Publish parcel data by tenant id

POST /parcels/data/by-tenant-locker-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.

application/json

Body Required

  • eventType string Required

    The type of booking request.

    Values are PRE_CHECK or BOOKING.

  • carrierLockerId string Required

    The unique identifier of the locker in the Carrier Platform.

  • carrierParcelId string Required

    The identifier of the parcel in the carrier's system.

  • The possible types of last-mile shipments accepted.

    Values are LAST_MILE or ALTERNATIVE_DELIVERY.

  • consignee object | null

    The details of the consignee.

    Hide consignee attributes Show consignee attributes object | null
  • dimensions object Required

    The dimensions of the parcel.

    Hide dimensions attributes Show dimensions attributes object
  • weight integer

    Weight in grams

  • The allocation type of the shipment.

    Values are HARD_RESERVATION or SOFT_RESERVATION.

Responses

  • 200 application/json

    Parcel event published successfully

    Hide response attributes Show response attributes object
    • status string

      The status of the event processing.

    • message string

      A message providing additional information about the event processing.

    • timestamp string(date-time)

      The timestamp when the event was processed.

  • 400 application/json

    Bad request due to invalid input.

    Hide response attributes Show response attributes object
    • A code representing the type of error.

    • message string

      A message describing the error.

  • 401 application/json

    The requested resource requires authentication.

    Hide response attributes Show response attributes object
    • A code representing the type of error.

    • message string

      A message describing the error.

  • 500 application/json

    The server encountered an internal error.

    Hide response attributes Show response attributes object
    • A code representing the type of error.

    • message string

      A message describing the error.

POST /parcels/data/by-tenant-locker-id
curl \
 --request POST 'https://api.staging.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"
}