Skip to main content
You can enrich any transaction with a memo, a category, and/or an attachment (e.g. receipts, invoices, purchase orders). Annotations can be added at the time of the original transaction or updated afterward using the updateTransactionMetadata mutation. For accounts with ERP integrations enabled and an active QuickBooks Online connection, you can also manage ERP transaction metadata: accounting category, vendor, customer, billable status, and an ERP-specific memo. ERP metadata is separate from annotations. Annotations are supported on:
  • Deposits (depositCashBalance)
  • Gift card purchases (purchaseGiftCard)
  • Wallet transfers (createTransfer, transferInternalBalance)
  • Virtual card creation (createVirtualCard)
    • attachment is excluded
ERP metadata is supported on:
  • Existing transactions (updateTransactionMetadata.input.erpTransactionMetadata)
  • Bulk transaction updates (bulkUpdateErpTransactionMetadata)
  • Transaction reads (Transaction.erpMetadata, erpTransactionMetadata, erpTransactionMetadataList)

How it works

  1. Optional: If you want to attach a file, upload it first via the REST upload endpoint. You’ll get back an attachmentId.
  2. Pass memo, transactionCategory, and/or attachmentId into your mutation input — either at transaction time or later via updateTransactionMetadata.
  3. For ERP metadata, first query imported QuickBooks Online reference items, or pass names that should be resolved or created in QuickBooks Online.
  4. Update ERP metadata on one transaction with updateTransactionMetadata.input.erpTransactionMetadata, or update up to 100 transactions with bulkUpdateErpTransactionMetadata.
  5. Read annotations back on getTransactions, getUserPurchases, or the mutation response. Read ERP details on Transaction.erpMetadata, erpTransactionMetadata, or erpTransactionMetadataList. The attachmentUrl field returns a short-lived signed URL for file access.

Step 1: Upload an attachment (optional)

This is a REST endpoint, not a GraphQL mutation

Endpoint

POST /api/v1/file-upload/transaction-memo-attachment

Authentication

Authorization: Bearer <YOUR_USER_ACCESS_TOKEN>

Request

Send the file as multipart/form-data with the field name file. Accepted types: application/pdf, image/png
⚠️ JPEG is not accepted for transaction attachments.

Sample Request

Response

Copy the attachmentId — you’ll pass it into your mutation input in the next step.
The attachmentId is scoped to your account. The system verifies the file exists in your account’s storage when you submit the mutation. An ID from a different account will be rejected.

Upload Errors


Step 2: Annotate the transaction

You can provide annotations at the time of the original transaction or update them afterward.

Option A — At transaction time

The following mutations accept memo, transactionCategory, and attachmentId as optional fields in their input:
  • depositCashBalanceDepositCashBalanceInput
  • purchaseGiftCardPurchaseGiftCardInput
  • createTransferCreateTransferInput
  • transferInternalBalanceTransferInternalBalanceInput

Annotation Fields

Sample — Purchase Gift Card with Annotation


Option B — After the transaction (updateTransactionMetadata)

Use this mutation to add or update annotations on any existing transaction.
Partial update semantics: Only the fields you include are updated. Omitted fields are left unchanged. Pass null to clear a field.

Mutation

UpdateTransactionMetadataInput

Required scopes

LIST_PAYMENT and LIST_PURCHASES. If you include erpTransactionMetadata, the request also requires MANAGE_ERP_TRANSACTION_METADATA.

Sample — Add a memo and category

Sample — Attach a file to an existing transaction

Sample — Clear a memo

Sample Response

Errors


Step 3: Manage ERP metadata

ERP metadata is used to categorize transactions before exporting them to the connected accounting provider. The currently available provider is QuickBooks Online. ERP metadata fields are separate from annotations:
  • Annotation memo is limited to 255 characters.
  • ERP erpTransactionMetadata.memo is limited to 4000 characters.
  • Annotation transactionCategory is a Fluz category label.
  • ERP categoryReferenceItemId points to a QuickBooks Online chart-of-accounts item.

UpdateErpTransactionMetadataInput

Leave erpTransactionMetadata out of the request when you do not want to update ERP metadata.

Sample: Update annotations and ERP metadata together


Step 4: Find ERP reference items

Use these queries to find imported QuickBooks Online reference items before setting categoryReferenceItemId, vendorReferenceItemId, or customerReferenceItemId.

Reference item fields

Reference item filters

Sample: Search chart of accounts

Sample: Search vendors and customers


Step 5: Read ERP metadata

ERP metadata can be read from the transaction object or through dedicated ERP metadata queries.

Read ERP metadata in getTransactions

erpMetadata is null when the account has no active ERP connection or the transaction has no ERP metadata.

Read one transaction’s ERP metadata

This query returns null, not an error, when there is no ERP metadata for the transaction or the account has no active ERP connection.

List ERP metadata records

ERP metadata list filters


ERP sync status


Bulk update ERP metadata

Use bulkUpdateErpTransactionMetadata to update ERP metadata for up to 100 transactions in one request. Each item uses the same UpdateErpTransactionMetadataInput fields. Omitted fields are left unchanged; nullable reference fields, memo, and isBillable can be passed as null to clear them.

Mutation

Variables

Sample response

Per-item ERP validation failures are returned in failed, other valid items can still succeed.

Reading annotations

Annotations are returned on the following:
⚠️ attachmentUrl is a signed URL. It expires shortly after being generated. Do not store it — re-fetch the transaction when you need to display or access the file.

Common errors


Notes and limits

  • recordId is the transaction record ID returned by transaction queries.
  • Annotation updates are partial: omitted fields stay unchanged, and null clears.
  • ERP metadata updates are also partial: omitted fields stay unchanged, and supported nullable fields can be cleared with null.
  • In updateTransactionMetadata, erpTransactionMetadata: null is a no-op, not a clear.
  • In updateTransactionMetadata, erpTransactionMetadata: {} is invalid. Omit the field instead.
  • If both an ERP reference ID and a name are provided for the same field, the reference ID wins.
  • categoryName creates or selects a QuickBooks Online account with account type Expense.
  • vendorName creates or selects a QuickBooks Online vendor.
  • customerName creates or selects a QuickBooks Online customer.
  • GraphQL pagination uses OffsetInput, limit defaults to 20 and is capped by the API pagination cap.