Cancel Subscription

Cancel subscription.

 

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the subscription

 

Request Body Parameter
Attribute Type Required Description
canceled_at string Yes When the subscription canceled
reason number Yes The unique identifier of the reason

 

Example Request & Response


$ curl https://api.custerem.com/<org_id>/subscriptions/<id>/ \
-X PUT \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "canceled_at": "2022-04-09 09:20",
    "reason": 6
}'

 

204 No Content

{
    "canceled_at": "2022-04-09T09:20:00Z",
    "reason": 6
}

 

404 Not Found

{
    "status_code": 404,
    "message": "Subscription with id 3 not found"
}