Brink CommerceConfigurationConceptAdd webhookGetting startedIntegrationsModelsPrice and Shipping RulesProduct Feed

Configuration in Brink Commerce

Concept

Brink Commerce support webhooks on Order status changes. If you need multiple hooks setup with diffrent hooknames.

Add webhook

Order and Product

Swagger

curl --request PUT \
--url https://api.${env}.brinkcommerce.com/configurationv1/configurations/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: ${api key}' \
--data '[
{
"name": "webhook.${order|product}.hookname",
"data": {
"url": "https://1527b018dffa8a2320879f1728e72958.m.pipedream.net",
"headers": {
"hello": "world"
}
}
}
]'

Response

[
{
"service": "brink",
"name": "webhook.${order|product}.hookname",
"data": {
"url": "https://1527b018dffa8a2320879f1728e72958.m.pipedream.net",
"headers": {
"hello": "world"
}
}
}
]

If there was a problem for Brink Commerce to post to the configured url you will recivie a 400 Bad Request.

You should be set if recive a 200 Ok and you see a POST request with a body like this:

{
"message": "Hello from Brink Commerce"
}

Brink Commerce will send a callback for when there is a state change on order.
Example of a callback

{
"service": "order",
"state": "success",
"orderId": "f3a1b916-63b5-469f-8654-2762d5ca8589"
}

State values are success|refunded|canceled|shipped

Brink Commerce will send a callback for when there is a state change on product.
Example of a callback

{
"service": "product",
"state": "created",
"productId": "e9fd11fb-ce94-4eee-a253-3c180a94f857"
}

State values are created|updated