Completed deliveries

GET /reports/deliveries

Read a paginated list of Shop delivery records. To get completed deliveries, set both stage=PROCESSED and status=COMPLETED. Without these filters, the endpoint can also return pending or cancelled deliveries. It does not return order lists or every part of the Shop screen; see Shop for the operational endpoints.

curl 'https://app.yourbarmate.com/api/reports/deliveries?stage=PROCESSED&status=COMPLETED&limit=25' \
  --header 'accept: application/json' \
  --header 'authorization: token YOUR_API_TOKEN'

Parameters

All query parameters are optional.

  • stage: PENDING or PROCESSED.
  • status: CANCELLED or COMPLETED.
  • supplier: Numeric supplier ID.
  • from: Earliest timestamp to include, in milliseconds since the Unix epoch.
  • to: Latest timestamp to include, in milliseconds since the Unix epoch.
  • limit: Maximum number of results. Defaults to 100; ALL requests all matching deliveries and should be used with care.
  • cursor: Cursor returned by a previous request for the next page.

Status codes

  • 200 on success
  • 400 on invalid request parameters

Response properties

  • list: Array of deliveries. Each entry includes id, scheduled, status, total and order. Depending on the delivery and permissions, it may also include processed, supplier, reference, location and products.
  • cursor: Cursor for the next page, or null when there are no more results.

The total object includes product_count. Its value and the products list are available only when the API token has permission to read delivery totals.