API docs
Sous Chef Management API
Request access

Update webhook settings

POST/management/settings/setAllWebhookSettings

Set any of newUrl, newUrlEvents, newUrlEnabled and legacyUrlEnabled in one call.

An omitted field is left unchanged; a field you send is set. Send only the fields you are changing. You do not have to restate a setting to keep it. In particular, registering a newUrl without mentioning legacyUrlEnabled does not switch your legacy order feed off.

Field by field:

  • newUrl. Omitted: unchanged. A url: registered (send newUrlEvents with it). Explicit null: cleared. To stop delivery and keep the registration, send newUrlEnabled: false instead.
  • newUrlEvents. Omitted: unchanged. Present: replaces the whole list, so [] means "no events". It is never an append.
  • newUrlEnabled. Omitted: unchanged. Present: set.
  • legacyUrlEnabled. Omitted: unchanged. Present: set.

On an organization that has never had any webhook settings, "unchanged" means the stored default: newUrl absent, newUrlEvents empty, and both enabled switches on.

legacyUrl must not appear in the request body. It is rejected with 400, not silently ignored. Sous Chef controls where the legacy feed delivers; legacyUrlEnabled is how you control whether it delivers.

setAllWebhookSettings does not reset the fields you leave out. The name means that this one operation covers every settable webhook field. There is no per-field endpoint.

Validation:

  1. If newUrl is sent as a url, newUrlEvents must be sent with it and contain at least one event. A destination with no subscribed events would receive nothing.
  2. legacyUrl in the body is a 400.
  3. Every entry in newUrlEvents must be one of the published event types.
  4. newUrl must be https:// and must not resolve to a private (RFC1918), link-local, or cloud-metadata address.
  5. Any field in the body outside newUrl / newUrlEvents / newUrlEnabled / legacyUrlEnabled is a 400.
  6. A call that would leave the organization with no webhook destination is a 400. This covers clearing newUrl with null when no legacyUrl is on file, and a first call that registers no destination.

Returns the full updated settings, including the unchanged legacyUrl, so you can confirm the write without a second call.

Safe to retry: this operation changes state but is idempotent.

Request

application/json
required
  • newUrlstring

    The new signed destination to register.

    Omitted -> the stored newUrl is left alone. A url -> registered, and at least one entry in newUrlEvents must accompany it in the same call. Explicit null -> the destination is cleared, which is refused with 400 when it would leave the organization with no webhook destination at all (no legacyUrl on file). Prefer newUrlEnabled: false to stop delivery: pausing keeps the registration, clearing removes it.

  • newUrlEventsstring[]

    Which events newUrl receives.

    Omitted -> the stored subscription list is left alone. Present -> it replaces the whole stored list, so [] means "no events" and this is not an append. Must contain at least one entry whenever newUrl is sent as a url.

    Possible values: [order.created, order.status.updated, order.rejected, order.cancelled, order.delivery.updated, store.status.changed, report.completed, menu.publication.completed, item.availability.changed]
  • newUrlEnabledboolean

    Pause switch for newUrl only. Omitted -> left at its stored value.

  • legacyUrlEnabledboolean

    Pause switch for legacyUrl only. legacyUrl itself has no field on this request and is rejected with 400 if sent. This switch can be set, and it is the only way to turn the legacy feed off yourself. false stops legacy delivery immediately; setting it back to true resumes it.

    Omitting it leaves legacy delivery unchanged. You do not need to restate this field to keep the legacy feed running.

Responses

200: Your full webhook configuration after the update, including the untouched `legacyUrl`.

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.

  • legacyUrlstring

    The legacy orders-only feed's registered url. Read-only through this API. Absent when nothing is configured. Delivery to it is also gated by Sous Chef's order-notifications switch for your organization, and by legacyUrlEnabled.

  • legacyUrlEnabledboolean

    A pause switch for legacyUrl only, the counterpart of newUrlEnabled for the legacy destination. Unlike legacyUrl itself, it can be set through setAllWebhookSettings. Use it to finish migrating off the legacy feed yourself, without Sous Chef clearing legacyUrl as a support action. false silences legacyUrl alone; it has no effect on newUrl. It defaults to true, so a destination that was never switched off keeps delivering, including across a setAllWebhookSettings call that omits this field.

  • newUrlstring

    The new signed (v2= ES256) destination. Absent when nothing is registered.

  • newUrlEventsstring[]

    Which events are delivered to newUrl. Governs newUrl only: the legacy feed has no per-event list and is always orders-only.

    Possible values: [order.created, order.status.updated, order.rejected, order.cancelled, order.delivery.updated, store.status.changed, report.completed, menu.publication.completed, item.availability.changed]
  • newUrlEnabledboolean

    A pause switch for newUrl only. false silences the new feed; it has no effect on legacyUrl, which has its own switch, legacyUrlEnabled.

About Settings

Read and set where Sous Chef delivers your webhooks.

Your organization is resolved from the authenticated api key and is never a field on any request or response here, so no caller can point another organization's feed at their own server.

Two destinations, one configuration. legacyUrl is the existing orders-only feed. The URL itself is read-only here (Sous Chef controls where the legacy feed delivers, and clears it only as a support action), and legacyUrlEnabled is the switch that lets you turn legacy delivery off yourself. newUrl is the signed (v2=, ES256) destination you register yourself, together with newUrlEvents (which events it receives) and newUrlEnabled (its own pause switch). Any combination of legacyUrlEnabled and newUrlEnabled is valid: legacy only, both while you migrate, or new only once you are done. Registering or pausing one destination never changes the other.

Each field governs one destination. newUrlEvents and newUrlEnabled govern newUrl only. legacyUrlEnabled governs legacyUrl only: the legacy feed has no per-event subscription list and is always orders-only. newUrlEnabled: false does not turn all webhooks off. It silences newUrl alone, just as legacyUrlEnabled: false silences only legacyUrl.