Publish parcel data by tenant id
This endpoint allows the Carriers to publish parcel data into the OOH Platform. It should be used to push parcel data by tenant id at the time when the locker booking is expected to take place or to pre-check if a parcel can be accepted in the locker.
Body
Required
-
The type of booking request.
Values are
PRE_CHECK
orBOOKING
. -
The unique identifier of the locker in the Carrier Platform.
-
The identifier of the parcel in the carrier's system.
-
The possible types of last-mile shipments accepted.
Values are
LAST_MILE
orALTERNATIVE_DELIVERY
. -
The details of the consignee.
-
The dimensions of the parcel.
-
Weight in grams
-
The allocation type of the shipment.
Values are
HARD_RESERVATION
orSOFT_RESERVATION
.
POST
/parcels/data/by-tenant-locker-id
curl \
--request POST 'https://api.glsnxt.com/ooh/carrier-connector/v1/parcels/data/by-tenant-locker-id' \
--header "X-API-Key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"eventType":"BOOKING","carrierLockerId":"LOCKER123","carrierParcelId":"12345KL6789M","shipmentType":"LAST_MILE","consignee":{"name":"John Doe","email":"john.doe@google.com"},"dimensions":{"depth":190,"height":100,"width":140},"weight":300,"allocationType":"HARD_RESERVATION"}'
Request examples
{
"eventType": "BOOKING",
"carrierLockerId": "LOCKER123",
"carrierParcelId": "12345KL6789M",
"shipmentType": "LAST_MILE",
"consignee": {
"name": "John Doe",
"email": "john.doe@google.com"
},
"dimensions": {
"depth": 190,
"height": 100,
"width": 140
},
"weight": 300,
"allocationType": "HARD_RESERVATION"
}
Response examples (200)
{
"status": "success",
"message": "Parcel event received and processed successfully",
"timestamp": "2023-06-18T10:45:00Z"
}
Response examples (400)
{
"errorCode": "INVALID_REQUEST",
"message": "Bad request due to invalid input"
}
Response examples (401)
{
"errorCode": "UNAUTHORIZED",
"message": "The requested resource requires authentication"
}
Response examples (500)
{
"errorCode": "SERVER_ERROR",
"message": "The server encountered an internal error"
}