Update webhook settings
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 (sendnewUrlEventswith it). Explicitnull: cleared. To stop delivery and keep the registration, sendnewUrlEnabled: falseinstead.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:
- If
newUrlis sent as a url,newUrlEventsmust be sent with it and contain at least one event. A destination with no subscribed events would receive nothing. legacyUrlin the body is a400.- Every entry in
newUrlEventsmust be one of the published event types. newUrlmust behttps://and must not resolve to a private (RFC1918), link-local, or cloud-metadata address.- Any field in the body outside
newUrl/newUrlEvents/newUrlEnabled/legacyUrlEnabledis a400. - A call that would leave the organization with no webhook destination is a
400. This covers clearingnewUrlwithnullwhen nolegacyUrlis 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
- newUrlstring
The new signed destination to register.
Omitted -> the stored
newUrlis left alone. A url -> registered, and at least one entry innewUrlEventsmust accompany it in the same call. Explicitnull-> the destination is cleared, which is refused with400when it would leave the organization with no webhook destination at all (nolegacyUrlon file). PrefernewUrlEnabled: falseto stop delivery: pausing keeps the registration, clearing removes it. - newUrlEventsstring[]
Which events
newUrlreceives.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 whenevernewUrlis 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
newUrlonly. Omitted -> left at its stored value. - legacyUrlEnabledboolean
Pause switch for
legacyUrlonly.legacyUrlitself has no field on this request and is rejected with400if sent. This switch can be set, and it is the only way to turn the legacy feed off yourself.falsestops legacy delivery immediately; setting it back totrueresumes it.Omitting it leaves legacy delivery unchanged. You do not need to restate this field to keep the legacy feed running.
{
"newUrl": "<newUrl>",
"newUrlEvents": [
"order.created"
],
"newUrlEnabled": true,
"legacyUrlEnabled": true
}Responses
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
legacyUrlonly, the counterpart ofnewUrlEnabledfor the legacy destination. UnlikelegacyUrlitself, it can be set throughsetAllWebhookSettings. Use it to finish migrating off the legacy feed yourself, without Sous Chef clearinglegacyUrlas a support action.falsesilenceslegacyUrlalone; it has no effect onnewUrl. It defaults totrue, so a destination that was never switched off keeps delivering, including across asetAllWebhookSettingscall that omits this field. - newUrlstring
The new signed (
v2=ES256) destination. Absent when nothing is registered. - newUrlEventsstring[]
Which events are delivered to
newUrl. GovernsnewUrlonly: 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
newUrlonly.falsesilences the new feed; it has no effect onlegacyUrl, which has its own switch,legacyUrlEnabled.
{
"legacyUrl": "<legacyUrl>",
"legacyUrlEnabled": true,
"newUrl": "<newUrl>",
"newUrlEvents": [
"order.created"
],
"newUrlEnabled": true
}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.