Create a webhook subscription
POST
/api/v1/vendor/webhooks
const url = 'https://api-omni.linra.net/api/v1/vendor/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com","eventTypes":["vendor.order.assigned"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string format: uri
eventTypes
required
Array<string>
Responses
Section titled “Responses”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>
isActive
boolean
lastDeliveryAt
string format: date-time
lastDeliveryStatus
string
createdAt
string format: date-time
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"}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.