REST Examples: Amending a Subscription
Request to Switch a Subscription to Different Plan
{ "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
{ "_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
{ "status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "subscriptionInformation.code", "reason": "DUPLICATE" } ] }