Update subscription
https://app.iteras.dk/api/customers/updatesubscription/
The /api/customers/updatesubscription/ endpoint updates the data on a subscription.
Parameters
-
id string requiredID of the customer the subscription belongs to.
-
subscription_id string requiredID of the subscription to update.
-
data objectAny fields to set on the subscription. The valid fields are the ones associated with the products that the subscription is subscribed to. Fields not mentioned in
dataare not touched; to delete a field, passnull. -
created stringOverride the time the subscription was created, e.g.
2026-09-09T01:35:09. Mainly useful when correcting imported subscriptions. -
reinvoice booleanSet to
trueif the update changes the pricing of the subscription to make the change take effect immediately. The system then credits the future part of the subscription (if it has been invoiced already) and sets it up to be invoiced. -
policy objectAn object containing an
idorexternal_idof the business policy to attach to the subscription. To remove an attached policy, sendpolicyasnull.
You can set any custom subscription field, using its field id (the field name with a colon prepended, or its external identifier).
Log in, or send your API key as a bearer token, to see the custom subscription fields set up for your account.
Examples
POST /api/customers/updatesubscription/ HTTP/1.1
Content-Type: application/json{
"id": "12345",
"subscription_id": "32142532",
"data": {
":Custom subscription field": "Eksempeltekst",
":Obsolete field": null
},
"policy": {
"external_id": "no_pause"
}
}The endpoint returns the ID of the updated 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. The response is a JSON object with the errors keyed by the field they concern, e.g. an unknown policy:
{
"external_id": ["Policy not found"]
}
Errors that are not specific to a field are returned with the empty string as key. This covers an unknown subscription or a subscription that belongs to a different customer, and invalid custom subscription fields:
{
"": ["Subscription does not exist."]
}