> ## Documentation Index
> Fetch the complete documentation index at: https://urbnbox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a public locker booking

> Creates the locker booking used by the checkout widget.



## OpenAPI

````yaml /openapi.json post /api/public/locker-bookings
openapi: 3.1.0
info:
  title: UrbnBox integration API
  version: 1.0.0
  description: >-
    Create and track delivery orders, send parcels between pickup points, and
    connect Shopify.
servers:
  - url: https://portal.urbnbox.io
    description: UrbnBox production and test-key server
security: []
tags:
  - name: Shipments
    description: Quote, create, and retrieve pickup-point shipments.
  - name: Checkout sessions
    description: Hold lockers for partner checkout sessions.
  - name: Public bookings
    description: Create browser-based locker bookings.
  - name: Store discovery
    description: Find active UrbnBox stores.
  - name: Shopify
    description: Callbacks called by Shopify.
  - name: Vendor API
    description: >-
      Vendor-authenticated endpoints for delivery orders, pickup-point shipments
      and webhooks. All require an X-API-Key header with a vendor key.
paths:
  /api/public/locker-bookings:
    post:
      tags:
        - Public bookings
      summary: Create a public locker booking
      description: Creates the locker booking used by the checkout widget.
      operationId: createPublicLockerBooking
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicBookingRequest'
      responses:
        '201':
          description: Booking created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  confirmation_url:
                    type: string
                    example: /b/public-token
                required:
                  - token
                  - confirmation_url
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - publishableKey: []
components:
  schemas:
    CreatePublicBookingRequest:
      type: object
      properties:
        space_id:
          type: string
        client_name:
          type: string
        phone:
          type: string
        starts_at:
          type: string
          format: date
        ends_at:
          type: string
          format: date
      required:
        - space_id
        - client_name
        - phone
        - starts_at
        - ends_at
  responses:
    BadRequest:
      description: The request body, date, field, or query parameter is invalid.
      content:
        text/plain:
          schema:
            type: string
    Unauthorized:
      description: The credential is missing, invalid, or inactive.
      content:
        text/plain:
          schema:
            type: string
    ServerError:
      description: UrbnBox could not complete the request.
      content:
        text/plain:
          schema:
            type: string
  securitySchemes:
    publishableKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Publishable key restricted to allowed browser origins.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.