v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Transaction

Upload transaction files

Attaches one or more files to a transaction's documentation, creating the documentation record on first upload. Send the request as multipart/form-data with a files field (single file or array). Returns the most recently attached file.

post/v1/transactions/{transaction_id}/files

Path parameters

transaction_idstring uuid required

The Cardda accounting-ledger transaction id (accounting_ledger_tx_id). This is the same value exposed as id in the unified transactions list.

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.

Response

File attached

idstring uuid required

The attachment id (used as file_id in the file endpoints).

namestring

The attachment name (association name, always files).

record_typestring

The record type the attachment belongs to.

record_idstring uuid

The id of the documentation record the attachment belongs to.

blob_idstring uuid

The id of the underlying blob.

created_atstring date-time

Example response

{
  "id": "b1f2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "name": "files",
  "record_type": "TransactionDocumentation",
  "blob": {
    "filename": "invoice-1234.pdf",
    "content_type": "application/pdf",
    "byte_size": 48213,
    "service_name": "amazon"
  }
}