Migration of the endpoint PATCH /v0/subscriptions/{subscription_id} to PATCH /v1/subscriptions/{subscription_id}

  • Outdated
  • September 1, 2025
  • 1 related route

Context

Upgrade from PATCH - /v0/subscriptions/{subscription_id} to PATCH - /v1/subscriptions/{subscription_id}

Key benefit :

  • Complete revamp of the endpoint to make it easier to use

Impacts

Route to call :

  • PATCH - /v1/subscriptions/{subscription_id}

Input became

In order to make it easier to use, we changed this endpoint to now only allow two operations : subscribe & unsubscribe.

unsubscribe Input example :

{
  "operation": "unsubscribe"
}

There is only one possible input to unsubscribe


subscribe Input example :

{
  "operation": "subscribe",
  "parameters": {
    "newsletter_subscriptions": [
      "CLUBMED"
    ],
    "origin_code": "CUSTOMER_ACCOUNT"
  }
}

parameters.newsletter_subscriptions is mandatory and must contain at least 1 item. parameters.origin_code is optional

You can subscribe only if you previously unsubscribed for this subscription_id. For new subscription you may use the endpoint POST /v1/subscriptions