Publish menu

http
POST /v1/publish

Creates a publication snapshot of the current menu and makes it live: all products with menuVisible: true (and their categories, compositions and modifiers) are frozen into a new publication that guests see on the public menu.

No request body is required.

Sync vs publish#

POST /v1/sync writes to the draft menu — guests don't see those changes yet. POST /v1/publish takes what the draft looks like right now and snapshots it as the live menu. The typical flow:

  1. One or more sync calls (and/or cleanup).
  2. One publish call at the end.

Publish once per batch

Publishing after every small sync creates needless snapshots. Batch your changes, then publish once — it also keeps you well inside the rate limits.

Products with menuVisible: false (including those deactivated by cleanup) are excluded from the snapshot.

Example#

bash
curl -X POST https://api.duck-hub.com/v1/publish \
  -H "Authorization: Bearer dk_live_your_api_key"

Response#

201 Created:

json
{
  "success": true,
  "publicationId": "cml9x2f4a0001abcd1234efgh"
}
FieldMeaning
successAlways true on success
publicationIdId of the created publication snapshot

Errors#