Skip to content

transfer_order/cancelled

Overview

PropertyValue
Webhook typetransfer_order/cancelled
Kafka topictransfer-order.cancelled
DirectionPlatform → Your endpoint

Description

Fired when a transfer order is cancelled. All active lines transition to CANCELED state, and no further reception is possible on this order.

Trigger Conditions

  • A user or integration explicitly cancels the transfer order via the API
  • The transfer order was in DRAFT or OPENED state before cancellation

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/cancelled",
    "date": "2024-03-18T11:00:00.000Z"
  },
  "body": { ... }
}

Body — Property Table

TransferOrder Object

FieldTypeNullableDescription
idstring (uuid)NoUnique transfer order identifier
organizationIdstring (uuid)NoOrganization that owns this transfer order
locationIdstring (uuid)NoDestination warehouse/location
supplierIdstring (uuid)YesSupplier providing the stock
stateenumNoAlways CANCELED for this event
orderNumberstringNoHuman-readable order reference number
externalReferencestringYesExternal system reference
shippingDatestring (ISO 8601)NoOriginally scheduled shipping date
expectedDatestring (ISO 8601)NoOriginally expected arrival date
carrierstringYesCarrier name
trackingstringYesCarrier tracking number
commentstringYesFree-text comment (may contain cancellation reason)
emergencybooleanYesEmergency replenishment flag
containerNumberintegerYesNumber of containers/pallets
containerTypeenumNoContainer type: BOX, PALLET, CONTAINER
linesTransferOrderLine[]NoLines with updated state: CANCELED
createdAtstring (ISO 8601)NoOriginal creation timestamp
issuedAtstring (ISO 8601)NoIssue timestamp
updatedAtstring (ISO 8601)NoTimestamp of cancellation

TransferOrderLine Object

FieldTypeNullableDescription
idstring (uuid)NoUnique line identifier
transferOrderIdstring (uuid)NoParent transfer order ID
stockReferenceIdstring (uuid)YesAssociated stock reference
labelstringYesDisplay label
skustringYesStock keeping unit
referencestringYesProduct reference code
limitUsageDatestring (ISO 8601)YesExpiry date
batchNumberstringYesBatch / lot number
expectedQuantityintegerNoDeclared quantity
receivedQuantityintegerYesQuantity received before cancellation
restockedQuantityintegerYesQuantity restocked before cancellation
garbageQuantityintegerYesQuantity discarded before cancellation
metaobjectYesArbitrary metadata (JSON)
stateenumNoAlways CANCELED for lines of a cancelled order

Full JSON Payload Sample

json
{
  "header": {
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "messageId": "f7a8b9c0-d1e2-3456-fabc-678901234567",
    "webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "type": "transfer_order/cancelled",
    "date": "2024-03-18T11:00:00.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": "CANCELED",
    "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": null,
    "comment": "Supplier unable to fulfill — order rescheduled",
    "emergency": false,
    "containerNumber": 2,
    "containerType": "PALLET",
    "createdAt": "2024-03-15T10:23:45.000Z",
    "issuedAt": "2024-03-15T10:23:45.000Z",
    "updatedAt": "2024-03-18T11:00:00.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": "CANCELED"
      }
    ]
  }
}

Notes

  • Once cancelled, a transfer order cannot be reopened. A new transfer order must be created.
  • All lines in the payload will have state: CANCELED regardless of their prior state.
  • Stock that was already received and restocked before cancellation is not automatically reversed; any stock adjustments must be handled manually.

HappyColis API Documentation