Skip to content

Create a webhook subscription

POST
/api/v1/vendor/webhooks
curl --request POST \
--url https://api-omni.linra.net/api/v1/vendor/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com", "eventTypes": [ "vendor.order.assigned" ] }'

Registers a new webhook endpoint for the calling vendor. The signing secret is server-generated and returned in THIS response ONLY — it is never shown again. Subject to a per-vendor active-subscription cap (see the Webhooks & HMAC verification guide). Requires the Orders capability.

Media typeapplication/json
object
url
required
string format: uri
eventTypes
required
Array<string>
Allowed values: vendor.order.assigned vendor.offer.review-decision

The created subscription, with its one-time secret.

Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
subscription
object
id
string format: uuid
vendorId
string format: uuid
url
string format: uri
eventTypes
Array<string>
Allowed values: vendor.order.assigned vendor.offer.review-decision
isActive
boolean
lastDeliveryAt
string format: date-time
nullable
lastDeliveryStatus
string
nullable
createdAt
string format: date-time
nullable
secret

Shown EXACTLY ONCE — no other read ever returns it.

string
Example
{
"state": "SUCCESS",
"payload": {
"subscription": {
"eventTypes": [
"vendor.order.assigned"
]
}
}
}

Request validation failed.

Media typeapplication/json
object
state
required
string
payload
details
object
Example
{
"state": "NOT_FOUND_VENDOR_OFFER"
}

Your token doesn’t carry the capability this endpoint requires.

Media typeapplication/json
object
state
required
string
payload
details
object
Examples
ExamplemissingCapability
{
"state": "FORBIDDEN_CAPABILITY_NOT_GRANTED",
"payload": null,
"details": {
"requiredCapability": "Orders"
}
}

You already have 5 active subscriptions, or the URL failed the SSRF guardrail check.

Media typeapplication/json
object
state
required
string
payload
details
object
Examples
ExamplecapReached
{
"state": "BUSINESS_VENDOR_WEBHOOK_SUBSCRIPTION_LIMIT",
"payload": null,
"details": {}
}

Too many requests. Retry after the Retry-After header (seconds).

Media typeapplication/json
object
state
required
string
payload
details
object
Example
{
"state": "NOT_FOUND_VENDOR_OFFER"
}
Retry-After
integer

Seconds to wait before retrying.