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/v1

The 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/json and UTF-8 encoding.
  • Responses are JSON (application/json), except binary downloads (PDF, XML, ZIP) and file uploads, which use multipart/form-data.
  • Any other content type gets 415 unsupported_media_type; malformed JSON gets 400 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" }
JSON
  • In requests you may send JSON numbers (39.9), but we recommend strings.
  • Responses always use strings: parse them with a decimal type (Decimal in Python, BigDecimal/bcmath in PHP, a decimal library in JavaScript), not parseFloat, 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, EUR by default).
  • Legacy exception: the expense tax_breakdown still returns JSON numbers.

Dates and times

TypeFormatExample
DateYYYY-MM-DD"2026-11-01"
Date-timeISO 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 POST and kebab-case names: /invoices/{id}/mark-paid/, /invoices/{id}/create-rectifying/, /quotes/{id}/to-invoice/.
  • The trailing slash is optional: /invoices/5120 and /invoices/5120/ are equivalent. These docs always include it.

Methods and status codes

MethodUseSuccess response
GETList or read200 OK
POSTCreate a resource201 Created with the resource
POSTAction that creates a new resource (convert, correct…)201 Created
POSTAccepted asynchronous action202 Accepted
POSTOther actions (issue, cancel…)200 OK
PATCHUpdate only the fields sent200 OK
PUTReplace the whole resource200 OK
DELETEDelete204 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

HeaderDescription
AuthorizationBearer blr_…. See Authentication.
Content-Typeapplication/json (or multipart/form-data for uploads).
Idempotency-KeyOptional on POST and PATCH. See Idempotency.
X-Request-IdOptional. Your own request id (up to 128 characters A-Z a-z 0-9 . _ -); we echo it back.

Response

HeaderDescription
X-Request-IdRequest id (yours or a generated req_…). Include it when contacting support.
X-RateLimit-Limit / -Remaining / -ResetRate limit status for your key. See Rate limits.
Retry-AfterSeconds to wait, on 429 responses.
X-Quota-*Plan quota usage on requests that create quota-limited resources.
Idempotent-Replayedtrue 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 writing status.