---
title: "Resolve statement line"
method: POST
path: "/api/v1/statements/lines/{statement_line_id}/resolve"
tags: ["API"]
---

# Resolve statement line

`POST /api/v1/statements/lines/{statement_line_id}/resolve`

## Request

- Base URL: `https://api.lapyme.com.ar`
- URL: `https://api.lapyme.com.ar/api/v1/statements/lines/{statement_line_id}/resolve`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lapyme/apis/la-pyme-api/docs/api/v1/statements/lines/:statement_line_id/resolve/post.ts> (a function with typed inputs; its response is checked against the schema)

Link existing records first, else create a manual movement or own-account transfer, or exclude with a reason. Link also accepts open sales and purchases with partial amounts: La Pyme creates one cobranza or pago per contact on the line date. Adjustments post differences such as fees, IVA or withholdings to accounts. Amounts are signed native cents of the bank effect (sales positive, purchases negative); targets plus adjustments must equal the line, else the request is refused with the remaining amount. Sale or purchase targets, and undoing created payments, also need payments:write. API and MCP resolutions record agent with the optional reason. Undo restores pending and removes records created by this resolution atomically, including created payments and adjustments. A movement with remember.text also saves a rule: later lines whose description contains the text, in this line's direction, post to the same account; matching pending lines resolve now.

## Path parameters

- `statement_line_id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Request body

- union
  - object
    - `action` 'link', required
    - `targets` union[]
      - union
        - object
          - `type` 'payment', required
          - `payment_id` string, uuid, required
          - `amount` integer, required
        - object
          - `type` 'journal_entry', required
          - `journal_entry_id` string, uuid, required
          - `amount` integer, required
        - object
          - `type` 'sale' | 'purchase', required
          - `document_id` string, uuid, required
          - `amount` integer, required
    - `adjustments` object[]
      - `account_id` string, uuid, required
      - `amount` integer, required
      - `note` string
      - `cost_center1_id` string, uuid
      - `cost_center2_id` string, uuid
      - `cost_center3_id` string, uuid
    - `reason` string
  - object
    - `action` 'movement', required
    - `account_id` string, uuid
    - `contact_id` string, uuid
    - `cost_center1_id` string, uuid
    - `cost_center2_id` string, uuid
    - `cost_center3_id` string, uuid
    - `note` string
    - `reason` string
    - `remember` object
      - `text` string, required
  - object
    - `action` 'transfer', required
    - `counterpart_type` 'bank_account' | 'register' | 'safe', required
    - `counterpart_id` string, uuid, required
  - object
    - `action` 'exclude', required
    - `reason` string, required
  - object
    - `action` 'undo', required
    - `reason` string, required

## Response `200`

Treasury result or immutable replay

- object
  - `request_id` string, required
  - `data` object, required
    - `object` 'statement_line_resolution', required
    - `statement_line_id` string, uuid, required
    - `statement_id` string, uuid, required
    - `status` 'pending' | 'linked' | 'excluded', required
    - `reconciliation_id` string, uuid, nullable, required
    - `created_record_id` string, uuid, nullable, required
    - `created_records` object[]
      - `type` 'customer_payment' | 'supplier_payment' | 'treasury_movement' | 'funds_transfer', required
      - `id` string, uuid, required
    - `remembered_rule_id` string, uuid, nullable
    - `paired_statement_line_id` string, uuid, nullable

## Other responses

- `400`: Statement request could not be completed
- `401`: Statement request could not be completed
- `403`: Statement request could not be completed
- `404`: Statement request could not be completed
- `409`: Idempotency or statement state conflict
- `422`: Statement request could not be completed
- `429`: Statement request could not be completed
- `503`: Statement request could not be completed Verificación de credenciales temporalmente ocupada; reintentá sin cambiar la operación ni su Idempotency-Key.

## Changes

- **2026-11-07** `597a718d17bd`: 1 info
  - added the optional property `data/paired_statement_line_id` to the response with the `200` status
- **2026-11-07** `0b0c4de0366d`: 2 info
  - added the new optional request property `oneOf[subschema #2]/remember`
  - added the optional property `data/remembered_rule_id` to the response with the `200` status
- **2026-11-06** `a9b5a8d295fd`: 1 breaking, 2 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
  - added the optional property `data/created_records` to the response with the `200` status
- **2026-11-05** `7b0bc8043efd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lapyme/apis/la-pyme-api/changes/api/v1/statements/lines/:statement_line_id/resolve/post.md)

---

[API](https://skmtc.dev/lapyme/apis/la-pyme-api.md) - [All operations](https://skmtc.dev/lapyme/apis/la-pyme-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lapyme/apis/la-pyme-api/revisions/597a718d17bd?raw)
