Clozo for developers
An HTTP API with a published schema
Issue, deliver and reconcile invoices from your own system. The schema is published and browsable; keys, webhooks and usage are self-service in your workspace.
Open the API referenceThe reference is generated from the running service, so it cannot describe a previous version.
Quick start
curl https://api.useclozo.com/b2b/v1/documents \
-X POST \
-H "Authorization: Bearer clz_live_<keyid>_<secret>" \
-H "Idempotency-Key: order-4471-v1" \
-H "Content-Type: application/json" \
-d '{
"issuer_id": "3f6c1b8e-2d4a-4e7b-9a15-6c0d2e8f7a41",
"customer": {
"name": "Kestrel Logistics GmbH",
"country": "DE",
"vat_number": "DE123456789"
},
"currency": "EUR",
"line_items": [
{
"description": "Consulting, October",
"quantity": "1",
"unit_amount": 395000,
"tax_rate": 0,
"tax_category": "AE"
}
]
}'HTTP/1.1 201 Created
{
"object": "document",
"id": "doc_5Hq2m8Zr4Kd9",
"issuer_id": "3f6c1b8e-2d4a-4e7b-9a15-6c0d2e8f7a41",
"issuer_country": "NL",
"currency": "EUR",
"subtotal": 395000,
"tax_total": 0,
"total": 395000,
"reverse_charge": true,
"status_bucket": "created",
"status_detail": "draft",
"invoice_number": ""
}
// ...Create an API key in your workspace, then send it as a Bearer token. Requests that create or issue documents or record money take an Idempotency-Key, so a retry never creates a duplicate. issuer_id is the UUID of one of your legal entities.
One rule worth reading before you start
The organisation is resolved from the credential, never from a request parameter. A key issued for one organisation cannot address another — there is no organisation id to pass and no way to widen the scope by changing the request. Rate limits are reported back on every response through X-RateLimit headers, on success and on a 429 alike, so a client can pace itself instead of guessing.
What the API covers
Everything listed here is available today unless it is marked Early access.
Published schema and a browser for it
An OpenAPI schema and a Swagger UI, both served by the API itself. Generate your client from the schema rather than transcribing endpoints by hand.
Self-service API keys with scopes and rotation
Create, rotate and revoke keys in your workspace. Rotation issues the new key before the old one stops working, so a deploy does not have to be simultaneous.
Signed webhooks with a delivery log and replay
Register endpoints, send a sample event, read the delivery log, and replay a single event or the whole dead-letter queue. A missed delivery is recoverable without asking us.
Usage you can read yourself
What the organisation has consumed, including e-mail, is an endpoint rather than a support question.
Filtered exports
CSV and XLSX extracts of the same data you can list through the API, for the places a spreadsheet is still the answer.
E-invoice delivery over PeppolEarly access. Early access: sending and receiving over Peppol, KSeF and SdI is being switched on with early-access customers.
Delivery of a document to a recipient's Peppol participant, with the delivery state readable through the same API. See the countries page for where e-invoicing is available.