> ## 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 historial de estado

Devuelve el historial de transiciones de estado de la entidad, con el actor, el motivo y el ID de correlación de cada cambio.

* Las entradas están ordenadas cronológicamente.
* Las transiciones realizadas por Localpayment (IN\_REVIEW, ACTIVE, REJECTED, BLOCKED y el regreso a PENDING\_KYC para correcciones) aparecen aquí con su motivo.

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/entities/{entityId}/status-history
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/entities/{entityId}/status-history:
    get:
      summary: Obtener historial de estado
      operationId: get-entity-status-history
      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: entityId
          in: path
          description: internalId de la entidad.
          required: true
          schema:
            type: string
            examples:
              - 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    fromStatus:
                      type: string
                      examples:
                        - PENDING_KYC
                      enum:
                        - PENDING_KYC
                        - IN_REVIEW
                        - ACTIVE
                        - REJECTED
                        - BLOCKED
                        - CLOSED
                      description: Transición.
                    toStatus:
                      type: string
                      examples:
                        - IN_REVIEW
                      enum:
                        - PENDING_KYC
                        - IN_REVIEW
                        - ACTIVE
                        - REJECTED
                        - BLOCKED
                        - CLOSED
                      description: Transición.
                    reason:
                      type: string
                      examples:
                        - Review started
                      description: >-
                        Motivo indicado por el actor (siempre presente en
                        REJECTED y BLOCKED).
                    changedBy:
                      type: string
                      examples:
                        - '12345'
                      description: >-
                        Usuario que realizó el cambio: un usuario de tu cuenta
                        (a partir del token de acceso) o un usuario de
                        Cumplimiento de Localpayment.
                    correlationId:
                      type: string
                      examples:
                        - b68165b9-1d60-4f9d-9919-7fee12411714
                      format: uuid
                      description: >-
                        Identificador de correlación de la solicitud que provocó
                        el cambio.
                    createdAt:
                      type: string
                      examples:
                        - '2024-01-15T17:03:15Z'
                      format: date-time
                      description: Cuando sucedió.
              examples:
                Example 1:
                  value:
                    - fromStatus: PENDING_KYC
                      toStatus: IN_REVIEW
                      reason: Review started
                      changedBy: '12345'
                      correlationId: b68165b9-1d60-4f9d-9919-7fee12411714
                      createdAt: '2024-01-15T17:03:15Z'
                    - fromStatus: IN_REVIEW
                      toStatus: ACTIVE
                      reason: KYC approved
                      changedBy: '67890'
                      correlationId: b07a3416-11fb-48d8-8671-be471694f0a2
                      createdAt: '2024-01-15T17:03:22Z'
        '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/entities/5aced5da-40c1-4bec-85ff-c8cd1bcb4526/status-history
                    code: UNAUTHORIZED
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '404':
          description: >-
            No encontrado. ENTITY_NOT_FOUND: La entidad no existe o pertenece a
            otro 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 - ENTITY_NOT_FOUND:
                  value:
                    type: about:blank
                    title: Not found
                    status: 404
                    detail: The entity does not exist or belongs to another merchant.
                    instance: >-
                      /api/entity/v1/entities/5aced5da-40c1-4bec-85ff-c8cd1bcb4526/status-history
                    code: ENTITY_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.