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

# GET /v1/scheduling/appointments/:id

> Fetch an appointment by id. Returns 404 if it belongs to another company.

Returns the requested appointment as long as it belongs to the PAT's tenant.

## Endpoint

```
GET https://api.keebai.com/v1/scheduling/appointments/:id
```

## Required scope

`scheduling:appointments:read`

## Path params

| Param | Type     | Description                                  |
| ----- | -------- | -------------------------------------------- |
| `id`  | `string` | Appointment id (UUID generated at creation). |

## Example request

```bash theme={null}
curl https://api.keebai.com/v1/scheduling/appointments/9d5b1f4e-7c2a-4a4d-9d3e-9f1b1f8c7a3a \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Response

### 200 OK

```json theme={null}
{
  "_id": "9d5b1f4e-7c2a-4a4d-9d3e-9f1b1f8c7a3a",
  "appointment_number": 1042,
  "branch": { "id": "65a1f2b3c4d5e6f7a8b9c0d1", "display_name": "Norte" },
  "service": { "id": "65b1c2d3e4f5a6b7c8d9e0f1", "display_name": "Consulta general" },
  "professional": {
    "id": "66c1d2e3f4a5b6c7d8e9f0a1",
    "name": "María",
    "last_name": "Soto",
    "specialty": "Medicina general"
  },
  "customer": {
    "name": "Juan",
    "last_name": "Pérez",
    "email": "juan@example.com",
    "phone": "+56912345678"
  },
  "dates": {
    "start": "2026-05-02T13:00:00.000Z",
    "end": "2026-05-02T13:30:00.000Z",
    "time_zone": "America/Santiago"
  },
  "appointment_type": "in-person",
  "status": "confirmed",
  "payment_status": "pending",
  "notes": "Primera consulta",
  "price": 25000,
  "currency": "CLP",
  "paid": false,
  "created_at": "2026-04-29T12:00:00.000Z",
  "updated_at": "2026-04-29T12:01:00.000Z"
}
```

| Field                | Type     | Description                                                              |
| -------------------- | -------- | ------------------------------------------------------------------------ |
| `appointment_number` | `number` | Human-readable correlative, unique per company.                          |
| `appointment_type`   | `string` | `in-person` or `online`.                                                 |
| `status`             | `string` | `pending`, `confirmed`, `completed`, `cancelled`, `blocked`, `waitlist`. |
| `payment_status`     | `string` | `pending`, `paid`, `partial`, `refunded`, `cancelled`.                   |
| `dates.time_zone`    | `string` | Tz of the branch the appointment was booked at.                          |

The response is an explicit projection, not the stored record. Commercial and internal
fields the scheduling service keeps on the appointment — sales and cart links, package
entitlements, commission snapshots, payment records, reminders, external calendar
references and recurrence rules — are deliberately not part of the public shape.

### 404 Not Found

The appointment doesn't exist or belongs to another company.

### 401 Unauthorized · 403 Forbidden

Same semantics as the rest of the public API.


## OpenAPI

````yaml GET /v1/scheduling/appointments/{id}
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/scheduling/appointments/{id}:
    get:
      tags:
        - scheduling-appointments
      summary: Obtener detalle de una cita
      operationId: PublicAppointmentsController_getById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAppointmentResponseDto'
      security:
        - PAT: []
components:
  schemas:
    PublicAppointmentResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: Id de la cita
        appointment_number:
          type: number
          description: Correlativo legible de la cita
        branch:
          $ref: '#/components/schemas/PublicAppointmentRefDto'
        service:
          $ref: '#/components/schemas/PublicAppointmentRefDto'
        professional:
          $ref: '#/components/schemas/PublicAppointmentProfessionalDto'
        customer:
          $ref: '#/components/schemas/PublicAppointmentCustomerDto'
        dates:
          $ref: '#/components/schemas/PublicAppointmentDatesDto'
        appointment_type:
          type: string
          description: online | in-person
        status:
          type: string
          description: pending | confirmed | cancelled | …
        payment_status:
          type: string
          description: Estado del pago
        notes:
          type: string
        price:
          type: number
        currency:
          type: string
          description: Moneda ISO 4217
        paid:
          type: boolean
        cancelled_at:
          type: string
          format: date-time
        cancellation_reason:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - _id
        - branch
        - dates
        - status
    PublicAppointmentRefDto:
      type: object
      properties:
        id:
          type: string
        display_name:
          type: string
      required:
        - id
    PublicAppointmentProfessionalDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        last_name:
          type: string
        specialty:
          type: string
      required:
        - id
    PublicAppointmentCustomerDto:
      type: object
      properties:
        name:
          type: string
        last_name:
          type: string
        email:
          type: string
        phone:
          type: string
      required:
        - name
    PublicAppointmentDatesDto:
      type: object
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        time_zone:
          type: string
          description: IANA, ej. America/Santiago
      required:
        - start
        - end
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````