↑↓select↵openescclose

Horeca24 Partner API › Connection

Set or change the webhook URL

PUThttps://management.horeca-24.de/api/partner/v1/webhook

The URL must use https on port 443, carry no user:pass@, be at most 2048 characters long and name a host (no IP literal, no localhost) whose addresses are all public. The check is repeated at every delivery. A refused URL answers 422 INVALID_FIELD with path: "url".

webhookSecret is answered only the first time a URL is set; store it. A first or changed URL sends menu.updated right away if the restaurant has synced a menu; menuDelivery says how that went.

Until a URL is set, no events are produced and orders are refused (409 WEBHOOK_NOT_CONFIGURED).

Headers

AuthorizationstringRequired

Bearer pk_<connectionId>.<keyId>.<secret>

The connection's API key, from the restaurant's till. Treat it as one opaque string. 401 UNAUTHORIZED for a missing, wrong, expired or revoked key; 403 CONNECTION_REVOKED for the key of a deleted connection. After a rotation by the restaurant, the previous key keeps working for 24 hours.

Request

application/jsonRequired

urlstringRequired1-2048 charsformat: uri

https, port 443, public host

Response

200Stored
urlstringRequiredformat: uri
webhookSecretstringOptionalpattern: ^whsec_

Only the first time a URL is set. Store it.

menuDeliverystringRequiredsentqueuedfailedskipped

The menu.updated sent for the URL - sent, queued (retried), failed, or skipped (nothing to send)

Errors

objectErrorBody

400

An error; see ErrorCode

401

UNAUTHORIZED: the key is missing, malformed, unknown, wrong, expired or revoked

403

CONNECTION_REVOKED: the restaurant deleted the connection; stop sending

422

An error; see ErrorCode