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

# Ler paciente

> O cadastro inteiro da paciente nesta clínica.

**Escopo do app:** `patients:read`. Pelo OAuth, vale o perfil da pessoa.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/patients/{id}
openapi: 3.1.0
info:
  title: API da Westhetics
  version: 1.0.0
  description: >-
    A API pública da Westhetics: pacientes, anamneses, contratos e assinaturas
    da clínica, com eventos por webhook. Autentique com a chave do app
    (`Authorization: Bearer wx_…`), criada pela gestora em Integrações, ou com o
    token OAuth da pessoa. Respostas em JSON, mensagens em pt-BR. Guias em
    https://docs.westhetics.io.
  contact:
    name: Westhetics
    url: https://docs.westhetics.io
    email: suporte@westhetics.com.br
servers:
  - url: https://api.westhetics.io
    description: Produção
security:
  - apiKey: []
  - oauth2: []
tags:
  - name: Conta
    description: Quem chama e a clínica.
  - name: Pacientes
    description: O cadastro da paciente.
  - name: Anamneses
    description: Enviar, acompanhar e ler a anamnese.
  - name: Catálogo
    description: Procedimentos, prestadores e modelos.
  - name: Contratos e assinaturas
    description: Gerar o contrato e os termos e enviar para assinatura.
  - name: Eventos
    description: O que aconteceu na clínica, por consulta ou por webhook.
  - name: Webhooks
    description: Os endereços que recebem os eventos do app.
