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

# Consultar registro

> Obtén un registro por su ID.

Obtén un registro específico y sus valores resueltos.

## Endpoint

```text theme={null}
GET /databases/{databaseId}/records/{recordId}
```

## Parámetro de consulta

| Parámetro | Valor       | Descripción                                         |
| --------- | ----------- | --------------------------------------------------- |
| `include` | `relations` | Incluye vistas resumidas de relaciones y contactos. |

## Ejemplo de solicitud

```bash theme={null}
curl "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/records/{recordId}?include=relations" \
  -H "x-ib-api-key: TU_API_KEY"
```

## Respuesta exitosa (`200`)

```json theme={null}
{
  "id": "<record-id>",
  "databaseId": "<database-id>",
  "values": {
    "numeroPoliza": "POL-1001",
    "prima": 1450.5,
    "cliente": "<related-record-id>"
  },
  "createdAt": 1720000000000,
  "updatedAt": 1720000000000,
  "included": {
    "databases": {
      "<target-database-id>": {
        "<related-record-id>": {
          "id": "<related-record-id>",
          "displayValues": {
            "<relation-field-id>": "María López"
          }
        }
      }
    }
  }
}
```

`included` y `meta` solo aparecen al solicitar relaciones.

## Errores frecuentes

| HTTP  | Qué significa                         | Qué hacer                                 |
| ----- | ------------------------------------- | ----------------------------------------- |
| `404` | El tablero o el registro no existe.   | Confirma ambos IDs.                       |
| `500` | No fue posible consultar el registro. | Reintenta; si continúa, contacta soporte. |


## OpenAPI

````yaml openapi/tableros-v1.yaml GET /databases/{databaseId}/records/{recordId}
openapi: 3.1.0
info:
  title: Insurance Boosters API — Tableros
  version: 1.0.0
  description: API pública para administrar tableros, campos, registros y archivos.
  license:
    name: Propietaria
    url: https://insuranceboosters.com
servers:
  - url: https://api.insuranceboosters.com/api/v1
    description: Producción
security:
  - IbApiKey: []
tags:
  - name: Tableros
    description: Administración de tableros.
  - name: Campos
    description: Configuración del esquema de un tablero.
  - name: Registros
    description: Lectura y escritura de registros.
  - name: Archivos
    description: Archivos adjuntos a registros.
paths:
  /databases/{databaseId}/records/{recordId}:
    parameters:
      - $ref: '#/components/parameters/DatabaseId'
      - $ref: '#/components/parameters/RecordId'
    get:
      tags:
        - Registros
      summary: Consultar registro
      operationId: getDatabaseRecord
      parameters:
        - name: include
          in: query
          required: false
          description: >-
            Usa `relations` para incluir vistas resumidas de relaciones y
            contactos.
          schema:
            type: string
            enum:
              - relations
      responses:
        '200':
          description: Registro solicitado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordWithIncluded'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    DatabaseId:
      name: databaseId
      in: path
      required: true
      description: ID del tablero.
      schema:
        type: string
    RecordId:
      name: recordId
      in: path
      required: true
      description: ID del registro.
      schema:
        type: string
  schemas:
    RecordWithIncluded:
      allOf:
        - $ref: '#/components/schemas/Record'
        - type: object
          properties:
            included:
              type: object
              additionalProperties: true
            meta:
              type: object
              additionalProperties: true
    Record:
      type: object
      required:
        - id
        - databaseId
        - values
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        databaseId:
          type: string
        values:
          type: object
          additionalProperties: true
        createdAt:
          type: integer
        updatedAt:
          type: integer
        createdBy:
          type: string
        updatedBy:
          type: string
    Error:
      type: object
      properties:
        message:
          type: string
        error:
          type: string
      additionalProperties: false
  responses:
    Unauthorized:
      description: API key inválida o faltante.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Recurso no encontrado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Error del servicio.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    IbApiKey:
      type: apiKey
      in: header
      name: x-ib-api-key
      description: API key de Insurance Boosters.

````