Every time an event you subscribed to happens, Melonn sends an HTTP POST to the URL you configured, with a JSON body that describes the event.

Subscribe to an event

In Orbita, go to Integrations → Webhooks, pick the event and enter the URL that will receive it. You can also add headers, which Melonn sends with every call.
Webhook configuration form in Orbita
Melonn does not sign webhook calls. Add a header with a secret value of your own when you configure the webhook, and reject calls that do not carry it.

Test it

Once configured, send a test event from the list of configured webhooks. Melonn posts a sample payload to your URL and shows you the response.
Configured webhooks list, with the button to test an event
Test event dialog showing the request sent and the response received
The test payload carries sample data, not information from your real orders. Build your integration against the examples in this reference.

The payload

Every event has the same envelope. Most events also carry eventSource and sourceSpecificEventIdentifier; each event’s page shows which fields it sends.
  • eventClassifier.type tells you which event it is. Route on it.
  • eventData carries the entity the event is about. Each event’s page documents its fields.
  • Fields without a value are left out, not sent as null. Treat every field inside eventData as optional.
  • New fields may be added to an event at any time. Ignore the ones you do not use.

Delivery and retries

  • Respond with any 2xx status to acknowledge the event. Any other status, or a connection error, counts as a failure.
  • Respond quickly, and do any slow processing after responding.
  • A failed delivery is retried, up to 3 attempts in total, about 5 minutes apart.
  • Events for the same URL are delivered in order. While an event is being retried, the events after it for that URL wait.
  • After 3 failed attempts the webhook is deactivated, and it stops receiving events. Events that happen while it is inactive are not delivered later. Fix your endpoint and activate the webhook again in Orbita.
  • An event can occasionally be delivered more than once. Make your processing idempotent: when the event carries sourceSpecificEventIdentifier, use it as the key, since it is unique for each occurrence; otherwise, key on the event type, the entity id and eventDate.

Available events