Post courier session events
Post events related to a specific courier session. This endpoint is used to log and track events that occur during a courier's session.
Body
Required
-
The unique identifier assigned by the carrier to the locker.
-
The unique identifier of the parcel. Nullable if not applicable.
-
The UTC timestamp of the event in the ISO 8601 format.
-
The type of shipment. Nullable if not applicable.
Values are
LAST_MILE
,RETURN
, orFIRST_MILE
. -
The status of the flow.
Values are
STARTED
,IN_PROGRESS
,PARCEL_SCANNED
, orCOMPLETED
. -
Error details if any. Nullable if no errors.
-
The unique number assigned to the vehicle delivering/picking parcels.
-
The unique number assigned to the depot.
-
The carrier identifier
-
The provider identifier
POST
/app/courier/sessions/events
curl \
--request POST 'https://api.staging.glsnxt.com/ooh/carrier-connector/v1/app/courier/sessions/events' \
--header "X-APP-Key: $API_KEY" \
--header "Content-Type: application/json" \
--data '[{"externalLockerId":"locker123","parcelId":"parcel123","timestamp":"2021-10-01T12:00:00Z","shipmentType":"LAST_MILE","flowStatus":"STARTED","errors":{"errorLevel":"LOCKER","errorCode":"COMPARTMENT_BROKEN"},"vehicleNo":"Vehicle01","depotNo":"Depot10","carrier":"GLS_DE","provider":"SWIPBOX"}]'
Request examples
[
{
"externalLockerId": "locker123",
"parcelId": "parcel123",
"timestamp": "2021-10-01T12:00:00Z",
"shipmentType": "LAST_MILE",
"flowStatus": "STARTED",
"errors": {
"errorLevel": "LOCKER",
"errorCode": "COMPARTMENT_BROKEN"
},
"vehicleNo": "Vehicle01",
"depotNo": "Depot10",
"carrier": "GLS_DE",
"provider": "SWIPBOX"
}
]
Response examples (200)
{
"status": "Events have been published successfully"
}
Response examples (401)
{
"error": "Unauthorized"
}
Response examples (400)
{
"error": "Invalid request. Check parameters and try again."
}
Response examples (500)
{
"error": "Internal Server Error"
}