Deliveries

The goods-in record — every field, its type, and what it means on the shop floor.

A delivery is one goods-in check: a member of staff receiving an order, recording temperatures, and deciding whether to accept it. It is the record a food-safety inspector asks for.

Both endpoints need the deliveries:read scope on the restaurant in the path.

Deliveries are the one hand-shaped resource here: a designed object, immutable once recorded, listed by time range. Everything else the app records — cooking and cooling temperatures, cleaning, labels — comes through collections, which share one generic envelope instead.

List deliveries

GET /v1/restaurants/{restaurantId}/deliveries?from=…&to=…&limit=…&cursor=…

Returns { "data": Delivery[], "nextCursor": string | null }, newest first. See Pagination for the range rules and the cursor.

Get one delivery

GET /v1/restaurants/{restaurantId}/deliveries/{deliveryId}

Returns a single Delivery, or 404 if the identifier is unknown or the key holds no grant for that restaurant.

The delivery object

FieldTypeMeaning
idstringStable identifier of the delivery, unique within the restaurant.
restaurantIdstringThe restaurant the record belongs to. Echoes the path.
occurredAtstringWhen the check happened, in epoch milliseconds as a string.
isCompliantbooleanThe staff member's verdict on the delivery as a whole.
supplierobject | null{ "id": string, "name": string }, or null when the delivery was recorded without one.
temperatureRecordsarrayOne entry per product measured. See below.
nonComplianceReasonsstring[]Why the delivery was refused or accepted with reservation. Free text chosen by the staff member; empty when compliant.
correctiveActionsstring[]What was done about it. Empty when nothing was needed.
commentarystring | nullFree-text note. Often null.
imageCountintegerHow many photographs are attached. 0 means the images endpoint has nothing to return.

temperatureRecords[]

FieldTypeMeaning
productstringWhat was measured, as the staff member named it. Never empty.
valuenumber | nullThe reading. null when the product was logged without a measurement.
unit"C"Always Celsius. Present so a consumer never has to assume.
lotNumberstring | nullThe batch or lot, when it was captured.

Reading it correctly

isCompliant is the record, not a computation. It is what the person receiving the delivery decided, and it can disagree with what you would conclude from the temperatures alone — a reading taken on a surface probe, a product with its own threshold, a judgement call. Present it as their verdict. If you want your own, compute it beside theirs and label it as yours.

Free-text fields are free text. nonComplianceReasons, correctiveActions and product are typed by staff during service, in the language of the restaurant, with the spelling of a busy Tuesday. Do not build an enum from them, do not key a join on them, and do not assume French.

value can be null. A product logged without a reading is normal — it is often a dry good. Treat null as "not measured", never as 0.

Timestamps are strings. occurredAt is a decimal string of epoch milliseconds, because the whole BackResto platform stores timestamps that way. Number(occurredAt) is safe today and for the next few hundred thousand years, but do not let a JSON parser coerce it silently and then write it back with precision lost.

Example

{
  "id": "8f2c1b04-0d5a-4b7e-9f31-6ad2c0e77a51",
  "restaurantId": "restaurant-1",
  "occurredAt": "1787932800000",
  "isCompliant": false,
  "supplier": { "id": "supplier-7", "name": "Metro Nord" },
  "temperatureRecords": [
    { "product": "Poulet fermier", "lotNumber": "L2291", "unit": "C", "value": 6.4 },
    { "product": "Farine T55", "lotNumber": null, "unit": "C", "value": null }
  ],
  "nonComplianceReasons": ["Température trop élevée"],
  "correctiveActions": ["Produit refusé", "Fournisseur prévenu"],
  "commentary": "Camion en retard, rupture de chaîne du froid probable",
  "imageCount": 2
}

Last updated 2026-09-19.