Skip to content

Formats and conventions

  • Field names are snake_case. Ignore fields you don’t know: new fields may be added to v1 at any time; a field is never removed or retyped in v1 (see Versioning).
  • Money is a decimal string: "125.50". Quantities are decimal strings with three places: "10.000". VAT rates are percentage strings: "14.00".
  • Times are ISO-8601 in UTC: "2026-10-05T10:42:00Z". Business dates — order_date, issue_date — are YYYY-MM-DD in the company’s own calendar.
Answer Shape
One record {"data": {…}}
A collection {"data": [ … ], "meta": {…}}
An error {"error": {"code", "message", "details", "request_id", "retryable"}}

Every answer carries an X-Request-Id header. Quote it when you contact us.

Every record names itself both ways, so you never have to keep a mapping table:

Field Whose Example
id Slflo’s — stable, never reused "C0000001", "ord_01J9X"
number (or code) Slflo’s, for people "SO-000123", "CUST-1"
external_ref Yours, once you’ve told us (by a push or an ack) "CUST-0042"
external_number Yours, the number your users see "SO-0012345"
version Rises on every change 18342

References inside a record carry both keys too:

"customer": { "id": "C0000001", "code": "CUST-1", "external_ref": "CUST-0042" }

A branch is known under its account, so where a branch’s key is shown it reads CUSTOMER_REF/BRANCH_REF, for example CUST-0042/01.

Prefix Document
SO-000123 Order (pre-sale or van sale)
DEL-000045 Delivery of a booked order
INV-000026 Invoice
RC-000310 Receipt (a payment)
RET-000014 Return — and its credit note, which uses the same number
LD-000014 Van load

The number is for people; use id to fetch or ack a document.

Fetch the sandbox’s first invoice and look at how it names itself and its customer:

Terminal window
curl -sg "$SLFLO_BASE/invoices?filter[seq_after]=0&per_page=1" -H "Authorization: Bearer $SLFLO_TOKEN" \
| jq '.data[0] | {id, number, version, seq, external_ref, customer, total: .totals.total}'

number is INV-000001; customer carries id, code and — once your ERP has pushed that customer — your external_ref. Until then external_ref is null.