v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Transaction label

Associate a label with a transaction

Associates a label with a transaction. Provide cardda_transaction_id and either an existing transaction_label_id or a label name (a label is created for the caller's company when only label is given and none matches). The caller must own the transaction or have a role over its owner within the same company.

post/v1/transaction_label_associations

Headers

company-idstring uuid required

UUID of the company on whose behalf the request is made. Required for every Accounting endpoint. See The company-id header for details on how to obtain a value for this header and the error responses to expect when it is missing or invalid.

Request body

cardda_transaction_idstring required

The transaction's accounting_ledger_tx_id.

transaction_label_idstring uuid

An existing label id to associate.

labelstring

Label name; used to find-or-create a label when transaction_label_id is absent.

Example request

{
  "cardda_transaction_id": "09f6cc5e-8a16-43ae-8bb1-637c0e1c0a6d",
  "transaction_label_id": "f1e2d3c4-b5a6-4978-8c9d-0e1f2a3b4c5d",
  "label": "Reembolsable"
}

Response

Association created

idstring uuid required
transaction_label_idstring uuid required
cardda_transaction_idstring required

The transaction's accounting_ledger_tx_id.

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "aa11bb22-cc33-4d44-8e55-6f778899aabb",
  "transaction_label_id": "f1e2d3c4-b5a6-4978-8c9d-0e1f2a3b4c5d",
  "cardda_transaction_id": "09f6cc5e-8a16-43ae-8bb1-637c0e1c0a6d"
}