Create Developer Webhook
curl --request POST \
--url https://omnicommerce.sg/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://omnicommerce.sg/api/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/webhooks"
payload = {
"url": "<string>",
"events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Developer Platform
Create Developer Webhook
Create a developer webhook subscription for the authenticated organization. The signing secret is returned only once.
POST
/
api
/
v1
/
webhooks
Create Developer Webhook
curl --request POST \
--url https://omnicommerce.sg/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://omnicommerce.sg/api/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/webhooks"
payload = {
"url": "<string>",
"events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Body
application/json
Public HTTP(S) callback URL.
Maximum string length:
2048Minimum array length:
1Available options:
product.created, product.updated, product.deleted, product.delisted, product.price.changed, product.inventory.changed, product.enrichment.started, product.enrichment.completed, order.created, order.updated, order.deleted, order.status.changed, look.created, look.deleted, review.created, review.updated, review.status.changed, settlement.created, settlement.updated, settlement.status.changed, return.created, return.updated, return.status.changed, account_statement.created, account_statement.updated, account_statement.status.changed, account_statement.reconciliation.changed, account_statement.transactions.synced, account_statement.transactions.failed, account_statement.sync.queued, account_statement.sync.started, account_statement.sync.completed, account_statement.sync.failed, account_statement.sync.unavailable Optional for API-key requests and otherwise resolved by authentication.
Maximum string length:
500Response
Subscription created. The response contains the one-time signing secret.