> ## 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.

# List statement lines

> Read source lines with up to five candidate groups per line. Exact references rank first; partial matches show the remaining difference. Attached tax lines resolve with their parent.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/statements/{statement_id}/lines
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/statements/{statement_id}/lines:
    get:
      tags:
        - API
      summary: List statement lines
      description: >-
        Read source lines with up to five candidate groups per line. Exact
        references rank first; partial matches show the remaining difference.
        Attached tax lines resolve with their parent.
      operationId: listApiStatementLines
      parameters:
        - name: statement_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: status
          in: query
          required: false
          schema:
            default: all
            type: string
            enum:
              - all
              - pending
              - linked
              - excluded
        - name: limit
          in: query
          required: false
          schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Statement result or immutable replay
          content:
            application/json:
              schema:
                type: object
                required:
                  - request_id
                  - data
                  - object
                  - url
                  - has_more
                  - next_cursor
                properties:
                  request_id:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          const: statement_line
                        id:
                          type: string
                          format: uuid
                        statement_id:
                          type: string
                          format: uuid
                        bank_account_id:
                          type: string
                          format: uuid
                        external_id:
                          type:
                            - string
                            - 'null'
                        occurred_at:
                          type: string
                          format: date
                        description:
                          type: string
                        reference:
                          type:
                            - string
                            - 'null'
                        amount:
                          type: integer
                        running_balance:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        parent_line_id:
                          anyOf:
                            - type: string
                              format: uuid
                            - type: 'null'
                        attached_line_ids:
                          type: array
                          items:
                            type: string
                            format: uuid
                        group_amount:
                          type: integer
                        status:
                          $ref: '#/components/schemas/ApiSharedEnume7b34c7d75'
                        reconciliation_id:
                          anyOf:
                            - type: string
                              format: uuid
                            - type: 'null'
                        candidates:
                          maxItems: 5
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - exact_reference
                                  - amount_and_date
                              amount:
                                type: integer
                              difference:
                                type: integer
                              records:
                                minItems: 1
                                maxItems: 100
                                type: array
                                items:
                                  $ref: >-
                                    #/components/schemas/ApiSharedObject7687b554ab
                            required:
                              - match
                              - amount
                              - difference
                              - records
                            additionalProperties: false
                      required:
                        - object
                        - id
                        - statement_id
                        - bank_account_id
                        - external_id
                        - occurred_at
                        - description
                        - reference
                        - amount
                        - running_balance
                        - parent_line_id
                        - attached_line_ids
                        - group_amount
                        - status
                        - reconciliation_id
                        - candidates
                      additionalProperties: false
                  object:
                    type: string
                    const: list
                  url:
                    type: string
                  has_more:
                    type: boolean
                  next_cursor:
                    type:
                      - string
                      - 'null'
        '400':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '401':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '403':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '404':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '409':
          description: Idempotency or statement state conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Idempotency or statement state conflict
                      retryable: false
                      details: []
        '422':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '429':
          description: Statement request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
        '503':
          description: >-
            Statement request could not be completed Verificación de
            credenciales temporalmente ocupada; reintentá sin cambiar la
            operación ni su Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Statement request could not be completed
                      retryable: false
                      details: []
                authentication_capacity:
                  summary: Verificación temporalmente ocupada
                  value:
                    request_id: req_auth_capacity_1
                    error:
                      type: api_error
                      code: INTERNAL_ERROR
                      message: >-
                        La verificación de credenciales está ocupada. Reintentá
                        más tarde.
                      retryable: true
                      details: []
          headers:
            Retry-After:
              description: >-
                Segundos de espera. La verificación de credenciales indica 1;
                otras dependencias pueden indicar otro valor.
              schema:
                type: string
                example: '1'
            Cache-Control:
              description: La verificación de credenciales indica no-store.
              schema:
                type: string
                example: no-store
components:
  schemas:
    ApiSharedEnume7b34c7d75:
      type: string
      enum:
        - pending
        - linked
        - excluded
    ApiSharedObject7687b554ab:
      type: object
      properties:
        target_type:
          $ref: '#/components/schemas/ApiSharedEnumfb34785183'
        target_id:
          type: string
          format: uuid
        occurred_at:
          type: string
          format: date
        amount:
          type: integer
        reference:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
      required:
        - target_type
        - target_id
        - occurred_at
        - amount
        - reference
        - description
      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
    ApiSharedEnumfb34785183:
      type: string
      enum:
        - payment
        - journal_entry
  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.