API reference

Sales

What clients bought: date, receipt number, items and total. A receipt number is unique per brand.

Endpoints

GET/api/v1/salesList, newest first
POST/api/v1/salesCreate · write key
GET/api/v1/sales/{id}Get one
PATCH/api/v1/sales/{id}Change · write key
DELETE/api/v1/sales/{id}Delete · write key · owners, admins, managers

Fields

Every record also has object = "sale".

FieldTypeDescription
id
read only
uuidUnique ID.
brand_id
required on create
set on create only
uuidThe brand this belongs to (see GET /brands). Required when creating; cannot be changed.
client_iduuidThe client it belongs to (optional).
purchased_ondateDate of the sale (YYYY-MM-DD). Default: today.
receipt_nostring, max 60Receipt or order number; unique per brand.
itemsstring, max 2000What was sold, as text.
total
required on create
number, 0–10000000Total amount in the brand currency.
channelstring, max 40Where it was sold: store, website, phone…
created_at
read only
date-timeWhen it was created (UTC, ISO 8601).

List filters

Add to GET /api/v1/sales as query parameters. Also limit (1–200, default 50) and cursor. See Pagination.

ParameterTypeMeaning
brand_iduuidOnly this brand.
client_iduuidOnly this client.
receipt_nostringExact receipt number.
purchased_fromdateSold on or after this date.
purchased_todateSold on or before this date.
created_sincedate-timeCreated at or after this time.

List

Terminal
curl "$QUILO_URL/api/v1/sales?limit=20" \
  -H "Authorization: Bearer $QUILO_API_KEY"
JSON
{
  "object": "list",
  "data": [
    {
      "object": "sale",
      "id": "6f1c2a90-3b4d-4e5f-8a7b-9c0d1e2f3a4b",
      "brand_id": "0b7e9a52-1c3d-4f6e-9a8b-7c6d5e4f3a2b",
      "client_id": "5d2c1b0a-9e8f-4a7b-8c6d-5e4f3a2b1c0d",
      "purchased_on": "2026-10-17",
      "receipt_no": "W-10442",
      "items": "18k gold ring, sapphire",
      "total": 2480,
      "channel": "website",
      "created_at": "2026-10-17T09:30:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create

Answers 201 Created with the new sale. Send an Idempotency-Key to retry safely.

Terminal
curl -X POST "$QUILO_URL/api/v1/sales" \
  -H "Authorization: Bearer $QUILO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-unique-id-123" \
  -d '{
  "brand_id": "0b7e9a52-1c3d-4f6e-9a8b-7c6d5e4f3a2b",
  "client_id": "5d2c1b0a-9e8f-4a7b-8c6d-5e4f3a2b1c0d",
  "purchased_on": "2026-10-17",
  "receipt_no": "W-10442",
  "items": "18k gold ring, sapphire",
  "total": 2480,
  "channel": "website"
}'

Get one

Terminal
curl "$QUILO_URL/api/v1/sales/ID" -H "Authorization: Bearer $QUILO_API_KEY"
JSON
{
  "object": "sale",
  "id": "6f1c2a90-3b4d-4e5f-8a7b-9c0d1e2f3a4b",
  "brand_id": "0b7e9a52-1c3d-4f6e-9a8b-7c6d5e4f3a2b",
  "client_id": "5d2c1b0a-9e8f-4a7b-8c6d-5e4f3a2b1c0d",
  "purchased_on": "2026-10-17",
  "receipt_no": "W-10442",
  "items": "18k gold ring, sapphire",
  "total": 2480,
  "channel": "website",
  "created_at": "2026-10-17T09:30:00Z"
}

Unknown IDs, IDs from other companies and records you cannot access all answer 404 not_found.

Change

Send only the fields to change. brand_id cannot be changed after creation.

Terminal
curl -X PATCH "$QUILO_URL/api/v1/sales/ID" \
  -H "Authorization: Bearer $QUILO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purchased_on":"2026-10-17"}'

Delete

Owners, admins and managers only, with a Read and write key. Deleting cannot be undone.

Terminal
curl -X DELETE "$QUILO_URL/api/v1/sales/ID" -H "Authorization: Bearer $QUILO_API_KEY"
JSON
{
  "object": "sale",
  "id": "6f1c2a90-3b4d-4e5f-8a7b-9c0d1e2f3a4b",
  "deleted": true
}