v60

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-01361201.5 MB
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

Domainstring required
OrderIdstring required
Statestring required
LastStatestring required
LastChangestring required
CurrentChangestring required

Example response

{
  "Origin": {
    "Account": "automacaoqa",
    "Key": "vtexappkey-appvtex"
  }
}