Requests and responses
Conventions shared by the whole API: JSON, amounts as decimal strings, dates, identifiers, paths, status codes and headers.
Base URL and version
Every path hangs from:
https://api.billora.app/api/v1The version is part of the path (/v1). See the versioning policy for which changes may ship without a new version.
JSON and encoding
- Send bodies as JSON with
Content-Type: application/jsonand UTF-8 encoding. - Responses are JSON (
application/json), except binary downloads (PDF, XML, ZIP) and file uploads, which usemultipart/form-data. - Any other content type gets
415 unsupported_media_type; malformed JSON gets400 parse_error.
Amounts and quantities: decimal strings
Amounts, prices, quantities, percentages and exchange rates are decimal strings with a dot as separator: "1234.50", "21.00", "0.857". This avoids floating-point rounding errors.
{ "quantity": "2.5", "unit_price": "39.90", "discount_percent": "10.00", "total": "108.63" }- In requests you may send JSON numbers (
39.9), but we recommend strings. - Responses always use strings: parse them with a decimal type (
Decimalin Python,BigDecimal/bcmathin PHP, a decimal library in JavaScript), notparseFloat, if you are going to do arithmetic. - Money is rounded to 2 decimals; quantities allow more precision.
- The currency is a separate field,
currency(ISO 4217,EURby default). - Legacy exception: the expense
tax_breakdownstill returns JSON numbers.
Dates and times
| Type | Format | Example |
|---|---|---|
| Date | YYYY-MM-DD | "2026-11-01" |
| Date-time | ISO 8601 with offset | "2026-11-01T10:15:30Z", "2026-11-01T11:15:30+01:00" |
Business dates (issue_date, due_date, date…) are calendar dates in Spain, without time. Timestamps (created_at, updated_at) always carry an offset; treat them as instants.
Identifiers
Resources are identified by integers ("id": 5120). Relations are sent by id ("customer": 318) and some are expanded in detail responses ("customer": {"id": 318, "legal_name": "…"}). An invoice's legal number ("number": "F-2026-0001") is different from its id and only exists once issued.
Paths
- Plural, lowercase resources:
/invoices/,/customers/,/expense-categories/. - Actions use
POSTand kebab-case names:/invoices/{id}/mark-paid/,/invoices/{id}/create-rectifying/,/quotes/{id}/to-invoice/. - The trailing slash is optional:
/invoices/5120and/invoices/5120/are equivalent. These docs always include it.
Methods and status codes
| Method | Use | Success response |
|---|---|---|
GET | List or read | 200 OK |
POST | Create a resource | 201 Created with the resource |
POST | Action that creates a new resource (convert, correct…) | 201 Created |
POST | Accepted asynchronous action | 202 Accepted |
POST | Other actions (issue, cancel…) | 200 OK |
PATCH | Update only the fields sent | 200 OK |
PUT | Replace the whole resource | 200 OK |
DELETE | Delete | 204 No Content |
Use PATCH to update: fields you don't send stay unchanged. On documents, sending lines in a PATCH replaces every line with the ones sent.
Headers
Request
| Header | Description |
|---|---|
Authorization | Bearer blr_…. See Authentication. |
Content-Type | application/json (or multipart/form-data for uploads). |
Idempotency-Key | Optional on POST and PATCH. See Idempotency. |
X-Request-Id | Optional. Your own request id (up to 128 characters A-Z a-z 0-9 . _ -); we echo it back. |
Response
| Header | Description |
|---|---|
X-Request-Id | Request id (yours or a generated req_…). Include it when contacting support. |
X-RateLimit-Limit / -Remaining / -Reset | Rate limit status for your key. See Rate limits. |
Retry-After | Seconds to wait, on 429 responses. |
X-Quota-* | Plan quota usage on requests that create quota-limited resources. |
Idempotent-Replayed | true when the response replays an earlier idempotent request. |
Nulls and unknown fields
- Optional fields without a value are returned as
null(or""for some text fields); they are not omitted. - Ignore fields you don't know: adding response fields is not a breaking change.
- Read-only fields (
id, totals,number,status…) are ignored if you send them when creating or editing. Status changes always go through their action (/send/,/cancel/,/mark-paid/), never by writingstatus.
