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

# Get booking configuration

> Services, their questions, branding, and the tenant timezone.

Everything needed to render the form. Call it once when the page loads.

## Questions live inside each service

`form_fields` is a property of a **service**, not of the tenant, and there is deliberately
no top-level mirror — a mirror is how the two lists drift and the form starts asking the
wrong thing. If the customer switches service, re-render from the new service's list.

See [Questions](/index#questions) in the guide for the per-type validation rules and a
client-side normalizer that matches the server.

## Things that will catch you out

* **`price_cents` can be `null`** and carries no currency. `null` means the tenant doesn't
  publish a price for that service — render nothing, not "\$0".
* **`sms_consent_enabled` is a tenant-level capability, not a prompt.** It is `true` only
  when the tenant has an active phone source. Show the consent checkbox only when it is
  `true` *and* the customer has entered a phone number.
* **Only active services appear.** Combined with the 5-minute shared cache, a service
  deactivated moments ago can still be listed here and then fail the submit with
  `400 invalid_service`. Treat that error as "reload the config", not as a bug.
* **A question that was soft-deleted while still attached is silently skipped**, not an
  error. The booking page stays up; the missing question is only visible in our logs.


## OpenAPI

````yaml openapi.json GET /api/public/tenants/{slug}
openapi: 3.1.0
info:
  title: DPC Bookings API
  version: 1.0.0
  description: >-
    Public, unauthenticated endpoints for taking a booking from a custom
    website. Read services, read open times, submit one booking. Booking
    management lives in the DPC dashboard.
servers:
  - url: https://deepcontext.app
security: []
paths:
  /api/public/tenants/{slug}:
    get:
      summary: Get booking configuration
      description: >-
        Services, their questions, branding, and the tenant timezone. Only
        active services are returned. Cached 60s in the browser and 5 minutes in
        the shared cache, so a service deactivated moments ago can still appear
        here and fail the submit with `invalid_service`.
      operationId: getBookingConfig
      parameters:
        - name: slug
          in: path
          required: true
          description: >-
            The tenant's public booking slug. Issued by DPC; there is no
            discovery endpoint.
          schema:
            type: string
      responses:
        '200':
          description: Booking configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  business_name:
                    type: string
                  branding:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  timezone:
                    type: string
                  services:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        name:
                          type: string
                        duration_minutes:
                          type: integer
                          exclusiveMinimum: 0
                          maximum: 9007199254740991
                        price_cents:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        form_fields:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              name:
                                type: string
                              type:
                                type: string
                                enum:
                                  - text
                                  - number
                                  - date
                                  - select
                                  - boolean
                              options:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        value:
                                          type: string
                                        label:
                                          type: string
                                      required:
                                        - value
                                        - label
                                      additionalProperties: false
                                  - type: 'null'
                              required:
                                type: boolean
                            required:
                              - id
                              - name
                              - type
                              - options
                              - required
                            additionalProperties: false
                      required:
                        - id
                        - name
                        - duration_minutes
                        - price_cents
                        - form_fields
                      additionalProperties: false
                  sms_consent_enabled:
                    type: boolean
                required:
                  - business_name
                  - branding
                  - timezone
                  - services
                  - sms_consent_enabled
                additionalProperties: false
        '404':
          description: Unknown slug, or the tenant has booking disabled
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: Stored booking settings are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false

````