Skip to content

API reference

Change a number series

Invoicing API

PUT/v1/number-series/{kind}

Sets the pattern of one series, and the next counter when given. A pattern holds letters, digits, spaces and . _ / # -, the placeholders {YYYY} or {YY}, and exactly one counter such as {0000}, whose zeros set the width. A pattern with a year starts again at 1 in a new year. Only a signed-in person may call this. An API key is refused with 401 session_required.

Path parameters

  • kindstringRequired

    The series.

    One of invoice, credit-note, correction, quote, proforma.

Request body

application/json, required

  • patternstringRequired
  • nextCounterinteger

    The counter the next allocation tries first.

Response

A 200 answer carries these fields.

  • kindstringRequired
    One of invoice, credit-note, correction, quote, proforma.
  • patternstringRequired
  • nextCounterintegerRequired

    The counter of the next free number.

  • nextNumberstringRequired

    The next free number. It is not taken until an allocation takes it.

  • updatedAtstring (date-time) or nullRequired

    Null while the series was never saved.

Status codes

Status Meaning
200 The series as it is now.
400
401
404
501
PUT/v1/number-series/{kind}
Example
curl -X PUT https://api.certinvo.com/v1/number-series/$NUMBER_SERIE_KIND \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const numberSerieKind = 'value'

const response = await fetch(`https://api.certinvo.com/v1/number-series/${numberSerieKind}`, {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: await readFile('body.json'),
})
console.log(response.status, await response.json())
import os

import requests

number_serie_kind = "value"

response = requests.put(
    f"https://api.certinvo.com/v1/number-series/{number_serie_kind}",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
200
application/json
{
  "kind": "invoice",
  "pattern": "RE-{YYYY}-{0000}",
  "nextCounter": 0,
  "nextNumber": "RE-2026-0001",
  "updatedAt": "2026-09-17T09:30:00Z"
}
Success response
PUT
/v1/number-series/{kind}
Change a number series
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables1
›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/number-series/{kind}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "pattern": "RE-{YYYY}-{0000}",
  "nextCounter": 0
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close