The Sage Cloud Demat Invoicing API lets you create documents programmatically in your own Sage Cloud Demat Invoicing environment. Once created, you can send those documents by email, Peppol or post, exactly like documents you create manually.
The API is meant for server-to-server integrations, for example:
The API is write-only: you use it to create documents. There are three endpoints:
| What | Endpoint | Documentation |
|---|---|---|
| Create sales invoices | POST /api/v1/webhooks/create-invoice |
Create invoices |
| Create an issued purchase borderelle (self-billing) | POST /api/v1/webhooks/create-purchase-borderelle |
Self-billing / purchase borderelle |
| Create a credit note on a purchase borderelle | POST /api/v1/webhooks/create-purchase-borderelle-creditnote |
Self-billing / purchase borderelle |
To set expectations clearly:
reference field or the returned IDs).ℹ️ Sending via Peppol or email is not part of this API; it happens afterwards in the app or your usual sending flow.
You generate your API token yourself on the My APIs page in your company settings (see Authentication). Don’t see that page? Contact support (help@clouddematinvoicing.be).
Every API request needs two headers: your personal API token and the company you are working for.
https://www.clouddematinvoicing.be/company/connection/myapi)A few important properties:
X-Company-Id header.Your X-Company-Id determines in which company the document is created. You can find it:
https://www.clouddematinvoicing.be/company/12345/... → Company ID = 12345).https://www.clouddematinvoicing.be/api/v1
| Header | Required | Example |
|---|---|---|
Authorization |
Yes | Bearer <your-api-token> |
X-Company-Id |
Yes | 12345 |
Content-Type |
Yes | application/json |
Accept |
Recommended | application/json |
Mind the space between Bearer and the token.
Treat only HTTP 201 as success. Any other status code means the document was not created; queue the request and retry later (with exponential back-off on 429 and 5xx).
| Status | Meaning | Response body |
|---|---|---|
201 Created |
Document(s) created | { "invoices": [1234] } (depending on the endpoint) |
400 Bad Request |
Headers missing | { "error": "Required headers are missing." } |
400 Bad Request |
Wrong Authorization format |
{ "error": "Authorization header format is invalid." } |
400 Bad Request |
Validation error in the payload | { "error": "invalid_body", "errors": { "0.client.email": ["..."] } } |
401 Unauthorized |
Invalid API token | { "error": "Invalid API token." } |
403 Forbidden |
Your user has no access to this company | { "error": "Access to this company is forbidden." } |
404 Not Found |
Unknown Company ID | { "error": "Invalid company ID." } |
429 Too Many Requests |
Rate limit or monthly limit reached | { "error": "Monthly API document limit reached." } |
500 |
Unexpected server error | Contact help@clouddematinvoicing.be |
For validation errors (400 invalid_body), the key points to the array position and the field, e.g. 0.client.email = first document, field client.email.
429.An older endpoint, POST /webhooks/create-invoice (without /api/v1), still exists for existing integrations. It uses the same token but returns a bare list ([10232, 10233]) and different error codes (406, 401). This endpoint is deprecated; for new integrations always use POST /api/v1/webhooks/create-invoice.
Questions? Contact help@clouddematinvoicing.be.