APIs to create, list, retrieve, and update webhook subscriptions.
Webhook Subscription API (v3)
Defines which event sources a subscription should match. Contains a list of scopes that are OR'd together — an event matches if it satisfies ANY scope.
List of scopes evaluated with OR logic. An event matches if at least one scope is satisfied.
List of predicates that must all be satisfied for this scope to match.
The type of event source entity.
List of entity IDs to match against.
List of event types this subscription should receive. At least one is required.
HTTPS endpoint that Spotnana will POST event payloads to. Must use the https scheme and accept POST requests.
Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.
Additional HTTP headers to include on every webhook request sent to url. Provided as a map of header name to header value. Reserved headers managed by Spotnana (such as Authorization and Content-Type) will override any values supplied here.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/webhooksubscriptionapi/v3/webhooks/subscriptions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"subscriberId": "96d0a1b8-7f77-4d5c-847e-2afd90ed23b3",
"eventSource": {
"scopes": [
{
"predicates": [
{
"type": "COMPANY",
"values": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"comparator": "IN"
}
]
}
]
},
"name": "string",
"eventTypes": [
"TRAVELER_V2"
],
"url": "http://example.com",
"isActive": true,
"customHeaders": {
"X-Custom-Header": "my-value",
"Authorization-Extra": "token123"
}
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "hmacSigningSecret": "string", "createdAt": { "iso8601": "2017-07-21" } }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/subscriber/{subscriberId}/list
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/webhooksubscriptionapi/v3/webhooks/subscriptions/subscriber/{subscriberId}/list
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/subscriber/{subscriberId}/list?limit=50&offset=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful List Webhook Subscriptions Response
Page of webhook subscriptions matching the request.
List of event types this subscription is configured to receive.
UUID of the company that owns this webhook subscription.
Defines which event sources a subscription should match. Contains a list of scopes that are OR'd together — an event matches if it satisfies ANY scope.
List of scopes evaluated with OR logic. An event matches if at least one scope is satisfied.
List of predicates that must all be satisfied for this scope to match.
The type of event source entity.
List of entity IDs to match against.
Comparator for evaluation. Defaults to IN.
Additional HTTP headers included on every webhook request sent to url. Reserved headers managed by Spotnana (such as Authorization and Content-Type) take precedence over values configured here.
Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.
{ "subscriptions": [ { … } ], "totalCount": 0 }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/{subscriptionId}
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/webhooksubscriptionapi/v3/webhooks/subscriptions/{subscriptionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/{subscriptionId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful Get Webhook Subscription Response
List of event types this subscription is configured to receive.
Defines which event sources a subscription should match. Contains a list of scopes that are OR'd together — an event matches if it satisfies ANY scope.
List of scopes evaluated with OR logic. An event matches if at least one scope is satisfied.
List of predicates that must all be satisfied for this scope to match.
The type of event source entity.
List of entity IDs to match against.
Comparator for evaluation. Defaults to IN.
Additional HTTP headers included on every webhook request sent to url. Reserved headers managed by Spotnana (such as Authorization and Content-Type) take precedence over values configured here.
Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "eventTypes": [ "TRAVELER_V2" ], "subscriberId": "96d0a1b8-7f77-4d5c-847e-2afd90ed23b3", "eventSource": { "scopes": [ … ] }, "url": "http://example.com", "customHeaders": { "X-Custom-Header": "my-value", "Authorization-Extra": "token123" }, "isActive": true, "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e", "createdAt": { "iso8601": "2017-07-21" }, "updatedAt": { "iso8601": "2017-07-21" } }
Defines which event sources a subscription should match. Contains a list of scopes that are OR'd together — an event matches if it satisfies ANY scope.
Replacement list of event types this subscription should receive. If provided, must contain at least one entry; the new list fully replaces the existing one.
Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.
HTTPS endpoint that Spotnana will POST event payloads to. Must use the https scheme and accept POST requests.
Replacement set of additional HTTP headers to include on every webhook request. Sending an empty map clears all existing custom headers; omitting the field leaves them unchanged. Reserved headers managed by Spotnana (such as Authorization and Content-Type) will override any values supplied here.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/{subscriptionId}
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/webhooksubscriptionapi/v3/webhooks/subscriptions/{subscriptionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions/{subscriptionId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"eventSource": {
"scopes": [
{
"predicates": [
{
"type": "COMPANY",
"values": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"comparator": "IN"
}
]
}
]
},
"name": "string",
"eventTypes": [
"TRAVELER_V2"
],
"isActive": true,
"url": "http://example.com",
"customHeaders": {
"headerName1": {
"X-Custom-Header": "my-value",
"Authorization-Extra": "token123"
},
"headerName2": {
"X-Custom-Header": "my-value",
"Authorization-Extra": "token123"
}
}
}'