Update Webhook Information
curl --request PUT \
--url https://api.loyalty.dog/v2/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.loyalty.dog/v2/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/webhooks/{webhookId}"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Webhooks
Update Webhook Information
Update the information of a specific webhook.
- data:
CreateWebhookPayload- The updated data for the webhook. - webhook:
Webhook- The webhook instance loaded by webhook ID.
Returns: dict - The updated webhook information.
PUT
/
v2
/
webhooks
/
{webhookId}
Update Webhook Information
curl --request PUT \
--url https://api.loyalty.dog/v2/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.loyalty.dog/v2/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/webhooks/{webhookId}"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
application/json
The webhook creation payload
Attributes: url (str): The webhook URL sharedSecret (str | None, optional): A random string to handshake to verify the URL and hmac the event payload data. Defaults to None allowedTemplates (List[PydanticObjectId] | None, optional): A list ID of the allowed templates. Defaults to None allowedEvents (List[WebhookEventType] | None, optional): A list of allowed webhook types. Defaults to None
Required string length:
1 - 2083Minimum string length:
8Required string length:
24Pattern:
^[0-9a-f]{24}$Available options:
pass.created, pass.updated, pass.downloaded, pass.installed, pass.deleted, registration.created, registration.deleted, scan.performed, webhook.verify, transaction.completed, loyalty.activity.performed, loyalty.activity.reward.redeemed, loyalty.activity.points.redeemed, loyalty.activity.offer.received, loyalty.activity.offer.redeemed, loyalty.activity.offer.expired, loyalty.activity.voucher.received, loyalty.activity.voucher.redeemed, loyalty.activity.voucher.expired, loyalty.activity.points.changed, loyalty.activity.email.added, loyalty.activity.phone.added, loyalty.activity.customer.referred, loyalty.activity.custom.field.added, loyalty.activity.card.installed, loyalty.activity.card.scanned, loyalty.customer.created, loyalty.customer.updated, loyalty.customer.deleted Response
Successful Response
