Set the orders webhook endpoint
PUT/webhooks/endpoints/orders
Creates or updates your orders endpoint, which receives order and kitchen-status events. Answers 201 when the endpoint is new and 200 when it existed.
Request
- Send the whole definition every time:
eventsreplaces the previous list, and an empty list answers400 VALIDATION_FAILED(useDELETEto stop notifications). - Each event must belong to this endpoint and duplicates are collapsed.
payloadisthin(default, the event only names the order) orfull(the order asGET /orders/{id}shows it at send time, but with empty image URLs; see the Webhooks section for the other differences).- The
urlmust be an absolutehttpsaddress on port 443, without user info or fragment, and notlocalhostor a private or loopback IP address.
Behaviour
- Events are sent with
X-Mekari-Signature,X-Mekari-Timestamp,X-Mekari-Key-Version,X-Mekari-Delivery-IDandX-Mekari-Event-IDheaders. - The endpoint is active at once, without a challenge; use
testto check it. - The response holds a
secretobject only when a signing secret was issued: the endpoint is new, itsurlchanged, or it is set again after aDELETE. Store the secret then, it is never shown again. - After a
urlchange the new secret signs every request at once; keep the previous one for 24 hours only to verify requests already on their way. - A change of
eventsorpayloadalone returns no secret. - A paused endpoint becomes active again and its failure count is reset.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
The endpoint, updated
The endpoint, created, with its first signing secret
Error envelope
Error envelope
Error envelope
Error envelope