Skip to content

shipment/created

Overview

PropertyValue
Webhook typeshipment/created
Kafka topicshipment.created
DirectionPlatform → Your endpoint

Description

Fired when a shipment is created. A shipment represents a physical parcel dispatched to the customer — it has a carrier label, tracking number, and delivery address. One delivery order may generate multiple shipments (e.g. partial fulfillments or multiple parcels).

Trigger Conditions

  • A warehouse creates a carrier label and registers a shipment
  • An operator manually creates a shipment via the GraphQL API
  • The fulfillment pipeline generates a shipment after a delivery order line reaches IN_PROGRESS

Message Envelope

json
{
  "header": {
    "organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "type": "shipment/created",
    "date": "2024-03-15T16:00:00.000Z"
  },
  "body": { ... }
}

Body — Property Table

Shipment Object

FieldTypeNullableDescription
idstring (uuid)NoUnique shipment identifier
externalIdstringYesExternal reference (carrier-assigned ID)
locationIdstring (uuid)YesOriginating warehouse/location
organizationIdstring (uuid)NoOwning organization
shippingMethodIdstring (uuid)YesShipping method used
shippingMethodNamestringYesHuman-readable shipping method name
detailsShipmentDetail[]NoArray of parcel contents (see below)
addressesShipmentAddress[]NoDelivery and return addresses (see below)
eventsShippingEvent[]NoArray of tracking events (see below)
lastEventenumNoMost recent tracking event code (see ShippingEventEnum)
stateenumYesShipment state: DRAFT, OPENED, or COMPLETED
labelstringNoCarrier label identifier (e.g. 1Z999AA10123456784)
referencestringNoInternal shipment reference
trackingUrlstringYesPublic tracking URL
trackingstringYesTracking number as a plain string
metaobjectYesArbitrary metadata (JSON)
issuedAtstring (ISO 8601)NoWhen the shipment was issued
createdAtstring (ISO 8601)NoWhen the shipment record was created
deliveredAtstring (ISO 8601)YesWhen the package was delivered
firstAttemptedAtstring (ISO 8601)YesWhen the first delivery attempt was made
estimatedAtstring (ISO 8601)YesEstimated delivery date
weightfloatYesPackage weight
weightSellingUnitenumYesWeight unit: kg, g, or mg, default kg
volumefloatYesPackage volume
volumeSellingUnitenumYesVolume unit: l or ml, default l
formatstringYesPackage format descriptor

ShipmentDetail Object (parcel line item)

FieldTypeNullableDescription
idstring (uuid)NoUnique detail identifier
shipmentIdstring (uuid)NoParent shipment ID
orderLineIdstring (uuid)YesSource order line ID
deliveryOrderLineIdstring (uuid)NoSource delivery order line ID
labelstringNoProduct label
quantityintegerNoQuantity in this parcel
batchNumberstringYesBatch/lot number (for regulated goods)
limitUsageDatestring (ISO 8601)YesExpiration date (for perishable goods)

ShipmentAddress Object

FieldTypeNullableDescription
idstring (uuid)NoUnique address identifier
shipmentIdstring (uuid)NoParent shipment ID
typeenumNoAddress type: DELIVERY or RETURN
fullnamestringNoFull recipient name
emailstringNoEmail address
addressstringNoStreet address line 1
addressComplementstringYesStreet address line 2
zipcodestringNoPostal/ZIP code
citystringNoCity name
countrystringNoISO 3166-1 alpha-2 country code
statestringYesState/region
phonestringYesPhone number
mobilestringYesMobile number
commentsstringYesFree-text comment

ShippingEvent Object

FieldTypeNullableDescription
idstring (uuid)NoUnique event identifier
shipmentIdstring (uuid)NoParent shipment ID
eventenumNoEvent code (see below)
eventCodestringYesCarrier-specific event code
eventMessagestringYesHuman-readable event message from carrier
eventDescriptionstringYesDetailed description
eventCountrystringYesCountry where the event occurred
eventDatestring (ISO 8601)YesWhen the carrier event occurred
datestring (ISO 8601)NoWhen HappyColis recorded this event
commentstringYesInternal comment
metaobjectYesArbitrary metadata (JSON)

ShippingEventEnum values:

