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
-
externalLockerId
string Required The unique identifier assigned by the carrier to the locker.
-
parcelId
string | null The unique identifier of the parcel. Nullable if not applicable.
-
timestamp
string(date-time) Required The UTC timestamp of the event in the ISO 8601 format.
-
shipmentType
string | null The type of shipment. Nullable if not applicable.
Values are
LAST_MILE
,RETURN
, orFIRST_MILE
. -
flowStatus
string Required The status of the flow.
Values are
STARTED
,IN_PROGRESS
,PARCEL_SCANNED
, orCOMPLETED
. -
errors
object | null Error details if any. Nullable if no errors.
-
vehicleNo
string | null The unique number assigned to the vehicle delivering/picking parcels.
-
depotNo
string | null The unique number assigned to the depot.
-
carrier
string Required The carrier identifier
-
provider
string Required The provider identifier
Responses
-
200 application/json
Events posted successfully
-
401 application/json
Unauthorized. The request is missing valid authentication credentials.
-
400 application/json
Bad Request. The request is malformed or missing required parameters.
-
500 application/json
Internal Server Error. An unexpected error occurred on the server.
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"}]'
[
{
"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"
}
]
{
"status": "Events have been published successfully"
}
{
"error": "Unauthorized"
}
{
"error": "Invalid request. Check parameters and try again."
}
{
"error": "Internal Server Error"
}