- Update Webhook Subscription
Replacement event source scope. If provided, fully replaces the existing 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 -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"
}
}
}'