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

# Obtener esquema de campos personalizados

Devuelve el esquema de campos personalizados publicado para tu comercio, como JSON Schema (predeterminado) o como definición de campos nativa de Localpayment (?format=definition). Úsalo para construir formularios y validar attributes antes de llamar a la API.

* Los esquemas son definidos y publicados por Localpayment para tu comercio durante el onboarding; solicita cambios a través de tu gestor de cuenta.
* Cuando no hay ningún esquema publicado, attributes se acepta sin validación y este endpoint devuelve 404.
* El esquema se aplica tanto a las entidades INDIVIDUAL como COMPANY.

Los errores usan `application/problem+json` con un `code` estable. Catálogo completo: [Estados de entidad y códigos de error](https://docs.localpayment.com/es/reference/entity-statuses-and-error-codes.md).


## OpenAPI

````yaml openapi/es/localpayment.json GET /api/entity/v1/custom-fields/schema
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/entity/v1/custom-fields/schema:
    get:
      summary: Obtener esquema de campos personalizados
      operationId: get-custom-fields-schema
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token de acceso Bearer para la autenticación. Este token se obtiene
            de los endpoints [Get Access Token](/es/reference/get-token) o
            [Refresh Access Token](/es/reference/refresh-token). Tu cuenta de
            comerciante y el usuario que actúa se determinan a partir de él.
          required: true
          schema:
            type: string
            examples:
              - Bearer <your_access_token>
        - name: X-Correlation-ID
          in: header
          description: >-
            Identificador de seguimiento (UUID). Se incluye en la respuesta;
            Localpayment lo genera si no está presente.
          required: false
          schema:
            type: string
            examples:
              - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
        - name: format
          in: query
          description: >-
            Definición para recibir la lista de campos nativos. Predeterminado:
            Esquema JSON 2020-12.
          required: false
          schema:
            type: string
            enum:
              - definition
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                properties:
                  $schema:
                    type: string
                    examples:
                      - https://json-schema.org/draft/2020-12/schema
                  type:
                    type: string
                    examples:
                      - object
                  properties:
                    type: object
                    properties:
                      reasonForAccountOpening:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                          title:
                            type: string
                            examples:
                              - Reason for account opening
                          enum:
                            type: array
                            items:
                              type: string
                              examples:
                                - receive_payments_for_goods_and_services
                      sourceOfFundsAndIncome:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      numberOfEmployees:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                          enum:
                            type: array
                            items:
                              type: string
                              examples:
                                - 1-10
                      estimatedAnnualRevenueUsd:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      estimatedMonthlyVolumeUsd:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      businessActivityDescription:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                          minLength:
                            type: integer
                            examples:
                              - 1
                          maxLength:
                            type: integer
                            examples:
                              - 2000
                      countryTaxResidence:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                          minLength:
                            type: integer
                            examples:
                              - 3
                          maxLength:
                            type: integer
                            examples:
                              - 3
                      socialMedia:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      emailPixKey:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      percentageOfOwnership:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      hasControl:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      documentCountry:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                      countryOfTaxId:
                        type: object
                        properties:
                          type:
                            type: string
                            examples:
                              - string
                  additionalProperties:
                    type: boolean
                    examples:
                      - false
              examples:
                Example 1:
                  value:
                    $schema: https://json-schema.org/draft/2020-12/schema
                    type: object
                    properties:
                      reasonForAccountOpening:
                        type: string
                        title: Reason for account opening
                        enum:
                          - receive_payments_for_goods_and_services
                          - payroll
                          - other
                      sourceOfFundsAndIncome:
                        type: string
                      numberOfEmployees:
                        type: string
                        enum:
                          - 1-10
                          - 11-50
                          - 51-200
                          - 200+
                      estimatedAnnualRevenueUsd:
                        type: string
                      estimatedMonthlyVolumeUsd:
                        type: string
                      businessActivityDescription:
                        type: string
                        minLength: 1
                        maxLength: 2000
                      countryTaxResidence:
                        type: string
                        minLength: 3
                        maxLength: 3
                      socialMedia:
                        type: string
                      emailPixKey:
                        type: string
                      percentageOfOwnership:
                        type: string
                      hasControl:
                        type: string
                      documentCountry:
                        type: string
                      countryOfTaxId:
                        type: string
                    additionalProperties: false
                Example 2 - Response with ?format=definition:
                  value:
                    version: 9
                    status: PUBLISHED
                    fields:
                      - key: reasonForAccountOpening
                        label: Reason for account opening
                        description: null
                        type: ENUM
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options:
                            - receive_payments_for_goods_and_services
                            - payroll
                            - other
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: sourceOfFundsAndIncome
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: numberOfEmployees
                        label: null
                        description: null
                        type: ENUM
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options:
                            - 1-10
                            - 11-50
                            - 51-200
                            - 200+
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: estimatedAnnualRevenueUsd
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: estimatedMonthlyVolumeUsd
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: businessActivityDescription
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: 1
                          maxLength: 2000
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: countryTaxResidence
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: 3
                          maxLength: 3
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: socialMedia
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: emailPixKey
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: percentageOfOwnership
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: hasControl
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: documentCountry
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                      - key: countryOfTaxId
                        label: null
                        description: null
                        type: STRING
                        required: false
                        constraints:
                          minLength: null
                          maxLength: null
                          pattern: null
                          min: null
                          max: null
                          options: null
                          minItems: null
                          maxItems: null
                        children: []
                        items: null
                    createdBy: '12345'
                    createdAt: '2024-01-15T17:18:41Z'
                    approvedBy: '67890'
                    approvedAt: '2024-01-15T17:18:46Z'
        '401':
          description: >-
            No autorizado. UNAUTHORIZED: Falta el token de acceso o no es
            válido.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Detalles del problema según RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve resumen del problema.
                  status:
                    type: integer
                    description: Código de estado HTTP.
                  detail:
                    type: string
                    description: Explicación comprensible para el ser humano.
                  instance:
                    type: string
                    description: Ruta de solicitud.
                  code:
                    type: string
                    description: >-
                      Código de error estable legible por máquina. Basa tu
                      lógica de ramificación en este valor.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificador de la solicitud. Indícalo cuando te pongas
                      en contacto con el servicio de asistencia.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campos problemáticos, cuando corresponda.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - UNAUTHORIZED:
                  value:
                    type: about:blank
                    title: Unauthorized
                    status: 401
                    detail: Missing or invalid access token.
                    instance: /api/entity/v1/custom-fields/schema
                    code: UNAUTHORIZED
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '404':
          description: >-
            No encontrado. CUSTOM_FIELD_SCHEMA_NOT_FOUND: No se ha publicado
            ningún esquema de campos personalizados para tu comerciante.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Detalles del problema según RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve resumen del problema.
                  status:
                    type: integer
                    description: Código de estado HTTP.
                  detail:
                    type: string
                    description: Explicación comprensible para el ser humano.
                  instance:
                    type: string
                    description: Ruta de solicitud.
                  code:
                    type: string
                    description: >-
                      Código de error estable legible por máquina. Basa tu
                      lógica de ramificación en este valor.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificador de la solicitud. Indícalo cuando te pongas
                      en contacto con el servicio de asistencia.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campos problemáticos, cuando corresponda.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - CUSTOM_FIELD_SCHEMA_NOT_FOUND:
                  value:
                    type: about:blank
                    title: Not found
                    status: 404
                    detail: No custom-fields schema is published for your merchant.
                    instance: /api/entity/v1/custom-fields/schema
                    code: CUSTOM_FIELD_SCHEMA_NOT_FOUND
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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