# Get Access Code For A Locker

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /locker:
    post:
      summary: Get Access Code For A Locker
      deprecated: false
      description: |-
        Allows to create access token for a locker.
        It supports multiple authentication API and Bearer token.
      tags:
        - Harbor App Engine
      parameters:
        - name: x-api-key
          in: header
          description: ''
          required: true
          example: '{{api_key}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                location_id:
                  type: integer
                locker_name:
                  type: string
                single_use:
                  type: boolean
                expiry:
                  type: string
                sub_organization_id:
                  type: string
                  description: Only provide it when using bearer authentication.
              x-apidog-orders:
                - location_id
                - locker_name
                - single_use
                - expiry
                - sub_organization_id
              required:
                - location_id
                - locker_name
                - single_use
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  accessCode:
                    type: string
                  state:
                    type: string
                  expiry:
                    type: string
                    nullable: true
                  createdOn:
                    type: string
                required:
                  - id
                  - accessCode
                  - state
                  - createdOn
                x-apidog-orders:
                  - id
                  - accessCode
                  - state
                  - expiry
                  - createdOn
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Harbor App Engine
      x-apidog-status: testing
      x-run-in-apidog: https://app.apidog.com/web/project/1131887/apis/api-24487761-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
