Skip to content

shipment/completed

Overview

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

Description

Fired when a shipment transitions to the COMPLETED state. This typically occurs when the carrier confirms successful delivery (lastEvent: DELIVERED). This is the terminal success state for a shipment.

Trigger Conditions

  • The carrier reports successful delivery (DELIVERED tracking event)
  • The shipment state transitions to COMPLETED
  • Can also be triggered manually by an operator confirming delivery
  • The deliveredAt field is populated when this event fires

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/completed",
    "date": "2024-03-17T14:30:00.000Z"
  },
  "body": { ... }
}

Body — Property Table

The body has the same shape as shipment/created. See shipment-created.md for the full property table.

When this event fires:

FieldExpected value
stateCOMPLETED
lastEventDELIVERED (typically)
deliveredAtISO 8601 timestamp of delivery

Full JSON Payload Sample

json
{
  "header": {
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "messageId": "f2a3b4c5-d6e7-8901-fabc-789012345678",
    "webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "type": "shipment/completed",
    "date": "2024-03-17T14:30: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": "DELIVERED",
    "state": "COMPLETED",
    "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": "2024-03-17T14:30:00.000Z",
    "firstAttemptedAt": "2024-03-17T10:00:00.000Z",
    "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
      }
    ],
    "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
      },
      {
        "id": "e7f8a9b0-c1d2-3456-efab-123456789012",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "event": "IN_TRANSIT",
        "eventCode": "D101",
        "eventMessage": "Parcel in transit at sorting center",
        "eventDescription": "Parcel scanned at Rungis sorting center",
        "eventCountry": "FR",
        "eventDate": "2024-03-16T06:00:00.000Z",
        "date": "2024-03-16T06:05:00.000Z",
        "comment": null,
        "meta": null
      },
      {
        "id": "f8a9b0c1-d2e3-4567-fabc-234567890123",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "event": "OUT_FOR_DELIVERY",
        "eventCode": "D201",
        "eventMessage": "Out for delivery",
        "eventDescription": "Parcel loaded on delivery vehicle",
        "eventCountry": "FR",
        "eventDate": "2024-03-17T08:00:00.000Z",
        "date": "2024-03-17T08:05:00.000Z",
        "comment": null,
        "meta": null
      },
      {
        "id": "a9b0c1d2-e3f4-5678-abcd-345678901234",
        "shipmentId": "f2a3b4c5-d6e7-8901-fabc-678901234567",
        "event": "DELIVERED",
        "eventCode": "D301",
        "eventMessage": "Parcel delivered",
        "eventDescription": "Delivered to recipient Alice Dupont",
        "eventCountry": "FR",
        "eventDate": "2024-03-17T14:30:00.000Z",
        "date": "2024-03-17T14:35:00.000Z",
        "comment": null,
        "meta": null
      }
    ]
  }
}

Notes

  • shipment/completed is a terminal event for the shipment — no further shipment/shipping_event events are emitted after completion.
  • When all shipments for a delivery order are completed, a delivery_order/completed event follows.
  • The full events history is included in the payload.
  • deliveredAt is set from the most recent DELIVERED ShippingEvent.eventDate value.
  • firstAttemptedAt is set on the first OUT_FOR_DELIVERY event timestamp.

HappyColis API Documentation