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 ofinvoice,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.
- kindstringRequiredOne 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.jsonimport { 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