Finance

Get the next available order number for the authenticated company.

Returns the next available business order number for the company resolved from the bearer JWT. Use the returned <code>nextOrderNumber</code> as the <code>orderNumber</code> field when subsequently creating an order. <strong>Not idempotent</strong>: each call reserves and advances the in-memory counter — call this immediately before creating the order and do not call speculatively. Gaps may appear in the sequence if the subsequent order creation fails. The caller must hold the <code>FINANCE</code> permission on the target company.

get/core/v1/orders/next-order-number

Request

  • Base URL: https://api.klara.ch
  • URL: https://api.klara.ch/core/v1/orders/next-order-number
  • Auth: one of:
    • API key in header X-API-KEY
    • HTTP bearer

Response

Next available order number for the authenticated company.

nextOrderNumberinteger

The next available business order number for the authenticated company. Reserved exclusively for this call — use it as the orderNumber when subsequently creating the order. Gaps may appear in the sequence if the order creation fails after this call.

Example response

{
  "nextOrderNumber": 10041
}

Changes

No recorded changes to this operation across all 1 revision of this API.