Reference
Contracts
GET/api/v1/contractsList contracts
Contracts in both directions -- sales contracts of orders and purchase contracts with suppliers -- with company, business unit, status, the running monthly amount, and the earliest end notice given today could reach. get_contract reads a sales contract by its order, get_purchase_contract a purchase contract.scope finance:read
Query
| direction | one of sales, purchase |
| status | stringE.g. active, ended, cancelled. Default: all. |
| query | stringWords in the title or company. |
Response 200
| contracts[] | object[] |
| contracts[].id | string |
| contracts[].title | string |
| contracts[].direction | one of sales, purchase |
| contracts[].directionLabel | one of Verkauf, Einkauf |
| contracts[].companyName | string |
| contracts[].businessUnit | string |
| contracts[].businessUnitId | string | null |
| contracts[].businessUnitSort | number |
| contracts[].status | string |
| contracts[].statusLabel | string |
| contracts[].monthlyCents | integer | null |
| contracts[].earliestEnd | string | null |
| contracts[].endNote | string | null |
| contracts[].href | string | null |
| contracts[].orderNumber | string | null |
| url | string |
Schema
{
"type": "object",
"properties": {
"contracts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [
"sales",
"purchase"
]
},
"directionLabel": {
"type": "string",
"enum": [
"Verkauf",
"Einkauf"
]
},
"companyName": {
"type": "string"
},
"businessUnit": {
"type": "string"
},
"businessUnitId": {
"type": [
"string",
"null"
]
},
"businessUnitSort": {
"type": "number"
},
"status": {
"type": "string"
},
"statusLabel": {
"type": "string"
},
"monthlyCents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"earliestEnd": {
"type": [
"string",
"null"
]
},
"endNote": {
"type": [
"string",
"null"
]
},
"href": {
"type": [
"string",
"null"
]
},
"orderNumber": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"title",
"direction",
"directionLabel",
"companyName",
"businessUnit",
"businessUnitId",
"businessUnitSort",
"status",
"statusLabel",
"monthlyCents",
"earliestEnd",
"endNote",
"href",
"orderNumber"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"contracts",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/contractsSave contract
Edits the terms of an order's sales contract -- title, business unit, cost center, payment term -- or, for an order that has none, creates it: then company is required, and an order from a quote gets the quote's lines, as acceptance would have given. finance.manage only.scope contracts
Body (JSON)
| orderrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
| titlerequired | string |
| business_unit | stringName or id of a business unit (list_business_units). Default: the contract's own, or for a new contract the order's. |
| cost_center | stringDATEV KOST1: up to 8 letters or digits. |
| payment_term_daysrequired | integer |
| company | stringOnly for a new contract: the customer's company id. |
Response 200
| order | string |
| delivery_from | string | null |
| delivery_to | string | null |
| contract | object | null |
| contract.id | string |
| contract.title | string |
| contract.status | string |
| contract.company | object |
| contract.company.id | string |
| contract.company.name | string |
| contract.business_unit | string | null |
| contract.cost_center | string | null |
| contract.payment_term_days | integer |
| contract.signed_on | string | null |
| contract.lines[] | object[] |
| contract.lines[].id | string |
| contract.lines[].position | integer |
| contract.lines[].label | string |
| contract.lines[].kind | string |
| contract.lines[].category | string |
| contract.lines[].vat_rate_pct | number |
| contract.lines[].amount_cents | integer | null |
| contract.lines[].planned_date | string | null |
| contract.lines[].completed_on | string | null |
| contract.lines[].interval | string | null |
| contract.lines[].timing | string | null |
| contract.lines[].start_date | string | null |
| contract.lines[].end_date | string | null |
| contract.lines[].minimum_term_months | integer | null |
| contract.lines[].renewal_months | integer | null |
| contract.lines[].notice_period | integer | null |
| contract.lines[].notice_unit | string | null |
| contract.lines[].notice_effective | string | null |
| contract.lines[].notice_given_on | string | null |
| contract.lines[].values | object |
| contract.lines[].invoiced | boolean |
| revenue_categories[] | object[] |
| revenue_categories[].key | string |
| revenue_categories[].name | string |
| url | string |
| created | boolean |
Schema
{
"type": "object",
"properties": {
"order": {
"type": "string"
},
"delivery_from": {
"type": [
"string",
"null"
]
},
"delivery_to": {
"type": [
"string",
"null"
]
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"business_unit": {
"type": [
"string",
"null"
]
},
"cost_center": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed_on": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"category": {
"type": "string"
},
"vat_rate_pct": {
"type": "number"
},
"amount_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"completed_on": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"timing": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"minimum_term_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"renewal_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_period": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_unit": {
"type": [
"string",
"null"
]
},
"notice_effective": {
"type": [
"string",
"null"
]
},
"notice_given_on": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"invoiced": {
"type": "boolean"
}
},
"required": [
"id",
"position",
"label",
"kind",
"category",
"vat_rate_pct",
"amount_cents",
"planned_date",
"completed_on",
"interval",
"timing",
"start_date",
"end_date",
"minimum_term_months",
"renewal_months",
"notice_period",
"notice_unit",
"notice_effective",
"notice_given_on",
"values",
"invoiced"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"title",
"status",
"company",
"business_unit",
"cost_center",
"payment_term_days",
"signed_on",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"revenue_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
},
"created": {
"type": "boolean"
}
},
"required": [
"order",
"delivery_from",
"delivery_to",
"contract",
"revenue_categories",
"url",
"created"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/contracts/{id}Get contract
An order's sales contract: its terms and every line -- instalments, recurring charges, time and material, forecasts, month values -- with amounts in cents, dates, term and notice, and whether an invoice bills it. Also the revenue categories a line can book to. finance.manage only.scope contracts
Path
| idrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
Response 200
| order | string |
| delivery_from | string | null |
| delivery_to | string | null |
| contract | object | null |
| contract.id | string |
| contract.title | string |
| contract.status | string |
| contract.company | object |
| contract.company.id | string |
| contract.company.name | string |
| contract.business_unit | string | null |
| contract.cost_center | string | null |
| contract.payment_term_days | integer |
| contract.signed_on | string | null |
| contract.lines[] | object[] |
| contract.lines[].id | string |
| contract.lines[].position | integer |
| contract.lines[].label | string |
| contract.lines[].kind | string |
| contract.lines[].category | string |
| contract.lines[].vat_rate_pct | number |
| contract.lines[].amount_cents | integer | null |
| contract.lines[].planned_date | string | null |
| contract.lines[].completed_on | string | null |
| contract.lines[].interval | string | null |
| contract.lines[].timing | string | null |
| contract.lines[].start_date | string | null |
| contract.lines[].end_date | string | null |
| contract.lines[].minimum_term_months | integer | null |
| contract.lines[].renewal_months | integer | null |
| contract.lines[].notice_period | integer | null |
| contract.lines[].notice_unit | string | null |
| contract.lines[].notice_effective | string | null |
| contract.lines[].notice_given_on | string | null |
| contract.lines[].values | object |
| contract.lines[].invoiced | boolean |
| revenue_categories[] | object[] |
| revenue_categories[].key | string |
| revenue_categories[].name | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"order": {
"type": "string"
},
"delivery_from": {
"type": [
"string",
"null"
]
},
"delivery_to": {
"type": [
"string",
"null"
]
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"business_unit": {
"type": [
"string",
"null"
]
},
"cost_center": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed_on": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"category": {
"type": "string"
},
"vat_rate_pct": {
"type": "number"
},
"amount_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"completed_on": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"timing": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"minimum_term_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"renewal_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_period": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_unit": {
"type": [
"string",
"null"
]
},
"notice_effective": {
"type": [
"string",
"null"
]
},
"notice_given_on": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"invoiced": {
"type": "boolean"
}
},
"required": [
"id",
"position",
"label",
"kind",
"category",
"vat_rate_pct",
"amount_cents",
"planned_date",
"completed_on",
"interval",
"timing",
"start_date",
"end_date",
"minimum_term_months",
"renewal_months",
"notice_period",
"notice_unit",
"notice_effective",
"notice_given_on",
"values",
"invoiced"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"title",
"status",
"company",
"business_unit",
"cost_center",
"payment_term_days",
"signed_on",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"revenue_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"order",
"delivery_from",
"delivery_to",
"contract",
"revenue_categories",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/contracts/{id}/linesAdd contract line
Adds a line to an order's sales contract: what it bills and when. label, kind and category are required, and each kind needs its own fields (see the field descriptions). finance.manage only. Nothing is invoiced by this.scope contracts
Path
| idrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
Body (JSON)
| label | string |
| kind | one of instalment, recurring, time_material, forecast, monthly_valuesinstalment (a part delivered once), recurring, time_material, forecast, or monthly_values (a year of month amounts). |
| category | stringA revenue category key, from get_contract. |
| vat_rate_pct | numberDefault for a new line: 19. |
| amount_cents | integerEvery kind but time_material and monthly_values. |
| planned_date | string | nullinstalment and forecast. |
| completed_on | string | nullinstalment: the day it was delivered. |
| interval | one of monthly, yearlyrecurring. |
| timing | one of advance, arrearsrecurring: in advance or in arrears. |
| start_date | string | nullrecurring and time_material. |
| end_date | string | null |
| minimum_term_months | integer | null |
| renewal_months | integer | null |
| notice_period | integer | null |
| notice_unit | one of weeks, months | null |
| notice_effective | one of month_end, term_end | null |
| notice_given_on | string | nullRecorded notice; without an end, the earliest end the term allows is set. |
| values_year | integermonthly_values: the year the values belong to. |
| values | objectmonthly_values: cents per month of values_year, e.g. {"2026-03": 120000}. A month left out is empty. |
Response 200
| order | string |
| delivery_from | string | null |
| delivery_to | string | null |
| contract | object | null |
| contract.id | string |
| contract.title | string |
| contract.status | string |
| contract.company | object |
| contract.company.id | string |
| contract.company.name | string |
| contract.business_unit | string | null |
| contract.cost_center | string | null |
| contract.payment_term_days | integer |
| contract.signed_on | string | null |
| contract.lines[] | object[] |
| contract.lines[].id | string |
| contract.lines[].position | integer |
| contract.lines[].label | string |
| contract.lines[].kind | string |
| contract.lines[].category | string |
| contract.lines[].vat_rate_pct | number |
| contract.lines[].amount_cents | integer | null |
| contract.lines[].planned_date | string | null |
| contract.lines[].completed_on | string | null |
| contract.lines[].interval | string | null |
| contract.lines[].timing | string | null |
| contract.lines[].start_date | string | null |
| contract.lines[].end_date | string | null |
| contract.lines[].minimum_term_months | integer | null |
| contract.lines[].renewal_months | integer | null |
| contract.lines[].notice_period | integer | null |
| contract.lines[].notice_unit | string | null |
| contract.lines[].notice_effective | string | null |
| contract.lines[].notice_given_on | string | null |
| contract.lines[].values | object |
| contract.lines[].invoiced | boolean |
| revenue_categories[] | object[] |
| revenue_categories[].key | string |
| revenue_categories[].name | string |
| url | string |
| line | string |
Schema
{
"type": "object",
"properties": {
"order": {
"type": "string"
},
"delivery_from": {
"type": [
"string",
"null"
]
},
"delivery_to": {
"type": [
"string",
"null"
]
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"business_unit": {
"type": [
"string",
"null"
]
},
"cost_center": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed_on": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"category": {
"type": "string"
},
"vat_rate_pct": {
"type": "number"
},
"amount_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"completed_on": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"timing": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"minimum_term_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"renewal_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_period": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_unit": {
"type": [
"string",
"null"
]
},
"notice_effective": {
"type": [
"string",
"null"
]
},
"notice_given_on": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"invoiced": {
"type": "boolean"
}
},
"required": [
"id",
"position",
"label",
"kind",
"category",
"vat_rate_pct",
"amount_cents",
"planned_date",
"completed_on",
"interval",
"timing",
"start_date",
"end_date",
"minimum_term_months",
"renewal_months",
"notice_period",
"notice_unit",
"notice_effective",
"notice_given_on",
"values",
"invoiced"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"title",
"status",
"company",
"business_unit",
"cost_center",
"payment_term_days",
"signed_on",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"revenue_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
},
"line": {
"type": "string"
}
},
"required": [
"order",
"delivery_from",
"delivery_to",
"contract",
"revenue_categories",
"url",
"line"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/contracts/{id}/lines/{line_id}Update contract line
Changes a line of an order's sales contract: only the fields given, the rest stays as the line holds it. For monthly_values, values_year with values replaces that year's months. finance.manage only.scope contracts
Path
| idrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
| line_idrequired | stringThe line's id, from get_contract. |
Body (JSON)
| label | string |
| kind | one of instalment, recurring, time_material, forecast, monthly_valuesinstalment (a part delivered once), recurring, time_material, forecast, or monthly_values (a year of month amounts). |
| category | stringA revenue category key, from get_contract. |
| vat_rate_pct | numberDefault for a new line: 19. |
| amount_cents | integerEvery kind but time_material and monthly_values. |
| planned_date | string | nullinstalment and forecast. |
| completed_on | string | nullinstalment: the day it was delivered. |
| interval | one of monthly, yearlyrecurring. |
| timing | one of advance, arrearsrecurring: in advance or in arrears. |
| start_date | string | nullrecurring and time_material. |
| end_date | string | null |
| minimum_term_months | integer | null |
| renewal_months | integer | null |
| notice_period | integer | null |
| notice_unit | one of weeks, months | null |
| notice_effective | one of month_end, term_end | null |
| notice_given_on | string | nullRecorded notice; without an end, the earliest end the term allows is set. |
| values_year | integermonthly_values: the year the values belong to. |
| values | objectmonthly_values: cents per month of values_year, e.g. {"2026-03": 120000}. A month left out is empty. |
Response 200
| order | string |
| delivery_from | string | null |
| delivery_to | string | null |
| contract | object | null |
| contract.id | string |
| contract.title | string |
| contract.status | string |
| contract.company | object |
| contract.company.id | string |
| contract.company.name | string |
| contract.business_unit | string | null |
| contract.cost_center | string | null |
| contract.payment_term_days | integer |
| contract.signed_on | string | null |
| contract.lines[] | object[] |
| contract.lines[].id | string |
| contract.lines[].position | integer |
| contract.lines[].label | string |
| contract.lines[].kind | string |
| contract.lines[].category | string |
| contract.lines[].vat_rate_pct | number |
| contract.lines[].amount_cents | integer | null |
| contract.lines[].planned_date | string | null |
| contract.lines[].completed_on | string | null |
| contract.lines[].interval | string | null |
| contract.lines[].timing | string | null |
| contract.lines[].start_date | string | null |
| contract.lines[].end_date | string | null |
| contract.lines[].minimum_term_months | integer | null |
| contract.lines[].renewal_months | integer | null |
| contract.lines[].notice_period | integer | null |
| contract.lines[].notice_unit | string | null |
| contract.lines[].notice_effective | string | null |
| contract.lines[].notice_given_on | string | null |
| contract.lines[].values | object |
| contract.lines[].invoiced | boolean |
| revenue_categories[] | object[] |
| revenue_categories[].key | string |
| revenue_categories[].name | string |
| url | string |
| line | string |
Schema
{
"type": "object",
"properties": {
"order": {
"type": "string"
},
"delivery_from": {
"type": [
"string",
"null"
]
},
"delivery_to": {
"type": [
"string",
"null"
]
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"business_unit": {
"type": [
"string",
"null"
]
},
"cost_center": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed_on": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"category": {
"type": "string"
},
"vat_rate_pct": {
"type": "number"
},
"amount_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"completed_on": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"timing": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"minimum_term_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"renewal_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_period": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_unit": {
"type": [
"string",
"null"
]
},
"notice_effective": {
"type": [
"string",
"null"
]
},
"notice_given_on": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"invoiced": {
"type": "boolean"
}
},
"required": [
"id",
"position",
"label",
"kind",
"category",
"vat_rate_pct",
"amount_cents",
"planned_date",
"completed_on",
"interval",
"timing",
"start_date",
"end_date",
"minimum_term_months",
"renewal_months",
"notice_period",
"notice_unit",
"notice_effective",
"notice_given_on",
"values",
"invoiced"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"title",
"status",
"company",
"business_unit",
"cost_center",
"payment_term_days",
"signed_on",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"revenue_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
},
"line": {
"type": "string"
}
},
"required": [
"order",
"delivery_from",
"delivery_to",
"contract",
"revenue_categories",
"url",
"line"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
DELETE/api/v1/contracts/{id}/lines/{line_id}Delete contract line
Deletes a line typed by mistake. A line an invoice bills, or one a bank transaction is allocated to, stays. finance.manage only.scope contracts
Path
| idrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
| line_idrequired | stringThe line's id, from get_contract. |
Response 200
| deleted | string |
Schema
{
"type": "object",
"properties": {
"deleted": {
"type": "string"
}
},
"required": [
"deleted"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/contracts/{id}/lines/{line_id}/reseedReseed contract line
Spreads a monthly_values line evenly over the order's delivery period again, replacing every month it had. It redistributes the line's current total; it does not bring back an estimate that months were edited away from. finance.manage only.scope contracts
Path
| idrequired | stringThe order's id or number, e.g. "AB-2026-0007". |
| line_idrequired | stringThe line's id, from get_contract. |
Response 200
| order | string |
| delivery_from | string | null |
| delivery_to | string | null |
| contract | object | null |
| contract.id | string |
| contract.title | string |
| contract.status | string |
| contract.company | object |
| contract.company.id | string |
| contract.company.name | string |
| contract.business_unit | string | null |
| contract.cost_center | string | null |
| contract.payment_term_days | integer |
| contract.signed_on | string | null |
| contract.lines[] | object[] |
| contract.lines[].id | string |
| contract.lines[].position | integer |
| contract.lines[].label | string |
| contract.lines[].kind | string |
| contract.lines[].category | string |
| contract.lines[].vat_rate_pct | number |
| contract.lines[].amount_cents | integer | null |
| contract.lines[].planned_date | string | null |
| contract.lines[].completed_on | string | null |
| contract.lines[].interval | string | null |
| contract.lines[].timing | string | null |
| contract.lines[].start_date | string | null |
| contract.lines[].end_date | string | null |
| contract.lines[].minimum_term_months | integer | null |
| contract.lines[].renewal_months | integer | null |
| contract.lines[].notice_period | integer | null |
| contract.lines[].notice_unit | string | null |
| contract.lines[].notice_effective | string | null |
| contract.lines[].notice_given_on | string | null |
| contract.lines[].values | object |
| contract.lines[].invoiced | boolean |
| revenue_categories[] | object[] |
| revenue_categories[].key | string |
| revenue_categories[].name | string |
| url | string |
| total_cents | integer |
Schema
{
"type": "object",
"properties": {
"order": {
"type": "string"
},
"delivery_from": {
"type": [
"string",
"null"
]
},
"delivery_to": {
"type": [
"string",
"null"
]
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"business_unit": {
"type": [
"string",
"null"
]
},
"cost_center": {
"type": [
"string",
"null"
]
},
"payment_term_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"signed_on": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"label": {
"type": "string"
},
"kind": {
"type": "string"
},
"category": {
"type": "string"
},
"vat_rate_pct": {
"type": "number"
},
"amount_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"planned_date": {
"type": [
"string",
"null"
]
},
"completed_on": {
"type": [
"string",
"null"
]
},
"interval": {
"type": [
"string",
"null"
]
},
"timing": {
"type": [
"string",
"null"
]
},
"start_date": {
"type": [
"string",
"null"
]
},
"end_date": {
"type": [
"string",
"null"
]
},
"minimum_term_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"renewal_months": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_period": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"notice_unit": {
"type": [
"string",
"null"
]
},
"notice_effective": {
"type": [
"string",
"null"
]
},
"notice_given_on": {
"type": [
"string",
"null"
]
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"invoiced": {
"type": "boolean"
}
},
"required": [
"id",
"position",
"label",
"kind",
"category",
"vat_rate_pct",
"amount_cents",
"planned_date",
"completed_on",
"interval",
"timing",
"start_date",
"end_date",
"minimum_term_months",
"renewal_months",
"notice_period",
"notice_unit",
"notice_effective",
"notice_given_on",
"values",
"invoiced"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"title",
"status",
"company",
"business_unit",
"cost_center",
"payment_term_days",
"signed_on",
"lines"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"revenue_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key",
"name"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
},
"total_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"order",
"delivery_from",
"delivery_to",
"contract",
"revenue_categories",
"url",
"total_cents"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.