Light APIv1.0.0

API / Reference / Card Transactions

Batch update card transactions

PATCH https://api.light.inc/v1/card-transactions/batch-update

Updates multiple card transactions in a single operation

Asynchronous. The call authorises every id up front (one id you may not update makes the whole request 403), queues the work and returns an empty body immediately; nothing in the response tells you whether any update succeeded. Items are processed independently: one failing item does not stop the others, and a failure that is a validation error is written to that transaction's failureContext, where a later GET shows it. Poll updatedAt or failureContext on the transactions to confirm. There is no cap on the list length.

This is the only endpoint that accepts postingDate, and it is write-only from the card side: no card-transaction response returns it. Read it back on the ledger line (GET /v1/ledger-transaction-lines, postingDate) once the transaction is posted. Line updates here take description, accountId, taxCodeId and customProperties only; edits to a posted transaction fail into failureContext rather than being rejected up front.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Request body

application/json;charset=UTF-8

  • cardTransactionId string · uuid

  • customProperties array of object

    • groupId string · uuid

    • valueIds array of string · uuid

      Catalogue value ids for this group. Required; send [] (with an empty inlineValues) to clear the group. SINGLE_SELECT and MULTI_SELECT groups accept nothing else. See Custom properties on writes.

    • inlineValues array of string

      Literal values for TEXT, NUMERIC, BOOLEAN and DATE groups, as strings (yyyy-MM-dd for dates). Rejected on select groups with CUSTOM_PROPERTY_VALUE_TYPE_MISMATCH. See Custom properties on writes.

  • lines array of object

    • lineId string · uuid

    • customProperties array of object

      • groupId string · uuid

      • valueIds array of string · uuid

        Catalogue value ids for this group. Required; send [] (with an empty inlineValues) to clear the group. SINGLE_SELECT and MULTI_SELECT groups accept nothing else. See Custom properties on writes.

      • inlineValues array of string

        Literal values for TEXT, NUMERIC, BOOLEAN and DATE groups, as strings (yyyy-MM-dd for dates). Rejected on select groups with CUSTOM_PROPERTY_VALUE_TYPE_MISMATCH. See Custom properties on writes.

    • description string

    • accountId string · uuid

    • taxCodeId string · uuid

  • postingDate string · date

    Writable here and nowhere else on the card side, and returned by no card-transaction response. Read it back on the ledger line (GET /v1/ledger-transaction-lines, postingDate) once the transaction is posted.

  • description string

Response

This endpoint returns no content.