Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Create a numbering series

Scope: sales:invoicing-settings.write https://api.alladdin.com/api/v2/numbering-series/{type}

Creates a new numbering series for a document type. Numbering series control the format and sequence of document numbers (e.g. INV-2024-001).
You can use placeholders like %[YYYY]% for the year or %[MM]% for the month in the format string. Each series tracks its own counter independently.

Parameters

Path parameters

type string required

Document type for the numbering series

"invoice" "salesreceipt" "creditnote" "estimate" "proform" "waybill" "salesorder" "purchase" "purchaserefund" "order" "purchaseshipment" "receiptnote" "productionorder"

Request body

object name string required

Name shown for this series in the invoicing settings.

format string required

Pattern the document number is built from. Each % is one digit of the counter, so the group length fixes the padding. [YYYY] and [YY] expand to the year. Changing it never renumbers documents already issued.

last integer optional

Last number already used in this series. The next document takes last + 1, so a series whose last invoice was INV-2026-1234 carries last: 1234, not 1235.

refund_numbering_series_id string | null optional

Id of the credit note series used for refunds of documents in this series. Null when no refund series is linked.

verifactu_excluded boolean optional

Whether documents in this series stay outside VeriFactu reporting.

Request

python
import requests

url = "https://api.alladdin.com/api/v2/numbering-series/{type}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "name": "Factura principal",
    "format": "INV-%[YYYY]-%",
    "last": 0,
    "refund_numbering_series_id": "string",
    "verifactu_excluded": false
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201 Numbering series created application/json object id string

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json

Next →Update a numbering series →