Introduction

Flow Diagrams

The main flow diagrams can be found here for implementation guidance.

Parcel Booking Flow

Parcel booking flow: optional pre-check, booking, and the booking webhook

1. Pre-check (optional). The PRE_CHECK step checks if a parcel can be reserved in a specific locker. It does not reserve a compartment.

Example usage: the parcel is created, but delivery is still a few days away. PRE_CHECK shows if the parcel must be redirected. It checks the maximum size and the parcel details, for example the locker ID.

2. Booking. API reference: Publish parcel data.

JSONCode
{ "eventType": "BOOKING", "lockerUid": "someLockerUid", "carrierParcelId": "someCarrierParcelId", "consignee": { "name": "John Doe", "email": "[email protected]" }, "dimensions": { "depth": 42, "height": 42, "width": 42 }, "weight": 42 }

The result arrives asynchronously over the parcel webhook. API reference: Webhook for parcel updates.

JSONCode
{ "shipmentUid": "anyParcelId123", "lockerUid": "anyLockerId123", "carrierParcelId": "anyCarrierParcelId123", "carrierLockerId": "Locker1", "shipmentType": "LAST_MILE", "shipmentStatus": "CREATED", "accessCodes": { "consigneeCollection": "compartmentAccessCode123" }, "events": [ { "timestamp": "2024-05-04T09:42:00+00:00", "eventType": "BOOKING_CREATED" } ] }

Parcel Cancel Flow

Parcel cancel flow: cancel succeeds before delivery and fails after delivery

A parcel delivery can be cancelled only before the parcel is delivered into the locker. API reference: Cancel parcel.

Courier Collection/Delivery Flow

Courier collection and delivery flow: Courier App integration, Collection webhook, and parcel webhooks

This flow is the same for all locker types, and for both collection and delivery. For delivery into lockers with a screen and a barcode reader, the courier does not need a Courier Delivery Access Code: the courier scans the parcel, and the compartment booked for the parcel opens.

The response to POST /app/courier/lockers/{lockerUid} contains the courier session data, for example the locker access codes and the parcels to deliver and collect.

The Collection webhook body:

JSONCode
{ "lockerUid": "string", "courierAccessCode": "string", "parcels": [ { "carrierParcelId": "string" } ] }
Last modified on