paths:
  /v1/patients/{id}:
    get:
      tags:
        - Pacientes
      summary: Ler paciente
      description: |-
        O cadastro inteiro da paciente nesta clínica.

        **Escopo do app:** `patients:read`. Pelo OAuth, vale o perfil da pessoa.
      operationId: getPatient
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Sucesso.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Patient'
                required:
                  - data
              example:
                data:
                  id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                  audience: patient
                  status: active
                  name: Amanda Ribeiro Costa
                  birthDate: '1992-04-18'
                  isMinor: false
                  docType: cpf
                  docNumber: '44595830890'
                  foreignDocument: null
                  rg: null
                  gender: female
                  maritalStatus: married
                  occupation: Arquiteta
                  email: amanda@email.com
                  whatsapp: '+5511987654321'
                  address:
                    postalCode: '01310100'
                    street: Avenida Paulista
                    number: '1000'
                    complement: apto 52
                    district: Bela Vista
                    city: São Paulo
                    state: SP
                    country: BR
                  guardian: null
                  imageConsent: 'yes'
                  instagram: amanda.ribeiro
                  referralSource:
                    channel: instagram
                    detail: null
                  notes: null
                  patientSince: '2026-10-15'
                  selfRegisteredAt: null
                  mergedIntoId: null
                  createdAt: '2026-10-15T14:30:00Z'
                  updatedAt: '2026-10-15T14:30:00Z'
                  archivedAt: null
        '401':
          description: Sem chave, chave que não confere, revogada ou token vencido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: O app não tem o escopo, ou a pessoa não pode pelo perfil.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Não existe nesta clínica.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Passou de 100 chamadas por minuto; veja `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Patient:
      type: object
      properties:
        id:
          type: string
        audience:
          type: string
          enum:
            - patient
            - student
            - employee
            - third_party
          description: O público da pessoa (RN-PAC-36).
        status:
          type: string
          enum:
            - active
            - archived
            - merged
        name:
          type: string
        birthDate:
          anyOf:
            - type: string
              description: Data no formato aaaa-mm-dd.
            - type: 'null'
        isMinor:
          type: boolean
          description: Menos de 18 anos no fuso da clínica.
        docType:
          anyOf:
            - type: string
              enum:
                - cpf
                - cnpj
            - type: 'null'
        docNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: Só dígitos.
        foreignDocument:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                number:
                  type: string
                country:
                  type: string
              required:
                - type
                - number
                - country
              additionalProperties: false
            - type: 'null'
        rg:
          anyOf:
            - type: string
            - type: 'null'
        gender:
          type: string
        maritalStatus:
          anyOf:
            - type: string
            - type: 'null'
        occupation:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
        whatsapp:
          anyOf:
            - type: string
            - type: 'null'
          description: E.164, como +5511987654321.
        address:
          anyOf:
            - type: object
              properties:
                postalCode:
                  anyOf:
                    - type: string
                    - type: 'null'
                street:
                  anyOf:
                    - type: string
                    - type: 'null'
                number:
                  anyOf:
                    - type: string
                    - type: 'null'
                complement:
                  anyOf:
                    - type: string
                    - type: 'null'
                district:
                  anyOf:
                    - type: string
                    - type: 'null'
                city:
                  anyOf:
                    - type: string
                    - type: 'null'
                state:
                  anyOf:
                    - type: string
                    - type: 'null'
                country:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - postalCode
                - street
                - number
                - complement
                - district
                - city
                - state
                - country
              additionalProperties: false
            - type: 'null'
        guardian:
          anyOf:
            - type: object
              properties:
                name:
                  type: string
                docType:
                  anyOf:
                    - type: string
                      enum:
                        - cpf
                        - cnpj
                    - type: 'null'
                docNumber:
                  anyOf:
                    - type: string
                    - type: 'null'
                whatsapp:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - name
                - docType
                - docNumber
                - whatsapp
              additionalProperties: false
            - type: 'null'
        imageConsent:
          type: string
          enum:
            - 'yes'
            - 'no'
            - not_provided
          description: O uso de imagem autorizado a esta clínica; vale só para ela.
        instagram:
          anyOf:
            - type: string
            - type: 'null'
        referralSource:
          anyOf:
            - type: object
              properties:
                channel:
                  type: string
                detail:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - channel
                - detail
              additionalProperties: false
            - type: 'null'
        notes:
          anyOf:
            - type: string
            - type: 'null'
        patientSince:
          type: string
          description: Data no formato aaaa-mm-dd.
        selfRegisteredAt:
          anyOf:
            - type: string
              description: Data e hora ISO 8601, em UTC.
            - type: 'null'
        mergedIntoId:
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          type: string
          description: Data e hora ISO 8601, em UTC.
        updatedAt:
          type: string
          description: Data e hora ISO 8601, em UTC.
        archivedAt:
          anyOf:
            - type: string
              description: Data e hora ISO 8601, em UTC.
            - type: 'null'
      required:
        - id
        - audience
        - status
        - name
        - birthDate
        - isMinor
        - docType
        - docNumber
        - foreignDocument
        - rg
        - gender
        - maritalStatus
        - occupation
        - email
        - whatsapp
        - address
        - guardian
        - imageConsent
        - instagram
        - referralSource
        - notes
        - patientSince
        - selfRegisteredAt
        - mergedIntoId
        - createdAt
        - updatedAt
        - archivedAt
      additionalProperties: false
      description: O cadastro da paciente na clínica.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unauthenticated
                - forbidden
                - not_found
                - conflict
                - validation_failed
                - rate_limited
                - unavailable
                - internal_error
            message:
              type: string
              description: A causa e o caminho, em pt-BR.
            fields:
              description: 'No 422: a mensagem de cada campo.'
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
            requestId:
              type: string
          required:
            - code
            - message
            - requestId
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: O envelope de erro.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: wx_<64 hex>
      description: >-
        A chave do app de integração, criada em Integrações. Escopos:
        `patients:read` (Listar, buscar e ler pacientes; os eventos patient.*.);
        `patients:write` (Criar e editar pacientes. Inclui ler.);
        `anamneses:read` (Listar e ler anamneses, sem as respostas; os eventos
        anamnesis.*.); `anamneses:write` (Enviar, reenviar e cancelar anamnese.
        Inclui ler.); `anamneses:answers` (Ler as respostas da anamnese
        preenchida. É dado de saúde.); `documents:read` (Atendimentos,
        documentos, status da assinatura e o PDF; os eventos appointment.* e
        signature_request.*.); `documents:write` (Gerar contrato e termos e
        enviar para assinatura, reenviar e cancelar. Inclui ler.);
        `catalog:read` (Procedimentos, prestadores e modelos de documento da
        clínica.); `webhooks:write` (Criar, alterar e remover os webhooks do
        próprio app pela API.)
    oauth2:
      type: oauth2
      description: >-
        Token OAuth 2.1 da pessoa (código com PKCE), emitido a um aplicativo
        conectado. Vale o perfil da pessoa na clínica da conexão, por 12 horas.
      flows:
        authorizationCode:
          authorizationUrl: https://zosqwpksgewzphikvgfz.supabase.co/auth/v1/oauth/authorize
          tokenUrl: https://zosqwpksgewzphikvgfz.supabase.co/auth/v1/oauth/token
          refreshUrl: https://zosqwpksgewzphikvgfz.supabase.co/auth/v1/oauth/token
          scopes:
            openid: Identidade.
            email: O e-mail.
            profile: O nome.

````

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