Creates a new Reservation for a Locker

This API operation creates a reservation for a locker unit in the specified locker bank.

Locker selection rules

  • Provide either size or lockerUnitId.
  • If lockerUnitId is provided, the system reserves that exact locker.
  • If only size is provided, the system selects any available locker of that size.
  • If both are provided, lockerUnitId takes precedence and size is ignored.
SecuritybearerAuth
Request
path Parameters
lockerBankId
required
string

This is the unique identifier of the locker bank.

Request Body schema: application/json

Create a reservation

userId
required
string

Identifier of the user performing the locker reservation action.

size
string

Requested locker size for the reservation.Used only when lockerUnitId is not provided. If both size and lockerUnitId are provided, this value is ignored.

Enum: "small" "medium" "large" "mlarge"
accessible
boolean

Requests a locker that would be deemed handicapped accesible to recipients.

lockerUnitId
string

Locker unit number you wish to reserve.

contactId
required
string

Identifier of the recipient of the package for whom the locker reservation is created.

contactType
required
string

Source type of the recipient identifier.

Enum: "recipient" "department"
trackingNumber
required
string

The primary identifier of a package, usually a carrier's tracking number.

secondaryTrackingNumber
string

A secondary identifier for a package, can be generated internally.

reservationExpiryTime
string

The timestamp when the reservation for the locker unit is scheduled to expire. Once reservation is expired, the locker unit becomes available for new reservations.

Responses
200

Successful operation

400

Invalid request.

401

The request could not be authorized.

404

The requested resource was not found.

500

The request could not be completed due to an internal error.

post/api/v1/lockerBanks/{lockerBankId}/lockers/reserve
Request samples
application/json
{
  • "userId": "thirdpartyuser@gmail.com",
  • "size": "small",
  • "accessible": true,
  • "lockerUnitId": "2",
  • "contactId": "684a6b7bbc85e1bce7392b9e",
  • "contactType": "recipient",
  • "trackingNumber": "TrackigID137",
  • "secondaryTrackingNumber": "Piece1_PBIL",
  • "reservationExpiryTime": "2027-12-01T00:00:00Z"
}
Response samples
application/json
{
  • "lockerBankId": "Axxx",
  • "lockerUnitId": "2",
  • "size": "small",
  • "contactId": "684a6b7bbc85e1bce7392b9e",
  • "contactType": "recipient",
  • "trackingNumber": "TrackigID137",
  • "secondaryTrackingNumber": "Piece1_PBIL",
  • "reservationExpiryTime": "2027-12-01T00:00:00Z"
}