Create a new locker

POST /lockers

Create a new locker with the specified details for the carrier, provider, location, and features.

application/json

Body Required

  • carrier object Required

    The details of the locker on the Carrier's system.

    Hide carrier attributes Show carrier attributes object
    • lockerName string Required

      The name assigned to the locker on the Carrier's system.

    • lockerId string Required

      The unique identifier of the locker on the Carrier's system.

    • activationDate string(date-time) Required

      The date when the locker is to be activated for the carrier.

  • provider object Required

    The details of the locker on the Provider's system.

    Hide provider attributes Show provider attributes object
    • name string Required

      The name of the locker provider.

    • lockerModel string Required

      The model of the locker provided by the provider.

    • lockerVersion string Required

      The version of the locker model provided by the provider.

  • location object Required

    Details about the geographical location of the locker.

    Hide location attributes Show location attributes object
    • street string Required

      The street name where the locker is located.

    • streetNumber string Required

      The street number of the locker location.

    • postalCode string Required

      The postal code of the locker location.

    • city string Required

      The city where the locker is located.

    • lon number(double) Required

      The longitude coordinate of the locker location.

    • lat number(double) Required

      The latitude coordinate of the locker location.

    • countryCode string Required

      The ISO 3166-1 alpha-2 country code for the locker location.

  • metadata array[object]

    Additional metadata associated with the locker.

    Metadata associated with the locker.

    Hide metadata attributes Show metadata attributes object
    • key string | null

      The key of the metadata.

    • value string | null

      The value of the metadata.

  • features object

    Features available in the locker.

    Hide features attributes Show features attributes object

Responses

  • 201 application/json

    Locker created successfully.

    Hide response attributes Show response attributes object
    • uid string

      The internal unique identifier assigned to the locker.

    • carrier object

      The details of the locker on the Carrier's system.

      Hide carrier attributes Show carrier attributes object
      • lockerName string Required

        The name assigned to the locker on the Carrier's system.

      • lockerId string Required

        The unique identifier of the locker on the Carrier's system.

      • activationDate string(date-time) Required

        The date when the locker is to be activated for the carrier.

      • status string

        Values are ACTIVE, INACTIVE, MAINTENANCE, or DECOMMISSIONED.

    • provider object

      The details of the locker on the Provider's system.

      Hide provider attributes Show provider attributes object
      • name string Required

        The name of the locker provider.

      • lockerModel string Required

        The model of the locker provided by the provider.

      • lockerVersion string Required

        The version of the locker model provided by the provider.

      • The unique identifier of the locker on the Provider's system.

    • location object

      Details about the geographical location of the locker.

      Hide location attributes Show location attributes object
      • street string Required

        The street name where the locker is located.

      • streetNumber string Required

        The street number of the locker location.

      • postalCode string Required

        The postal code of the locker location.

      • city string Required

        The city where the locker is located.

      • lon number(double) Required

        The longitude coordinate of the locker location.

      • lat number(double) Required

        The latitude coordinate of the locker location.

      • countryCode string Required

        The ISO 3166-1 alpha-2 country code for the locker location.

    • features object

      Features available in the locker.

      Hide features attributes Show features attributes object
    • metadata array[object]

      Additional metadata associated with the locker.

      Metadata associated with the locker.

      Hide metadata attributes Show metadata attributes object
      • key string | null

        The key of the metadata.

      • value string | null

        The value of the metadata.

    • compartmentTypes array[object] | null

      A list of different compartment types available in the locker.

      Details about the compartments available in the locker.

      Hide compartmentTypes attributes Show compartmentTypes attributes object
      • size string

        The size of the compartment.

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

      • count integer

        The number of compartments of this size available in the locker.

      • height integer

        The height of the compartment in millimeters.

      • width integer

        The width of the compartment in millimeters.

      • length integer

        The length of the compartment in millimeters.

  • 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 /lockers
curl \
 --request POST 'https://api.staging.glsnxt.com/ooh/carrier-connector/v1/lockers' \
 --header "X-API-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"carrier":{"lockerName":"Fancy Locker 01","lockerId":"CARRIER_LOCKER_001","activationDate":"2025-08-20T00:00:00Z"},"provider":{"name":"Provider X","lockerModel":"Model XYZ","lockerVersion":"v2.1"},"location":{"street":"Main Street","streetNumber":"1","postalCode":"90210","city":"Berlin","lon":-118.2437,"lat":34.0522,"countryCode":"DE"},"metadata":[{"key":"maxWeightCapacity","value":"50kg"}],"features":{"hasScreen":true,"hasPinPad":true,"hasPinBarcodeReader":false}}'
Request examples
{
  "carrier": {
    "lockerName": "Fancy Locker 01",
    "lockerId": "CARRIER_LOCKER_001",
    "activationDate": "2025-08-20T00:00:00Z"
  },
  "provider": {
    "name": "Provider X",
    "lockerModel": "Model XYZ",
    "lockerVersion": "v2.1"
  },
  "location": {
    "street": "Main Street",
    "streetNumber": "1",
    "postalCode": "90210",
    "city": "Berlin",
    "lon": -118.2437,
    "lat": 34.0522,
    "countryCode": "DE"
  },
  "metadata": [
    {
      "key": "maxWeightCapacity",
      "value": "50kg"
    }
  ],
  "features": {
    "hasScreen": true,
    "hasPinPad": true,
    "hasPinBarcodeReader": false
  }
}
Response examples (201)
{
  "uid": "123e4567-e89b-12d3-a456-426614174000",
  "carrier": {
    "lockerName": "Fancy Locker 01",
    "lockerId": "CARRIER_LOCKER_001",
    "activationDate": "2025-08-20T00:00:00Z",
    "status": "ACTIVE"
  },
  "provider": {
    "name": "Provider X",
    "lockerModel": "Model XYZ",
    "lockerVersion": "v2.1",
    "lockerUid": "PROVIDER_LOCKER_ABC123"
  },
  "location": {
    "street": "Main Street",
    "streetNumber": "1",
    "postalCode": "90210",
    "city": "Berlin",
    "lon": -118.2437,
    "lat": 34.0522,
    "countryCode": "DE"
  },
  "features": {
    "hasScreen": true,
    "hasPinPad": true,
    "hasPinBarcodeReader": false
  },
  "metadata": [
    {
      "key": "maxWeightCapacity",
      "value": "50kg"
    }
  ],
  "compartmentTypes": [
    {
      "size": "SMALL",
      "count": 10,
      "width": 400,
      "height": 200,
      "length": 600
    },
    {
      "size": "MEDIUM",
      "count": 4,
      "width": 400,
      "height": 400,
      "length": 600
    },
    {
      "size": "LARGE",
      "count": 2,
      "width": 400,
      "height": 800,
      "length": 600
    }
  ]
}
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"
}