Skip to main content
Omnilinker does not send outbound webhooks yet: you cannot register a URL for Omnilinker to call when something changes. To react to changes, poll the API. For orders, the order journal feed gives you every change in order, with a cursor, so you never miss one and never process one twice.
Outbound webhooks are not implemented. There is no:
  • way to subscribe a URL to events, in the app or through the API;
  • delivery, retry or signing of calls to your endpoint;
  • webhook, Slack or Microsoft Teams channel for notifications: notifications reach people in the app and by e-mail only.

Follow order changes with the order journal

Every change to an order is written to the order journal: a new order, a status change, a payment, an edited line, a shipment, and so on. The feed returns those entries oldest first, each with a number that only ever grows. Your integration remembers the last number it processed and asks for what came after it.

Before you start

  • The key needs the Journal permission, under Ordering. The Orders integration template includes it. To read the orders themselves, it also needs Orders. See Authentication.
  • The journal is part of Order Management. If Order Management is not enabled for your organization, the feed answers 403 Forbidden.

Read the feed

integer
Return entries with an id greater than this. Leave it out, or send 0, to start from the oldest entry.
integer
default:"100"
How many entries to return, from 1 to 100.
string[]
Return only these event types. Repeat the parameter for each one: EventTypes=StatusChanged&EventTypes=OrderCreated. Leave it out for every type.
string
Return only the entries of this order (its GUID). Leave it out for every order.
The answer is a list, oldest first:
integer
The entry’s number, and your cursor. Send the last one you processed as AfterId.
string
The order the entry is about. Fetch it with GET /api/ordering/order/{orderId}.
integer
The order’s number, as shown in Omnilinker.
string
What happened; see Event types.
string
The part of the order the entry is about, such as a line, a payment or a shipment. null for a change to the whole order.
string
The user behind the change, when there is one.
string
Always null in the feed. The feed carries no names.
integer
Who made the change: 0 a person, 1 an automation rule, 2 an API key.
string
A short JSON description of the change, as a string, or null. It holds no personal data. Its shape differs by event type and is not a published contract yet: show it, but do not build logic on its fields.
string
When the change was made, in UTC.

Poll the feed

1

Start from a cursor

The first time, send AfterId=0. The first run reads the whole history, up to 100 entries a call.
2

Process the page

Handle each entry in order. When an entry needs the order’s current state, fetch the order by orderId.
3

Save the cursor

Save the id of the last entry you processed, in the same transaction as your own changes if you can.
4

Ask for the next page

If the page was full (as many entries as MaxResultCount), ask again straight away with the new AfterId. If it had fewer, you are up to date: wait before the next poll.

How the feed behaves

  • Nothing is skipped. An entry appears in the feed only after every entry with a lower id is visible, so moving your cursor forward never skips one that was still being saved.
  • Changes appear within about two minutes. Omnilinker releases new entries to the feed every two minutes. Polling more often than that returns nothing new. Polling every few minutes is enough.
  • Entries do not change. An entry is never edited or deleted, so you can process each one once.
  • No personal data. The feed carries no buyer data and no names. Fetch the order, with a key that has the View personal data permission, when you need them.
  • Your organization only. The feed holds the orders of the key’s organization.

Event types

Each event type matches an entry on the order’s history in Omnilinker, shown with the label in the second column. New event types can be added. Ignore types you do not recognise rather than failing on them.

Other changes

The journal covers orders only. For other data, poll the list endpoints with a filter on time where they offer one. For example, the orders list takes CreatedFrom and CreatedTo, ConfirmedFrom and ConfirmedTo, and InStatusFrom and InStatusTo. The API reference lists each endpoint’s filters. To let people know about events, rather than a system, use Omnilinker’s notifications; see Notification channels.

Authentication

Create a key with the Journal permission.

Developer overview

Conventions, paging and errors.

Orders

How orders, statuses and payments work.

Built-in order automation

Act on orders inside Omnilinker, without code.