ReconSmiths Developers Your API keys

Requests, answers and errors

The rules every endpoint follows.

Base URL and format

Dates and amounts

Your references

Everything you push carries your own id, external_ref, unique per source_system. source_system names your system (for example shop): send the same name on every call - source_system in a body, sourceSystem in a query - so your references are read as yours. Changing a document (void, notes) also accepts our document number (INV-00042) or our id.

Idempotency: retry without fear

Writes that post or change documents and money require an Idempotency-Key header (the reference lists it on each one that does): any unique string up to 255 characters, typically a UUID made when you first try the request. A PUT that names its record (an employee, a period's hours) is safe to repeat without one.

You sendYou get
A new keyThe request is carried out.
The same key and the same body againThe first answer again, word for word. Nothing is done twice.
The same key with a different body422: the key was already used for something else.
The same key while the first is still running409: wait and try again.

Keep the key with the thing you are sending, and reuse it on every retry of that thing. Pushes are also matched on your external_ref: an invoice you already sent comes back with created: false rather than a second copy.

Batches

Bulk endpoints (/v1/parties, /v1/invoices, /v1/payments, /v1/allocations, /v1/credit-notes, /v1/purchase-invoices) take a JSON array of up to 1 000 items. A batch is all or nothing: if one item is refused, nothing in it is posted, and the answer names the item.

Answers

CodeMeans
200Done (reads, and updates that change something in place).
201Created. The body lists what was created, with our ids.
400The request is malformed, or the Idempotency-Key is missing.
401No key, or the key is unknown, switched off or expired.
403The key lacks the permission (scope) this call needs.
404Nothing matches the reference you gave.
409Conflicts with the current state (already in flight, already posted, period closed).
413More than 1 000 items in one call.
422The ledger refused it. The reason is in the body.
502, 503A part behind the API (the document renderer) is unavailable. Try again.

Errors are written to be read

Every error is an RFC 9457 problem document:

{
  "type": "about:blank",
  "title": "Unknown customer",
  "status": 422,
  "detail": "no party with external_ref 'CUST-1001'. Push it to /v1/parties first."
}

title is the short form, detail says what to do about it. Show detail to the person who can fix it.

Paging

Lists take limit (default and maximum stated per endpoint). The change feed is cursor-paged: pass the next_cursor you were given as since, and stop when has_more is false. Cursors, not page numbers, because rows written while you read would shift a page and you would miss some.

This page as plain text: requests-answers-and-errors.md