v1

latestOpenAPI 3.1.02026-07-241910582.8 KB

Update Ledger Transaction

patch/ledger_transactions/{id}

Path parameters

idstring required

The ID or external_id of the ledger transaction.

Request body

descriptionstring

An optional free-form description for internal use. Maximum of 1000 characters allowed.

statusstring

To post the ledger transaction, use posted. To archive a pending ledger transaction, use archived.

metadatastring json

Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or null as the value.

effective_atstring date-time

Format: ISO8601 to 6 decimal places.

ledgerable_typestring

If the ledger transaction can be reconciled to another object in Modern Treasury, add the ledgerable type here, otherwise null. See possible types at Ledger Transactions

ledgerable_idstring

If the ledger transaction can be reconciled to another object in Modern Treasury, add the id of that object here, otherwise null.

external_idstring

An optional user-defined 180 character unique identifier

Response

200

idstring
objectstring
live_modeboolean
external_idstring
{"stackTrail":"paths:/ledger_transactions/{id}:patch:responses:200:content:application/json:schema:properties:ledgerable_type","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/ledger_transactions/{id}:patch:responses:200:content:application/json:schema:properties:ledgerable_id","oasType":"schema","type":"unknown"}
ledger_idstring
{"stackTrail":"paths:/ledger_transactions/{id}:patch:responses:200:content:application/json:schema:properties:description","oasType":"schema","type":"unknown"}
statusstring
{"stackTrail":"paths:/ledger_transactions/{id}:patch:responses:200:content:application/json:schema:properties:archived_reason","oasType":"schema","type":"unknown"}
posted_atstring
effective_atstring
effective_datestring
metadataobject
created_atstring
updated_atstring

Example response

{
  "id": "7f973ee9-597c-46e3-bcf1-359e0115d560",
  "object": "ledger_transaction",
  "external_id": "ecfbad72-c438-49f7-8198-d4bdf1e169bf",
  "ledger_id": "fe96565f-4b9c-4871-8fb0-e6f02683458e",
  "status": "posted",
  "ledger_entries": [
    {
      "id": "6f285fc2-7259-40e8-bfa9-3be8ae802f1f",
      "object": "ledger_entry",
      "amount": 100,
      "direction": "debit",
      "status": "posted",
      "ledger_account_id": "6168628a-05a6-4d30-80ca-4080ea699179",
      "ledger_account_currency": "USD",
      "ledger_account_currency_exponent": 2,
      "ledger_account_lock_version": 3,
      "ledger_transaction_id": "7f973ee9-597c-46e3-bcf1-359e0115d560",
      "resulting_ledger_account_balances": {
        "pending_balance": {
          "currency": "USD",
          "currency_exponent": 2
        },
        "posted_balance": {
          "currency": "USD",
          "currency_exponent": 2
        },
        "available_balance": {
          "currency": "USD",
          "currency_exponent": 2
        }
      },
      "created_at": "2022-11-01T21:29:56Z",
      "updated_at": "2022-11-01T21:29:56Z"
    }
  ],
  "posted_at": "2022-11-01T21:29:56Z",
  "effective_at": "2022-11-01T00:00:00.000000Z",
  "effective_date": "2022-11-01",
  "created_at": "2022-11-01T21:29:32Z",
  "updated_at": "2022-11-01T21:29:56Z"
}