POST /api/subscriptions. The body names the customer, the contract terms and the contract’s steps: each step has a key, a trigger (when it takes effect), a settlement and the operations of the change API (add_line, update_price, add_discount and the others). POST /api/subscriptions/preview takes the same body, answers what the steps would invoice and stores nothing.
Both routes need the permission
subscription:write and subscription changes switched on for the organisation. Without the permission they answer 403; with subscription changes switched off, 403 with the code SUBSCRIPTION_CHANGE__DISABLED.A contract with a discount from the first invoice
The example starts a contract on 01.12.2026 with one line at 100.00 EUR a month and 10 % on all products for good. A discount withoutitems in the step that starts the contract applies from that step’s day, so the first invoice already carries it.
POST /api/subscriptions, the same body answers 201, and the contract bills 90.00 EUR on 01.12.2026, 01.01.2027 and 01.02.2027.
A discount on all products reaches every line that bills by period. A one-time line keeps its price: a setup of 100.00 EUR next to the line in the example makes a first invoice of 190.00 EUR.
Later steps
A later step is dated ({"type": "at", "date": "2027-01-01"}), follows an earlier step of the body by an offset ({"type": "after", "step": "start", "offset": "P6M"}) or waits until it is executed by its key ({"type": "manual"}). It names a line of an earlier step by the key of its add_line, for example {"item": {"key": "flat"}}.
- A step dated on the contract start day takes effect after the step that starts the contract, so it can change that step’s lines: a second step on 01.12.2026 with 10 % on
flatbills 90.00 EUR on 01.12.2026 and in every month after. - A step that adds a line together with a discount on all products bills that line with the discount from the step’s day: a step on 01.01.2027 that adds a support line at 20.00 EUR a month and gives 10 % on all products bills 108.00 EUR for January (90.00 and 18.00).
After the create
The answer lists the steps asGET /api/subscriptions/{subscriptionId}/steps does, with revocable, editable and notEditableReason per step. A pending step is changed with PUT /api/subscriptions/{subscriptionId}/steps/{key} and taken back with DELETE /api/subscriptions/{subscriptionId}/steps/{key}. While the contract has not started (a step marked startsContract waits for its execution), PUT /api/subscriptions/{subscriptionId}/steps writes every step of the draft again in one request.
The body of that request restates every step of the draft, the unchanged ones too, and a later step is planned on the new version of the step it builds on; POST /api/subscriptions/{subscriptionId}/steps/preview shows each step as the PUT would plan it. Every step the body changes is still pending and is invoiced only when it takes effect, so a later step bills on the new version from its first invoice. Example: a draft whose go-live adds 10 licences at 100.00 EUR a year and whose step mehr raises them to 12 two months after the go-live is saved on 20.11.2026 with 11 licences in the go-live and mehr unchanged. The go-live on 01.12.2026 invoices 1,100.00 EUR, and mehr on 01.02.2027 bills the one licence more: 1 × 100.00 × 303/365 = 83.01 EUR, where the draft before the edit bills 2 × 100.00 × 303/365 = 166.03 EUR. The draft is saved as a whole: a refused body leaves every step as it was.
Once the contract runs, each pending step is changed with a request of its own to PUT /api/subscriptions/{subscriptionId}/steps/{key}, in the order the requests are sent. Each request stands alone, so a refusal leaves the steps changed before it changed. That route refuses the change of a step that a later pending step builds on (409, reason later_step), where the draft edit plans the later step on the new version.
The phases, the triggers and the draft edit are described in detail, in German, in Vertragsphasen über die API; changes of a running contract in Mengen ändern. Every field is in the API reference of POST /api/subscriptions.