Brink CommerceConfigurationConceptAdd webhookGetting startedIntegrationsModelsPrice and Shipping RulesProduct Feed

Configuration in Brink Commerce

Concept

Brink Commerce support webhooks on Order or Product status changes. If you need multiple hooks create them with different hook names.

Add webhook

To add a webhook you need to provide a name and callback URL for Brink Commerce to use

IdentifierTypeDescriptionRestrictions
nameStringName of the webhook. Requiredwebhook\.(order|product)\.(\w+)
data.urlStringCallback URL. RequiredURL
data.headersObjectOptional headers to send with the callback

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}.newHookName",
"data": {
"url": "https://1527b018dffa8a2320879f1728e72958.m.pipedream.net",
"headers": {
"hello": "world"
}
}
}
]'

Response

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

Brink Commerce will POST a sample message to the endpoint provided to verify its validity. If there was a problem for Brink Commerce to POST to the configured URL you will receive a 400 Bad Request

Verification message:

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

Order callback

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

State values are (success|refunded|canceled|shipped|waiting)

Example of a callback:

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

Product callback

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

State values are (created|updated)

Example of a callback:

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