API docs
Sous Chef Management API
Request access

Publish a menu

POST/management/menus/publishMenu

Push the menu's current saved state to the delivery platforms.

Saving a menu never changes what guests see. This call does, and there is no unpublish.

Asynchronous. The reply is an acknowledgement carrying a publicationId; per-store, per-platform outcomes arrive from fetchMenuPublications and on the menu.publication.completed webhook. A failed store carries a one-line summary of the platform's error where the platform provides one. Some platforms report only success or failure.

What is sent. A publication always submits each storefront's complete menu set, because platforms replace rather than merge. menuId therefore selects which storefronts are published to, not what they receive: publishing menu A to a storefront that also carries menu B re-submits both. See MenuPublication.menuId for how that appears on the read side.

Scope: menuId must be in your organization's scope by the same rule fetchMenu uses, and every storeId supplied must be a storefront your organization owns. Anything else is 404 with nothing published. A publication only ever reaches your own organization's storefronts. There is never a partial write, and the response does not distinguish "does not exist" from "not yours".

NOT safe to retry: this operation changes state and is not idempotent.

Request

application/json
required
  • menuIdstring

    The menu to publish. Required. This API returns 404 for a menu that does not exist and for one belonging to another organization, and the two cannot be told apart.

    What this selects. menuId chooses which storefronts are published to (your storefronts that it is assigned to). It does not narrow what is sent to them. Each selected storefront receives its complete active menu set, because delivery platforms replace rather than merge. See the publishMenu operation.

  • storeIdsstring[]

    Narrow the publication to specific storefronts. Omit to publish to every storefront the menu is assigned to at a location your organization owns.

    A storeId here that your organization does not own, or that the menu is not assigned to, is 404, and nothing is published. The request is rejected whole rather than applied to the subset that did resolve.

Responses

200: An acknowledgement carrying the `publicationId` to follow the publication by.

Headers

  • x-mealco-tx-idstringoptional

    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.

  • publicationIdstring

    Poll this with fetchMenuPublications({ publicationIds: [publicationId] }).

  • statusstring

    Always queued on success: the publication was accepted. Follow its progress with fetchMenuPublications.

    Possible values: [queued]

About Menus

Menus: read a menu, publish it to the delivery platforms, and follow each publication's per-store, per-platform outcome.

publishMenu is the only write in this section. It changes the menu guests see on live DoorDash, Uber Eats and Grubhub storefronts, and there is no unpublish.

Every operation is scoped to the organization your API key belongs to. On fetchMenu and publishMenu, an id that does not exist and one that belongs to another organization are the same 404. On publishMenu, a menu or store outside your organization is rejected before anything is published.

Retries create a second publication. publishMenu does not replay a previous result: a retried call creates a new publication with its own publicationId and re-submits to the platforms. That changes no content, because a publication is a full replace of the same saved menu, but it doubles platform traffic. Treat a timeout as "may have succeeded" and check fetchMenuPublications before retrying.