400, so typos
fail loudly. Every answer carries an X-Request-Id.
Errors
code. field, next_action and payment_url appear when they
apply.
Plan and set-up
- Reads work on any plan. Writes need the company’s paid plan (
402). - VERI*FACTU first. Until the owner authorizes a company certificate in
the app, invoice calls answer
403tool_unavailable. It covers the common territory and the Canary Islands, not Álava, Bizkaia, Gipuzkoa, Navarra or the SII. - A self-employed person’s setup comes first (
403onboarding_required).
Data
- Money is a decimal string in euros:
"1210.00". Rates too:"21". - Dates are
YYYY-MM-DD; timestamps are RFC 3339 in UTC. - Versions. An invoice’s
versionfingerprints its content. Issuing and voiding take it asexpected_version, so only what you read goes out.
Pagination
Invoices page with a cursor: passnext_cursor as cursor, with the same
filters, until has_more is false. Customers have no cursor: narrow q.
limit is 50 by default, 200 at most.
Idempotency
Send anIdempotency-Key (a UUID) when you create a customer, a draft or a
corrective draft. For 24 hours, the same key and body return the first answer
with Idempotent-Replayed: true. Issue and void are safe to retry with the
same expected_version.
Limits and versions
A key makes up to 600 requests a minute. The version is in the path,/v1:
new fields can appear, so ignore what you don’t know.