Zum Inhalt

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

directionone of sales, purchase
statusstringE.g. active, ended, cancelled. Default: all.
querystringWords in the title or company.

Response 200

contracts[]object[]
contracts[].idstring
contracts[].titlestring
contracts[].directionone of sales, purchase
contracts[].directionLabelone of Verkauf, Einkauf
contracts[].companyNamestring
contracts[].businessUnitstring
contracts[].businessUnitIdstring | null
contracts[].businessUnitSortnumber
contracts[].statusstring
contracts[].statusLabelstring
contracts[].monthlyCentsinteger | null
contracts[].earliestEndstring | null
contracts[].endNotestring | null
contracts[].hrefstring | null
contracts[].orderNumberstring | null
urlstring
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)

orderrequiredstringThe order's id or number, e.g. "AB-2026-0007".
titlerequiredstring
business_unitstringName or id of a business unit (list_business_units). Default: the contract's own, or for a new contract the order's.
cost_centerstringDATEV KOST1: up to 8 letters or digits.
payment_term_daysrequiredinteger
companystringOnly for a new contract: the customer's company id.

Response 200

orderstring
delivery_fromstring | null
delivery_tostring | null
contractobject | null
contract.idstring
contract.titlestring
contract.statusstring
contract.companyobject
contract.company.idstring
contract.company.namestring
contract.business_unitstring | null
contract.cost_centerstring | null
contract.payment_term_daysinteger
contract.signed_onstring | null
contract.lines[]object[]
contract.lines[].idstring
contract.lines[].positioninteger
contract.lines[].labelstring
contract.lines[].kindstring
contract.lines[].categorystring
contract.lines[].vat_rate_pctnumber
contract.lines[].amount_centsinteger | null
contract.lines[].planned_datestring | null
contract.lines[].completed_onstring | null
contract.lines[].intervalstring | null
contract.lines[].timingstring | null
contract.lines[].start_datestring | null
contract.lines[].end_datestring | null
contract.lines[].minimum_term_monthsinteger | null
contract.lines[].renewal_monthsinteger | null
contract.lines[].notice_periodinteger | null
contract.lines[].notice_unitstring | null
contract.lines[].notice_effectivestring | null
contract.lines[].notice_given_onstring | null
contract.lines[].valuesobject
contract.lines[].invoicedboolean
revenue_categories[]object[]
revenue_categories[].keystring
revenue_categories[].namestring
urlstring
createdboolean
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

idrequiredstringThe order's id or number, e.g. "AB-2026-0007".

Response 200

orderstring
delivery_fromstring | null
delivery_tostring | null
contractobject | null
contract.idstring
contract.titlestring
contract.statusstring
contract.companyobject
contract.company.idstring
contract.company.namestring
contract.business_unitstring | null
contract.cost_centerstring | null
contract.payment_term_daysinteger
contract.signed_onstring | null
contract.lines[]object[]
contract.lines[].idstring
contract.lines[].positioninteger
contract.lines[].labelstring
contract.lines[].kindstring
contract.lines[].categorystring
contract.lines[].vat_rate_pctnumber
contract.lines[].amount_centsinteger | null
contract.lines[].planned_datestring | null
contract.lines[].completed_onstring | null
contract.lines[].intervalstring | null
contract.lines[].timingstring | null
contract.lines[].start_datestring | null
contract.lines[].end_datestring | null
contract.lines[].minimum_term_monthsinteger | null
contract.lines[].renewal_monthsinteger | null
contract.lines[].notice_periodinteger | null
contract.lines[].notice_unitstring | null
contract.lines[].notice_effectivestring | null
contract.lines[].notice_given_onstring | null
contract.lines[].valuesobject
contract.lines[].invoicedboolean
revenue_categories[]object[]
revenue_categories[].keystring
revenue_categories[].namestring
urlstring
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

idrequiredstringThe order's id or number, e.g. "AB-2026-0007".

Body (JSON)

labelstring
kindone of instalment, recurring, time_material, forecast, monthly_valuesinstalment (a part delivered once), recurring, time_material, forecast, or monthly_values (a year of month amounts).
categorystringA revenue category key, from get_contract.
vat_rate_pctnumberDefault for a new line: 19.
amount_centsintegerEvery kind but time_material and monthly_values.
planned_datestring | nullinstalment and forecast.
completed_onstring | nullinstalment: the day it was delivered.
intervalone of monthly, yearlyrecurring.
timingone of advance, arrearsrecurring: in advance or in arrears.
start_datestring | nullrecurring and time_material.
end_datestring | null
minimum_term_monthsinteger | null
renewal_monthsinteger | null
notice_periodinteger | null
notice_unitone of weeks, months | null
notice_effectiveone of month_end, term_end | null
notice_given_onstring | nullRecorded notice; without an end, the earliest end the term allows is set.
values_yearintegermonthly_values: the year the values belong to.
valuesobjectmonthly_values: cents per month of values_year, e.g. {"2026-03": 120000}. A month left out is empty.

Response 200

