Appearance
POST
/customer-relationships/subscription-v2/subscriptions/{subscriptionId}/_cancelRequired scope:
subscription:deactivateEnds a tailored subscription now, or after its next delivery.
Parameters ​
Path parameters
subscriptionId integerThe unique identifier of the subscription to cancel.
Request body ​
JSON
{
"cancellationReasonId": 4,
"arrivalMethodId": 2,
"endAfterNextDelivery": true,
"ignoreMinimumDeliveries": false,
"note": "Customer asked by e-mail to stop after the next delivery."
}
Response ​
The subscription was cancelled. Read it again for its new state.
| Error code | Description |
|---|---|
arrival-method-missing | arrivalMethodId is required. |
arrival-method-not-found | The arrival method does not exist or is not an active cancellation arrival method. |
cancellation-already-queued | The subscription is already set to end after its next delivery. |
cancellation-reason-missing | cancellationReasonId is required. |
cancellation-reason-not-found | The cancellation reason does not exist or is not an active reason for subscriptions. |
end-after-next-delivery-missing | endAfterNextDelivery is required. |
minimum-deliveries-not-reached | The subscription has not reached its minimum number of deliveries; set ignoreMinimumDeliveries to end it anyway. |
no-next-delivery | The subscription has no next delivery planned to end after. |
shipment-in-progress | A delivery is on its way, so the subscription can only end after it. |
subscription-already-cancelled | The subscription has already ended. |
subscription-not-found | The subscription does not exist. |
subscription-procedure-failed | A database procedure behind the change failed. |
subscription-type-not-supported | Only tailored subscriptions can be changed. |