Order Transferred
5 min
An order is transferred to another location.
Set the webhook (sandbox)
Send this mutation with your urlPath. Expressoft then sends a message to urlPath each time the location of the order changes. When the location changes, the orderKey of the old order becomes the newOrderKey.
Query
mutation OrderTransferred($urlPath: String!, $orderKey: Guid!, $newOrderKey: Guid!) {
miscellaneous {
webHooks {
post_OrderTransfered(
payload: {
urlPath: $urlPath,
orderKey: $orderKey,
newOrderKey: $newOrderKey }
)
}
}
}Variables
{
"urlPath": "<your callback URL>",
"orderKey": "<orderKey>",
"newOrderKey": "<newOrderKey>"
}cURL
curl --location 'https://sandbox.expressoft.eu/connect/api/interopgql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{"query": "mutation OrderTransferred($urlPath: String!, $orderKey: Guid!, $newOrderKey: Guid!) { miscellaneous { webHooks { post_OrderTransfered( payload: { urlPath: $urlPath, orderKey: $orderKey, newOrderKey: $newOrderKey } ) } } }", "variables": {"urlPath": "<your callback URL>", "orderKey": "<orderKey>", "newOrderKey": "<newOrderKey>"}}'Response
{
"data": {
"miscellaneous": {
"webHooks": {
"post_OrderTransfered": "<string>"
}
}
}
}The mutation returns a String (the type is confirmed by the schema). Your callback URL is called later, when the event happens.
Payload sent to your URL
Expressoft sends a POST request with this JSON body:
{
"order_key": "00000000-0000-0000-0000-000000000121",
"new_order_key": "00000000-0000-0000-0000-000000000122"
}Field | Type | Description |
|---|---|---|
order_key | GUID | The key of the original order. It is no longer valid after the transfer. |
new_order_key | GUID | The key of the order at the new location. Use this key from now on. |
⚠️ WARNING
After a transfer, the original order_key is no longer valid. Replace it with new_order_key in your system.
ℹ️ INFO
The mutation is named post_OrderTransfered in the schema (spelled with one r). Use the name exactly as written.