Order hook
Create or update hook configuration
Configures filtering rules applied to orders hook. Learn more with the orders hook guide.
There are two types of filtering that can be used:
-
FromWorkflow: filters orders by status.
-
FromOrders: uses JSONata expressions to filter orders according to any property in the orders JSON document.
This enables stores to filter delivered orders and orders in which products have been added or removed, for example.
To learn more, access the JSONata documentation and test filtering JSONata expressions with our expressions API.
post/api/orders/hook/config
Headers
Content-Typestring required
Type of the content being sent.
Acceptstring required
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Request body
Example request
{
"filter": {
"type": "FromWorkflow",
"status": [
"order-completed",
"handling",
"ready-for-handling",
"waiting-ffmt-authorization",
"cancel"
]
},
"hook": {
"url": "https://endpoint.example/path",
"headers": {
"key": "value"
}
}
}Response
OK
Example response
{
"Origin": {
"Account": "automacaoqa",
"Key": "vtexappkey-appvtex"
}
}