v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Transaction

Retrieve one transaction file

Returns a single attached file (with its blob) by attachment id. Responds 404 when the file does not belong to the transaction's documentation.

get/v1/transactions/{transaction_id}/files/{file_id}

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.

file_idstring uuid required

The id of the attached file (ActiveStorage attachment id).

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

The requested file

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"
  }
}