Creates an event subscription. Omit `id` to have one generated, or supply your own to keep ids stable across environments.
Setting one up end to end
- GET /api/EventSubscriptions/Filters — read the object types, statuses, markets, stores and users this tenant actually has, so the filters you send reference real values.
- POST /api/EventSubscriptions — create it, usually with isActive: false first.
- POST /api/EventSubscriptions/{id}/Test — fire one event at the destination and check the endpoint really accepts it.
- PUT /api/EventSubscriptions/{id} — flip isActive to true once the test passes.
A webhook that fires when an order is created
{
"name": "Order created to ERP",
"isActive": true,
"connector": "Webhook",
"baseUrl": "https://erp.example.com",
"requestUri": "/omnium/orders",
"httpVerb": "POST",
"messageEncoding": "UTF-8",
"useQueueDelivery": true,
"clientId": "omnium-integration",
"clientSecret": "the-secret-value",
"requestHeaders": [
{ "key": "Authorization", "value": "Bearer eyJhbGciOi..." },
{ "key": "X-Source", "value": "omnium" }
],
"filters": {
"classNames": ["Order"],
"statuses": ["Created"],
"markets": ["NOR"],
"excludedUserUpdates": ["System"]
}
}
excludedUserUpdates is worth setting on any integration that also writes back to Omnium — without it the integration is woken by the events its own writes produce.
A queue subscription instead of a webhook
Queue and bus connectors use topic rather than a URL, and clientSecret carries the connection string:
{
"name": "All product changes to the bus",
"isActive": true,
"connector": "AzureServiceBus",
"topic": "omnium-products",
"clientSecret": "Endpoint=sb://...;SharedAccessKey=...",
"filters": { "classNames": ["Product"] }
}
Built-in connector values are Webhook, AzureServiceBus, AzureStorageQueue, Kafka and RabbitMQ; installed integration modules may add more. The name is not validated on write, so a typo produces a subscription that never delivers — use Test to confirm it before relying on it.
Omitting filters entirely subscribes to every event for the tenant. An empty or omitted list inside filters places no restriction on that one dimension rather than matching nothing.
Request
- Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
- URL: https://api.omnium.no/api/EventSubscriptions
- Auth: API key in header Authorization
Request body
Response
Subscription created. The response carries the assigned id, with credentials omitted.
Changes
No recorded changes to this operation across all 1 revision of this API.