Settings | Event Subscriptions

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

  1. 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.
  2. POST /api/EventSubscriptions — create it, usually with isActive: false first.
  3. POST /api/EventSubscriptions/{id}/Test — fire one event at the destination and check the endpoint really accepts it.
  4. 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.

post/api/EventSubscriptions

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

idstring nullable

Unique identifier. Assigned by Omnium when omitted on create; supply your own to keep ids stable across environments.

namestring required

Name shown in the UI and included in delivery log entries.

isActiveboolean

When false the subscription is kept but no events are delivered.

connectorstring required

Delivery mechanism. Built-in values are Webhook, AzureServiceBus, AzureStorageQueue, Kafka and RabbitMQ; installed integration modules may add more.

baseUrlstring nullable

Target host for HTTP delivery, for example https://example.com. Required by the Webhook connector.

requestUristring nullable

Path appended to Omnium.Public.Events.Models.OmniumEventSubscription.BaseUrl, for example /hooks/orders.

httpVerbstring nullable

HTTP method used for delivery, for example POST.

topicstring nullable

Queue, topic or stream name. Used by the queue and bus connectors instead of a URL.

clientIdstring nullable

Client id used to authenticate against the destination.

clientSecretstring nullable

Client secret or connection string used to authenticate against the destination. Write-only: always returned as null. Omit it on update to keep the stored value, or send an empty string to clear it.

messageEncodingstring nullable

Character encoding of the delivered message body, for example UTF-8.

useQueueDeliveryboolean

When true, events are put on an internal queue and delivered asynchronously with retries instead of being sent inline.

Response

Subscription created. The response carries the assigned id, with credentials omitted.

idstring nullable

Unique identifier. Assigned by Omnium when omitted on create; supply your own to keep ids stable across environments.

namestring required

Name shown in the UI and included in delivery log entries.

isActiveboolean

When false the subscription is kept but no events are delivered.

connectorstring required

Delivery mechanism. Built-in values are Webhook, AzureServiceBus, AzureStorageQueue, Kafka and RabbitMQ; installed integration modules may add more.

baseUrlstring nullable

Target host for HTTP delivery, for example https://example.com. Required by the Webhook connector.

requestUristring nullable

Path appended to Omnium.Public.Events.Models.OmniumEventSubscription.BaseUrl, for example /hooks/orders.

httpVerbstring nullable

HTTP method used for delivery, for example POST.

topicstring nullable

Queue, topic or stream name. Used by the queue and bus connectors instead of a URL.

clientIdstring nullable

Client id used to authenticate against the destination.

clientSecretstring nullable

Client secret or connection string used to authenticate against the destination. Write-only: always returned as null. Omit it on update to keep the stored value, or send an empty string to clear it.

messageEncodingstring nullable

Character encoding of the delivered message body, for example UTF-8.

useQueueDeliveryboolean

When true, events are put on an internal queue and delivered asynchronously with retries instead of being sent inline.

Changes

No recorded changes to this operation across all 1 revision of this API.