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

# Get a booking

> Get a single booking by session ID. Returns 404 if the session exists but is not booked. Requires the `read:scheduler_analytics` permission.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/teams/{teamId}/bookings/{bookingId}
openapi: 3.1.0
info:
  title: Avoca Enterprise API
  description: >-
    Read-only programmatic access to Avoca data: calls, transcripts, leads,
    coach evaluations, Simple Scheduler sessions and analytics, and outbound
    texting activity.
  version: 1.3.0
servers:
  - url: https://enterprise-api.avoca.ai
security:
  - bearerAuth: []
tags:
  - name: Calls
    description: Call records, transcripts, and pre-call transfers
  - name: Leads
    description: Unified leads (v0) and the canonical leads feed (v1)
  - name: Teams
    description: Teams accessible to the API key
  - name: Coach
    description: Coach (QA) call evaluations and rubrics
  - name: Scheduler Analytics (v0)
    description: Simple Scheduler analytics — legacy flat endpoints
  - name: Sessions & Bookings
    description: v1 scheduling-widget sessions and completed bookings
  - name: Analytics (v1)
    description: v1 funnel, UTM, service-area, and issue-type analytics
  - name: Outbound Texting
    description: Campaign text and subscription-event feeds for BI ingestion
paths:
  /api/v1/teams/{teamId}/bookings/{bookingId}:
    get:
      tags:
        - Sessions & Bookings
      summary: Get a booking
      description: >-
        Get a single booking by session ID. Returns 404 if the session exists
        but is not booked. Requires the `read:scheduler_analytics` permission.
      operationId: getTeamBooking
      parameters:
        - $ref: '#/components/parameters/teamIdPath'
        - name: bookingId
          in: path
          required: true
          description: The session ID of the booking
          schema:
            type: string
      responses:
        '200':
          description: The booking
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Session'
                  meta:
                    $ref: '#/components/schemas/TeamMeta'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    teamIdPath:
      name: teamId
      in: path
      required: true
      description: The team ID
      schema:
        type: integer
  schemas:
    Session:
      type: object
      description: >-
        A customer's journey through the scheduling widget — from starting a
        booking to completing it or dropping off.
      properties:
        session_id:
          type: string
          examples:
            - sess_abc123
        team_id:
          type: integer
        scheduler_id:
          type: integer
        status:
          type: string
          enum:
            - booked
            - dropped_off
            - pending
        customer_info:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            email:
              type:
                - string
                - 'null'
            phone:
              type:
                - string
                - 'null'
            address:
              type:
                - string
                - 'null'
        issue_type:
          type:
            - string
            - 'null'
          examples:
            - HVAC Repair
        job_type:
          type:
            - string
            - 'null'
        selected_date:
          type:
            - string
            - 'null'
          format: date
        selected_time:
          type:
            - string
            - 'null'
        utm:
          type: object
          properties:
            source:
              type:
                - string
                - 'null'
            medium:
              type:
                - string
                - 'null'
            campaign:
              type:
                - string
                - 'null'
            term:
              type:
                - string
                - 'null'
            content:
              type:
                - string
                - 'null'
        google_ads:
          type: object
          properties:
            gclid:
              type:
                - string
                - 'null'
            wbraid:
              type:
                - string
                - 'null'
            gbraid:
              type:
                - string
                - 'null'
        st_job_id:
          type:
            - integer
            - 'null'
          description: ServiceTitan job ID when the booking created a job
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        last_activity_at:
          type:
            - string
            - 'null'
          format: date-time
        events:
          type: array
          items:
            type: object
            properties:
              event_type:
                type: string
                examples:
                  - avoca:bookingCompletion
              created_at:
                type: string
                format: date-time
    TeamMeta:
      type: object
      properties:
        team_id:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error type
        message:
          type: string
          description: Human-readable description (newer endpoints)
      required:
        - error
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key in the format `avoca_<64 hex characters>`

````