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 what you are actually changing — you never 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 without throwing the registration away, sendnewUrlEnabled: falseinstead.newUrlEvents— omitted: unchanged. Present: REPLACES the whole list, so[]means "no events". It is never an append; a list you could only add to would be useless.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 at all — it is rejected with 400, not silently ignored, so you are never left believing you changed something you did not. OneTablet controls WHERE legacy delivers; legacyUrlEnabled is how you control WHETHER.
The name setAllWebhookSettings does not mean "resets everything you leave out". It means this ONE operation covers ALL of the settable webhook fields — there is no per-field endpoint to hunt for.
Validation:
- If
newUrlis sent as a url,newUrlEventsmust be sent with it and contain at least one event — registering a destination with no stated subscriptions would be a silent no-op. 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 — clearing
newUrlwithnullwhen nolegacyUrlis on file, or a first-ever call that registers no destination at all — is a400.
Returns the full updated settings, including the untouched 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 throws it away. - newUrlEventsstring[]
Which events
newUrlreceives.Omitted -> the stored subscription list is left alone. PRESENT -> it REPLACES the stored list wholesale, so
[]genuinely 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] - newUrlEnabledboolean
Pause switch for
newUrlonly. Omitted -> left at its stored value. - legacyUrlEnabledboolean
Pause switch for
legacyUrlonly. UnlikelegacyUrlitself — which has no field on this request at all and is rejected with400if sent — this one IS settable: it is the only way a partner can turn the legacy feed off themselves.falsestops legacy delivery immediately; setting it back totrueresumes it.Omitting it leaves legacy delivery exactly as it is; you never need to restate this field to keep legacy running.
{
"newUrl": "<newUrl>",
"newUrlEvents": [
"order.created"
],
"newUrlEnabled": true,
"legacyUrlEnabled": true
}Responses
Headers
- x-mealco-tx-idstringoptional
The correlation id for this call, echoed on every response — a 200 exactly as much as a 400, 401 or 500. Quote it when reporting a problem and we can find every log line for the request, in every service it touched. You may also send your own x-mealco-tx-id on the request and we adopt it, so your correlation id becomes ours. Not marked required for one reason: a request whose JSON body is malformed is rejected before it reaches an operation, so no id exists yet and that single response carries neither this header nor the txId field of the error body. Everything that reaches an operation carries it.
- 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 OneTablet's own order-notifications switch for your organization, and by
legacyUrlEnabledbelow. - legacyUrlEnabledboolean
A pause switch for
legacyUrlONLY — the sibling ofnewUrlEnabledfor the legacy destination. UnlikelegacyUrlitself, this IS settable throughsetAllWebhookSettings: it is how a partner finishes migrating off the legacy feed without OneTablet clearinglegacyUrlas a support action.falsesilenceslegacyUrlalone; it has no effect onnewUrl. It defaultstrue, so a destination nobody has ever switched off keeps delivering — including across asetAllWebhookSettingscall that does not mention this field at all. - 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. Absent/empty whennewUrlis absent.Possible values: [order.created, order.status.updated, order.rejected, order.cancelled, order.delivery.updated, store.status.changed, report.completed, menu.publication.completed] - newUrlEnabledboolean
A pause switch for
newUrlONLY.falsesilences the new feed; it has no effect onlegacyUrl, which has its own switch,legacyUrlEnabled.
About Settings
Read and set where OneTablet 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 pre-existing orders-only feed — the URL itself is read-only here (OneTablet controls where legacy delivers, and clears it only as a support action), and legacyUrlEnabled is the self-serve switch that lets you turn legacy delivery off yourself. newUrl is the signed (v2=, ES256) destination you register for yourself, together with newUrlEvents (which events it receives) and newUrlEnabled (its own pause switch). Any combination of legacyUrlEnabled / newUrlEnabled is valid at once — legacy-only, dual-run while migrating, or new-only once you are done — and registering or pausing one destination never touches the other.
The naming carries the semantics. newUrlEvents and newUrlEnabled govern newUrl ONLY; legacyUrlEnabled governs legacyUrl ONLY — the legacy feed has no per-event subscription list and is always orders-only. Do not read newUrlEnabled: false as "webhooks are off" — it silences newUrl alone, exactly as legacyUrlEnabled: false silences only legacyUrl.