Sous Chef API
Sous Chef Management API
Documentation

Quickstart

Your first call takes two headers and one JSON body.

1. Get credentials

API keys are not issued publicly. To get one, contact support@yoursouschef.com. Credentials are issued per organization, together with test stores. You receive:

  • an API key — send it as x-api-key;
  • an organization id — send it as x-mealco-org-id.

Both are required on every request. Neither is sufficient alone.

Examples call production, https://api.yoursouschef.com. The sandbox is https://api.dev.yoursouschef.com: same paths, same headers, its own keys.

2. Call an operation

Every operation is a POST to a fixed path with a JSON body. Start with a directory read, because every other operation is addressed by an id one of them returns:

POST /management/stores/fetchLocations HTTP/1.1
Host: api.yoursouschef.com
Content-Type: application/json
x-api-key: <your-api-key>
x-mealco-org-id: <your-organization-id>

{ "page": { "limit": 50 } }

3. Join on ids, then read orders

fetchLocations, fetchBrands and fetchStores are the identity map. Every store carries its location.id and brand.id, so you resolve your own records against ours once and key everything after that on ids — never on display names, which change.

With a location code or a Store.id in hand, fetchOrders reads the order feed — filter by locationCode or storeId (not both), bound it with createdAtStartDate / createdAtEndDate, and choose sort (createdAtDesc is the default). Omit every filter for the whole estate, all time, newest first.

4. Page to the end

A reply carries nextCursor when more rows exist. Pass it back as page.cursor and repeat until nextCursor is absent. From page 2 on, send the cursor on its own: it remembers the filters and sort of the first page. Repeating the same filters is tolerated; a different value is a 400. See Concepts → Pagination.

Where to go next

  • Authentication — what the two headers mean and how they fail.
  • Errors and retries — which status codes are worth retrying, and which are a bug in the call.