Numberings

List document numberings

Changed on

List the document numbering configuration of the company.

Numbering is configured per document type, and a document type that has never been configured is absent from this list. Use this endpoint to check before calling the endpoints below:

  • invoice gates PUT /api/external/v2/customer_invoices/{id}/finalize. Finalizing fails when it is missing.
  • quote gates POST /api/external/v2/quotes. Creation succeeds without it, and the quote then has no number.
  • proforma, shipping_order and purchasing_order gate POST /api/external/v2/commercial_documents. Creation fails when the matching numbering is missing.

Numbering can only be configured from the Pennylane application.

ℹ️ This endpoint requires one of the following scopes: customer_invoices:all, customer_invoices:readonly, quotes:all, quotes:readonly, commercial_documents:all, commercial_documents:readonly

get/api/external/v2/numberings

Request

  • Base URL
    https://app.pennylane.com
  • URL
    https://app.pennylane.com/api/external/v2/numberings
  • Auth
    OAuth 2
    Authorization code: https://app.pennylane.com/oauth/authorize
    Token URL: https://app.pennylane.com/oauth/oauth/token scopes: customer_invoices:all, customer_invoices:readonly, quotes:all, quotes:readonly, commercial_documents:all, commercial_documents:readonly

Query parameters

cursorstring
Example:dXBkYXRlZF9hdDoxNjc0MTIzNDU2

Cursor for pagination. Use this to fetch the next set of results. The cursor is an opaque string returned in the previous response's metadata. Leave empty for the first request.

limitinteger
Example:20

Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 100.

sortstring

You can choose to sort items on specific attributes Sort field may be prefixed with - for descending order. Example : id will sort by ascending order, -id will sort by descending order. Available fields : id

Headers

X-Company-Idstring
Example:12345

Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.

Response

Returns the document numbering configuration of the company

has_moreboolean required

Indicates whether additional results are available beyond this set. Use this flag to determine if another request is needed.

next_cursorstring nullable required

Cursor to retrieve the next set of results. Include this value in the cursor parameter of your next request to fetch subsequent items. A null next_cursor in the response indicates no further results.

Example response

{
  "next_cursor": "dXBkYXRlZF9hdDoxNjc0MTIzNDU2",
  "items": [
    {
      "id": 1234,
      "number_prefix": "F-%Y-%m-",
      "next_number": 42
    }
  ]
}

Changes