ValueDescription
NEWShipment created, not yet in carrier system
INFO_RECEIVEDCarrier received shipping information (default)
PENDINGAwaiting carrier pickup
IN_TRANSITPackage in transit
OUT_FOR_DELIVERYOut for final delivery attempt
ATTEMPT_FAILDelivery attempt failed
AVAILABLE_FOR_PICKUPAvailable at pickup point
DELIVEREDSuccessfully delivered
DELIVERED_TO_SENDERReturned to sender
EXCEPTIONCarrier exception (damage, loss, etc.)
RETURNED_TO_SENDERIn transit back to sender
EXPIREDShipment expired without delivery

Full JSON Payload Sample

json
{
  "header": {
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "messageId": "e1f2a3b4-c5d6-7890-efab-567890123456",
    "webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "type": "shipment/created",
    "date": "2024-03-15T16:00:00.000Z"
  },
  "body": {
    "id": "f2a3b4c5-d6e7-8901-fabc-678901234567",
    "externalId": "CLS-9387263847",
    "locationId": "f0a1b2c3-d4e5-6789-f0ab-123456789012",
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "shippingMethodId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
    "shippingMethodName": "Colissimo Domicile",
    "lastEvent": "INFO_RECEIVED",
    "state": "OPENED",
    "label": "1Z999AA10123456784",
    "reference": "SHP-2024-001234",
    "trackingUrl": "https://www.laposte.fr/outils/track-a-parcel?code=1Z999AA10123456784",
    "tracking": "1Z999AA10123456784",
    "meta": null,
    "issuedAt": "2024-03-15T16:00:00.000Z",
    "createdAt": "2024-03-15T16:00:00.000Z",
    "deliveredAt": null,
    "firstAttemptedAt": null,
    "estimatedAt": "2024-03-17T18:00:00.000Z",
    "weight": 1.5,
    "weightSellingUnit": "kg",
    "volume": null,
    "volumeSellingUnit": "l",
    "format": "S",
    "addresses": [
      {
        "id": "a3b4c5d6-e7f8-9012-abcd-789012345678",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "type": "DELIVERY",
        "fullname": "Alice Dupont",
        "email": "alice.dupont@example.com",
        "address": "12 Rue de la Paix",
        "addressComplement": "Apt 4B",
        "zipcode": "75001",
        "city": "Paris",
        "country": "FR",
        "state": null,
        "phone": "+33612345678",
        "mobile": null,
        "comments": null
      },
      {
        "id": "b4c5d6e7-f8a9-0123-bcde-890123456789",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "type": "RETURN",
        "fullname": "HappyColis Entrepôt Paris",
        "email": "returns@happycolis.com",
        "address": "123 Avenue des Champs-Élysées",
        "addressComplement": null,
        "zipcode": "75008",
        "city": "Paris",
        "country": "FR",
        "state": null,
        "phone": "+33140000000",
        "mobile": null,
        "comments": null
      }
    ],
    "details": [
      {
        "id": "c5d6e7f8-a9b0-1234-cdef-901234567890",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "orderLineId": "c9d0e1f2-a3b4-5678-cdef-789012345678",
        "deliveryOrderLineId": "b2c3d4e5-f6a7-8901-bcde-012345678901",
        "label": "T-Shirt Blanc Taille M",
        "quantity": 2,
        "batchNumber": null,
        "limitUsageDate": null
      }
    ],
    "events": [
      {
        "id": "d6e7f8a9-b0c1-2345-defa-012345678901",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "event": "INFO_RECEIVED",
        "eventCode": null,
        "eventMessage": null,
        "eventDescription": null,
        "eventCountry": null,
        "eventDate": null,
        "date": "2024-03-15T16:00:00.000Z",
        "comment": null,
        "meta": null
      }
    ]
  }
}

Notes

  • One delivery order can generate multiple shipments (e.g. items from the same order split across multiple parcels).
  • At creation, events always contains at least one INFO_RECEIVED event.
  • The lastEvent field is a convenience field reflecting the most recent event code — it is updated by each new ShippingEvent.
  • state: DRAFT may occur when the shipment is pre-created before label generation; OPENED means the label is active.
  • details links this shipment back to specific delivery order lines via deliveryOrderLineId.
  • For B2C orders, there is typically one DELIVERY address and one RETURN address.

HappyColis API Documentation