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

# Listar definiciones de campos personalizados de clientes

> Devuelve páginas de definiciones de contacto no sistémicas de la empresa autenticada, ordenadas por clave e ID ascendentes. Usa el cursor opaco next_cursor para continuar; limit vale 50 por defecto y admite entre 1 y 100. Incluye su UUID para enviarlo como definition_id al crear o actualizar clientes y las validaciones required, límites de texto o número y opciones configuradas de select. No devuelve valores ingresados por clientes, valores observados ni cantidades. Usa customers:read; customers:write y admin conservan su implicación existente. No requiere Idempotency-Key.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/customers/metafield-definitions
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/customers/metafield-definitions:
    get:
      tags:
        - API
      summary: Listar definiciones de campos personalizados de clientes
      description: >-
        Devuelve páginas de definiciones de contacto no sistémicas de la empresa
        autenticada, ordenadas por clave e ID ascendentes. Usa el cursor opaco
        next_cursor para continuar; limit vale 50 por defecto y admite entre 1 y
        100. Incluye su UUID para enviarlo como definition_id al crear o
        actualizar clientes y las validaciones required, límites de texto o
        número y opciones configuradas de select. No devuelve valores ingresados
        por clientes, valores observados ni cantidades. Usa customers:read;
        customers:write y admin conservan su implicación existente. No requiere
        Idempotency-Key.
      operationId: listApiCustomerMetafieldDefinitions
      parameters:
        - name: cursor
          in: query
          required: false
          description: Valor opaco de next_cursor recibido en la respuesta anterior
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Cantidad máxima de definiciones por página
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        '200':
          description: Definiciones obtenidas exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCustomerMetafieldDefinitionsResponse'
              examples:
                default:
                  summary: Campo obligatorio que la integración puede descubrir
                  value:
                    request_id: req_customer_definitions_1
                    object: list
                    url: /api/v1/customers/metafield-definitions
                    has_more: false
                    next_cursor: null
                    data:
                      - object: metafield_definition
                        id: 550e8400-e29b-41d4-a716-446655440701
                        key: tipo_de_cliente
                        name: Tipo de cliente
                        description: null
                        field_type: select
                        validations:
                          required: true
                          options:
                            - Mayorista
                            - Minorista
        '400':
          description: Cursor o límite inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_customer_definitions_1
                    error:
                      code: INVALID_REQUEST
                      message: >-
                        Invalid parameters for listing customer metafield
                        definitions
                      retryable: false
                      type: invalid_request_error
                      details: []
        '401':
          description: Credencial faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: AUTHENTICATION_REQUIRED
                  value:
                    request_id: req_customer_definitions_1
                    error:
                      code: AUTHENTICATION_REQUIRED
                      message: Authentication required
                      retryable: false
                      type: invalid_request_error
                      details: []
        '403':
          description: Scope insuficiente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: FORBIDDEN
                  value:
                    request_id: req_customer_definitions_1
                    error:
                      code: FORBIDDEN
                      message: Permisos insuficientes
                      retryable: false
                      type: invalid_request_error
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INTERNAL_ERROR
                  value:
                    request_id: req_customer_definitions_1
                    error:
                      code: INTERNAL_ERROR
                      message: Could not list customer metafield definitions
                      retryable: false
                      type: invalid_request_error
                      details: []
components:
  schemas:
    ApiCustomerMetafieldDefinitionsResponse:
      type: object
      properties:
        request_id:
          type: string
        object:
          type: string
          const: list
        url:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: metafield_definition
              id:
                type: string
                format: uuid
              key:
                type: string
              name:
                type: string
              description:
                type:
                  - string
                  - 'null'
              field_type:
                $ref: '#/components/schemas/ApiSharedEnumf7fe6bfeb0'
              validations:
                $ref: '#/components/schemas/ApiSharedObjectba357c1d29'
            required:
              - object
              - id
              - key
              - name
              - description
              - field_type
              - validations
            additionalProperties: false
        has_more:
          type: boolean
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - request_id
        - object
        - url
        - data
        - has_more
        - next_cursor
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - string
                        - number
                        - boolean
                        - 'null'
                required:
                  - code
                  - message
                additionalProperties: false
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnumf7fe6bfeb0:
      type: string
      enum:
        - boolean
        - text
        - number
        - date
        - select
    ApiSharedObjectba357c1d29:
      type: object
      properties:
        required:
          type: boolean
        min_length:
          type: number
        max_length:
          type: number
        min:
          type: number
        max:
          type: number
        options:
          type: array
          items:
            type: string
      required:
        - required
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````

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