transfer_order/created
Overview
| Property | Value |
|---|---|
| Webhook type | transfer_order/created |
| Kafka topic | transfer-order.created |
| Direction | Platform → Your endpoint |
Description
Fired when a new transfer order is created in the system. A transfer order represents an inbound stock replenishment from a supplier to a warehouse location.
Trigger Conditions
- A transfer order is created via the HappyColis GraphQL API
- An import process creates a transfer order programmatically
Message Envelope
json
{
"header": {
"organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "transfer_order/created",
"date": "2024-03-15T10:23:45.000Z"
},
"body": { ... }
}Body — Property Table
TransferOrder Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique transfer order identifier |
organizationId | string (uuid) | No | Organization that owns this transfer order |
locationId | string (uuid) | No | Destination warehouse/location for this transfer |
supplierId | string (uuid) | Yes | Supplier providing the stock |
state | enum | No | Transfer order state: DRAFT, OPENED, CANCELED, COMPLETED |
orderNumber | string | No | Human-readable order reference number |
externalReference | string | Yes | External system reference (e.g. supplier PO number) |
shippingDate | string (ISO 8601) | No | Scheduled shipping date from the supplier |
expectedDate | string (ISO 8601) | No | Expected arrival date at the warehouse |
carrier | string | Yes | Carrier name for transport |
tracking | string | Yes | Carrier tracking number |
comment | string | Yes | Free-text comment |
emergency | boolean | Yes | Whether this is an emergency replenishment order |
containerNumber | integer | Yes | Number of containers/pallets |
containerType | enum | No | Container type: BOX, PALLET, CONTAINER |
lines | TransferOrderLine[] | No | Array of transfer order lines (see below) |
createdAt | string (ISO 8601) | No | Timestamp when the transfer order was created |
issuedAt | string (ISO 8601) | No | Timestamp when the transfer order was issued |
updatedAt | string (ISO 8601) | No | Timestamp of the last update |
TransferOrderLine Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique line identifier |
transferOrderId | string (uuid) | No | Parent transfer order ID |
stockReferenceId | string (uuid) | Yes | Associated stock reference (if matched) |
label | string | Yes | Display label for the item |
sku | string | Yes | Stock keeping unit identifier |
reference | string | Yes | Product reference code |
limitUsageDate | string (ISO 8601) | Yes | Expiry / use-by date for the batch |
batchNumber | string | Yes | Batch or lot number |
expectedQuantity | integer | No | Declared quantity expected from supplier |
receivedQuantity | integer | Yes | Quantity actually received at warehouse |
restockedQuantity | integer | Yes | Quantity placed into stock |
garbageQuantity | integer | Yes | Quantity discarded (damaged/unsellable) |
meta | object | Yes | Arbitrary metadata (JSON) |
state | enum | No | Line state: ACTIVE, CANCELED |
Full JSON Payload Sample
json
{
"header": {
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"messageId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"type": "transfer_order/created",
"date": "2024-03-15T10:23:45.000Z"
},
"body": {
"id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"locationId": "e5f6a7b8-c9d0-1234-efab-345678901234",
"supplierId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
"state": "DRAFT",
"orderNumber": "TO-2024-001234",
"externalReference": "SUPP-PO-98765",
"shippingDate": "2024-03-20T00:00:00.000Z",
"expectedDate": "2024-03-25T00:00:00.000Z",
"carrier": "DHL Freight",
"tracking": "1234567890123456",
"comment": "Urgent restock for spring collection",
"emergency": false,
"containerNumber": 2,
"containerType": "PALLET",
"createdAt": "2024-03-15T10:23:45.000Z",
"issuedAt": "2024-03-15T10:23:45.000Z",
"updatedAt": "2024-03-15T10:23:45.000Z",
"lines": [
{
"id": "a7b8c9d0-e1f2-3456-abcd-567890123456",
"transferOrderId": "d4e5f6a7-b8c9-0123-defa-234567890123",
"stockReferenceId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
"label": "T-Shirt Blanc Taille M",
"sku": "TSHIRT-WHITE-M",
"reference": "TSH-WH-M-001",
"limitUsageDate": null,
"batchNumber": null,
"expectedQuantity": 100,
"receivedQuantity": null,
"restockedQuantity": null,
"garbageQuantity": null,
"meta": null,
"state": "ACTIVE"
},
{
"id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
"transferOrderId": "d4e5f6a7-b8c9-0123-defa-234567890123",
"stockReferenceId": null,
"label": "Pantalon Bleu Taille 38",
"sku": "PANTS-BLUE-38",
"reference": "PNT-BL-38-001",
"limitUsageDate": null,
"batchNumber": "BATCH-2024-Q1",
"expectedQuantity": 50,
"receivedQuantity": null,
"restockedQuantity": null,
"garbageQuantity": null,
"meta": null,
"state": "ACTIVE"
}
]
}
}Related Events
transfer_order/updated— fired when transfer order fields changetransfer_order/opened— fired when the transfer order is confirmed and openedtransfer_order/completed— fired when all lines are received and the order is completetransfer_order/cancelled— fired when the transfer order is cancelled
Notes
- A newly created transfer order always starts with
state: DRAFT. - The
linesarray is always present (eager-loaded) but may be empty if the order was created without lines. stockReferenceIdon a line isnulluntil the line is matched to an existing stock reference in the warehouse.receivedQuantity,restockedQuantity, andgarbageQuantityarenulluntil receiving is performed.