Get locker compartments

GET /app/lockers/{externalLockerId}/compartments

Fetch available compartments for a specific locker. This endpoint helps in identifying the compartments that are available for use within a locker.

Path parameters

Query parameters

  • available boolean

    Returns only available compartments if set to true

  • parcelId string

    Indicates the parcel currently assigned to this compartment

Responses

  • 200 application/json

    Locker compartments fetched successfully

    Hide response attributes Show response attributes object
    • name string

      Name of the compartment based on volume in ascending order

      Values are SMALL, MEDIUM, LARGE, XLARGE, or XXLARGE.

    • Hide dimensions attributes Show dimensions attributes object
    • Number of free compartments of this type

    • current boolean

      Indicates if this is the current compartment of the given parcel

  • 401 application/json

    Unauthorized. The request is missing valid authentication credentials.

    Hide response attribute Show response attribute object
    • error string

      Error message indicating lack of authorization

  • 400 application/json

    Bad Request. The request is malformed or missing required parameters.

    Hide response attribute Show response attribute object
    • error string

      Error message detailing the cause of the bad request

  • Locker not found

  • 500 application/json

    Internal Server Error. An unexpected error occurred on the server.

    Hide response attribute Show response attribute object
    • error string

      Error message indicating an internal server error

GET /app/lockers/{externalLockerId}/compartments
curl \
 --request GET 'https://api.staging.glsnxt.com/ooh/carrier-connector/v1/app/lockers/{externalLockerId}/compartments' \
 --header "X-APP-Key: $API_KEY"
Response examples (200)
[
  {
    "name": "MEDIUM",
    "dimensions": {
      "depth": 500,
      "height": 300,
      "width": 400
    },
    "freeCompartments": 5,
    "current": true
  }
]
Response examples (401)
{
  "error": "Unauthorized"
}
Response examples (400)
{
  "error": "Invalid request. Check parameters and try again."
}
Response examples (500)
{
  "error": "Internal Server Error"
}