Restart subscription
https://app.iteras.dk/api/customers/restartsubscription/
The /api/customers/restartsubscription/ endpoint restarts a stopped subscription. The subscription must either be stopped already or marked for a future stop.
A restart computes how much of the interrupted period went unused and, when that is a meaningful fraction, starts the new period with that remaining length instead of a full period. The first period is invoiced for the same fraction, so the customer is not charged twice for time already paid for. When the unused remainder is negligible, the restart creates a full period instead.
Parameters
-
id string requiredID of the customer the subscription belongs to.
-
subscription_id string requiredID of the subscription to restart.
Examples
POST /api/customers/restartsubscription/ HTTP/1.1
Content-Type: application/json{
"id": "12345",
"subscription_id": "32142532"
}The endpoint returns the ID of the restarted subscription:
{ "subscription_id": "32142532" }
Errors
Invalid requests due to programming error, e.g. invalid JSON, returns 400.
A well-formed operation where a supplied value is invalid is not executed and returns an HTTP 422 error. Errors that are not specific to a field are returned with the empty string as key, e.g. an unknown subscription or a subscription that can't be restarted:
{
"": ["The subscription can't be restarted."]
}