REST Example: Switching a Subscription to a Different Plan
Request
12345678910{"subscriptionInformation": { "planId": 7379850138646475304951, "name": "Update Sub Name - Switch Plan 6192115800926177701960", "code":"1619215852Code" }, "orderInformation": { "amountDetails": { "billingAmount": "13.23" } }}
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 to a Failed Request
123456789{"status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "One or more fields in the request contains invalid data.", "details": [ { "field": "subscriptionInformation.code", "reason": "DUPLICATE" } ]}