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)attachmentis excluded
- Existing transactions (
updateTransactionMetadata.input.erpTransactionMetadata) - Bulk transaction updates (
bulkUpdateErpTransactionMetadata) - Transaction reads (
Transaction.erpMetadata,erpTransactionMetadata,erpTransactionMetadataList)
How it works
- Optional: If you want to attach a file, upload it first via the REST upload endpoint. You’ll get back an
attachmentId. - Pass
memo,transactionCategory, and/orattachmentIdinto your mutation input — either at transaction time or later viaupdateTransactionMetadata. - For ERP metadata, first query imported QuickBooks Online reference items, or pass names that should be resolved or created in QuickBooks Online.
- Update ERP metadata on one transaction with
updateTransactionMetadata.input.erpTransactionMetadata, or update up to 100 transactions withbulkUpdateErpTransactionMetadata. - Read annotations back on
getTransactions,getUserPurchases, or the mutation response. Read ERP details onTransaction.erpMetadata,erpTransactionMetadata, orerpTransactionMetadataList. TheattachmentUrlfield 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 asmultipart/form-data with the field name file.
Accepted types: application/pdf, image/png
⚠️ JPEG is not accepted for transaction attachments.
Sample Request
Response
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 acceptmemo, transactionCategory, and attachmentId as optional fields in their input:
depositCashBalance→DepositCashBalanceInputpurchaseGiftCard→PurchaseGiftCardInputcreateTransfer→CreateTransferInputtransferInternalBalance→TransferInternalBalanceInput
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
memois limited to 255 characters. - ERP
erpTransactionMetadata.memois limited to 4000 characters. - Annotation
transactionCategoryis a Fluz category label. - ERP
categoryReferenceItemIdpoints 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 settingcategoryReferenceItemId, 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
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
UsebulkUpdateErpTransactionMetadata 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
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
recordIdis the transaction record ID returned by transaction queries.- Annotation updates are partial: omitted fields stay unchanged, and
nullclears. - ERP metadata updates are also partial: omitted fields stay unchanged, and supported nullable fields can be cleared with
null. - In
updateTransactionMetadata,erpTransactionMetadata: nullis 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.
categoryNamecreates or selects a QuickBooks Online account with account typeExpense.vendorNamecreates or selects a QuickBooks Online vendor.customerNamecreates or selects a QuickBooks Online customer.- GraphQL pagination uses
OffsetInput,limitdefaults to 20 and is capped by the API pagination cap.