{
  "openapi": "3.1.0",
  "info": {
    "title": "Sous Chef Management API",
    "summary": "Read your orders, stores, menus and reports, and manage store status, hours, item availability, menu publishing, promotions and webhooks.",
    "version": "0.1.0-draft",
    "description": "The Sous Chef Management API gives restaurant groups, and the systems they run on, one interface\nto the delivery platforms their stores sell on. Read orders, stores and menus in one normalised\nshape, whichever platform they come from. Manage store status, hours, item availability and menu\npublishing, request platform reports, and receive signed webhooks.\n\n## Shape of every call\n\nEvery operation is a **POST** with a single JSON body and a single JSON reply. There are no path\nparameters and no query strings, so a request is fully described by its URL and its body.\n\nThe base path carries **no version segment**. Changes are additive: new optional fields and new\noperations are added. Write your client to ignore fields it does not recognise and it keeps\nworking across releases.\n\n## Authentication\n\nSend **both** headers on every request:\n\n- `x-api-key`: your partner API key, issued per organization.\n- `x-mealco-org-id`: the organization the call acts on behalf of. It must be the organization\n  the key belongs to; a mismatch is rejected with `401`.\n\nBoth are required together. Neither is sufficient alone.\n\n## Conventions worth learning once\n\n- **Money is an integer in the currency's minor unit.** `1250` is $12.50. A decimal amount cannot\n  survive a round trip through every language's default number type, so the API never emits one.\n- **Times are ISO-8601 in UTC.** A store's local time is a rendering decision that the API leaves\n  to you. Resolve it from the location's IANA `timezone`.\n- **Paging is cursor-based.** Requests carry a `page` object (`limit`, `cursor`); replies return\n  `nextCursor` at the top level, which you pass back as `page.cursor`.\n- **Directory reads join on IDs, never on display names.** Every store carries its `location.id`\n  and `brand.id`; the name strings are for rendering only.\n\nEvery route under `paths` states whether it is safe to retry, derived from the endpoint's\ndeclared side-effect contract. It covers routes only: a webhook is a call we send, and we\nretry its delivery ourselves, so a webhook carries no retry sentence.\n\n| declared operation | read-only | destructive | idempotent |\n|---|---|---|---|\n| read | yes | no | yes |\n| write-idempotent | no | yes | yes |\n| write | no | yes | no |"
  },
  "servers": [
    {
      "url": "https://api.yoursouschef.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "Read the orders placed with your restaurants.\n\nStart an integration here. Poll `fetchOrders` for the orders Sous Chef has accepted on\nyour behalf across every delivery platform you are connected to. Orders are normalized into\none shape, whether they arrived from DoorDash, Uber Eats, Grubhub or a direct channel.\n\nTwo conventions hold everywhere on this API. **Money is always an integer in the currency's\nminor unit**: `1250` is $12.50. **Times are always ISO-8601 in UTC**. The API does not convert\nthem to a store's local time.\n\nAll endpoints are POST with a single JSON body, and the path carries no version segment.\nChanges to this API are additive (new fields and new endpoints, never removals or narrowing),\nso there is no versioned cutover."
    },
    {
      "name": "Stores",
      "description": "The places you operate and the brands you operate there.\n\nSous Chef models a restaurant business in three layers, and every other section of this API\nassumes them. A **brand** is a menu concept: what a customer sees on a delivery app. A\n**location** is a physical address with a kitchen in it. A **store** is one storefront: a\nsingle brand, at a single location, on a single platform. A location running two brands on\nthree platforms has six stores, each with its own menu, hours and pause state.\n\nThe directory reads join on ids, never on display names: every store carries its `location.id`\nand `brand.id`, and a location carries the `id` of each brand it runs.\n\nStart here. A location carries the timezone that every schedule, report window and business\nday elsewhere on this API is interpreted in.\n\nEvery operation is scoped to the organization your API key resolves to, and nothing here\ncalls out to a delivery platform live. The directory reads (`fetchLocations`, `fetchBrands`,\n`fetchStores`, `fetchStore`, `fetchStoreHours`, `fetchStoreMenus`) never mutate;\n`setLocationHours` and `setLocationSpecialHours` write a location you own.\n\nWhether a storefront is currently taking orders is not in this section. `fetchStoreStatuses`,\n`pauseStores`, `unpauseStores` and the `store.status.changed` webhook are in the Store status\nsection. This section describes what you operate. That one describes whether it is open right\nnow, and whether the platform agrees."
    },
    {
      "name": "Store status",
      "description": "Whether each storefront is actually taking orders, and whether Sous Chef and the delivery\nplatform agree about it.\n\nSeparate from `Stores`, which is the identity map: the brands, kitchens and\nstorefronts you operate, which changes when your estate changes. This section is the\noperational layer on top of it: two reads (`fetchStoreStatuses`, `fetchStoreStatus`), two\nwrites (`pauseStores`, `unpauseStores`) and the `store.status.changed` webhook, all addressed\nby the `Store.id` values `fetchStores` returns. It uses the same API key, organization scoping\nand ids, under a different route prefix (`/management/store-status`).\n\nThree things are kept distinct throughout: `desired` is what Sous Chef is configured to do,\n`observed` is what the platform reports, and `discrepancy` is the classified disagreement\nbetween the two.\n\nScoped to the organization your API key resolves to, exactly as the directory reads are."
    },
    {
      "name": "Item availability",
      "description": "Item availability: mark one item available or unavailable at one kitchen.\n\n`fetchLocationItems` and `setItemAvailability` work as a pair: the write needs the discovery\nread, because Sous Chef's item ids cannot be known in advance.\n\nThere is no `Idempotency-Key` replay on this API: a retried `setItemAvailability` call\nre-applies the same value rather than de-duplicating."
    },
    {
      "name": "Reports",
      "description": "Partner reporting. Coverage and every report are tenant-scoped and never global: the\norganization is the one the API key authenticates, and no request field can name another.\n\n`createReport` is a write: a read-only API key is refused with `403`.\n\n`Idempotency-Key` is accepted on `createReport` and ignored, so a retried `createReport`\nrequests a second report with a new `reportId`. The duplicate uses platform request budget but\ndoes not affect the first report: each report is an independent file. Treat a timeout as \"may\nhave succeeded\" and check `fetchReports` before retrying."
    },
    {
      "name": "Menus",
      "description": "Menus: read a menu, publish it to the delivery platforms, and follow each publication's\nper-store, per-platform outcome.\n\n`publishMenu` is the only write in this section. It changes the menu guests see on live\nDoorDash, Uber Eats and Grubhub storefronts, and there is no unpublish.\n\nEvery operation is scoped to the organization your API key belongs to. On `fetchMenu` and\n`publishMenu`, an id that does not exist and one that belongs to another organization are the\nsame `404`. On `publishMenu`, a menu or store outside your organization is rejected before\nanything is published.\n\n**Retries create a second publication.** `publishMenu` does not replay a previous result: a\nretried call creates a new publication with its own `publicationId` and re-submits to the\nplatforms. That changes no content, because a publication is a full replace of the same saved\nmenu, but it doubles platform traffic. Treat a timeout as \"may have succeeded\" and check\n`fetchMenuPublications` before retrying."
    },
    {
      "name": "Promotions",
      "description": "Promotions on the connected delivery platforms. Organization-scoped like every other section:\nthe organization is the one the API key authenticates and no request field can name another.\n\nFour operations cover the whole Uber Eats promotion lifecycle: `fetchUberEatsPromotions` (list),\n`fetchUberEatsPromotion` (get one, by id), `createUberEatsPromotion` and\n`revokeUberEatsPromotion`. There is no update and no pause on the platform, so a promotion is\nimmutable once created.\n\nThe operations are named for the platform because the platforms differ materially: DoorDash\nexposes no promotion write API to integrations, and Grubhub no promotions surface at all. For\nboth, promotion attribution arrives on the order instead (see the Orders section).\n\n`createUberEatsPromotion` and `revokeUberEatsPromotion` are writes. A read-only API key is\nrefused with `403`.\n\nMoney is an integer in the currency's minor unit everywhere in this section: `1250` is $12.50."
    },
    {
      "name": "Settings",
      "description": "Read and set where Sous Chef delivers your webhooks.\n\nYour organization is resolved from the authenticated api key and is never a field on any\nrequest or response here, so no caller can point another organization's feed at their own\nserver.\n\n**Two destinations, one configuration.** `legacyUrl` is the existing orders-only feed. The URL\nitself is read-only here (Sous Chef controls where the legacy feed delivers, and clears it only\nas a support action), and `legacyUrlEnabled` is the switch that lets you turn legacy delivery\noff yourself. `newUrl` is the signed (`v2=`, ES256) destination you register yourself, together\nwith `newUrlEvents` (which events it receives) and `newUrlEnabled` (its own pause switch). Any\ncombination of `legacyUrlEnabled` and `newUrlEnabled` is valid: legacy only, both while you\nmigrate, or new only once you are done. Registering or pausing one destination never changes\nthe other.\n\n**Each field governs one destination.** `newUrlEvents` and `newUrlEnabled` govern `newUrl`\nonly. `legacyUrlEnabled` governs `legacyUrl` only: the legacy feed has no per-event\nsubscription list and is always orders-only. `newUrlEnabled: false` does not turn all webhooks\noff. It silences `newUrl` alone, just as `legacyUrlEnabled: false` silences only `legacyUrl`."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": [],
      "OrganizationId": []
    }
  ],
  "paths": {
    "/management/orders/fetchOrders": {
      "post": {
        "operationId": "fetchOrders",
        "summary": "List orders",
        "description": "The order feed and single-order read in one operation: filter by time window, statuses,\nkitchen or storefront, or pass `orderIds` to fetch specific orders.\n\n`createdAtStartDate` and `createdAtEndDate` bound the order's creation time: the moment\nSous Chef recorded the order, which is the `createdAt` every order carries.\n`createdAtStartDate` is inclusive and `createdAtEndDate` is exclusive. **There is no maximum\nwindow width** and no rolling retention limit, so a full backfill is a loop over contiguous\n`[createdAtStartDate, createdAtEndDate)` windows of whatever size suits your loader.\nBoth bounds are optional; omit both for all-time.\n\n**These bounds filter on `createdAt` and on nothing else.** An order's pickup time is a\ndifferent timestamp, minutes to days away from its creation, and there is no pickup-time\nwindow on this operation. Size your windows against creation time: an order created just\nbefore `createdAtStartDate` belongs to the previous window even when it is picked up inside\nthis one. A backfill assembled from contiguous creation-time windows is complete, because\nevery order is created exactly once.\n\n**The page is sorted** by `createdAt`, newest first unless `sort` says otherwise, with ties\nbroken on the order's `id` so the ordering is total. With `sort: \"createdAtAsc\"` and no\ncursor, the first row is your earliest order. Paging a closed window returns each order in\nit exactly once.\n\n`locationCode` narrows to one kitchen and `storeId` to one storefront. They are mutually\nexclusive; sending both is a `400`.\n\nCursor-paginated, to a depth of 10,000 orders (see `page`). Paging deeper is a `400`; use a\nnarrower window instead. The response is an object, so fields can be added without a\nbreaking change.\n\n**Iteration is not snapshot-stable.** The sort is total, so ties never reorder between pages.\nAn order created mid-sweep lands wherever its `createdAt` puts it, which on the default\nnewest-first sweep is a page you have already read, and the next page can then repeat a row.\nClose the window (an upper bound in the past cannot gain rows) and reconcile on order `id`\nfor anything that must be exact.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchOrdersRequest",
                "description": "Request for `fetchOrders`.",
                "properties": {
                  "orderIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Fetch specific orders. **Every other filter is ignored when this is present**: the window,\nthe statuses, the kitchen and the storefront. `sort` and `page` still apply: they shape the\nanswer rather than narrowing it.\n\nIf you want the filters to narrow the result, send them without `orderIds`."
                  },
                  "locationCode": {
                    "type": "string",
                    "description": "One kitchen per call, addressed by its short site code: the `code` on the `Location` that\n`fetchStores` and `fetchStore` report. Omit for every kitchen.\n\nThis operation filters kitchens by code, not by `locationId`. The code is returned on every\nstore, so it is a value you already hold.\n\nMutually exclusive with `storeId`. See that field."
                  },
                  "storeId": {
                    "type": "string",
                    "description": "One storefront per call, by `Store.id` as `fetchStores` reports it. Omit for every\nstorefront.\n\nMutually exclusive with `locationCode`: sending both is a `400`. A store belongs to\nexactly one kitchen, so the two filters together are either redundant or contradictory. Send\none of them."
                  },
                  "statuses": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/OrderStatusFilter"
                    },
                    "description": "Filter by stored status. `recentlyCancelled` is a stored-status filter value that renders as\n`cancelled` in responses. Pass both to retrieve all cancelled orders."
                  },
                  "createdAtStartDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Inclusive lower bound on the order's creation time (`Order.createdAt`), ISO-8601 UTC."
                  },
                  "createdAtEndDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Exclusive upper bound on the order's creation time (`Order.createdAt`), ISO-8601 UTC.\n\nThere is no maximum window width, and omitting both bounds is valid and means all-time."
                  },
                  "sort": {
                    "$ref": "#/components/schemas/OrderSort",
                    "description": "How to order the page, on the order's creation time. Defaults to `createdAtDesc`.\n\n`createdAtDesc`: newest first. Use it to read what has arrived since you last polled. It is\nalso the order in which Sous Chef shows orders to a kitchen.\n\n`createdAtAsc`: oldest first. With no cursor, the first row is your earliest order.\n\nThe order is total: ties on `createdAt` break on the order's `id`. While nothing is written,\na given page of a sweep returns the same rows every time you request it."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination.\n\n**The cursor remembers your filters and `sort`.** Page two of a `createdAtStartDate` window\nneeds only the cursor. Repeating the same filters is accepted, and a filter with a different\nvalue is a `400`. Only `page.limit` may change.\n\n**The cursor has a depth limit on this feed: 10,000 orders.** Past that you get a `400`. To\nread deeper, for example in a backfill, use a narrower\n`[createdAtStartDate, createdAtEndDate)` window. There is no limit on how wide a window may\nbe, so contiguous windows give you every order we hold."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of orders, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchOrdersResponse",
                  "description": "Reply from `fetchOrders`.",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      },
                      "description": "The page of orders, ordered by creation time in the direction `sort` asked for (newest first\nby default).\n\nIteration is not snapshot-stable: an order created while you are paging lands wherever its\n`createdAt` puts it, which for the default newest-first sweep is a page you have already\nread. For an exact backfill, close the window and reconcile on order `id`. Contiguous\n`[createdAtStartDate, createdAtEndDate)` ranges whose upper bound is in the past cannot gain\nrows while you page them."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/orders/fetchOrder": {
      "post": {
        "operationId": "fetchOrder",
        "summary": "Get one order",
        "description": "Get one order by its Sous Chef id. Use it when a webhook arrives, to fetch the full record\nbehind the event.\n\nScoped to the organization your api key resolves to. An `orderId` that belongs to another\norganization is indistinguishable from one that does not exist: both are `404`. Every other\nunknown id on this API follows the same convention.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchOrderRequest",
                "description": "Request for `fetchOrder`, the single-order read.",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "Sous Chef's identifier for the order (uuid): the `Order.id` every order webhook carries."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchOrderResponse",
                  "description": "Reply from `fetchOrder`.",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order",
                      "description": "The order. It is wrapped in an object, like every other reply on this API, so that fields\ncan be added without a breaking change."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchLocations": {
      "post": {
        "operationId": "fetchLocations",
        "summary": "List locations",
        "description": "Your physical locations (kitchens): address, timezone, the brands each carries, and the\nstore count.\n\nCross-reference: every store from `fetchStores` carries its `location.id` and\n`brand.id`, so the directory reads join on ids.\n\nScope: kitchens your organization owns, plus kitchens where one of your brands operates.\nRetired kitchens are excluded. `Location.storeCount` counts exactly the storefronts\n`fetchStores` would return for you at that kitchen, so the two always reconcile.\n\nPaging: sorted by `name` ascending. Loop until `nextCursor` is absent.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchLocationsRequest",
                "description": "Request for `StoresApi.fetchLocations`.",
                "properties": {
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of your locations, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchLocationsResponse",
                  "description": "Reply from `StoresApi.fetchLocations`.",
                  "properties": {
                    "locations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Location"
                      },
                      "description": "The page of locations."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchBrands": {
      "post": {
        "operationId": "fetchBrands",
        "summary": "List brands",
        "description": "Your brands (menu concepts), the top of the identity map.\n\nCross-reference with `fetchLocations` and `fetchStores` via ids.\n\nScope: brands owned by the organization your API key resolves to. Retired brands are\nincluded, with `Brand.deactivatedAt` set, so an id you recorded last year still\nresolves.\n\nPaging: sorted by `name` ascending, so the order is stable across calls. Loop until\n`nextCursor` is absent.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchBrandsRequest",
                "description": "Request for `StoresApi.fetchBrands`.",
                "properties": {
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of your brands, retired ones included, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchBrandsResponse",
                  "description": "Reply from `StoresApi.fetchBrands`.",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Brand"
                      },
                      "description": "The page of brands, sorted by `name` ascending."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page. End your loop on an absent\ncursor, not on an empty array."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchStores": {
      "post": {
        "operationId": "fetchStores",
        "summary": "List stores",
        "description": "The identity map: your storefronts, with the complete join between Sous Chef's identifiers\nand the delivery platform's.\n\nEach store carries `Store.id` and `Store.code` (ours),\n`Store.platformStoreId` (the platform's own), the owning `Store.brand` and\n`Store.location` each with their own ids and codes, and `Store.wentLiveAt`.\n\nIntegrate this operation first: one call gives the complete crosswalk, and everything else\nin the API is addressed by identifiers it returns. Ids never change, so build your mapping\non them once, at onboarding.\n\nNarrow the result with `storeIds`, `locationIds`, `brandIds` and `platforms`; omitting them\nall returns your whole estate, which you page through.\n\nScope: storefronts at a kitchen you own, or selling a brand you own. Retired storefronts are\nexcluded.\n\n`Store.platformStoreId` and `Store.storeUrl` are stored values. This operation makes no live\ncall out to a delivery platform, so it is cheap to poll, and those two fields do not follow a\nchange made directly on a platform.\n\nPaging: sorted by `id` ascending. Loop until `nextCursor` is absent. An estate of several\nthousand storefronts is normal; page, do not ask for everything at once.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoresRequest",
                "description": "Request for `StoresApi.fetchStores`.\n\nOmitting a filter means no filter, never \"no results\". When you send several filters, a\nstorefront must match all of them: `brandIds` plus `platforms` returns that brand's storefronts\non those platforms only. An empty array is applied as written and matches nothing. It is not\nthe same as omitting the filter.",
                "properties": {
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  },
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to these `Store.id` values, the ids `fetchStores` itself returns."
                  },
                  "locationIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to storefronts at these kitchens (`Location.id`, as returned by `fetchLocations`)."
                  },
                  "brandIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to storefronts selling these brands (`Brand.id`, as returned by `fetchBrands`)."
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to these platform slugs, e.g. `[\"doordash\", \"ubereats\"]`.\n\nMatched case- and punctuation-insensitively against the platform name, so `\"doordash\"`,\n`\"DoorDash\"` and `\"Door Dash\"` all select the same platform. The same open enum as\n`Store.platform`: a slug we do not recognise matches nothing and is not an error."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of your storefronts with their Sous Chef and platform identifiers, and the\ncursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoresResponse",
                  "description": "Reply from `StoresApi.fetchStores`.",
                  "properties": {
                    "stores": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Store"
                      },
                      "description": "The page of storefronts, sorted by `id` ascending."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchStore": {
      "post": {
        "operationId": "fetchStore",
        "summary": "Get one store",
        "description": "One storefront, by `Store.id`: the same `Store` shape `fetchStores` returns, addressed\ndirectly instead of paged.\n\nScope: exactly `fetchStores`' scope. `404` when `storeId` does not resolve for your\norganization. An id that does not exist and one that belongs to another organization return\nthe same `404`, the same convention as every other single-resource read on this API\n(`fetchMenu`).\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreRequest",
                "description": "Request for `StoresApi.fetchStore`.",
                "properties": {
                  "storeId": {
                    "type": "string",
                    "description": "`Store.id`, as returned by `fetchStores`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The storefront, plus the time Sous Chef set it up.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreResponse",
                  "description": "Reply from `StoresApi.fetchStore`.",
                  "properties": {
                    "store": {
                      "$ref": "#/components/schemas/Store",
                      "description": "The storefront, in the same shape `fetchStores` returns."
                    },
                    "liveAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When Sous Chef set this storefront up, as an ISO-8601 UTC instant. It is the same value\n`store.wentLiveAt` carries. Not a go-live signal: whether the storefront is open and taking\norders is `fetchStoreStatuses`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchStoreHours": {
      "post": {
        "operationId": "fetchStoreHours",
        "summary": "Get store hours",
        "description": "Effective operating hours for up to 100 storefronts at a time: regular\nweekly windows plus special dates (holidays, early closes), resolved in each location's\ntimezone. Windows may cross midnight. Compare against your own expected hours to detect\ndrift.\n\nA storefront whose active menus all carry their own hours reports the union of those menus'\nwindows as `regular`; otherwise the location's weekly hours are reported.\n\n**Two exceptions.** An organization whose brands cook in a kitchen it does not own can set its\nown weekly hours for all of its brands there, in the Sous Chef Portal. Once it has, those\nhours replace the location's in `regular` on its storefronts there. The location's special\ndates still reach those storefronts: a closure still closes them, and a date that opens the\nkitchen opens each one only within the hours it reports as `regular`. Whoever reads those\nstorefronts gets this same answer, the kitchen's owner included: on them, `regular` is not\nthe week the owner set with `setLocationHours`.\n\nA single brand can also keep its own week at a location. That week then replaces whichever\nhours would otherwise apply in `regular` on that brand's storefronts there.\n\nNo pagination. Pass 1-100 `storeIds` and chunk a larger estate across calls.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreHoursRequest",
                "description": "Request for `StoresApi.fetchStoreHours`. Required, 1-100 ids. Chunk larger sets across calls.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`Store.id` values to read hours for, 1-100."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The effective hours of each requested storefront your organization operates.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreHoursResponse",
                  "description": "Reply from `StoresApi.fetchStoreHours`.",
                  "properties": {
                    "hours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoreHours"
                      },
                      "description": "One entry per requested storefront your organization operates. Requested ids that are\nunknown, deactivated or not yours are omitted rather than reported as errors."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/fetchStoreMenus": {
      "post": {
        "operationId": "fetchStoreMenus",
        "summary": "Get store menu assignments",
        "description": "Which menus are assigned to each of up to 100 storefronts, each menu's\noperating-hours configuration, whether and when it was last published, and, where a\npublished snapshot exists, the menu document exactly as last published to that storefront.\n\nSnapshots are returned verbatim from Sous Chef's publish history, never regenerated; a menu\nnever published to the store carries no snapshot, and neither does one whose recorded\nsnapshot exceeds this API's size cap (see `MenuAssignment.snapshot`).\n\nNo pagination. Pass 1-100 `storeIds` and chunk a larger estate across calls.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreMenusRequest",
                "description": "Request for `StoresApi.fetchStoreMenus`. Required, 1-100 ids. Chunk larger sets across calls.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`Store.id` values to read menu assignments for, 1-100."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The menus assigned to each requested storefront your organization operates.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreMenusResponse",
                  "description": "Reply from `StoresApi.fetchStoreMenus`.",
                  "properties": {
                    "assignments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoreMenuAssignments"
                      },
                      "description": "One entry per requested storefront your organization operates that has at least one menu\nassigned, in request order. Requested ids that are unknown, deactivated, not yours, or have\nno menu assigned are omitted."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/setLocationSpecialHours": {
      "post": {
        "operationId": "setLocationSpecialHours",
        "summary": "Set location special hours",
        "description": "Replace a location's upcoming special dates: holidays, early closes, full-day closures.\nThe list you send replaces all special dates from today forward; past dates are untouched.\nPropagates asynchronously to every storefront at the location, including those of an\norganization that has set its own weekly hours at this kitchen: a closure closes them like\nevery other storefront, and a date that opens the kitchen opens each one only within the hours\n`fetchStoreHours` reports as its `regular`.\n\nThe location tier is the only special-hours tier this API writes. Sous Chef also holds\nbrand-at-location overrides, and a storefront's effective special dates combine the two.\n`fetchStoreHours` reports the combined result.\n\n`dates` is required and must be non-empty unless `wipeAll: true`, which clears every\nupcoming special date instead. See `SetLocationSpecialHoursRequest`.\n\n**Scope: owner-only, which is narrower than the reads.** Only a `locationId` your organization\nowns: one whose `Location.organizationId` from `fetchLocations` equals your own organization\nid. If you operate a brand out of somebody else's host kitchen, `fetchLocations` shows you\nthat kitchen and `fetchStoreHours` reports its special dates, but you may not write them. A\nlocation-hours write is not brand-scoped: it moves the schedule for every brand trading\nthere, including the host's. Ask the host to make the change.\n\nA `locationId` that is not yours, whether it belongs to another organization or is a host\nkitchen you operate in, is treated the same as one that does not exist. Each returns the\nsame `404` and nothing is written. The response body does not say which case applied, so\ncheck `organizationId` on the location from `fetchLocations` against your own organization id\nbefore you write.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "SetLocationSpecialHoursRequest",
                "description": "Request for `StoresApi.setLocationSpecialHours`.\n\n**`wipeAll` is the only way to clear every upcoming special date:**\n\n  - `wipeAll: true`  -> `dates` may be empty or absent. Clears every upcoming special date at\n    this location.\n  - `wipeAll` absent/false -> `dates` must be present and non-empty, or the call is rejected\n    (400) with nothing changed. Missing or empty `dates` is never treated as \"clear\n    everything\" without `wipeAll: true`.",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "The `Location` to write special hours for. Required."
                  },
                  "dates": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SpecialDate"
                    },
                    "description": "The complete desired set of special hours for the location, replacing every upcoming date not\npresent in it. Required and must be non-empty unless `wipeAll: true`. See the request's own\ndescription."
                  },
                  "wipeAll": {
                    "type": "boolean",
                    "description": "Set to `true` to clear every upcoming special date. Absent means the normal behavior (send\n`dates`). See the request's own description."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The location's special dates as saved by this call.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "SetLocationSpecialHoursResponse",
                  "description": "Reply from `StoresApi.setLocationSpecialHours`: the special dates after the update.",
                  "properties": {
                    "dates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpecialDate"
                      },
                      "description": "The location's special dates as persisted after this call."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/stores/setLocationHours": {
      "post": {
        "operationId": "setLocationHours",
        "summary": "Set location weekly hours",
        "description": "Replace a location's weekly operating hours: the regular template, as opposed to\nthe date-specific overrides `setLocationSpecialHours` writes. Send the complete week;\n`windows` replaces whatever the location had. A window whose `closesAt` is earlier than its\n`opensAt` crosses midnight, and several windows may name the same `day` for a split service.\n\n**What it propagates to.** Every storefront at the location whose menus follow location\nhours. A menu configured with its own weekly hours is unaffected: read\n`MenuAssignment.hours.followsLocationHours` from `fetchStoreMenus` to see which is which. So is\na storefront of another organization's brand once that organization has set its own weekly\nhours at your kitchen: its menus that follow location hours take that organization's hours,\nnot yours, and `fetchStoreHours` keeps reporting them for it.\n\n**An hours write republishes menus.** Propagation is an asynchronous save-then-publish over\nevery affected menu, so a menu holding unpublished saved changes goes live with them. Verify the outcome with `fetchStoreHours`, which reads the\neffective, post-propagation state. This operation's own reply echoes what was saved, not\nwhat each platform has accepted.\n\n`windows` is required and must be non-empty. See `SetLocationHoursRequest` for why this\noperation has no equivalent of `wipeAll`.\n\n**Scope: owner-only, which is narrower than the reads.** Only a `locationId` your organization\nowns: one whose `Location.organizationId` from `fetchLocations` equals your own organization\nid. If you operate a brand out of somebody else's host kitchen, `fetchLocations` shows you\nthat kitchen and `fetchStoreHours` reports the hours its storefronts trade on, but you may not\nwrite the kitchen's weekly hours: this write moves the weekly template for every brand there\nthat follows the location's hours, including the host's, so it is the host's to make. Ask\nthem, or give your brands their own week instead (below).\n\nA `locationId` that is not yours, whether it belongs to another organization or is a host\nkitchen you operate in, is treated the same as one that does not exist. Each returns the\nsame `404` and nothing is written. The response body does not say which case applied, so\ncheck `organizationId` on the location from `fetchLocations` against your own organization id\nbefore you write.\n\n**Your own week at a host kitchen.** If your brands cook in somebody else's kitchen, your\norganization can set its own weekly hours for all of its brands there, in the Sous Chef\nPortal. They apply to your brands there and to nobody else's, `fetchStoreHours` reports them\nas `regular` on your storefronts there whose menus follow location hours, and the host's\n`setLocationHours` no longer changes those storefronts' weekly hours. No operation on this\nAPI reads or writes that schedule as such.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Stores"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "SetLocationHoursRequest",
                "description": "Request for `StoresApi.setLocationHours`.\n\n`windows` is the complete week, replacing whatever the location had. It is required and must be\nnon-empty: an empty week would mean \"this kitchen is never open\", which is a closure, not an\nhours edit. Use `setLocationSpecialHours` (or the store-status pause operations) to close a\nlocation.\n\nThere is no equivalent of the `wipeAll` option of `setLocationSpecialHours`: clearing the\nweekly template would leave every menu at the location with no hours at all.\n\nThere is no `organizationId` field: the acting organization comes from the API key, never from\nthe body.",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "The `Location` whose weekly hours are being replaced. Required."
                  },
                  "windows": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RegularHoursWindow"
                    },
                    "description": "The complete weekly template. Required, non-empty. Several windows may name the same `day`\n(a split service, such as lunch and dinner), and a window whose `closesAt` is earlier than\nits `opensAt` crosses midnight, exactly as `fetchStoreHours` reports them.\n\n**No two windows may cover the same minute.** Overlapping entries are rejected with a `400`,\nand the comparison spans midnight, so a Sunday `22:00`-`02:00` window collides with a Monday\n`01:00`-`05:00` one.\n\n**Times are wall clock in the location's own timezone** (the IANA zone `fetchStoreHours`\nreports beside the windows), never UTC and never an offset (`HH:MM` accepts no offset). Do\nnot convert before sending: `\"11:00\"` means eleven in the morning where the kitchen is, in\nsummer and in winter, and no value written here shifts at a DST boundary."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The location's weekly template as saved by this call.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "SetLocationHoursResponse",
                  "description": "Reply from `StoresApi.setLocationHours`: the location's weekly template after the update.",
                  "properties": {
                    "windows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegularHoursWindow"
                      },
                      "description": "The location's complete weekly template as persisted after this call."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/store-status/fetchStoreStatuses": {
      "post": {
        "operationId": "fetchStoreStatuses",
        "summary": "List store statuses",
        "description": "Status for any set of stores, from one storefront to the whole estate, in one operation.\n\nEach status carries three things: `desired` (what Sous Chef is configured to do),\n`observed` (what the platform reports), and `discrepancy` (always present; its classification\nfields are populated only when the two disagree).\n\nServed from Sous Chef's stored state, never proxied per request, so this never touches\nplatform rate limits.\n\nFreshness is not uniform. `lastPolledAt` shows the age of each observation. `observed`\n(and the `discrepancy` derived from it) comes from a sweep that runs hourly and covers\nDoorDash, Uber Eats and Grubhub only. Storefronts on other platforms are never swept, and a\nstorefront on one of those three may also have no recent reading. A store that has never\nbeen polled is absent from this feed. It is not returned with an unknown state.\nTreat a stale `lastPolledAt` as \"we do not currently know\", not as \"nothing has changed\",\nand check its age before driving an automated decision off `observed`. `desired` carries no\nsuch caveat: it is Sous Chef's own intended state and is always current.\n\nPass `storeIds` for specific stores, filter by `locationIds` / `brandIds` / `platforms`, or\nfilter `hasDiscrepancy: true` for just the stores needing attention. Omitting a filter means\nno filter, exactly as on `fetchStores`.\n\nPaging: sorted by `storeId` ascending. Loop until `nextCursor` is absent.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Store status"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreStatusesRequest",
                "description": "Request for `StoreStatusApi.fetchStoreStatuses`.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to specific storefronts."
                  },
                  "locationIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to storefronts at these kitchens."
                  },
                  "brandIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to storefronts selling these brands."
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to these platform slugs."
                  },
                  "state": {
                    "$ref": "#/components/schemas/StoreStatusState",
                    "description": "Filter on the desired state. `closedSpecialHours` is accepted but never matches: Sous Chef\ndoes not produce that state."
                  },
                  "hasDiscrepancy": {
                    "type": "boolean",
                    "description": "Filter to stores with (or without) a live discrepancy between desired and observed state."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of storefront statuses, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreStatusesResponse",
                  "description": "Reply from `StoreStatusApi.fetchStoreStatuses`.",
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoreStatus"
                      },
                      "description": "The page of statuses, sorted by `storeId` ascending."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/store-status/fetchStoreStatus": {
      "post": {
        "operationId": "fetchStoreStatus",
        "summary": "Get one store's status",
        "description": "Status for one storefront: the single-store form of `fetchStoreStatuses`,\nreturning the same three things: `desired`, `observed`, `discrepancy`.\n\nThe status is identical to the one the bulk read returns. Every caveat on\n`fetchStoreStatuses` applies here unchanged, and `lastPolledAt` is still the field that\ntells you how fresh `observed` is.\n\nNot found is `404`, and covers two cases, matching the bulk read, which omits the same store\nfrom the page:\n  - the `storeId` does not exist, or belongs to another organization (the two are not\n    distinguished, as everywhere else on this API), and\n  - the storefront is yours but Sous Chef has never polled it, so there is no observation to\n    report. The response message says which of the two applies. The status code does not,\n    because in both cases there is no status to return.\n\nIf you need the storefront's identity rather than its status, `fetchStores` answers for a\nnever-polled store where this one does not.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Store status"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreStatusRequest",
                "description": "Request for `StoreStatusApi.fetchStoreStatus`.",
                "properties": {
                  "storeId": {
                    "type": "string",
                    "description": "The `Store.id` to read."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The storefront's status.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreStatusResponse",
                  "description": "Reply from `StoreStatusApi.fetchStoreStatus`.",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/StoreStatus",
                      "description": "The storefront's status: the same `StoreStatus` the bulk read returns. It is wrapped in an\nobject, not returned bare, so that sibling fields can be added without a breaking change."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/store-status/pauseStores": {
      "post": {
        "operationId": "pauseStores",
        "summary": "Pause stores",
        "description": "Take one or more storefronts offline, with a typed reason and an optional automatic reopen\ntime. Your `note` is stored with the pause and returned as `desired.pauseNote`.\n\nStores are processed independently: one unsupported storefront in the batch does not fail\nit. `422` is returned only when no store in the batch supports the action through the API\n(none of the requested ids has live platform credentials).\n\nScope: only storefronts your organization owns or operates a brand out of. A `storeId` that\nexists but belongs to another organization is treated the same as one that does not exist.\nBoth are absent from the response and neither is changed. When none of the requested ids is\nyours, the answer is `404`.\n\n`reason: 'other'` requires `note`.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Store status"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "PauseStoresRequest",
                "description": "Request for `StoreStatusApi.pauseStores`.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`Store.id` values, 1-100."
                  },
                  "reason": {
                    "$ref": "#/components/schemas/PauseReason",
                    "description": "Typed reason. Required. `'other'` requires `note`."
                  },
                  "note": {
                    "type": "string",
                    "description": "Required when `reason` is `'other'`. Stored with the pause and returned as\n`desired.pauseNote`."
                  },
                  "until": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Automatic reopen time. Omit for an indefinite pause."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The `desired` state just written, for each paused storefront.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PauseStoresResponse",
                  "description": "Reply from `StoreStatusApi.pauseStores`.",
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoreStatus"
                      },
                      "description": "One entry per requested storefront your organization operates that supports pausing through\nthe API, carrying only `storeId` and the `desired` state just written. Requested ids that are\nnot yours, or not integrated, are omitted."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/store-status/unpauseStores": {
      "post": {
        "operationId": "unpauseStores",
        "summary": "Unpause stores",
        "description": "Bring storefronts back online. Safe to repeat: unpausing an already-open store leaves it open\nand returns `desired.state: open`.\n\nSame organization scoping and per-store independence as `pauseStores`. When none of the\nrequested ids is yours, the answer is `404`.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Store status"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "UnpauseStoresRequest",
                "description": "Request for `StoreStatusApi.unpauseStores`.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`Store.id` values, 1-100. Chunk larger sets across calls."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The `desired` state just written (`open`), for each requested storefront you operate.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "UnpauseStoresResponse",
                  "description": "Reply from `StoreStatusApi.unpauseStores`.",
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoreStatus"
                      },
                      "description": "One entry per requested storefront your organization operates, carrying only `storeId` and\nthe `desired` state just written (`open`). Requested ids that are not yours are omitted."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/item-availability/fetchLocationItems": {
      "post": {
        "operationId": "fetchLocationItems",
        "summary": "List items at a location",
        "description": "The item catalogue at one location: every item and modifier option your organization sells\nthere, with Sous Chef's item ids and current availability. This is the discovery read\n`setItemAvailability` depends on.\n\nScope: items whose brand your organization owns, at a location your organization owns or\noperates a brand out of. A `locationId` that does not exist and one outside your\norganization's scope are the same `404`.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Item availability"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchLocationItemsRequest",
                "description": "Request for `ItemAvailabilityApi.fetchLocationItems`.",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "The location (kitchen) whose catalogue you want: the `id` from `StoresApi.fetchLocations`.\nRequired; absent is `400`. A location that does not exist and one outside your organization's\nscope are the same `404`."
                  },
                  "query": {
                    "type": "string",
                    "description": "Case-insensitive name search."
                  },
                  "available": {
                    "type": "boolean",
                    "description": "Filter to items currently available (or unavailable) at the location."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of the location's items with their current availability, and the cursor for\nthe next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchLocationItemsResponse",
                  "description": "Reply from `ItemAvailabilityApi.fetchLocationItems`.",
                  "properties": {
                    "asOf": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this response was assembled (UTC, ISO-8601). The availability values are read live at\nthat moment; this is the freshness claim for the whole response."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ItemAvailability"
                      },
                      "description": "The page of items tracked at the location, sorted by name, restricted to items of brands your\norganization owns. Empty when nothing matches."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/item-availability/fetchStoreItems": {
      "post": {
        "operationId": "fetchStoreItems",
        "summary": "List items for a store",
        "description": "The item catalogue for one storefront. This is the per-store form of\n`fetchLocationItems`, for when you hold store ids from `fetchStores` rather than\nkitchen ids.\n\n**Availability is held at the kitchen, not the storefront.** This operation resolves your\n`storeId` to its parent kitchen and answers from there, narrowed to the store's own brand.\nTwo consequences follow:\n  - `available` is the kitchen's answer. Every other storefront of the same brand at that\n    kitchen reports the identical value, and marking an item unavailable affects all of\n    them. The reply echoes `locationId` so the sharing is visible in the data.\n  - `available` is what Sous Chef intends, not what the delivery platform currently shows.\n    A platform can independently mark an item unavailable on its own side, and this read does\n    not see that. It is the item-level counterpart of the `desired` / `observed` split\n    `fetchStoreStatus` makes explicit for the storefront itself.\n\nWhether a storefront is paused is separate and does not change any `available` value here.\nRead `fetchStoreStatus` for that.\n\nScope: the store must be one your organization owns or operates a brand out of, and items are\nrestricted to the store's own brand. A `storeId` that does not exist and one outside your\norganization's scope are the same `404`.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Item availability"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchStoreItemsRequest",
                "description": "Request for `ItemAvailabilityApi.fetchStoreItems`, the per-store form of\n`fetchLocationItems`.\n\nIt takes the same filters as the location form and is addressed by `storeId` instead of\n`locationId`. Use it when you hold store ids from `fetchStores` and do not want to look up the\nkitchen behind each one to ask what is marked unavailable there.",
                "properties": {
                  "storeId": {
                    "type": "string",
                    "description": "The `Store.id` whose catalogue you want."
                  },
                  "query": {
                    "type": "string",
                    "description": "Case-insensitive name search."
                  },
                  "available": {
                    "type": "boolean",
                    "description": "Filter to items currently available (or unavailable) at the store's kitchen."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One page of the store's items with their current availability, the kitchen the answer\ncame from, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchStoreItemsResponse",
                  "description": "Reply from `ItemAvailabilityApi.fetchStoreItems`. Carries the same `ItemAvailability` shape the\nlocation read returns.",
                  "properties": {
                    "asOf": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this response was assembled (UTC, ISO-8601). The availability values are read live at\nthat moment; this is the freshness claim for the whole response."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "The kitchen the answer came from.\n\n**Read this before acting on the result.** Availability is held per kitchen (location), never\nper storefront, so this operation resolves your `storeId` to its parent location and reports\nthat kitchen's catalogue. Every other storefront at the same kitchen sees the identical\nanswer. It is echoed here so the sharing is visible in the response. Pass it to\n`setItemAvailability` if you intend to change anything."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ItemAvailability"
                      },
                      "description": "The page of items tracked at the store's kitchen, narrowed to the store's own brand and sorted\nby name. Empty when nothing matches."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/item-availability/setItemAvailability": {
      "post": {
        "operationId": "setItemAvailability",
        "summary": "Set item availability",
        "description": "Mark one item available or unavailable at one kitchen.\n\n`itemId`/`sku` must resolve to an item whose brand your organization owns, and `locationId`\nmust be one your organization owns or operates a brand out of. Anything that does not resolve\nis an HTTP error: 404 for an item or location that does not exist or is not yours (the two\nare indistinguishable, as on `fetchLocationItems`), 400 for a malformed request, 409 for an\nambiguous `sku`. A failure is never reported inside a 200.\n\nTo change an item across many kitchens, discover the scope with `fetchLocationItems` /\n`fetchStores` and call this once per (item, location).\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Item availability"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "SetItemAvailabilityRequest",
                "description": "Request for `ItemAvailabilityApi.setItemAvailability`: one item at one location.\n\nExactly one of `itemId` / `sku` must be set. `locationId` is a single kitchen. Writes address\nthe location, which is where availability is held, never a storefront. To change an item across\nmany kitchens, call this once per location.",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "The location (kitchen) to change availability at. Required; absent is `400`. Not yours, or\nnot existing, is `404`."
                  },
                  "itemId": {
                    "type": "string",
                    "description": "The item to change, by `ItemAvailability.itemId`. Set exactly one of `itemId` / `sku`: both\nor neither is `400`. An item whose brand your organization does not own is `404`."
                  },
                  "sku": {
                    "type": "string",
                    "description": "The item to change, by SKU. This is the alternate key to `itemId`; set exactly one of the two.\nSKUs are not unique: a SKU matching more than one of your items is `409`, and nothing is\nwritten."
                  },
                  "available": {
                    "type": "boolean",
                    "description": "The availability to set: `true` puts the item back in stock, `false` marks it unavailable\nat the location. Required; absent is `400`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The item's resulting availability at the location.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "SetItemAvailabilityResponse",
                  "description": "Reply from `ItemAvailabilityApi.setItemAvailability`: the item's resulting state at that one\nlocation, in the same shape as `ItemAvailability`.\n\nA failed write is never this shape. Every failure (item or location not owned by your\norganization, ambiguous SKU, the write being rejected) is an HTTP error status with the\nstandard error body, never a 200.",
                  "properties": {
                    "itemId": {
                      "type": "string",
                      "description": "Sous Chef's identifier for the item. It is brand-scoped and stable for that brand's catalogue\nacross every location. `setItemAvailability` addresses items by it.\n\nThe id space is the same whether or not `isModifier` is set: a modifier option is addressed\nexactly like any other item."
                    },
                    "sku": {
                      "type": "string",
                      "description": "Stock-keeping unit. Not unique. An alternate lookup key on `setItemAvailability`."
                    },
                    "name": {
                      "type": "string",
                      "description": "The item's display name."
                    },
                    "isModifier": {
                      "type": "boolean",
                      "description": "`true` when this item is configured as a modifier option (e.g. a side or topping added to\nanother item) rather than a standalone menu item. Availability works identically for both."
                    },
                    "available": {
                      "type": "boolean",
                      "description": "Current availability at the requested location."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/reports/fetchReportCoverage": {
      "post": {
        "operationId": "fetchReportCoverage",
        "summary": "List available report types",
        "description": "Reports reachable through the authenticated organization's connected platforms.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchReportCoverageRequest",
                "description": "This request has no fields. The authenticated API key determines organization scope.",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The coverage matrix: one entry per platform report type, with whether it is available\nto your organization and its window constraint.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchReportCoverageResponse",
                  "description": "Reply from `ReportsApi.fetchReportCoverage`: which platform reports your organization can request.",
                  "properties": {
                    "asOf": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this organization-scoped matrix was calculated."
                    },
                    "coverage": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReportCoverage"
                      },
                      "description": "A small fixed matrix that is not paginated. Empty means no eligible connected stores."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/reports/createReport": {
      "post": {
        "operationId": "createReport",
        "summary": "Create a report",
        "description": "Request generation of a platform report for a date range and store scope. Asynchronous: the\nresponse returns the report before its files are ready, normally with status `processing`.\n\nFailures beyond the document-wide codes: `422` when this `(platform, type)` is not available\nto your organization (this includes every DoorDash type, and a scope that resolves to no\neligible store), or when the period is longer than the type allows or ends later than its\ndata lag allows. `fetchReportCoverage` says in advance which requests are valid: read\n`windowConstraint` and `dataLag` together.\n\nNOT safe to retry: this operation changes state and is not idempotent.",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "CreateReportRequest",
                "description": "Request for `ReportsApi.createReport`. `type`, `platform`, `periodStart` and `periodEnd` are\nrequired. Provide `locationIds` or `storeIds`, never both (`400`); omit both for every\neligible store of your organization on that platform.",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The platform's own report type, e.g. `PAYMENT_DETAILS_REPORT` or `order-details`."
                  },
                  "platform": {
                    "type": "string",
                    "description": "Delivery platform slug, e.g. `ubereats` or `grubhub`."
                  },
                  "periodStart": {
                    "type": "string",
                    "format": "date",
                    "description": "First day of the period, inclusive."
                  },
                  "periodEnd": {
                    "type": "string",
                    "format": "date",
                    "description": "Last day of the period, inclusive."
                  },
                  "locationIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to stores at these locations. Omit for all locations."
                  },
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow to these stores. Omit for all stores in scope. Mutually exclusive with `locationIds`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The newly recorded report, normally `processing`.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "CreateReportResponse",
                  "description": "Reply from `ReportsApi.createReport`: the report as recorded, normally `processing`.",
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/Report",
                      "description": "The newly recorded report request. Poll `fetchReport` with its `reportId` for its status."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/reports/fetchReports": {
      "post": {
        "operationId": "fetchReports",
        "summary": "List reports",
        "description": "List your organization's reports, newest first, with cursor pagination. List entries never\ninclude `files`. To follow one report to `ready`, poll `fetchReport`: a report that is still\n`processing` is checked against the platform when you read it there.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchReportsRequest",
                "description": "Request for `ReportsApi.fetchReports`. Every filter is optional; an omitted or empty filter\ndoes not narrow the list. There is no id filter: use this list to find your reports, then\ncall `fetchReport` once per report you want to follow or download.",
                "properties": {
                  "statuses": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ReportStatus"
                    },
                    "description": "Only reports in these statuses."
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Only reports for these delivery platform slugs, e.g. `ubereats`."
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Only reports of these platform report types."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Page size and cursor. `page.limit` defaults to 50 and above 100 is a `400`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A page of your organization's reports, newest first, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchReportsResponse",
                  "description": "Reply from `ReportsApi.fetchReports`.",
                  "properties": {
                    "reports": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Report"
                      },
                      "description": "Your organization's reports, newest `requestedAt` first. List entries never carry `files`:\ncall `fetchReport` for a download URL."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Pass back as `page.cursor` for the next page. Absent on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/reports/fetchReport": {
      "post": {
        "operationId": "fetchReport",
        "summary": "Get one report",
        "description": "Get one report. When it is `ready`, each entry in `files` carries a signed `downloadUrl` that\nworks for 24 hours (`expiresAt`) with no credentials, so treat it as a secret. Every call\nsigns a fresh URL, so an expired one never requires regenerating the report: call this\noperation again.\n\n`404` when `reportId` does not exist or belongs to another organization. The two cases are\nindistinguishable.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchReportRequest",
                "description": "Request for `ReportsApi.fetchReport`.",
                "properties": {
                  "reportId": {
                    "type": "string",
                    "description": "The `reportId` returned by `createReport` or listed by `fetchReports`. Required."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The report, with `files` and fresh download URLs once it is `ready`.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchReportResponse",
                  "description": "Reply from `ReportsApi.fetchReport`.",
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/Report",
                      "description": "The report. When `status` is `ready` it carries `files`, each with a fresh download URL."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/menus/fetchMenu": {
      "post": {
        "operationId": "fetchMenu",
        "summary": "Get one menu",
        "description": "The complete menu as one document: categories -> items -> modifier groups -> modifier\noptions.\n\nWithout `storeId`, prices are base prices and availability flags are omitted. With `storeId`,\nprices resolve for that storefront's location (see `Menu` on pricing), and\navailability flags reflect the storefront's live stock.\n\nScope: a menu whose brand your organization owns, or that your organization has assigned to\none of its own storefronts. A `menuId` that does not exist and one outside that scope are the\nsame `404`, as on every other directory and menu read on this API.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Menus"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchMenuRequest",
                "description": "Request for `MenusApi.fetchMenu`.",
                "properties": {
                  "menuId": {
                    "type": "string",
                    "description": "The menu to fetch. Required: an absent value is `404`. A menu that does not exist and one\noutside your organization's scope (neither its brand is yours nor is it assigned to one of your\nstorefronts) are the same `404`."
                  },
                  "storeId": {
                    "type": "string",
                    "description": "Optional storefront context: when provided, prices and availability resolve for this\nstorefront; otherwise base prices are returned and availability flags are omitted (never\ndefaulted to `false`)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The requested menu document.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchMenuResponse",
                  "description": "Reply from `MenusApi.fetchMenu`.",
                  "properties": {
                    "menu": {
                      "$ref": "#/components/schemas/Menu",
                      "description": "The requested menu document. Always present on a `200`; an unknown menu is a `404` instead."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/menus/fetchMenuPublications": {
      "post": {
        "operationId": "fetchMenuPublications",
        "summary": "List menu publications",
        "description": "Per-store, per-platform publication outcomes, by publication id (the polling path after\n`publishMenu`) or filtered by menu or store.\n\n`acknowledged` and `confirmed` are distinct states: `acknowledged` means the platform\naccepted the submission; `confirmed` means the platform reported the menu live.\n`confirmationMode` says which of the two a given platform can report. See that field.\n\nScope: publications your organization owns, including those started from the Sous Chef\nportal's \"publish menu\" flow, not only those started through this API.\n\nPaging: sorted by request time descending, and pages are counted in publications. Loop\nuntil `nextCursor` is absent.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Menus"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchMenuPublicationsRequest",
                "description": "Request for `MenusApi.fetchMenuPublications`.",
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Return only these publications (the `publicationId` values `publishMenu` returned). Absent\nmeans no filter on publication."
                  },
                  "menuIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Return only publications that submitted at least one of these menus to at least one store.\nA matching publication still returns all of its stores. Absent means no filter on menu."
                  },
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Return only publications that touched at least one of these storefronts. A matching\npublication still returns all of its stores, not only these. Absent means no filter on store."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Cursor pagination. Pages are counted in publications."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A page of publications, newest first, each with its per-store outcomes.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchMenuPublicationsResponse",
                  "description": "Reply from `MenusApi.fetchMenuPublications`.",
                  "properties": {
                    "publications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MenuPublication"
                      },
                      "description": "The page of publications, newest first."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent means the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/menus/publishMenu": {
      "post": {
        "operationId": "publishMenu",
        "summary": "Publish a menu",
        "description": "Push the menu's current saved state to the delivery platforms.\n\n**Saving a menu never changes what guests see. This call does, and there is no unpublish.**\n\nAsynchronous. The reply is an acknowledgement carrying a `publicationId`; per-store,\nper-platform outcomes arrive from `fetchMenuPublications` and on the\n`menu.publication.completed` webhook. A failed store carries a one-line summary of the\nplatform's error where the platform provides one. Some platforms report only success or\nfailure.\n\n**What is sent.** A publication always submits each storefront's complete menu set, because\nplatforms replace rather than merge. `menuId` therefore selects which storefronts are\npublished to, not what they receive: publishing menu A to a storefront that also carries menu\nB re-submits both. See `MenuPublication.menuId` for how that appears on the read\nside.\n\nScope: `menuId` must be in your organization's scope by the same rule `fetchMenu`\nuses, and every `storeId` supplied must be a storefront your organization owns. Anything else\nis `404` with nothing published. A publication only ever reaches your own organization's\nstorefronts. There is never a partial write, and the response does not distinguish \"does not\nexist\" from \"not yours\".\n\nNOT safe to retry: this operation changes state and is not idempotent.",
        "tags": [
          "Menus"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "PublishMenuRequest",
                "description": "Request for `MenusApi.publishMenu`. The organization is the one your API key belongs to; it is\nnever sent in the body.",
                "properties": {
                  "menuId": {
                    "type": "string",
                    "description": "The menu to publish. Required. This API returns `404` for a menu that does not exist and for\none belonging to another organization, and the two cannot be told apart.\n\n**What this selects.** `menuId` chooses which storefronts are published to (your storefronts\nthat it is assigned to). It does not narrow what is sent to them. Each selected storefront\nreceives its complete active menu set, because delivery platforms replace rather than merge.\nSee the `publishMenu` operation."
                  },
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Narrow the publication to specific storefronts. Omit to publish to every storefront the menu\nis assigned to at a location your organization owns.\n\nA `storeId` here that your organization does not own, or that the menu is not assigned to, is\n`404`, and nothing is published. The request is rejected whole rather than applied to the\nsubset that did resolve."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An acknowledgement carrying the `publicationId` to follow the publication by.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PublishMenuResponse",
                  "description": "Reply from `MenusApi.publishMenu`.\n\nThis is only an acknowledgement. Publication is asynchronous: the call returns as soon as the\npublication is recorded and queued, before any delivery platform has received it. Per-store,\nper-platform outcomes arrive on `fetchMenuPublications` (keyed by `publicationId`) and on the\n`menu.publication.completed` webhook.",
                  "properties": {
                    "publicationId": {
                      "type": "string",
                      "description": "Poll this with `fetchMenuPublications({ publicationIds: [publicationId] })`."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued"
                      ],
                      "description": "Always `queued` on success: the publication was accepted. Follow its progress with\n`fetchMenuPublications`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/promotions/fetchUberEatsPromotions": {
      "post": {
        "operationId": "fetchUberEatsPromotions",
        "summary": "List UberEats promotions",
        "description": "List the UberEats promotions your organization's storefronts are running, with cursor\npagination.\n\nThis read calls Uber Eats on each request. If Uber Eats refuses the call, it fails with a\n`502`. It never returns an empty page in that case.\n\n**Per store, only UberEats' first page.** UberEats' own list takes no paging parameter,\nso for each store this lists the promotions on the first page UberEats serves, and a promotion\npast that page is not listed. `states` and `promotionIds` filter that set, and `page` pages\nthrough it across your stores.\n\n**Order.** Store by store, in the order of `storeIds` (or of your organization's Uber Eats\nstores when you omit it); within one store, newest `createdAt` first, then `promotionId`. A\npromotion with no `createdAt` comes last in its store.\n\n**A shared storefront is listed once.** When several of your stores are connected to\nthe same Uber Eats storefront, its promotions are listed once, under one of those stores' ids.\n\nWith no `storeIds`, stores that are not connected to an Uber Eats storefront are skipped, and\nso is a store Uber Eats cannot list; naming such a store in `storeIds` is a `404`.\n\nFailures beyond the document-wide codes: `404` when any `storeId` is not a store of your\norganization. An unknown id and another organization's id are indistinguishable.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Promotions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchUberEatsPromotionsRequest",
                "description": "Request for `PromotionsApi.fetchUberEatsPromotions`.\n\nEvery filter is optional, and an omitted or empty one does not narrow the list. `fetchReports`\nfollows the same convention. Omitting all of them asks for every API-created UberEats\npromotion on every Uber Eats store of your organization.\n\n`storeIds` is the only filter that can answer `404`: every id in it must be a store your\norganization owns or operates a brand out of. One that is not is a `404`, indistinguishable from\nan id that does not exist anywhere. Every operation on this API that takes an id follows this\nconvention, so a response never confirms that another organization holds an id.\n\nAn organization with more than 50 Uber Eats storefronts must send `storeIds`, with at most 50\nids in one call. Omitting it there is a `400`.",
                "properties": {
                  "storeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Only promotions on these stores. Omit for every Uber Eats store in your organization."
                  },
                  "promotionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Only these promotions, by UberEats `promotionId`."
                  },
                  "states": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/UberEatsPromotionState"
                    },
                    "description": "Only promotions in these states."
                  },
                  "page": {
                    "$ref": "#/components/schemas/PageRequest",
                    "description": "Page size and cursor. `page.limit` defaults to 50 and above 100 is a `400`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A page of the matching promotions, and the cursor for the next page.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchUberEatsPromotionsResponse",
                  "description": "Reply from `PromotionsApi.fetchUberEatsPromotions`.",
                  "properties": {
                    "promotions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UberEatsPromotion"
                      },
                      "description": "The matching promotions."
                    },
                    "nextCursor": {
                      "type": "string",
                      "description": "Pass back as `page.cursor` for the next page. Absent on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/promotions/fetchUberEatsPromotion": {
      "post": {
        "operationId": "fetchUberEatsPromotion",
        "summary": "Get one UberEats promotion",
        "description": "Get one UberEats promotion, by id.\n\nThis read calls Uber Eats on each request. If Uber Eats refuses the call, it fails with a\n`502`. It never returns a promotion in that case.\n\nFailures beyond the document-wide codes: `404` when `promotionId` does not exist or belongs\nto another organization. The two cases are indistinguishable, as everywhere else on this API.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Promotions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchUberEatsPromotionRequest",
                "description": "Request for `PromotionsApi.fetchUberEatsPromotion`: one promotion, by id.\n\n`promotionId` is required. Omitting it is a `400`. This is the single-entity\ncounterpart of `fetchUberEatsPromotions`, following the same convention as\n`StoresApi.fetchStore` and `OrdersApi.fetchOrder`: a list read for many, and a get for one.",
                "properties": {
                  "promotionId": {
                    "type": "string",
                    "description": "Required. The `promotionId` from `createUberEatsPromotion` or `fetchUberEatsPromotions`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The promotion.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchUberEatsPromotionResponse",
                  "description": "Reply from `PromotionsApi.fetchUberEatsPromotion`.\n\n`404` when `promotionId` does not exist or belongs to another organization. The two cases are\nindistinguishable, as everywhere else on this API.",
                  "properties": {
                    "promotion": {
                      "$ref": "#/components/schemas/UberEatsPromotion",
                      "description": "The promotion, in the same shape `fetchUberEatsPromotions` returns."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/promotions/createUberEatsPromotion": {
      "post": {
        "operationId": "createUberEatsPromotion",
        "summary": "Create an UberEats promotion",
        "description": "Create a promotion on one of your UberEats storefronts.\n\nIf Uber Eats refuses the call outright, it fails with a `502`, and nothing is spent.\n\n**This spends money on a live storefront** and cannot be undone. It can only be revoked, which\nstops it going forward and refunds nothing. It is also not idempotent: read the notes on\nretries and on immutability in `CreateUberEatsPromotionRequest` before you write the\ncalling code.\n\nFailures beyond the document-wide codes: `403` when the API key is read-only; `404` when\n`storeId` is not a storefront of your organization (an unknown id and another organization's\nid are indistinguishable); `400` when a `MENU_ITEM_DISCOUNT` item sets `discountValue` or\nhas no `percentValue`, because Uber Eats discounts a menu item by percentage only;\n`400` when a `PERCENTOFF` or `MENU_ITEM_DISCOUNT` promotion has no `discount`, when a\n`PERCENTOFF` discount has no `percentValue`, when a `MENU_ITEM_DISCOUNT` lists no `items`, or\nwhen any `percentValue` is not a whole number from 1 to 100.\n\nOne more `400`: when Uber Eats itself refuses the promotion, for a limit only Uber Eats\nenforces (for example an unknown `userGroup` or a budget `period` it does not offer), the call\nfails with `400` and `errorCode` (also `subType`) `bad_request.uber_eats_refused`. Its message\ncarries Uber Eats' own reason, shortened, and nothing is created. This `400` is final: fix the\nrequest, do not retry it unchanged.\n\nNOT safe to retry: this operation changes state and is not idempotent.",
        "tags": [
          "Promotions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "CreateUberEatsPromotionRequest",
                "description": "Request for `PromotionsApi.createUberEatsPromotion`.\n\n`storeId`, `promoType`, `startsAt` and `endsAt` are required. Omitting any of them is a `400`.\n\n**A promotion is immutable once created.** UberEats offers no update and no pause, so this API\nhas no `updateUberEatsPromotion`. Changing a running promotion means `revokeUberEatsPromotion`\nfollowed by a new create: two separate calls, as on the platform.\n\n**Not idempotent.** `Idempotency-Key` is accepted and ignored on this API, so a retried\ncreate makes a second promotion, with its own `promotionId` and its own budget, on a live\nstorefront. Treat a timeout as \"may have succeeded\": call `fetchUberEatsPromotions` and look for\nyour `externalPromotionId` before retrying.",
                "properties": {
                  "storeId": {
                    "type": "string",
                    "description": "Required. The storefront to run the promotion on, as `fetchStores` reports it."
                  },
                  "promoType": {
                    "$ref": "#/components/schemas/UberEatsPromoType",
                    "description": "Required. The promotion mechanic. See `UberEatsPromoType`."
                  },
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Required. When the promotion starts running."
                  },
                  "endsAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Required. When the promotion stops running. Must be after `startsAt`."
                  },
                  "externalPromotionId": {
                    "type": "string",
                    "description": "Your reference for this promotion. Returned on promotion reads."
                  },
                  "discount": {
                    "$ref": "#/components/schemas/UberEatsDiscount",
                    "description": "Mechanic-specific parameters: the branch of `UberEatsDiscount` for your `promoType`,\ne.g. `minBasket` + `discountValue` for `FLATOFF`; `percentValue` + `maxDiscount` for\n`PERCENTOFF`; `targetItemIds` for `BOGO`; per-item `items` for `MENU_ITEM_DISCOUNT`. When\npresent, `discount.promoType` must equal `promoType` or the request is a `400`. Required for\n`PERCENTOFF` and `MENU_ITEM_DISCOUNT`: omitting it there is a `400`."
                  },
                  "budget": {
                    "$ref": "#/components/schemas/UberEatsPromotionBudget",
                    "description": "The spend ceiling. `amount` is an integer in minor units. See\n`UberEatsPromotionBudget`."
                  },
                  "allowUnlimitedApply": {
                    "type": "boolean",
                    "description": "Whether one customer may redeem repeatedly."
                  },
                  "userGroup": {
                    "$ref": "#/components/schemas/UberEatsUserGroup",
                    "description": "Which customers the promotion is offered to. Omit it and Sous Chef uses `ALL_CUSTOMERS` on\nyour behalf. See `UberEatsUserGroup`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The promotion you requested, carrying its new `promotionId`.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "CreateUberEatsPromotionResponse",
                  "description": "Reply from `PromotionsApi.createUberEatsPromotion`: your request, with the new `promotionId`.",
                  "properties": {
                    "promotion": {
                      "$ref": "#/components/schemas/UberEatsPromotion",
                      "description": "The new promotion, carrying the `promotionId` every later call takes."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/promotions/revokeUberEatsPromotion": {
      "post": {
        "operationId": "revokeUberEatsPromotion",
        "summary": "Revoke an UberEats promotion",
        "description": "Revoke a promotion. This is terminal: there is no un-revoke, on this API or on the platform.\n\nIf Uber Eats refuses the call outright, it fails with a `502`, and nothing is revoked.\n\nThe reply carries the promotion in its final state, so confirming the revoke needs no\nfollow-up read. Revoking stops the promotion going forward; it does not reverse redemptions already\nmade, and it refunds nothing.\n\nFailures beyond the document-wide codes: `403` when the API key is read-only; `404` when\n`promotionId` does not exist or belongs to another organization. The two cases are\nindistinguishable, as everywhere else on this API.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Promotions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "RevokeUberEatsPromotionRequest",
                "description": "Request for `PromotionsApi.revokeUberEatsPromotion`.",
                "properties": {
                  "promotionId": {
                    "type": "string",
                    "description": "Required. The `promotionId` from `createUberEatsPromotion` or `fetchUberEatsPromotions`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The promotion in its final state, normally `revoked`.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "RevokeUberEatsPromotionResponse",
                  "description": "Reply from `PromotionsApi.revokeUberEatsPromotion`: the promotion in its final state.",
                  "properties": {
                    "promotion": {
                      "$ref": "#/components/schemas/UberEatsPromotion",
                      "description": "The promotion in its final state, normally `revoked`. A promotion that had already expired or\ncompleted is returned as it is. Returned so you need no follow-up read to confirm."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/settings/fetchWebhookSettings": {
      "post": {
        "operationId": "fetchWebhookSettings",
        "summary": "Get webhook settings",
        "description": "Your current webhook configuration: both destinations, in one read.\n\n`legacyUrl` is included so you can see what Sous Chef has on file for the legacy feed. The\nURL itself cannot be set through this API; `legacyUrlEnabled` can. The response never\ncontains an api key.\n\nAn organization with neither destination configured gets back `newUrlEnabled: false`,\n`legacyUrlEnabled: true` and no other field, not a `404`. Having nothing configured is a valid\nstate, not an error.\n\nSafe to retry: this operation is read-only and idempotent.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "FetchWebhookSettingsRequest",
                "description": "Request for `SettingsApi.fetchWebhookSettings`. It has no fields: everything is resolved from\nyour api key.",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your current webhook configuration for both destinations.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "FetchWebhookSettingsResponse",
                  "description": "Reply from `SettingsApi.fetchWebhookSettings`.",
                  "properties": {
                    "legacyUrl": {
                      "type": "string",
                      "description": "The legacy orders-only feed's registered url. Read-only through this API. Absent when nothing\nis configured. Delivery to it is also gated by Sous Chef's order-notifications switch for\nyour organization, and by `legacyUrlEnabled`."
                    },
                    "legacyUrlEnabled": {
                      "type": "boolean",
                      "description": "A pause switch for `legacyUrl` only, the counterpart of `newUrlEnabled` for the legacy\ndestination. Unlike `legacyUrl` itself, it can be set through `setAllWebhookSettings`. Use it\nto finish migrating off the legacy feed yourself, without Sous Chef clearing `legacyUrl` as a\nsupport action. `false` silences `legacyUrl` alone; it has no effect on `newUrl`. It defaults\nto `true`, so a destination that was never switched off keeps delivering, including across a\n`setAllWebhookSettings` call that omits this field."
                    },
                    "newUrl": {
                      "type": "string",
                      "description": "The new signed (`v2=` ES256) destination. Absent when nothing is registered."
                    },
                    "newUrlEvents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEventType"
                      },
                      "description": "Which events are delivered to `newUrl`. Governs `newUrl` only: the legacy feed has no\nper-event list and is always orders-only."
                    },
                    "newUrlEnabled": {
                      "type": "boolean",
                      "description": "A pause switch for `newUrl` only. `false` silences the new feed; it has no effect on\n`legacyUrl`, which has its own switch, `legacyUrlEnabled`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    },
    "/management/settings/setAllWebhookSettings": {
      "post": {
        "operationId": "setAllWebhookSettings",
        "summary": "Update webhook settings",
        "description": "Set any of `newUrl`, `newUrlEvents`, `newUrlEnabled` and `legacyUrlEnabled` in one call.\n\n**An omitted field is left unchanged; a field you send is set.** Send only the fields you are\nchanging. You do not have to restate a setting to keep it. In particular, registering a\n`newUrl` without mentioning `legacyUrlEnabled` does not switch your legacy order feed off.\n\nField by field:\n  - `newUrl`. Omitted: unchanged. A url: registered (send `newUrlEvents` with it). Explicit\n    `null`: cleared. To stop delivery and keep the registration, send\n    `newUrlEnabled: false` instead.\n  - `newUrlEvents`. Omitted: unchanged. Present: replaces the whole list, so `[]` means \"no\n    events\". It is never an append.\n  - `newUrlEnabled`. Omitted: unchanged. Present: set.\n  - `legacyUrlEnabled`. Omitted: unchanged. Present: set.\n\nOn an organization that has never had any webhook settings, \"unchanged\" means the stored\ndefault: `newUrl` absent, `newUrlEvents` empty, and both enabled switches on.\n\n`legacyUrl` must not appear in the request body. It is rejected with `400`, not silently\nignored. Sous Chef controls where the legacy feed delivers; `legacyUrlEnabled` is how you\ncontrol whether it delivers.\n\n`setAllWebhookSettings` does not reset the fields you leave out. The name means that this one\noperation covers every settable webhook field. There is no per-field endpoint.\n\nValidation:\n  1. If `newUrl` is sent as a url, `newUrlEvents` must be sent with it and contain at least one\n     event. A destination with no subscribed events would receive nothing.\n  2. `legacyUrl` in the body is a `400`.\n  3. Every entry in `newUrlEvents` must be one of the published event types.\n  4. `newUrl` must be `https://` and must not resolve to a private (RFC1918), link-local, or\n     cloud-metadata address.\n  5. Any field in the body outside `newUrl` / `newUrlEvents` / `newUrlEnabled` /\n     `legacyUrlEnabled` is a `400`.\n  6. A call that would leave the organization with no webhook destination is a `400`. This\n     covers clearing `newUrl` with `null` when no `legacyUrl` is on file, and a first call\n     that registers no destination.\n\nReturns the full updated settings, including the unchanged `legacyUrl`, so you can confirm\nthe write without a second call.\n\nSafe to retry: this operation changes state but is idempotent.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "SetAllWebhookSettingsRequest",
                "description": "Request for `setAllWebhookSettings`. Narrower than what `fetchWebhookSettings` returns:\n`legacyUrl` has no field here at all, and sending it is rejected with `400` rather than\nsilently ignored.\n\nEvery field here is optional: omitting one leaves its stored value unchanged, and sending one\nsets it. No field is reset by being absent.",
                "properties": {
                  "newUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The new signed destination to register.\n\nOmitted -> the stored `newUrl` is left alone. A url -> registered, and at least one entry in\n`newUrlEvents` must accompany it in the same call. Explicit `null` -> the destination is\ncleared, which is refused with `400` when it would leave the organization with no webhook\ndestination at all (no `legacyUrl` on file). Prefer `newUrlEnabled: false` to stop delivery:\npausing keeps the registration, clearing removes it."
                  },
                  "newUrlEvents": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEventType"
                    },
                    "description": "Which events `newUrl` receives.\n\nOmitted -> the stored subscription list is left alone. Present -> it replaces the whole\nstored list, so `[]` means \"no events\" and this is not an append. Must contain at least one\nentry whenever `newUrl` is sent as a url."
                  },
                  "newUrlEnabled": {
                    "type": "boolean",
                    "description": "Pause switch for `newUrl` only. Omitted -> left at its stored value."
                  },
                  "legacyUrlEnabled": {
                    "type": "boolean",
                    "description": "Pause switch for `legacyUrl` only. `legacyUrl` itself has no field on this request and is\nrejected with `400` if sent. This switch can be set, and it is the only way to turn the\nlegacy feed off yourself. `false` stops legacy delivery immediately; setting it back to `true`\nresumes it.\n\nOmitting it leaves legacy delivery unchanged. You do not need to restate this field to keep\nthe legacy feed running."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your full webhook configuration after the update, including the untouched\n`legacyUrl`.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "SetAllWebhookSettingsResponse",
                  "description": "Reply from `SettingsApi.setAllWebhookSettings`: your full webhook configuration after the\nupdate, including the unchanged `legacyUrl`, so you can confirm the write in the same round\ntrip.",
                  "properties": {
                    "legacyUrl": {
                      "type": "string",
                      "description": "The legacy orders-only feed's registered url. Read-only through this API. Absent when nothing\nis configured. Delivery to it is also gated by Sous Chef's order-notifications switch for\nyour organization, and by `legacyUrlEnabled`."
                    },
                    "legacyUrlEnabled": {
                      "type": "boolean",
                      "description": "A pause switch for `legacyUrl` only, the counterpart of `newUrlEnabled` for the legacy\ndestination. Unlike `legacyUrl` itself, it can be set through `setAllWebhookSettings`. Use it\nto finish migrating off the legacy feed yourself, without Sous Chef clearing `legacyUrl` as a\nsupport action. `false` silences `legacyUrl` alone; it has no effect on `newUrl`. It defaults\nto `true`, so a destination that was never switched off keeps delivering, including across a\n`setAllWebhookSettings` call that omits this field."
                    },
                    "newUrl": {
                      "type": "string",
                      "description": "The new signed (`v2=` ES256) destination. Absent when nothing is registered."
                    },
                    "newUrlEvents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEventType"
                      },
                      "description": "Which events are delivered to `newUrl`. Governs `newUrl` only: the legacy feed has no\nper-event list and is always orders-only."
                    },
                    "newUrlEnabled": {
                      "type": "boolean",
                      "description": "A pause switch for `newUrl` only. `false` silences the new feed; it has no effect on\n`legacyUrl`, which has its own switch, `legacyUrlEnabled`."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation. Correct the request; a retry returns the same answer.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or mismatched credentials. Correct the credentials before you send the request again. Repeated 401 responses can be rate limited.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key is valid but is not allowed to make this call: a read-only key on a write, or a key without access to this part of the API. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "429": {
            "description": "Over the rate limit, which applies per organization rather than per key. Honour the `Retry-After` header when it is present; otherwise wait 60 seconds, then retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "500": {
            "description": "A fault on our side. Retry with exponential backoff and jitter.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          },
          "501": {
            "description": "Reserved. No operation returns this status today. Do not retry.",
            "headers": {
              "x-mealco-tx-id": {
                "$ref": "#/components/headers/x-mealco-tx-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "order.created": {
      "post": {
        "operationId": "orderCreatedWebhook",
        "summary": "Order created",
        "description": "A new order entered Sous Chef from a connected platform.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Every order\nevent is delivered to the same URL: each event has its own page, not its own endpoint. Return\nany 2xx to acknowledge; anything else is retried up to four more times.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "OrderCreatedEvent",
                "description": "A new order entered Sous Chef from a connected platform.\n\n`data` is the same `Order` object `fetchOrders` returns, without `store`, `cancellation` and\n`details`. Read the order with `fetchOrder` when you need those.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "order.created"
                    ],
                    "description": "Always `order.created`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/Order",
                    "description": "The order, as `fetchOrders` returns it minus `store`, `cancellation` and `details`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "order.status.updated": {
      "post": {
        "operationId": "orderStatusUpdatedWebhook",
        "summary": "Order status updated",
        "description": "An order moved through its lifecycle (ready, finished).\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Order by the\ntransported state (`data.updatedAt`, `data.status`), never by arrival: deliveries are\nunordered.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "OrderStatusUpdatedEvent",
                "description": "An order moved through its lifecycle (ready, finished).\n\nRejections are announced by `OrderRejectedEvent`, not here.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "order.status.updated"
                    ],
                    "description": "Always `order.status.updated`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/Order",
                    "description": "The order, carrying its new `status`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "order.rejected": {
      "post": {
        "operationId": "orderRejectedWebhook",
        "summary": "Order rejected",
        "description": "An order was rejected, including the automatic rejections Sous Chef makes at intake.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "OrderRejectedEvent",
                "description": "An order was rejected. This includes automatic rejections at intake (store paused, outside\noperating or special hours, items out of stock). `data.rejectReason` and\n`data.rejectReasonCode` say why.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "order.rejected"
                    ],
                    "description": "Always `order.rejected`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/Order",
                    "description": "The order, with `status: rejected`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "operationId": "orderCancelledWebhook",
        "summary": "Order cancelled",
        "description": "An order was cancelled. The event says who cancelled it, why, and when.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. The event name\nand the order **status** value are both spelled `cancelled`, with two `l`s.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "OrderCancelledEvent",
                "description": "An order was cancelled by any party.\n\nThe event name is `order.cancelled`, with two `l`s. This is the same spelling as the order\n**status** value.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "order.cancelled"
                    ],
                    "description": "Always `order.cancelled`, with two `l`s."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/CancelledOrder",
                    "description": "The cancelled order, carrying `by`, `reason` and `at`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "order.delivery.updated": {
      "post": {
        "operationId": "orderDeliveryUpdatedWebhook",
        "summary": "Order delivery updated",
        "description": "Courier lifecycle for a platform-delivered order.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Deduplicate on\nthe envelope's `id`: successive courier transitions for one order are separate events and\ncarry separate ids, so a key built from the order id and the event type would collapse them\nand lose one.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "OrderDeliveryUpdatedEvent",
                "description": "Courier lifecycle for platform-delivered orders: assigned, en route to store, en route to\ncustomer, completed, cancelled (`CANCELED` on the wire).",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "order.delivery.updated"
                    ],
                    "description": "Always `order.delivery.updated`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/Order",
                    "description": "The order, carrying its new `deliveryStatus`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "store.status.changed": {
      "post": {
        "operationId": "storeStatusChangedWebhook",
        "summary": "Store status changed",
        "description": "A store's intended or observed state changed.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Return any 2xx\nto acknowledge; anything else is retried up to four more times. The payload carries the part\nof the status that changed. Read `fetchStoreStatus` for the whole status.",
        "tags": [
          "Store status"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "StoreStatusChangedEvent",
                "description": "A store was paused or resumed, or a discrepancy between the store and its delivery platform\nappeared.\n\n**Sent on every status write, not only on a genuine change.** Pausing a store that is already\npaused, or resuming one that is already open, sends this event. Sous Chef acts on the\noperator's intent and does not re-read the store's prior state to suppress a no-op. Treat the\npayload as the current state, not as proof that something changed, and collapse repeats on\n`data.desired.state` if you need edge semantics.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "store.status.changed"
                    ],
                    "description": "Always `store.status.changed`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/StoreStatus",
                    "description": "The part of the store's status that changed, in the shape `fetchStoreStatuses` returns. A\npause or a resume carries `storeId` and `desired`. A new discrepancy carries `desired`,\n`observed`, `lastPolledAt` and `discrepancy.hasDiscrepancy`, without a classification. Read\nthe whole status with `fetchStoreStatus`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "item.availability.changed": {
      "post": {
        "operationId": "itemAvailabilityChangedWebhook",
        "summary": "Item availability changed",
        "description": "Items were marked unavailable or restocked at a kitchen that sells them through your stores.\n\nDelivered to your webhook URL (`newUrl`), alongside every other event you subscribed it to.\nSubscribe it to `item.availability.changed` with `setAllWebhookSettings`. Return any 2xx to\nacknowledge; anything else is retried up to four more times. Deduplicate on the envelope's\n`id`.",
        "tags": [
          "Item availability"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "ItemAvailabilityChangedEvent",
                "description": "An item or modifier option was marked out of stock or back in stock at a kitchen that sells it\nthrough one of your stores.\n\n`data.items` carries the same `ItemAvailability` objects `fetchStoreItems` returns.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "item.availability.changed"
                    ],
                    "description": "Always `item.availability.changed`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/ItemAvailabilityChange",
                    "description": "The change."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "report.completed": {
      "post": {
        "operationId": "reportCompletedWebhook",
        "summary": "Report completed",
        "description": "A requested report finished, successfully or not.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Return any 2xx\nto acknowledge; anything else is retried up to four more times. Branch on `data.status`:\n`ready` means the files exist and can be fetched, `failed` means that request will not\nproduce files.",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "ReportCompletedEvent",
                "description": "A report you requested with `createReport` reached a terminal state: `ready` or `failed`. The\nevent is sent for both, so you also learn when a report failed. Read `data.status` to tell\nwhich; `data.error` carries a human-readable summary on `failed`.\n\n**`data.files` is not carried, even when the report is `ready`.** Each file's `downloadUrl` is\nsigned at read time and expires after 24 hours. A signed URL is also a bearer credential, so it\nis not sent in a webhook body. Call `fetchReport` with\n`data.reportId` when this event arrives. Every call signs a fresh URL, and the report is not\nregenerated for it.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "report.completed"
                    ],
                    "description": "Always `report.completed`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/Report",
                    "description": "The report and its terminal `status`. This is the same object `fetchReport` returns, with\n`files` omitted."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    },
    "menu.publication.completed": {
      "post": {
        "operationId": "menuPublicationCompletedWebhook",
        "summary": "Menu publication completed",
        "description": "A menu publication finished, successfully or not.\n\nDelivered to your webhook URL (`newUrl`) when it is subscribed to this event. Return any 2xx\nto acknowledge; anything else is retried up to four more times. Check `data.stores[]` for\nthe per-store, per-platform outcome. A publication that reached a terminal state does not\nmean every store succeeded.\n\n**When it fires.** Once for the publication as a whole, never once per store, each time it\nreaches a terminal state. That is the moment `fetchMenuPublications` would first report it\n`completed` or `failed`:\n- every store finished, some possibly with a failure: `data.status` is `completed`;\n- the publication failed as a whole: `failed`;\n- it was cancelled while still `queued` or `publishing`: `failed`, the value the read reports\n  for a cancelled publication. Cancelling a publication that had already failed sends nothing\n  more, because its `failed` event was already sent;\n- no storefront had a menu to publish: `completed`, with an empty `data.stores`, sent at once.\n\n**A reopened publication sends a second event.** When Sous Chef retries the failed stores of a\nfinished publication, it goes back to `publishing` and its `completedAt` is cleared. When it\nfinishes again, this fires again with the new `completedAt` and a new `id`. Both deliveries are\nreal events, not duplicates: keep the one with the later `data.completedAt`.\n\n**The `id`.** Deduplicate on the envelope `id`, as for every event. For this event it is built\nfrom the publication and the instant this terminal state was reached\n(`<publicationId>:<completedAt>`, for example `9b2f…:2026-10-08T12:34:56.123Z`), so every retry\nof one delivery carries the same `id`, and a reopened publication's next event carries a new\none. It is not a UUID: store it as a string, and read `data.publicationId` and\n`data.completedAt` rather than parsing it.",
        "tags": [
          "Menus"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "MenuPublicationCompletedEvent",
                "description": "A menu publication reached a terminal state: `completed` or `failed`.\n\nOne publish request produces one outcome per store per platform, and they do not succeed or\nfail together. This event fires once for the publication as a whole, not once per store. The\nper-store detail is inside `data.stores`, including the platform's error verbatim where the\nplatform gives one. A publication `status` of `completed` does not imply every store\nsucceeded. Read `data.stores[].status` before telling an operator their menu is live.\n\nWhen it fires, the second event a reopened publication sends, and how its `id` is built are\ndocumented on the `menu.publication.completed` webhook.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event id, and your deduplication key.\n\nA delivery that is not acknowledged is sent again, and deliveries are unordered, so you will\nreceive the same event more than once. Every retry of one delivery carries the same `id`. Two\nlegitimate transitions of the same subject are two different events and carry two different\nids. `newUrl` and the legacy webhook feed assign their ids separately.\n\nKey your idempotency on this field alone. Nothing else in the payload is a deduplication\nkey: `timestamp` is the moment the attempt was sent and differs between copies of one event."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "menu.publication.completed"
                    ],
                    "description": "Always `menu.publication.completed`."
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery was sent, not when the event happened. Order by the transported state,\nnever by arrival."
                  },
                  "organization_id": {
                    "type": "string",
                    "description": "Your organization id. The legacy webhook feed also carries it on the delivery's\n`X-Organization-ID` header.\n\nSnake case on this one field is a long-lived wire value; every other field on this API is\ncamelCase.\n\nTreat it as a sanity check, never as proof of origin: it is a value inside a body anyone\nwho learns your URL can POST. Proof of origin is the `X-SousChef-Signature` header, which\nevery delivery to your `newUrl` carries on every attempt (the same value is also sent as\n`X-OneTablet-Signature`, for backward compatibility); see \"Verifying webhook signatures\".\nOrder events delivered to the legacy webhook feed (`legacyUrl`) carry no signature."
                  },
                  "data": {
                    "$ref": "#/components/schemas/MenuPublication",
                    "description": "The publication and its per-store, per-platform outcomes. This is the same object\n`fetchMenuPublications` returns."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx to acknowledge delivery; the body is ignored. Anything else is retried\nup to four more times."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Brand": {
        "type": "object",
        "description": "A brand (menu concept): what a customer sees on a delivery app. Top of the three-level\nidentity map: brand -> location -> store.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the brand, and what the brand-scoped operations accept."
          },
          "code": {
            "type": "string",
            "description": "Short reference code for the brand, where one has been configured.\n\nOften absent: the value is optional and many brands have none. Do not key on it. It exists\nso that a partner who supplied us a code can recognise its own record."
          },
          "name": {
            "type": "string",
            "description": "URL-friendly unique name, lowercase and hyphenated, e.g. \"example-kitchen\". Unique across\nall of Sous Chef, so it works as a human-readable join key where there is nowhere to keep an\nid."
          },
          "displayName": {
            "type": "string",
            "description": "Public-facing brand name as shown in the portal and printed on tickets. The one to display;\n`name` is the slug."
          },
          "organizationId": {
            "type": "string",
            "description": "The organization that owns the brand. On `fetchBrands` rows it is always the one your API\nkey resolves to. Echoed so a partner holding keys for several organizations can attribute a\nmerged result set."
          },
          "deactivatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the brand was retired, as an ISO-8601 UTC instant. Absent means active.\n\nRetired brands are returned by `fetchBrands`, so that a partner reconciling last year's\norders can still resolve the id it recorded then."
          }
        }
      },
      "CancelledOrder": {
        "type": "object",
        "description": "The order as it stands after a cancellation, plus who cancelled it and when.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the order (uuid). `fetchOrder` takes this id."
          },
          "platformOrderId": {
            "type": "string",
            "description": "The id the order has on the platform or channel it came from, which is the order id a channel\npartner sent when it placed the order. Absent when the platform sends none."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "description": "Current state of the order."
          },
          "deliveryStatus": {
            "$ref": "#/components/schemas/OrderDeliveryStatus",
            "description": "Delivery progress, where the platform transmits it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order record was created, ISO-8601 UTC."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order record last changed, ISO-8601 UTC."
          },
          "estimatedReadyAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the kitchen expects the order to be ready, ISO-8601 UTC. Set when Sous Chef accepts the\norder, from the kitchen's preparation time. A scheduled order carries its scheduled time.\n\nCarried on the order webhooks (`order.created` onward). Absent when no estimate exists, and\nabsent on `fetchOrders` and `fetchOrder`."
          },
          "rejectReason": {
            "type": "string",
            "description": "Why the order was rejected, in words. Present on `order.rejected` only. For example \"Order at\n23:10 is outside business hours\"."
          },
          "rejectReasonCode": {
            "$ref": "#/components/schemas/OrderCancelReason",
            "description": "Why the order was rejected, as a code. Present on `order.rejected` only. `storeClosed` covers\na paused store and an order outside the store's hours; `itemOutOfStock` covers an item the\nkitchen has marked unavailable."
          },
          "store": {
            "$ref": "#/components/schemas/OrderStore",
            "description": "The storefront the order arrived through: which brand, at which kitchen, on which platform.\n\nPresent on `fetchOrders` and `fetchOrder`. Absent on the order webhooks."
          },
          "cancellation": {
            "$ref": "#/components/schemas/OrderCancellation",
            "description": "Who cancelled the order, why and when. On `fetchOrders` and `fetchOrder`, present on every\norder whose `status` is `cancelled` and on no other. The `order.cancelled` webhook carries the\nsame facts as top-level fields of its payload instead."
          },
          "details": {
            "$ref": "#/components/schemas/OrderDetails",
            "description": "What was ordered and what it cost: items with their modifiers, promotions, and the order's\nsubtotal, tax, tip, delivery fee and total in cents.\n\nPresent on `fetchOrders` and `fetchOrder`. Absent on the order webhooks."
          },
          "by": {
            "type": "string",
            "description": "Who cancelled the order."
          },
          "reason": {
            "type": "string",
            "description": "Why the order was cancelled, as reported by the cancelling party."
          },
          "reasonCode": {
            "$ref": "#/components/schemas/OrderCancelReason",
            "description": "Why the restaurant cancelled the order, as a code. Set when `by` is `kitchen`, beside the\nfree-text `reason`. Absent for a cancellation by the platform or by you."
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "When the cancellation happened, ISO-8601 UTC."
          }
        }
      },
      "DesiredStoreStatus": {
        "type": "object",
        "description": "The state configured in Sous Chef for one storefront.\n\n`updatedAt` is when the current pause began, and is absent while the store is open. It is not\nthe time this record last changed.",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/StoreStatusState",
            "description": "What Sous Chef is configured to do. `open`: the storefront should be taking orders.\n`paused`: it has been paused (by an operator, this API, or the system).\n`closedSpecialHours`: closed by a special-hours date. Sous Chef does not produce\n`closedSpecialHours`."
          },
          "pauseReason": {
            "$ref": "#/components/schemas/PauseReason",
            "description": "Typed pause reason. Pauses recorded outside this API, or whose free-text reason does not\nmatch a typed value, read as `'other'`, with the operator's original wording carried in\n`pauseNote`. Absent for a system-initiated pause with no operator-entered reason."
          },
          "pauseNote": {
            "type": "string",
            "description": "Free-text note accompanying the pause, in the operator's own wording. When `pauseReason` is\n`'other'` because the recorded reason matched no typed value, that original reason text is\nincluded here. Absent when no note was recorded, and always absent while `open`."
          },
          "pausedUntil": {
            "type": "string",
            "format": "date-time",
            "description": "When the pause automatically ends, as an ISO-8601 UTC instant. Absent means the pause is\nindefinite."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the current pause began, as an ISO-8601 UTC instant. It is not the time this record\nlast changed. Absent while the store is open on a read; on a `pauseStores` / `unpauseStores`\nresponse it is the time the write was applied."
          }
        }
      },
      "Discrepancy": {
        "type": "object",
        "description": "Whether `desired` and `observed` disagree, and why.\n\n`hasDiscrepancy` is always present. The other fields appear only when it is `true`.\n\nSous Chef does not report when a discrepancy was first detected. A discrepancy is a standing\ncondition rather than an event, so treat it as true as of `lastPolledAt` on the status that\ncarries it and re-read to see whether it still holds.",
        "properties": {
          "hasDiscrepancy": {
            "type": "boolean",
            "description": "Whether Sous Chef currently records a discrepancy between the storefront's desired and\nobserved state, from its last platform-status check. It can be `false` while `desired.state`\nand `observed.state` differ, so compare those two yourself if you need every difference.\nAlways present."
          },
          "classification": {
            "$ref": "#/components/schemas/DiscrepancyClassification",
            "description": "Why the two sides disagree. One of four values:\n\n- `pauseNotPropagated`: Sous Chef's desired pause/unpause has not reached the platform yet.\n  Auto-remediable through the API. Reserved: Sous Chef does not report this value today.\n- `unexpectedPlatformPause`: the platform shows the store paused when Sous Chef did not ask\n  for it (typically paused from the platform's own merchant tools). Needs a human, via the\n  merchant portal.\n- `deactivatedByPlatform`: the platform took the store down by its own decision (enforcement,\n  quality or fraud review, removal, suspension). Needs a human, via platform support.\n- `unclassified`: the explicit fallback. A discrepancy exists but its reason matches none of\n  the values above (for example an unknown or raw platform error). Needs a human.\n\nNew values may be added. Treat a value you do not recognise like `unclassified`."
          },
          "autoRemediable": {
            "type": "boolean",
            "description": "Whether re-sending Sous Chef's desired state through the platform API is expected to clear\nthe discrepancy on its own (only a pause that did not propagate). Present only when\n`hasDiscrepancy` is `true`."
          },
          "requiresHumanIntervention": {
            "type": "boolean",
            "description": "No API on either side can fix this. Route it to a human."
          },
          "remediationChannel": {
            "$ref": "#/components/schemas/DiscrepancyRemediationChannel",
            "description": "Where the fix has to happen. `api`: re-send the desired state through the platform API.\n`merchantPortal`: change it in the platform's merchant portal. `platformSupport`: only the\nplatform's support team can resolve it (e.g. the platform deactivated the store). Absent when\n`hasDiscrepancy` is `false`, and also absent when Sous Chef could not classify the\ndiscrepancy."
          }
        }
      },
      "DiscrepancyClassification": {
        "type": "string",
        "description": "Why a storefront's desired and observed state disagree. See `Discrepancy.classification` for\nwhat each value means.",
        "enum": [
          "pauseNotPropagated",
          "unexpectedPlatformPause",
          "deactivatedByPlatform",
          "unclassified"
        ]
      },
      "DiscrepancyRemediationChannel": {
        "type": "string",
        "description": "Where the fix for a discrepancy has to happen. See `Discrepancy.remediationChannel`.",
        "enum": [
          "api",
          "merchantPortal",
          "platformSupport"
        ]
      },
      "HoursWindowDay": {
        "type": "string",
        "description": "Day of the week an hours window opens on. Shared by `RegularHoursWindow` and\n`MenuHoursWindow`.",
        "enum": [
          "mon",
          "tue",
          "wed",
          "thu",
          "fri",
          "sat",
          "sun"
        ]
      },
      "ItemAvailability": {
        "type": "object",
        "description": "One item or modifier option at a location, with its current availability there.",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "Sous Chef's identifier for the item. It is brand-scoped and stable for that brand's catalogue\nacross every location. `setItemAvailability` addresses items by it.\n\nThe id space is the same whether or not `isModifier` is set: a modifier option is addressed\nexactly like any other item."
          },
          "sku": {
            "type": "string",
            "description": "Stock-keeping unit. Not unique. An alternate lookup key on `setItemAvailability`."
          },
          "name": {
            "type": "string",
            "description": "The item's display name."
          },
          "isModifier": {
            "type": "boolean",
            "description": "`true` when this item is configured as a modifier option (e.g. a side or topping added to\nanother item) rather than a standalone menu item. Availability works identically for both."
          },
          "available": {
            "type": "boolean",
            "description": "Current availability at the requested location."
          }
        }
      },
      "ItemAvailabilityChange": {
        "type": "object",
        "description": "What changed: which items, at which kitchen, for which of your stores.",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "The kitchen (location) where availability changed: the `id` from `fetchLocations`."
          },
          "stores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemAvailabilityStore"
            },
            "description": "Your stores at that kitchen that sell at least one of the items. Availability is held per\nkitchen, so it applies to every one of them at once."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemAvailability"
            },
            "description": "The items whose availability changed, each with its new value. Only items of brands your\norganization owns, and only items that really changed. An item marked out of stock again\nwhile already out of stock is not announced."
          },
          "changedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the change was made, ISO-8601 UTC. Order changes for one item by this, never by arrival."
          }
        }
      },
      "ItemAvailabilityStore": {
        "type": "object",
        "description": "One of your stores at the kitchen where availability changed.",
        "properties": {
          "storeId": {
            "type": "string",
            "description": "Sous Chef's `Store.id`: the id `fetchStores` and `fetchStoreItems` use."
          },
          "storeCode": {
            "type": "string",
            "description": "The store's code: the `storeCode` you send `createOrder` with, when your organization takes\norders through order intake."
          }
        }
      },
      "Location": {
        "type": "object",
        "description": "A physical location (kitchen).\n\nReturned when your organization either owns the kitchen or operates a brand out of it. A\n\"host-located\" operator, whose brand cooks inside somebody else's kitchen, owns no location\nof its own but still needs the location id, because `setItemAvailability` and the hours\noperations key on it.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the location."
          },
          "code": {
            "type": "string",
            "description": "The location's short site code, as shown on kitchen tickets and platform dashboards."
          },
          "name": {
            "type": "string",
            "description": "Operator-facing name."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone, e.g. \"America/New_York\". It is not an offset, which changes with DST."
          },
          "address": {
            "type": "string",
            "description": "Free-text street address as configured."
          },
          "brands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationBrand"
            },
            "description": "The brands carried at this location."
          },
          "storeCount": {
            "type": "number",
            "description": "How many storefronts operate at this location."
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable display name, e.g. \"Harlem Store\".\n\n`name` is the unique operator-facing name; this is the one to show a person where they differ."
          },
          "organizationId": {
            "type": "string",
            "description": "The organization that owns the kitchen.\n\nNot necessarily yours. For a host-located brand this is the host's id, which is how you tell\nthe two cases apart."
          }
        }
      },
      "LocationBrand": {
        "type": "object",
        "description": "One brand carried at a location.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the brand. Join the directory reads on this, not on `name`."
          },
          "code": {
            "type": "string",
            "description": "The brand's short code."
          },
          "name": {
            "type": "string",
            "description": "The brand's display name."
          },
          "displayName": {
            "type": "string",
            "description": "The brand's public-facing name, as printed on tickets. Where it differs from `name`, this is\nthe prose form."
          }
        }
      },
      "ManagementApiError": {
        "type": "object",
        "description": "The body of a failure response from an operation on this API: one envelope, whatever the status\ncode.\n\nUnlike a success reply, every field except `txId` is always present, so you can read `path` or\n`message` without a null check.\n\nTwo responses are produced before a request reaches an operation and do not carry this envelope:\nthe `400` for a body that is not valid JSON, and a `429` from the rate limiter, which has no\nbody.",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "The HTTP status, repeated in the body so a caller that logs only the body still knows what\nhappened. Always the same number as the status line, never a second, body-only code."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When we produced the failure, ISO-8601 UTC."
          },
          "path": {
            "type": "string",
            "description": "The route that failed, for example `/management/stores/fetchStores`. No query string."
          },
          "method": {
            "type": "string",
            "description": "The HTTP method of the failed call. Always `POST` on this API."
          },
          "message": {
            "type": "string",
            "description": "A human-readable summary, meant for people. Do not branch on it: it is not part of the\ncontract and changes without notice. Branch on `statusCode` and on documented fields."
          },
          "txId": {
            "type": "string",
            "description": "The identifier for this one call. It is the same value as the `x-mealco-tx-id` response\nheader. Quote it when you report a problem so that we can trace the call.\n\nIt is optional for one reason: a request whose body is not valid JSON is rejected before it\nreaches an operation, so that one `400` answers a bare `{\"message\": \"Bad Request\"}` with no\n`txId` and no header. Every failure that an operation produces carries the full envelope,\nincluding this field."
          }
        },
        "required": [
          "statusCode",
          "timestamp",
          "path",
          "method",
          "message"
        ]
      },
      "Menu": {
        "type": "object",
        "description": "The full menu document: categories -> items -> modifier groups -> modifier options.\n\nPrices are the item's base price, or the storefront location's price override when the menu is\nfetched with a `storeId`. Dynamic pricing rules (per-platform or date-range price adjustments)\nare not applied to these prices.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the menu."
          },
          "name": {
            "type": "string",
            "description": "The menu's name."
          },
          "brandId": {
            "type": "string",
            "description": "The brand this menu belongs to: the `id` returned by `StoresApi.fetchBrands`."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuCategory"
            },
            "description": "The menu's enabled categories, in configured display order. Categories disabled on this menu\nare omitted. Empty when the menu has none."
          }
        }
      },
      "MenuAssignment": {
        "type": "object",
        "description": "One menu assigned to a storefront.\n\n`snapshot` is the menu document exactly as last published to this storefront. It is returned\nverbatim from Sous Chef's publish history, never regenerated, typed as `MenuSnapshot`.\nWhen it is absent, `snapshotWithheld` says why.",
        "properties": {
          "menuId": {
            "type": "string",
            "description": "Sous Chef's identifier for the menu."
          },
          "name": {
            "type": "string",
            "description": "The menu's name as configured in Sous Chef."
          },
          "isPublished": {
            "type": "boolean",
            "description": "Whether this menu is marked published on this storefront. Absent when the menu is assigned\nat the brand-location level rather than directly to the storefront, because that assignment\ncarries no publish state."
          },
          "lastPublishedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this menu was last successfully published to this storefront, as an ISO-8601 UTC\ninstant. Absent when it has never been published there, or for a brand-location-level\nassignment."
          },
          "hours": {
            "$ref": "#/components/schemas/MenuAssignmentHours",
            "description": "The menu's operating-hours configuration."
          },
          "snapshot": {
            "$ref": "#/components/schemas/MenuSnapshot",
            "description": "The menu document as last published to this storefront, verbatim. Absent when no published\nsnapshot exists for this assignment, or when one exists but exceeds the 2 MB size cap.\n`snapshotWithheld` tells the two apart."
          },
          "snapshotWithheld": {
            "type": "boolean",
            "description": "`true` when a published snapshot exists for this assignment but was left out because it is\nlarger than the 2 MB per-snapshot size cap. `snapshot` is then absent even though the menu\nhas been published. Absent (never `false`) otherwise, so `snapshot` absent and\n`snapshotWithheld` absent means no published snapshot exists for this assignment: the menu\nhas never been published to this storefront, or it is assigned at the brand-location level\nand so has no storefront-level publish history."
          }
        }
      },
      "MenuAssignmentHours": {
        "type": "object",
        "description": "A menu's operating-hours configuration. `followsLocationHours: true` means the menu follows\nits location's hours (`windows` absent); otherwise `windows` carries the menu's own weekly\nhours.",
        "properties": {
          "followsLocationHours": {
            "type": "boolean",
            "description": "`true` when the menu uses its location's hours; `false` when it has its own. On a storefront\nwhose brand's organization does not own the kitchen, a `true` menu takes that organization's\nown weekly hours there instead once it has set them. Those are the `regular` hours that\n`fetchStoreHours` reports for the storefront."
          },
          "windows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuHoursWindow"
            },
            "description": "The menu's own weekly windows. Absent when `followsLocationHours` is `true`."
          }
        }
      },
      "MenuCategory": {
        "type": "object",
        "description": "One category on the menu.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the category."
          },
          "name": {
            "type": "string",
            "description": "The category's display name, e.g. \"Burgers\"."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuItem"
            },
            "description": "The category's enabled items, in configured display order. Items disabled in this category\nare omitted. Empty when the category has none."
          }
        }
      },
      "MenuHoursWindow": {
        "type": "object",
        "description": "One menu's weekly hours configuration. Mirrors `RegularHoursWindow`'s day/opensAt/closesAt.",
        "properties": {
          "day": {
            "$ref": "#/components/schemas/HoursWindowDay",
            "description": "Day of the week the window opens on: `mon`, `tue`, `wed`, `thu`, `fri`, `sat` or `sun`."
          },
          "opensAt": {
            "type": "string",
            "description": "Opening time, `HH:MM` 24-hour wall clock in the location's timezone (not UTC)."
          },
          "closesAt": {
            "type": "string",
            "description": "Closing time, `HH:MM` 24-hour wall clock in the location's timezone. Earlier than `opensAt`\nmeans the window runs past midnight into the next day."
          }
        }
      },
      "MenuItem": {
        "type": "object",
        "description": "One item on the menu.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the item: what `setItemAvailability` accepts as `itemId`."
          },
          "sku": {
            "type": "string",
            "description": "The item's SKU, where one has been configured. Absent otherwise."
          },
          "name": {
            "type": "string",
            "description": "The item's display name."
          },
          "description": {
            "type": "string",
            "description": "The item's customer-facing description. Absent when none has been configured."
          },
          "imageUrl": {
            "type": "string",
            "description": "URL of the item's image. Absent when the item has no image."
          },
          "price": {
            "type": "number",
            "description": "Minor units (cents). Resolves to the storefront's location when fetched with `storeId`."
          },
          "pickupPrice": {
            "type": "number",
            "description": "Separate pickup price, where configured."
          },
          "available": {
            "type": "boolean",
            "description": "Same presence rule as `MenuModifierOption.available`."
          },
          "modifierGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuModifierGroup"
            },
            "description": "Modifier groups attached to this item, in configured display order. Empty when none."
          }
        }
      },
      "MenuModifierGroup": {
        "type": "object",
        "description": "One modifier group attached to an item.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for this group's attachment to the item. The same modifier group\nattached to two items carries two different ids here."
          },
          "name": {
            "type": "string",
            "description": "The modifier group's display name, e.g. \"Choose a side\"."
          },
          "minSelections": {
            "type": "number",
            "description": "The fewest options a customer must pick from this group. Absent when not configured."
          },
          "maxSelections": {
            "type": "number",
            "description": "The most options a customer may pick from this group. Absent when not configured."
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuModifierOption"
            },
            "description": "The options in this group, in configured display order. Empty when the group has none."
          }
        }
      },
      "MenuModifierOption": {
        "type": "object",
        "description": "One modifier option: an entry of `Menu.categories[].items[].modifierGroups[].options[]`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for this modifier option."
          },
          "itemId": {
            "type": "string",
            "description": "The `Item` this option adds, which is the id an order for it carries\n(`OrderIntakeModifierDto.itemId`). Distinct from `id`, which identifies the option. Absent\nwhen it is not known."
          },
          "name": {
            "type": "string",
            "description": "The option's display name: the name of the item the option adds."
          },
          "price": {
            "type": "number",
            "description": "Upcharge, in cents. Absent means no upcharge."
          },
          "available": {
            "type": "boolean",
            "description": "Present only when `FetchMenuRequest.storeId` was supplied. It is omitted, not `false`, when\nthe menu was fetched with no storefront context."
          }
        }
      },
      "MenuPublication": {
        "type": "object",
        "description": "One publication and its per-store, per-platform outcomes.\n\nA publication submits each targeted storefront's complete active menu set, because delivery\nplatforms replace rather than merge. Publishing menu A to a storefront that also carries menu B\ntherefore submits both, and `menuId` is then omitted: it is present only when every store on the\npublication received exactly one and the same menu.",
        "properties": {
          "publicationId": {
            "type": "string",
            "description": "The publication's identifier: the `publicationId` `publishMenu` returned."
          },
          "menuId": {
            "type": "string",
            "description": "The single menu this publication submitted, when every store on it agrees on exactly one.\nAbsent otherwise. See the `MenuPublication` description."
          },
          "status": {
            "$ref": "#/components/schemas/MenuPublicationStatus",
            "description": "The publication's overall state:\n- `queued`: accepted, no store work started.\n- `publishing`: at least one store has not finished. Its menu is being sent, or the platform\n  has not answered yet. A publication with a DoorDash store stays here until DoorDash confirms\n  or rejects the menu.\n- `completed`: finished. This includes a publication where some stores failed; check each\n  `stores[].status`.\n- `failed`: the publication as a whole failed or was cancelled."
          },
          "requestedAt": {
            "type": "string",
            "description": "When the publication was requested (UTC, ISO-8601)."
          },
          "completedAt": {
            "type": "string",
            "description": "When the publication reached its final state (`completed` or `failed`), in UTC, ISO-8601.\nAbsent while `status` is `queued` or `publishing`. On a publication recorded before its\nfinishing time was tracked exactly, this is the time the publication was last updated: a\nclose approximation of when it finished, not an exact value."
          },
          "stores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuPublicationStore"
            },
            "description": "Every store this publication targeted, with its per-store, per-platform outcome."
          }
        }
      },
      "MenuPublicationStatus": {
        "type": "string",
        "description": "The overall state of one publication. See `MenuPublication.status`.",
        "enum": [
          "queued",
          "failed",
          "publishing",
          "completed"
        ]
      },
      "MenuPublicationStore": {
        "type": "object",
        "description": "One store's outcome within a publication.",
        "properties": {
          "storeId": {
            "type": "string",
            "description": "The storefront this outcome is for."
          },
          "platform": {
            "type": "string",
            "description": "Delivery platform slug. The same open enum as `StoresApi`'s `Store.platform`."
          },
          "status": {
            "$ref": "#/components/schemas/MenuPublicationStoreStatus",
            "description": "This store's publication outcome:\n- `queued`: not sent yet. It is waiting to start, or waiting behind another publication that\n  is still in flight to the same storefront.\n- `publishing`: sent to the platform, which has not answered yet. A submission retried after\n  a temporary error stays here until the retry finishes.\n- `acknowledged`: the platform accepted the submission (see `confirmationMode`).\n- `confirmed`: the platform reported the menu live. DoorDash reports this once it confirms\n  the menu; every other platform stops at `acknowledged` (see `confirmationMode`).\n- `failed`: the submission failed; see `platformError`. A store that is not connected to its\n  delivery platform is `failed` too, and nothing was sent to it.\n\nA publication recorded before these rules took effect keeps the status it was given when its\nmenu was handed on: such a store reads `acknowledged` as soon as Sous Chef passed the menu on\n(also when the store is not connected to its platform), and never reads `confirmed`."
          },
          "confirmationMode": {
            "$ref": "#/components/schemas/MenuPublicationStoreConfirmationMode",
            "description": "Whether this platform reports the menu live (`confirmed`) or only accepts the submission\n(`acknowledged`). This is a platform capability, not a per-request outcome, so it is\npopulated regardless of `status`.\n\nDoorDash is `confirmed`: it confirms each menu it takes live, and that confirmation is what\nmoves the store to `confirmed`. Every other platform is `acknowledged`. A publication recorded\nbefore DoorDash confirmations were tracked reports `acknowledged` for every platform."
          },
          "platformError": {
            "type": "string",
            "description": "The error recorded for this store's submission, as reported by or about the delivery\nplatform. Free text, not a stable code. Absent when no error was recorded."
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this store's publication succeeded, as an ISO-8601 UTC instant: the moment DoorDash\nconfirmed the menu (`confirmed`), or the moment any other platform accepted it\n(`acknowledged`). Absent until then, and absent on a publication recorded before this field\nwas introduced."
          },
          "failedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this store's publication failed, as an ISO-8601 UTC instant. Absent unless `status` is\n`failed`, and absent on a publication recorded before this field was introduced."
          }
        }
      },
      "MenuPublicationStoreConfirmationMode": {
        "type": "string",
        "description": "Whether a platform reports the menu live or only accepts the submission. See\n`MenuPublicationStore.confirmationMode`.",
        "enum": [
          "acknowledged",
          "confirmed"
        ]
      },
      "MenuPublicationStoreStatus": {
        "type": "string",
        "description": "One store's publication outcome. See `MenuPublicationStore.status`.",
        "enum": [
          "queued",
          "failed",
          "publishing",
          "acknowledged",
          "confirmed"
        ]
      },
      "MenuSnapshot": {
        "type": "object",
        "description": "The menu document exactly as Sous Chef last published it to one storefront's delivery platform:\ncategories, items, modifiers, prices and hours as the platform received them.\n\nSnapshots are returned exactly as recorded and never regenerated, so an older snapshot can lack\na field a newer one carries, carry `null` where its source was empty, or carry a key not listed\nhere. Ignore keys you do not recognise.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef menu id: the same value as the enclosing `MenuAssignment.menuId`."
          },
          "storeId": {
            "type": "string",
            "description": "The delivery platform's id for the storefront (its external store id), not the Sous Chef\n`storeId` the enclosing `StoreMenuAssignments` is keyed by."
          },
          "storeMenuId": {
            "type": "string",
            "description": "Sous Chef id of the menu-to-storefront assignment this was published for; absent on some older\nsnapshots."
          },
          "name": {
            "type": "string",
            "description": "The menu name as published."
          },
          "subtitle": {
            "type": [
              "string",
              "null"
            ],
            "description": "The menu subtitle as published; may be empty or `null`."
          },
          "available": {
            "type": "boolean",
            "description": "Whether the menu was switched on at publish time."
          },
          "useLocationHours": {
            "type": "boolean",
            "description": "`true` when the menu follows its location's hours rather than its own; `workingHours` is then\nthe location's hours as they stood at publish time. On a storefront whose brand's\norganization does not own the kitchen and had set its own weekly hours there, it is those\nhours instead."
          },
          "workingHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotWorkingHours"
            },
            "description": "The weekly hours the menu was published with."
          },
          "specialHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotSpecialHours"
            },
            "description": "The date-specific overrides the menu was published with."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotCategory"
            },
            "description": "The menu's categories, in display order."
          },
          "deleteExistingMenus": {
            "type": "boolean",
            "description": "The publish instruction sent to the platform: `true` asked it to replace every existing menu on\nthe storefront with this publish."
          }
        }
      },
      "MenuSnapshotCategory": {
        "type": "object",
        "description": "One category (section) of a published menu.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef category id."
          },
          "name": {
            "type": "string",
            "description": "The category name shown to customers."
          },
          "subtitle": {
            "type": [
              "string",
              "null"
            ],
            "description": "The category subtitle shown to customers; may be empty or `null`."
          },
          "available": {
            "type": "boolean",
            "description": "Whether the category was offered at publish time."
          },
          "sortId": {
            "type": "number",
            "description": "The category's position within the menu."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotItem"
            },
            "description": "The category's items, in display order."
          }
        }
      },
      "MenuSnapshotItem": {
        "type": "object",
        "description": "One sellable item in a published menu category. Also the base of a modifier option.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef item id (for a modifier option, the option's own id; see `itemId`)."
          },
          "name": {
            "type": "string",
            "description": "The name shown to customers."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The description shown to customers; `null` when there is none."
          },
          "available": {
            "type": "boolean",
            "description": "Whether it was orderable (in stock) at publish time."
          },
          "sortId": {
            "type": [
              "number",
              "null"
            ],
            "description": "Its `0`-based position among its siblings; `null` on some older modifier options."
          },
          "priceInfo": {
            "$ref": "#/components/schemas/MenuSnapshotPriceInfo",
            "description": "Its prices."
          },
          "modifierGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotModifierGroup"
            },
            "description": "The modifier groups offered on it, in display order; empty when it has none."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of its customer-facing image; `null` when there is none."
          },
          "POSImage": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the image shown on the Sous Chef POS; `null` or empty when there is none."
          },
          "showInPOS": {
            "type": "boolean",
            "description": "Whether it is shown on the Sous Chef POS."
          },
          "alwaysInStock": {
            "type": "boolean",
            "description": "`true` when it never goes out of stock, so availability updates skip it."
          },
          "managedByModifiers": {
            "type": "boolean",
            "description": "`true` when its availability follows its modifier options rather than being set on it."
          },
          "isAlcoholic": {
            "type": "boolean",
            "description": "`true` when it contains alcohol."
          },
          "allowableOrderTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The order types it may be sold in, e.g. `STANDARD`, `CATERING`. Absent on older snapshots,\nwhich predate the field."
          }
        }
      },
      "MenuSnapshotModifierGroup": {
        "type": "object",
        "description": "One modifier group: a set of options such as \"Choose a side\".",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef modifier-group id."
          },
          "name": {
            "type": "string",
            "description": "The group name shown to customers."
          },
          "available": {
            "type": "boolean",
            "description": "Whether the group was offered at publish time."
          },
          "sortId": {
            "type": "number",
            "description": "The group's `0`-based position on its item."
          },
          "quantity": {
            "$ref": "#/components/schemas/MenuSnapshotQuantity",
            "description": "The group's selection limits."
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotModifierOption"
            },
            "description": "The group's options, in display order."
          }
        }
      },
      "MenuSnapshotModifierOption": {
        "type": "object",
        "description": "One option inside a modifier group. An option is an item in its own right, so it carries every\nitem field, including its own `modifierGroups` (nested modifiers), plus these.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef item id (for a modifier option, the option's own id; see `itemId`)."
          },
          "name": {
            "type": "string",
            "description": "The name shown to customers."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The description shown to customers; `null` when there is none."
          },
          "available": {
            "type": "boolean",
            "description": "Whether it was orderable (in stock) at publish time."
          },
          "sortId": {
            "type": [
              "number",
              "null"
            ],
            "description": "Its `0`-based position among its siblings; `null` on some older modifier options."
          },
          "priceInfo": {
            "$ref": "#/components/schemas/MenuSnapshotPriceInfo",
            "description": "Its prices."
          },
          "modifierGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuSnapshotModifierGroup"
            },
            "description": "The modifier groups offered on it, in display order; empty when it has none."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of its customer-facing image; `null` when there is none."
          },
          "POSImage": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the image shown on the Sous Chef POS; `null` or empty when there is none."
          },
          "showInPOS": {
            "type": "boolean",
            "description": "Whether it is shown on the Sous Chef POS."
          },
          "alwaysInStock": {
            "type": "boolean",
            "description": "`true` when it never goes out of stock, so availability updates skip it."
          },
          "managedByModifiers": {
            "type": "boolean",
            "description": "`true` when its availability follows its modifier options rather than being set on it."
          },
          "isAlcoholic": {
            "type": "boolean",
            "description": "`true` when it contains alcohol."
          },
          "allowableOrderTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The order types it may be sold in, e.g. `STANDARD`, `CATERING`. Absent on older snapshots,\nwhich predate the field."
          },
          "itemId": {
            "type": "string",
            "description": "Sous Chef id of the item this option sells; `id` is the option's own id."
          },
          "default": {
            "type": "boolean",
            "description": "`true` when the option is pre-selected."
          },
          "defaultQuantity": {
            "type": "string",
            "description": "The quantity pre-selected when `default` is `true`, as a numeric string."
          },
          "minQuantity": {
            "type": "number",
            "description": "Minimum quantity of this option the customer must choose."
          },
          "maxQuantity": {
            "type": "number",
            "description": "Maximum quantity of this option the customer may choose."
          }
        }
      },
      "MenuSnapshotPriceInfo": {
        "type": "object",
        "description": "Prices for one item or modifier option, as published.",
        "properties": {
          "base": {
            "type": "number",
            "description": "Delivery price in integer cents (`1299` is $12.99), after Sous Chef pricing rules."
          },
          "pickup": {
            "type": "number",
            "description": "Pickup price in integer cents; present only when the item has a separate pickup price."
          },
          "taxRate": {
            "type": "number",
            "description": "Tax rate as a decimal fraction (`0.09` is 9%), present only when the storefront publishes\ntax. A rate, not cents, despite sitting beside the prices."
          },
          "originalPrice": {
            "type": "number",
            "description": "Present only on older snapshots: a reference price in integer cents. Newer snapshots do not\ncarry it, so do not rely on it."
          }
        }
      },
      "MenuSnapshotQuantity": {
        "type": "object",
        "description": "How many options a customer may or must choose from one modifier group.",
        "properties": {
          "min": {
            "type": "number",
            "description": "Minimum number of distinct options the customer must select."
          },
          "max": {
            "type": "number",
            "description": "Maximum number of distinct options the customer may select."
          },
          "minAggregated": {
            "type": "number",
            "description": "Minimum total quantity across every selected option."
          },
          "maxAggregated": {
            "type": "number",
            "description": "Maximum total quantity across every selected option."
          },
          "minSelectedQuantity": {
            "type": "number",
            "description": "Minimum selected quantity, as configured on the modifier group."
          },
          "maxSelectedQuantity": {
            "type": "number",
            "description": "Maximum selected quantity, as configured on the modifier group."
          },
          "maxQuantityFromSingleOption": {
            "type": "number",
            "description": "Maximum quantity of any single option."
          }
        }
      },
      "MenuSnapshotSpecialHours": {
        "type": "object",
        "description": "One date-specific override in a published menu's hours, such as a holiday or an early close.",
        "properties": {
          "date": {
            "type": "string",
            "description": "The calendar date the override applies to, `YYYY-MM-DD` in the location's timezone."
          },
          "closed": {
            "type": "boolean",
            "description": "`true` when the menu is closed for all of `date`; `startTime`/`endTime` then carry no hours."
          },
          "startTime": {
            "type": "string",
            "description": "When the menu opens on `date`: 24-hour `HH:MM` in the location's timezone."
          },
          "endTime": {
            "type": "string",
            "description": "When the menu closes on `date`: 24-hour `HH:MM` in the location's timezone."
          }
        }
      },
      "MenuSnapshotWorkingHours": {
        "type": "object",
        "description": "One weekly window in a published menu's hours.",
        "properties": {
          "day": {
            "type": "string",
            "enum": [
              "MONDAY",
              "TUESDAY",
              "WEDNESDAY",
              "THURSDAY",
              "FRIDAY",
              "SATURDAY",
              "SUNDAY"
            ],
            "description": "Day of the week this window applies to."
          },
          "startTime": {
            "type": "string",
            "description": "When the menu becomes available: 24-hour `HH:MM` in the location's timezone, e.g. `08:30`."
          },
          "endTime": {
            "type": "string",
            "description": "When the menu stops being available: 24-hour `HH:MM` in the location's timezone. An `endTime`\nat or before `startTime` means the window runs past midnight."
          }
        }
      },
      "ObservedStoreStatus": {
        "type": "object",
        "description": "What the delivery platform reports for one storefront.\n\nSous Chef does not report a per-observation timestamp on this object. The freshness signal is\n`lastPolledAt` on the status that carries it: that is when this observation was taken, and it\nis present whenever `observed` is.",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/ObservedStoreStatusState",
            "description": "The platform's view of the storefront. `online`: the platform shows it taking orders.\n`offline`: it is not taking orders. `deactivated`: the platform has deactivated it.\n`unknown`: the platform state could not be determined. Sous Chef reports only `online` or\n`offline`. The other two values are reserved."
          },
          "orderable": {
            "type": "boolean",
            "description": "Can a guest place an order right now. `null`/absent when the platform does not expose it."
          },
          "platformReason": {
            "type": "string",
            "description": "The reason Sous Chef recorded when it last checked the storefront on the platform. Raw text,\nnot the typed `classification`. Do not branch on it."
          }
        }
      },
      "ObservedStoreStatusState": {
        "type": "string",
        "description": "The platform's view of one storefront. See `ObservedStoreStatus.state`.",
        "enum": [
          "online",
          "offline",
          "deactivated",
          "unknown"
        ]
      },
      "Order": {
        "type": "object",
        "description": "A normalized order: one shape whichever delivery platform or channel it arrived from.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the order (uuid). `fetchOrder` takes this id."
          },
          "platformOrderId": {
            "type": "string",
            "description": "The id the order has on the platform or channel it came from, which is the order id a channel\npartner sent when it placed the order. Absent when the platform sends none."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "description": "Current state of the order."
          },
          "deliveryStatus": {
            "$ref": "#/components/schemas/OrderDeliveryStatus",
            "description": "Delivery progress, where the platform transmits it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order record was created, ISO-8601 UTC."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order record last changed, ISO-8601 UTC."
          },
          "estimatedReadyAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the kitchen expects the order to be ready, ISO-8601 UTC. Set when Sous Chef accepts the\norder, from the kitchen's preparation time. A scheduled order carries its scheduled time.\n\nCarried on the order webhooks (`order.created` onward). Absent when no estimate exists, and\nabsent on `fetchOrders` and `fetchOrder`."
          },
          "rejectReason": {
            "type": "string",
            "description": "Why the order was rejected, in words. Present on `order.rejected` only. For example \"Order at\n23:10 is outside business hours\"."
          },
          "rejectReasonCode": {
            "$ref": "#/components/schemas/OrderCancelReason",
            "description": "Why the order was rejected, as a code. Present on `order.rejected` only. `storeClosed` covers\na paused store and an order outside the store's hours; `itemOutOfStock` covers an item the\nkitchen has marked unavailable."
          },
          "store": {
            "$ref": "#/components/schemas/OrderStore",
            "description": "The storefront the order arrived through: which brand, at which kitchen, on which platform.\n\nPresent on `fetchOrders` and `fetchOrder`. Absent on the order webhooks."
          },
          "cancellation": {
            "$ref": "#/components/schemas/OrderCancellation",
            "description": "Who cancelled the order, why and when. On `fetchOrders` and `fetchOrder`, present on every\norder whose `status` is `cancelled` and on no other. The `order.cancelled` webhook carries the\nsame facts as top-level fields of its payload instead."
          },
          "details": {
            "$ref": "#/components/schemas/OrderDetails",
            "description": "What was ordered and what it cost: items with their modifiers, promotions, and the order's\nsubtotal, tax, tip, delivery fee and total in cents.\n\nPresent on `fetchOrders` and `fetchOrder`. Absent on the order webhooks."
          }
        }
      },
      "OrderCancelReason": {
        "type": "string",
        "description": "A reason code for a cancelled or rejected order: the item, the store or the kitchen.\n\nYou send one with `cancelOrder` when you cancel an order. Sous Chef sends one on the\n`order.rejected` webhook (`rejectReasonCode`) and on the `order.cancelled` webhook when the\nrestaurant cancelled (`reasonCode`). Anything that is not one of the first three is `other`;\nthe free-text reason beside it says more.",
        "enum": [
          "itemOutOfStock",
          "storeClosed",
          "kitchenBusy",
          "other"
        ]
      },
      "OrderCancellation": {
        "type": "object",
        "description": "Who cancelled an order, why and when. See `Order.cancellation`.",
        "properties": {
          "by": {
            "type": "string",
            "description": "Who cancelled: `platform` (on the delivery platform, including a customer or courier\ncancelling there), `kitchen` (the restaurant, in the Kitchen App) or `system` (Sous Chef). New\nvalues may be added. Absent on orders cancelled before Sous Chef recorded who cancelled."
          },
          "reason": {
            "type": "string",
            "description": "Why the order was cancelled, as recorded for the cancelling party. When the kitchen cancelled,\nthis is the kitchen's own reason label, for example `STORE_TOO_BUSY`. Branch on `reasonCode`,\nnot on this text."
          },
          "reasonCode": {
            "$ref": "#/components/schemas/OrderCancelReason",
            "description": "Why the restaurant cancelled the order, as a code. Set when `by` is `kitchen`, beside\n`reason`. Absent for a cancellation by the platform or by Sous Chef."
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was cancelled, ISO-8601 UTC."
          }
        }
      },
      "OrderDeliveryStatus": {
        "type": "string",
        "description": "Delivery progress of an order. See `Order.deliveryStatus`.",
        "enum": [
          "ASSIGNED",
          "EN_ROUTE_TO_STORE_LOCATION",
          "EN_ROUTE_TO_CUSTOMER",
          "COMPLETED",
          "CANCELED"
        ]
      },
      "OrderDetails": {
        "type": "object",
        "description": "What was ordered and what it cost. See `Order.details`.\n\nEvery amount is an integer in the currency's minor unit (cents). Each field is absent when the\nplatform did not send it, or when what was stored is not a whole number of cents or a readable\ntime, so older orders and orders from a direct channel can carry fewer. On an order sent by an\nordering channel through the Ordering API, a tax, tip or fee the channel did not send reads as\n`0`.\n\nThe guest's identity, the delivery address, the courier and free-text notes are not part of\nthis object.",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "The platform's own order id. In practice it is the same value as `platformOrderId`."
          },
          "externalReadableOrderNum": {
            "type": "string",
            "description": "The short order number the customer and the courier see."
          },
          "placedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the customer placed the order, ISO-8601 UTC."
          },
          "estimatedPickupAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order is due to be picked up, ISO-8601 UTC. A scheduled order carries its scheduled\ntime."
          },
          "isPickup": {
            "type": "boolean",
            "description": "`true` when the customer collects the order; `false` for delivery."
          },
          "isMerchantDelivery": {
            "type": "boolean",
            "description": "`true` when the restaurant delivers the order itself rather than a platform courier."
          },
          "subtotal": {
            "type": "integer",
            "description": "The items' total before tax, tip and fees, in cents."
          },
          "tax": {
            "type": "integer",
            "description": "Tax, in cents."
          },
          "tip": {
            "type": "integer",
            "description": "The tip, in cents."
          },
          "deliveryFee": {
            "type": "integer",
            "description": "The delivery fee, in cents."
          },
          "total": {
            "type": "integer",
            "description": "The order total, in cents, as the platform reported it."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            },
            "description": "The ordered items, each with its modifiers."
          },
          "promotions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderPromotion"
            },
            "description": "The promotions applied to the order. Empty or absent when none applied."
          }
        }
      },
      "OrderItem": {
        "type": "object",
        "description": "One line of an order.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the item on this order."
          },
          "sku": {
            "type": "string",
            "description": "The item's SKU. Synthesized from its `id` when the platform supplies none."
          },
          "name": {
            "type": "string",
            "description": "Name of the item."
          },
          "quantity": {
            "type": "integer",
            "description": "How many were ordered."
          },
          "price": {
            "$ref": "#/components/schemas/OrderItemPrice",
            "description": "The item's price."
          },
          "modifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemModifier"
            },
            "description": "The modifiers chosen on this item."
          }
        }
      },
      "OrderItemModifier": {
        "type": "object",
        "description": "A modifier chosen on an order item: an option such as a size or a topping. Modifiers nest to\nany depth through their own `modifiers`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the modifier option on this order."
          },
          "sku": {
            "type": "string",
            "description": "The option's SKU. Synthesized from its `id` when the platform supplies none."
          },
          "name": {
            "type": "string",
            "description": "Name of the option."
          },
          "quantity": {
            "type": "integer",
            "description": "How many of this option were chosen."
          },
          "price": {
            "$ref": "#/components/schemas/OrderItemPrice",
            "description": "The option's price."
          },
          "modifierGroup": {
            "$ref": "#/components/schemas/OrderItemModifierGroup",
            "description": "The modifier group the option was chosen from."
          },
          "modifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemModifier"
            },
            "description": "Modifiers chosen on this option, in the same shape as this object."
          }
        }
      },
      "OrderItemModifierGroup": {
        "type": "object",
        "description": "The modifier group an option was chosen from, for example \"Choose your size\".",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the modifier group."
          },
          "name": {
            "type": "string",
            "description": "Name of the modifier group."
          }
        }
      },
      "OrderItemPrice": {
        "type": "object",
        "description": "A price on an order line. Every amount is an integer in the currency's minor unit (cents).",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The line's total: `unit` multiplied by the quantity."
          },
          "unit": {
            "type": "integer",
            "description": "The price of one, including its modifiers."
          },
          "base": {
            "type": "integer",
            "description": "The price of one, without its modifiers."
          },
          "menu": {
            "type": "integer",
            "description": "The menu price of one when the order was placed."
          }
        }
      },
      "OrderPromotion": {
        "type": "object",
        "description": "A promotion applied to an order, as the platform reported it. Platforms do not report promotions\nthey fund entirely, so these are the merchant-funded and co-funded ones.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The promotion's name. Some platforms report a generic label here, not the promotion's own\ntitle."
          },
          "discountValue": {
            "type": "integer",
            "description": "How much the promotion took off the order, in cents."
          },
          "discountPercentage": {
            "type": "number",
            "description": "The discount as a percentage, where the platform states one."
          }
        }
      },
      "OrderSort": {
        "type": "string",
        "description": "How `fetchOrders` orders a page. See `FetchOrdersRequest.sort`.",
        "enum": [
          "createdAtAsc",
          "createdAtDesc"
        ]
      },
      "OrderStatus": {
        "type": "string",
        "description": "Current state of an order. See `Order.status`.",
        "enum": [
          "new",
          "future",
          "ready",
          "finished",
          "rejected",
          "cancelled"
        ]
      },
      "OrderStatusFilter": {
        "type": "string",
        "description": "A `FetchOrdersRequest.statuses` filter value. These are the stored statuses, including\n`recentlyCancelled`, which renders as `cancelled` in responses.",
        "enum": [
          "new",
          "future",
          "ready",
          "finished",
          "rejected",
          "cancelled",
          "recentlyCancelled"
        ]
      },
      "OrderStore": {
        "type": "object",
        "description": "The storefront an order arrived through. See `Order.store`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the storefront: the `id` that `fetchStores` reports. Join to the\nstore directory on this, not on the names below."
          },
          "externalId": {
            "type": "string",
            "description": "The merchant-supplied store id the platform holds for this storefront. It is the same value as\nthe storefront's `code` in `fetchStores`."
          },
          "location": {
            "type": "string",
            "description": "The kitchen's display name. Join to the directory via `store.id`, not this string."
          },
          "brand": {
            "type": "string",
            "description": "The brand's display name. Join to the directory via `store.id`, not this string."
          },
          "platform": {
            "type": "string",
            "description": "The delivery platform's slug, for example `doordash`, `ubereats` or `grubhub`. It is the same\nvalue as the storefront's `platform` in `fetchStores`. Treat it as an open enum: responses\nmay carry slugs beyond these, and new platforms are added without a version bump."
          }
        }
      },
      "PageRequest": {
        "type": "object",
        "description": "Cursor pagination. Every collection-feed operation takes this.\n\nNote the shape: the cursor goes inside `page`, not at the top level of the request. The reply\nreturns `nextCursor` at the top level, and you pass it back as `page.cursor`.\n\nThe cursor holds your position and the filters and sort of the first page, so later pages need\nonly the cursor; from page 2 on, do not send filters. Repeating the same filters with it is\ntolerated, and a filter with a different value is a `400`. Only `limit` may change between pages.",
        "properties": {
          "limit": {
            "type": "number",
            "description": "Page size, 1-100. Defaults to 50 when omitted. Outside that range is a 400."
          },
          "cursor": {
            "type": "string",
            "description": "Opaque cursor from the previous response. Omit for the first page. Send it alone, or with the\nsame filters and sort as the first page; a filter with a different value is a `400`."
          }
        }
      },
      "PauseReason": {
        "type": "string",
        "description": "Typed pause reason.",
        "enum": [
          "closingEarly",
          "problemInRestaurant",
          "outOfItems",
          "tooBusy",
          "other"
        ]
      },
      "RegularHoursWindow": {
        "type": "object",
        "description": "One weekly window. `closesAt` may be earlier than `opensAt`: a window crossing midnight.",
        "properties": {
          "day": {
            "$ref": "#/components/schemas/HoursWindowDay",
            "description": "Day of the week the window opens on: `mon`, `tue`, `wed`, `thu`, `fri`, `sat` or `sun`."
          },
          "opensAt": {
            "type": "string",
            "description": "Opening time, `HH:MM` 24-hour wall clock in the location's timezone (not UTC)."
          },
          "closesAt": {
            "type": "string",
            "description": "Closing time, `HH:MM` 24-hour wall clock in the location's timezone. Earlier than `opensAt`\nmeans the window runs past midnight into the next day."
          }
        }
      },
      "Report": {
        "type": "object",
        "description": "A platform report requested through `createReport`. Content is raw and unreconciled (the\nplatform's own CSV) and is scoped to the organization the API key authenticates.",
        "properties": {
          "reportId": {
            "type": "string",
            "description": "Sous Chef's identifier (a UUID) for this report request. Pass it to `fetchReport`."
          },
          "type": {
            "type": "string",
            "description": "The platform's own report type, as requested."
          },
          "platform": {
            "type": "string",
            "description": "Delivery platform slug, as requested."
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus",
            "description": "Lifecycle state. `queued`: accepted and recorded, not yet being fetched from the platform.\n`processing`: Sous Chef is retrieving the report from the platform. `ready`: the files are\navailable (see `files` on `fetchReport`). `failed`: the platform request did not succeed\n(see `error`). `ready` and `failed` are terminal and set `completedAt`."
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "description": "First day of the reported period, inclusive, as requested (`YYYY-MM-DD`)."
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "description": "Last day of the reported period, inclusive, as requested (`YYYY-MM-DD`)."
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the report was requested, as an ISO-8601 UTC instant."
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Present once the report is `ready` or `failed`."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportFile"
            },
            "description": "Present only when `status` is `ready`."
          },
          "error": {
            "type": "string",
            "description": "Present only when `status` is `failed`. A human-readable summary."
          }
        }
      },
      "ReportCoverage": {
        "type": "object",
        "description": "One report capability reachable by the authenticated organization's connected storefronts.",
        "properties": {
          "platform": {
            "type": "string",
            "description": "Delivery platform slug, such as `ubereats` or `grubhub`."
          },
          "type": {
            "type": "string",
            "description": "The platform's own report type."
          },
          "available": {
            "type": "boolean",
            "description": "Whether Sous Chef can currently deliver this report for your organization."
          },
          "windowConstraint": {
            "type": "string",
            "description": "Maximum accepted date window, e.g. `range<=30d`, or `unbounded`."
          },
          "notes": {
            "type": "string",
            "description": "Constraint or unavailability detail."
          },
          "dataLag": {
            "type": "string",
            "description": "Complete-data delay, e.g. `T+2`."
          }
        }
      },
      "ReportFile": {
        "type": "object",
        "description": "One downloadable file of a `ready` report.",
        "properties": {
          "downloadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Signed URL, valid 24 hours. Fetch the report again for a fresh one."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When `downloadUrl` stops working."
          },
          "sizeBytes": {
            "type": "number",
            "description": "Size of the file in bytes, as stored."
          },
          "format": {
            "type": "string",
            "enum": [
              "csv"
            ],
            "description": "Always `csv`: the platform's own file, unmodified."
          }
        }
      },
      "ReportStatus": {
        "type": "string",
        "description": "Lifecycle state of a report. See `Report.status`; also the `FetchReportsRequest.statuses`\nfilter.",
        "enum": [
          "ready",
          "queued",
          "processing",
          "failed"
        ]
      },
      "SpecialDate": {
        "type": "object",
        "description": "A date-specific hours override: closed all day, or open with special windows.",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD."
          },
          "closed": {
            "type": "boolean",
            "description": "Whether the location is closed all day on this date."
          },
          "opensAt": {
            "type": "string",
            "description": "Opening time, e.g. \"12:00\". Ignored when `closed`."
          },
          "closesAt": {
            "type": "string",
            "description": "Closing time, e.g. \"16:00\". Ignored when `closed`."
          }
        }
      },
      "Store": {
        "type": "object",
        "description": "One storefront: a single brand, at a single location, on a single platform.\n\nA location running two brands on three platforms has six stores, each with its own menu, hours\nand pause state. A store joins our identifiers to the platform's: our id, the merchant-supplied\ncode that appears on order payloads, and the platform's own storefront id, all on one object.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sous Chef's identifier for the storefront, and what `pauseStores` / `unpauseStores` accept."
          },
          "code": {
            "type": "string",
            "description": "Stable storefront identifier, human-readable where configured; also what the platform holds\nas the merchant-supplied store id, and the value order payloads carry as `store.externalId`."
          },
          "platform": {
            "type": "string",
            "description": "Delivery platform slug, e.g. \"doordash\", \"ubereats\", \"grubhub\".\n\nTreat as an open enum: responses may carry slugs beyond the documented three (smaller\nplatforms connected for some organizations), and new platforms are added without a version\nbump. Key on `platformId` if you need something closed and stable."
          },
          "platformStoreId": {
            "type": "string",
            "description": "The platform's own identifier for this storefront: the DoorDash store id, the Uber Eats store\nuuid, and so on.\n\nAbsent where the platform's id is the merchant-supplied id (Grubhub: use `code` there), or\nwhere we do not hold it. It is a stored value, recorded the first time Sous Chef reads the\nstorefront on the platform and not fetched live, so it does not follow a later change made\ndirectly on the platform."
          },
          "brand": {
            "$ref": "#/components/schemas/StoreBrandRef",
            "description": "The brand this storefront sells."
          },
          "location": {
            "$ref": "#/components/schemas/StoreLocationRef",
            "description": "The kitchen this storefront cooks in."
          },
          "mode": {
            "type": "string",
            "description": "`full`: Sous Chef manages orders and menus for this storefront.\n`reportingOnly`: data ingestion only. We never receive its orders.\n\nCheck this before acting on a storefront: a `reportingOnly` storefront never produces orders\nthrough this API. New values may be added."
          },
          "wentLiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "When Sous Chef set this storefront up, as an ISO-8601 UTC instant. A storefront provisioned\nthrough the Onboarding API's `addBrandsToLocation` gets it when it is created. Older storefronts\nmay instead carry the set-up time of their brand at that location, or the moment they were first\nswitched on. It is present before a storefront takes its first order, so it is not a go-live\nsignal: whether a storefront is open and taking orders is `fetchStoreStatuses`."
          },
          "platformId": {
            "type": "string",
            "description": "Sous Chef's id for the delivery platform. Unlike `platform` this is a fixed identifier that\nnever changes and never gains new spellings. Key your mapping on it."
          },
          "platformStoreName": {
            "type": "string",
            "description": "The storefront's name as it appears on the platform, where we hold it."
          },
          "name": {
            "type": "string",
            "description": "The storefront's name inside Sous Chef."
          },
          "storeUrl": {
            "type": "string",
            "description": "Public URL of the storefront on the platform, where we hold one. A stored value, recorded at\nthe same time as `platformStoreId`, with the same caveat."
          }
        }
      },
      "StoreBrandRef": {
        "type": "object",
        "description": "The brand a storefront sells, as carried inside a `Store`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "`Brand.id`."
          },
          "code": {
            "type": "string",
            "description": "`Brand.code`."
          },
          "name": {
            "type": "string",
            "description": "`Brand.name`."
          },
          "displayName": {
            "type": "string",
            "description": "`Brand.displayName`."
          }
        }
      },
      "StoreHours": {
        "type": "object",
        "description": "Effective operating hours for one storefront, resolved in `timezone`.\n\n`timezone` is absent when Sous Chef has no timezone recorded for the storefront's location.\nIt is never a guessed value.",
        "properties": {
          "storeId": {
            "type": "string",
            "description": "The `Store.id` these hours belong to."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone, e.g. `America/New_York`. Absent when Sous Chef has none recorded."
          },
          "regular": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegularHoursWindow"
            },
            "description": "The weekly template this storefront's hours resolve from: the location's, or, when every\nactive menu at this store carries its own hours, the union of those menus' windows.\n\n\"The location's\" has one exception. At a kitchen it does not own, the organization that owns\nthis storefront's brand can set its own weekly hours for all of its brands there, in the\nSous Chef Portal. Once it has, those hours stand in for the location's here, whoever reads\nthem: the kitchen's owner sees them on this storefront too."
          },
          "special": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecialDate"
            },
            "description": "Date-specific overrides: holidays, early closes.\n\nWhere `regular` is an organization's own weekly hours at a kitchen it does not own, every date\nis limited to those hours on its weekday: a closure stays a closure, and an opening keeps only\nthe part inside them, or reads closed if no part is. One date carries one window, so an\nopening that overlaps two separate own windows on that weekday (a split service, say\n`11:00`-`14:00` and `17:00`-`22:00`) reads closed for the whole date."
          }
        }
      },
      "StoreLocationRef": {
        "type": "object",
        "description": "The kitchen a storefront cooks in, as carried inside a `Store`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "`Location.id`."
          },
          "code": {
            "type": "string",
            "description": "`Location.code`."
          },
          "name": {
            "type": "string",
            "description": "`Location.name`."
          },
          "displayName": {
            "type": "string",
            "description": "`Location.displayName`."
          },
          "timezone": {
            "type": "string",
            "description": "`Location.timezone`."
          }
        }
      },
      "StoreMenuAssignments": {
        "type": "object",
        "description": "One storefront's menu assignments.",
        "properties": {
          "storeId": {
            "type": "string",
            "description": "The `Store.id` these assignments belong to."
          },
          "menus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuAssignment"
            },
            "description": "The menus active on the storefront, ordered by name. Assignments made directly on the\nstorefront win; only when it has none are the menus assigned to its brand at its location\nreturned instead."
          }
        }
      },
      "StoreStatus": {
        "type": "object",
        "description": "One storefront's desired/observed/discrepancy status.\n\nEverything beyond `storeId` is optional, so this same shape is also the response of\n`pauseStores` / `unpauseStores`. Those responses state only the `desired` they just wrote.\nThey do not re-read the platform (`observed`) or recompute `discrepancy`, so they omit those\nfields. Call `fetchStoreStatuses` next for the observed view.",
        "properties": {
          "storeId": {
            "type": "string",
            "description": "The `Store.id` this status describes. Always present."
          },
          "desired": {
            "$ref": "#/components/schemas/DesiredStoreStatus",
            "description": "The state configured in Sous Chef. Always present."
          },
          "observed": {
            "$ref": "#/components/schemas/ObservedStoreStatus",
            "description": "What the delivery platform last reported. Present on reads; absent on the `pauseStores` /\n`unpauseStores` response, which does not re-read the platform."
          },
          "discrepancy": {
            "$ref": "#/components/schemas/Discrepancy",
            "description": "Whether `desired` and `observed` disagree, and how to fix it. Present on reads; absent on the\n`pauseStores` / `unpauseStores` response."
          },
          "lastPolledAt": {
            "type": "string",
            "format": "date-time",
            "description": "When Sous Chef last refreshed `observed`. Reason about staleness against this before acting.\nAbsent on the `pauseStores` / `unpauseStores` response, which never sets `observed`."
          }
        }
      },
      "StoreStatusState": {
        "type": "string",
        "description": "The state Sous Chef is configured to hold a storefront in. Used by `DesiredStoreStatus.state`\nand the `FetchStoreStatusesRequest.state` filter.",
        "enum": [
          "open",
          "paused",
          "closedSpecialHours"
        ]
      },
      "UberEatsBogoDiscount": {
        "type": "object",
        "description": "`discount` for a `BOGO` promotion: buy one of an item, get a second of the same item free.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "BOGO"
            ],
            "description": "Required. Always `BOGO`. It must equal the promotion's own `promoType`."
          },
          "targetItemIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The items the buy-one-get-one applies to, by the ids `fetchLocationItems` reports."
          }
        }
      },
      "UberEatsDiscount": {
        "description": "The mechanic-specific parameters of a promotion: one branch per `UberEatsPromoType`,\ndiscriminated by `promoType`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UberEatsFlatOffDiscount"
          },
          {
            "$ref": "#/components/schemas/UberEatsPercentOffDiscount"
          },
          {
            "$ref": "#/components/schemas/UberEatsBogoDiscount"
          },
          {
            "$ref": "#/components/schemas/UberEatsFreeItemDiscount"
          },
          {
            "$ref": "#/components/schemas/UberEatsMenuItemDiscount"
          },
          {
            "$ref": "#/components/schemas/UberEatsFreeDeliveryDiscount"
          }
        ],
        "discriminator": {
          "propertyName": "promoType",
          "mapping": {
            "FLATOFF": "#/components/schemas/UberEatsFlatOffDiscount",
            "PERCENTOFF": "#/components/schemas/UberEatsPercentOffDiscount",
            "BOGO": "#/components/schemas/UberEatsBogoDiscount",
            "FREEITEM_MINBASKET": "#/components/schemas/UberEatsFreeItemDiscount",
            "MENU_ITEM_DISCOUNT": "#/components/schemas/UberEatsMenuItemDiscount",
            "FREEDELIVERY": "#/components/schemas/UberEatsFreeDeliveryDiscount"
          }
        }
      },
      "UberEatsFlatOffDiscount": {
        "type": "object",
        "description": "`discount` for a `FLATOFF` promotion: a fixed amount off a basket that reaches a minimum.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "FLATOFF"
            ],
            "description": "Required. Always `FLATOFF`. It must equal the promotion's own `promoType`."
          },
          "minBasket": {
            "type": "number",
            "description": "The basket subtotal the order must reach, in minor units (cents). `1000` = $10.00."
          },
          "discountValue": {
            "type": "number",
            "description": "The amount taken off the basket, in minor units (cents). `400` = $4.00."
          }
        }
      },
      "UberEatsFreeDeliveryDiscount": {
        "type": "object",
        "description": "`discount` for a `FREEDELIVERY` promotion: the delivery fee is waived, with no further terms.\n\n`minBasket` and `maxDiscount` are read-only: Uber Eats takes no parameters when a free-delivery\npromotion is created, but reports a basket minimum and a cap on the waived fee for an existing\none. They are returned on reads and are never sent on create.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "FREEDELIVERY"
            ],
            "description": "Required. Always `FREEDELIVERY`. It must equal the promotion's own `promoType`."
          },
          "minBasket": {
            "type": "number",
            "description": "Read-only. The basket minimum Uber reports for an existing promotion, in minor units."
          },
          "maxDiscount": {
            "type": "number",
            "description": "Read-only. The cap on the waived delivery fee Uber reports, in minor units."
          }
        }
      },
      "UberEatsFreeItemDiscount": {
        "type": "object",
        "description": "`discount` for a `FREEITEM_MINBASKET` promotion: a free item once the basket reaches a minimum.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "FREEITEM_MINBASKET"
            ],
            "description": "Required. Always `FREEITEM_MINBASKET`. It must equal the promotion's own `promoType`."
          },
          "minBasket": {
            "type": "number",
            "description": "The basket subtotal that unlocks the free item, in minor units (cents). `1000` = $10.00."
          },
          "freeItemIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The items that may be given free, by the ids `fetchLocationItems` reports."
          }
        }
      },
      "UberEatsMenuItemDiscount": {
        "type": "object",
        "description": "`discount` for a `MENU_ITEM_DISCOUNT` promotion: a discount on specific menu items.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "MENU_ITEM_DISCOUNT"
            ],
            "description": "Required. Always `MENU_ITEM_DISCOUNT`. It must equal the promotion's own `promoType`."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UberEatsMenuItemDiscountEntry"
            },
            "description": "Required. The items discounted and by how much, one entry per item, at least one."
          }
        }
      },
      "UberEatsMenuItemDiscountEntry": {
        "type": "object",
        "description": "One item's discount inside a `MENU_ITEM_DISCOUNT` promotion.",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "The discounted item, by the id `fetchLocationItems` reports."
          },
          "discountValue": {
            "type": "number",
            "description": "A fixed amount off this item, in minor units (cents). Not supported on Uber Eats: its menu-item\ndiscount takes a percentage only, so a create that sets this is refused with `400`. Use\n`percentValue` instead."
          },
          "percentValue": {
            "type": "number",
            "description": "A percentage off this item, as a whole number from 1 to 100 (`20` = 20%). Required on Uber\nEats."
          }
        }
      },
      "UberEatsPercentOffDiscount": {
        "type": "object",
        "description": "`discount` for a `PERCENTOFF` promotion: a percentage off the basket, optionally capped.",
        "properties": {
          "promoType": {
            "type": "string",
            "enum": [
              "PERCENTOFF"
            ],
            "description": "Required. Always `PERCENTOFF`. It must equal the promotion's own `promoType`."
          },
          "percentValue": {
            "type": "number",
            "description": "Required. The percentage taken off, as a whole number from 1 to 100: `20` = 20% off."
          },
          "maxDiscount": {
            "type": "number",
            "description": "The most the discount may take off one order, in minor units (cents). Omit for no cap."
          },
          "minBasket": {
            "type": "number",
            "description": "The basket subtotal the order must reach, in minor units (cents). Omit for no minimum."
          }
        }
      },
      "UberEatsPromoType": {
        "type": "string",
        "description": "The promotion mechanic, as UberEats names it. Upper-case on the wire. See\n`UberEatsPromotionState` for why the two enums on this contract differ in case.",
        "enum": [
          "FLATOFF",
          "PERCENTOFF",
          "BOGO",
          "FREEITEM_MINBASKET",
          "MENU_ITEM_DISCOUNT",
          "FREEDELIVERY"
        ]
      },
      "UberEatsPromotion": {
        "type": "object",
        "description": "An Uber Eats promotion as the platform reports it.\n\n**Visibility is limited by the platform** to promotions created through the API. A promotion an\noperator set up by hand in Uber Eats Manager is not visible here, so an absent promotion does\nnot mean the storefront is running none. Do not reconcile spend against this feed or draw\nconclusions about promotions you did not create.",
        "properties": {
          "promotionId": {
            "type": "string",
            "description": "UberEats' own id for the promotion: the handle every other promotion operation takes."
          },
          "storeId": {
            "type": "string",
            "description": "The Sous Chef `storeId` the promotion runs on. When several of your stores are connected to\nthe same Uber Eats storefront, this names one of them, which may not be the one you created\nthe promotion on."
          },
          "promoType": {
            "$ref": "#/components/schemas/UberEatsPromoType",
            "description": "The promotion mechanic. See `UberEatsPromoType`."
          },
          "state": {
            "$ref": "#/components/schemas/UberEatsPromotionState",
            "description": "Where the promotion is in its lifecycle. See `UberEatsPromotionState`."
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the promotion starts running."
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the promotion stops running."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the promotion was created on the platform."
          },
          "externalPromotionId": {
            "type": "string",
            "description": "The id supplied by whoever created the promotion, echoed back."
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO-4217 currency of `budget.amount`, e.g. `USD`."
          },
          "budget": {
            "$ref": "#/components/schemas/UberEatsPromotionBudget",
            "description": "The spend ceiling, in integer minor units. See `UberEatsPromotionBudget`."
          },
          "discount": {
            "$ref": "#/components/schemas/UberEatsDiscount",
            "description": "The mechanic-specific parameters, exactly as the promotion was created: the branch of\n`UberEatsDiscount` whose `promoType` matches this promotion's."
          },
          "userGroup": {
            "$ref": "#/components/schemas/UberEatsUserGroup",
            "description": "Which customers the promotion is offered to, echoed back. See `UberEatsUserGroup`."
          }
        }
      },
      "UberEatsPromotionBudget": {
        "type": "object",
        "description": "What a promotion is allowed to spend, and over what period.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Amount in the currency's minor unit (cents). `1250` = $12.50. Always a whole number, never a\ndecimal and never a string."
          },
          "unlimited": {
            "type": "boolean",
            "description": "When true the promotion has no spend ceiling and `amount` carries no meaning."
          },
          "period": {
            "type": "string",
            "enum": [
              "WEEKLY"
            ],
            "description": "The budget window. `WEEKLY` is the only period UberEats exposes."
          }
        }
      },
      "UberEatsPromotionState": {
        "type": "string",
        "description": "Every state an UberEats promotion can be in. Shared by the `states` filter on the request and by\n`UberEatsPromotion.state` on the reply, so the two always use the same values.\n\nLower-case, unlike `UberEatsPromoType`: these values keep the casing of UberEats'\npublished schema. A reply carries one of these values, or no `state` at all when UberEats\nreports a state this API does not know.",
        "enum": [
          "completed",
          "active",
          "pending",
          "revoked",
          "expired",
          "deleted"
        ]
      },
      "UberEatsUserGroup": {
        "type": "string",
        "description": "Which customers an Uber Eats promotion is offered to: `ALL_CUSTOMERS` (every customer sees it)\nor `FIRST_TIME_CUSTOMER` (only customers who have never ordered from this store).\n`createUberEatsPromotion` defaults to `ALL_CUSTOMERS` when you omit it.",
        "enum": [
          "ALL_CUSTOMERS",
          "FIRST_TIME_CUSTOMER"
        ]
      },
      "WebhookEventType": {
        "type": "string",
        "description": "Every event type this API can deliver: the value of a delivery's `event` field.",
        "enum": [
          "order.created",
          "order.status.updated",
          "order.rejected",
          "order.cancelled",
          "order.delivery.updated",
          "store.status.changed",
          "report.completed",
          "menu.publication.completed",
          "item.availability.changed"
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Sous Chef partner API key. Issued per organization; treat it as a secret and send it on every request."
      },
      "OrganizationId": {
        "type": "apiKey",
        "in": "header",
        "name": "x-mealco-org-id",
        "description": "The organization the request acts on behalf of. Required, and must be the organization the API key belongs to. A mismatch is rejected with 401."
      }
    },
    "headers": {
      "x-mealco-tx-id": {
        "description": "The correlation id for this call, returned on every response that an operation produces, successful or not. Quote it when you report a problem so that we can trace the request. You may send your own x-mealco-tx-id on the request and it is used as the id. It is optional in the schema because a request with a malformed JSON body is rejected before an id is assigned, so that one response carries neither this header nor the txId field of the error body.",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    }
  }
}
