---
title: Order Status Changed
slug: devdocs/order-status-changed
docTags: 
createdAt: 2026-10-16T12:03:51.067Z
---

The status of an order changes.

## Set the webhook (sandbox)

Send this mutation with your `urlPath`. Expressoft then sends a message to `urlPath` each time the status of the order with `orderKey` changes.

**Query**

```graphql
mutation OrderStatusChange($urlPath: String!, $locationKey: Guid!, $orderKey: Guid!, $status: Short!) {
  miscellaneous {
    webHooks {
      post_OrderStatusChanged(
        payload: {
          urlPath: $urlPath,
          locationKey: $locationKey,
          orderKey: $orderKey,
          status: $status }
      )
    }
  }
}
```

**Variables**

```json
{
  "urlPath": "<your callback URL>",
  "locationKey": "<locationKey>",
  "orderKey": "<orderKey>",
  "status": 1
}
```

**cURL**

```bash
curl --location 'https://sandbox.expressoft.eu/connect/api/interopgql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{"query": "mutation OrderStatusChange($urlPath: String!, $locationKey: Guid!, $orderKey: Guid!, $status: Short!) { miscellaneous { webHooks { post_OrderStatusChanged( payload: { urlPath: $urlPath, locationKey: $locationKey, orderKey: $orderKey, status: $status } ) } } }", "variables": {"urlPath": "<your callback URL>", "locationKey": "<locationKey>", "orderKey": "<orderKey>", "status": 1}}'
```

**Response**

```json
{
  "data": {
    "miscellaneous": {
      "webHooks": {
        "post_OrderStatusChanged": "<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:

```json
{
  "order_key": "00000000-0000-0000-0000-000000000121",
  "status": 4,
  "location_key": "00000000-0000-0000-0000-000000000051"
}
```

| Field          | Type    | Description                                              |
| -------------- | ------- | -------------------------------------------------------- |
| `order_key`    | GUID    | The `publicKey` of the order.                            |
| `status`       | integer | The new status. See the table below.                     |
| `location_key` | GUID    | The `publicKey` of the location that prepares the order. |

## Status codes

| Code | Status     |
| ---- | ---------- |
| 1    | Held       |
| 3    | PickedUp   |
| 4    | Ready      |
| 5    | Dispatched |
| 6    | Delivered  |
| 7    | HandedOver |
| 8    | Canceled   |
| 9    | Assigned   |

:::BlockQuote
ℹ️ **INFO**
The webhook supports only these values. The `BillDeliveryStatusType` enum has more names (`NONE`, `UNCONFIRMED`, `IN_TRANSIT`, `REASSIGN`) that aren't supported values here.
:::

:::BlockQuote
ℹ️ **INFO**
In production, Expressoft configures this webhook for you. Contact `support@expressoft.ro`.
:::
