REST Examples: Amending a Subscription

Light Dark
Request to Switch a Subscription to Different Plan
123456789101112131415
{"note": "Switch Plan Note", "reason": "Switch Plan Reason", "subscriptionInformation": { "name": "Update Sub Name - Switch Plan 6192115800926177701960", "code":"1619215852Code", "startDate":"2023-04-15T17:01:42Z" }, "orderInformation": { "amountDetails": { "billingAmount": "13.23", "currency": "USD", "setupFee": "8.43" } }, "reasonCode": "Switch Plan Reason Code"}
Response to a Successful Request
1234567891011121314151617181920
{"_links": { "self": { "href": "/rbs/v1/subscriptions/1619215852", "method": "GET" }, "update": { "href": "/rbs/v1/subscriptions/1619215852", "method": "PATCH" }, "cancel": { "href": "/rbs/v1/subscriptions/1619215852/cancel", "method": "POST" } }, "id": "1619215852", "status": "COMPLETED", "subscriptionInformation": { "code": "1619215852Code", "status": "PENDING" }}
Error Response
123456789
{"status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "subscriptionInformation.code", "reason": "DUPLICATE" } ]}