orderstring
delivery_fromstring | null
delivery_tostring | null
contractobject | null
contract.idstring
contract.titlestring
contract.statusstring
contract.companyobject
contract.company.idstring
contract.company.namestring
contract.business_unitstring | null
contract.cost_centerstring | null
contract.payment_term_daysinteger
contract.signed_onstring | null
contract.lines[]object[]
contract.lines[].idstring
contract.lines[].positioninteger
contract.lines[].labelstring
contract.lines[].kindstring
contract.lines[].categorystring
contract.lines[].vat_rate_pctnumber
contract.lines[].amount_centsinteger | null
contract.lines[].planned_datestring | null
contract.lines[].completed_onstring | null
contract.lines[].intervalstring | null
contract.lines[].timingstring | null
contract.lines[].start_datestring | null
contract.lines[].end_datestring | null
contract.lines[].minimum_term_monthsinteger | null
contract.lines[].renewal_monthsinteger | null
contract.lines[].notice_periodinteger | null
contract.lines[].notice_unitstring | null
contract.lines[].notice_effectivestring | null
contract.lines[].notice_given_onstring | null
contract.lines[].valuesobject
contract.lines[].invoicedboolean
revenue_categories[]object[]
revenue_categories[].keystring
revenue_categories[].namestring
urlstring
linestring
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

idrequiredstringThe order's id or number, e.g. "AB-2026-0007".
line_idrequiredstringThe line's id, from get_contract.

Body (JSON)

labelstring
kindone of instalment, recurring, time_material, forecast, monthly_valuesinstalment (a part delivered once), recurring, time_material, forecast, or monthly_values (a year of month amounts).
categorystringA revenue category key, from get_contract.
vat_rate_pctnumberDefault for a new line: 19.
amount_centsintegerEvery kind but time_material and monthly_values.
planned_datestring | nullinstalment and forecast.
completed_onstring | nullinstalment: the day it was delivered.
intervalone of monthly, yearlyrecurring.
timingone of advance, arrearsrecurring: in advance or in arrears.
start_datestring | nullrecurring and time_material.
end_datestring | null
minimum_term_monthsinteger | null
renewal_monthsinteger | null
notice_periodinteger | null
notice_unitone of weeks, months | null
notice_effectiveone of month_end, term_end | null
notice_given_onstring | nullRecorded notice; without an end, the earliest end the term allows is set.
values_yearintegermonthly_values: the year the values belong to.
valuesobjectmonthly_values: cents per month of values_year, e.g. {"2026-03": 120000}. A month left out is empty.

Response 200

orderstring
delivery_fromstring | null
delivery_tostring | null
contractobject | null
contract.idstring
contract.titlestring
contract.statusstring
contract.companyobject
contract.company.idstring
contract.company.namestring
contract.business_unitstring | null
contract.cost_centerstring | null
contract.payment_term_daysinteger
contract.signed_onstring | null
contract.lines[]object[]
contract.lines[].idstring
contract.lines[].positioninteger
contract.lines[].labelstring
contract.lines[].kindstring
contract.lines[].categorystring
contract.lines[].vat_rate_pctnumber
contract.lines[].amount_centsinteger | null
contract.lines[].planned_datestring | null
contract.lines[].completed_onstring | null
contract.lines[].intervalstring | null
contract.lines[].timingstring | null
contract.lines[].start_datestring | null
contract.lines[].end_datestring | null
contract.lines[].minimum_term_monthsinteger | null
contract.lines[].renewal_monthsinteger | null
contract.lines[].notice_periodinteger | null
contract.lines[].notice_unitstring | null
contract.lines[].notice_effectivestring | null
contract.lines[].notice_given_onstring | null
contract.lines[].valuesobject
contract.lines[].invoicedboolean
revenue_categories[]object[]
revenue_categories[].keystring
revenue_categories[].namestring
urlstring
linestring
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

idrequiredstringThe order's id or number, e.g. "AB-2026-0007".
line_idrequiredstringThe line's id, from get_contract.

Response 200

deletedstring
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

idrequiredstringThe order's id or number, e.g. "AB-2026-0007".
line_idrequiredstringThe line's id, from get_contract.

Response 200

orderstring
delivery_fromstring | null
delivery_tostring | null
contractobject | null
contract.idstring
contract.titlestring
contract.statusstring
contract.companyobject
contract.company.idstring
contract.company.namestring
contract.business_unitstring | null
contract.cost_centerstring | null
contract.payment_term_daysinteger
contract.signed_onstring | null
contract.lines[]object[]
contract.lines[].idstring
contract.lines[].positioninteger
contract.lines[].labelstring
contract.lines[].kindstring
contract.lines[].categorystring
contract.lines[].vat_rate_pctnumber
contract.lines[].amount_centsinteger | null
contract.lines[].planned_datestring | null
contract.lines[].completed_onstring | null
contract.lines[].intervalstring | null
contract.lines[].timingstring | null
contract.lines[].start_datestring | null
contract.lines[].end_datestring | null
contract.lines[].minimum_term_monthsinteger | null
contract.lines[].renewal_monthsinteger | null
contract.lines[].notice_periodinteger | null
contract.lines[].notice_unitstring | null
contract.lines[].notice_effectivestring | null
contract.lines[].notice_given_onstring | null
contract.lines[].valuesobject
contract.lines[].invoicedboolean
revenue_categories[]object[]
revenue_categories[].keystring
revenue_categories[].namestring
urlstring
total_centsinteger
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.