Additional subscription cancel examples
Cancellation of a subscription doesn't require parameters beyond the subscriptionId, nor are attributes included. The examples included below show possible error cases.
Cancelling a subscription that has already been cancelled
Below is an example of cancelling a subscription that has already been cancelled.
Response
- JSON
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 196
Content-Type: application/json;charset=UTF-8
Date: Tue, 18 Aug 2015 19:36:34 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=2906E30E4B81183984ABF99341C29C8B; Path=/; HttpOnly
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "SUBSCRIPTION_NOT_EDITABLE",
"message": "Cannot cancel a subscription in CANCELLED status or with pending null"
}
- XML
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 196
Content-Type: application/xml;charset=UTF-8
Date: Tue, 18 Aug 2015 19:36:34 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=2906E30E4B81183984ABF99341C29C8B; Path=/; HttpOnly
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
<error>
<code>SUBSCRIPTION_NOT_EDITABLE</code>
<message>Cannot cancel a subscription in CANCELLED status or with pending null</message>
</error>
</errors>
Cancelling a subscription that does not exist
Below is an example of cancelling a subscription that does not exist in the system or is not part of this channel.
Response
- JSON
Status Code: 404 Not Found
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 178
Content-Type: application/xml;charset=UTF-8
Date: Tue, 18 Aug 2015 19:42:38 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "Not Found",
"message": "Subscription not found with id 7845d75c-0fc0-4ec3-ac17-df95a746eff8."
}
- XML
Status Code: 404 Not Found
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 178
Content-Type: application/xml;charset=UTF-8
Date: Tue, 18 Aug 2015 19:42:38 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<code>Not Found</code>
<message>Subscription not found with id 7845d75c-0fc0-4ec3-ac17-df95a746eff8.</message>
</error>
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!