Skip to main content
Activity history is the audit trail for the things on a Fluz account. Fluz tracks four kinds of objects. Each one keeps its own list of every change ever made to it. You can read that list for any single object with one query: objectChangeHistory. It works in three parts:
  1. Objects. There are four: virtual cards, gift cards, spend accounts, and funding sources.
  2. Events. Every change to an object is saved as an event. The object was created, a field changed, it was shared, an approval was requested or decided. Events are never edited or deleted.
  3. One query. Pass the object’s type and ID to objectChangeHistory and you get its events back, newest first.
One query works for all four objects, and every event has the same shape. Only the events differ. See the Event catalog for every event on every object.

The four objects

Nothing else has activity history. Authorized users, approvals, share links, and developer applications aren’t objects here. See Approval and authorized user history for how to trace them.

What’s in an event

Every event answers the same five questions, whatever the object: For example, the first event in the sample response below reads: On October 8, a cardholder unlocked the card (status: LOCKED → UNLOCKED), after a manager approved the request through the Acme Expenses app (approvalId).
Activity history records actions on the object, not reads or spend.Revealing card details, viewing balances, and listing objects aren’t recorded. Neither are card transactions, authorizations, or refunds. To read spend, use Transaction activity.

Query activity history

objectChangeHistory Returns the newest events first, up to 50 per object. Required scope: VIEW_OBJECT_CHANGE_HISTORY
Prerequisites: the VIEW_OBJECT_CHANGE_HISTORY scope enabled on your application. The query accepts both Bearer (a user access token that carries the scope) and Basic (<API_KEY>) authentication. The object must belong to the account the credentials act on.

Arguments

Sample query

cURL example

Sample response

A card that an authorized user asked to unlock, and a manager approved through the API. The newest event comes first.

Response fields

objectChangeHistory returns a list of ObjectChangeHistoryEvent.

Change types

Treat changeType as an open list: new values can appear as Fluz records more actions.

The change payload

change is a JSON object. Its keys use snake_case. Fluz never puts sensitive values in change. PINs, card numbers, wallet tokens, address text, and memo or receipt content are replaced by a marker such as "updated", "UPDATED", or "ADDED", or by an ID.

Who made the change

actor names the one party that performed the action. Exactly one of userId and system is set. Each object page lists the system values you can see for that object. Treat system values as labels for display and auditing: new values can appear, and existing ones can change. With API key (Basic) authentication, userId is the user who owns your developer account and applicationId is your application. subjectUserId names the person the change was made for, when that’s someone other than the actor. For example, an admin creates a card for an authorized user: actor.userId is the admin, and subjectUserId is the cardholder.

Approvals

When a change goes through Approvals & requests, the object’s history shows the whole trail. Every event in it carries the same approvalId.
  1. APPROVAL_REQUESTED. The actor is the requester, with the application the request came through.
  2. APPROVAL_APPROVED or APPROVAL_DECLINED. One event per approver who decided. The actor is the user who submitted the decision, and subjectUserId is the requester. A decision made through an approval link that names no approver is attributed to system: "approvals-service".
  3. The resulting action. For example, a FIELD_CHANGED event that unlocks the card. A change to the object itself is usually attributed to the requester, because they asked for it. An access grant is attributed to the approver who granted it. Each object page notes the exceptions.
If nobody decides before the request expires, an APPROVAL_EXPIRED event is recorded instead, attributed to system: "approvals-service". For a request that creates a new object, such as a virtual card or gift card purchase, the new object gets the request and approval events once it exists. A declined or expired creation request doesn’t create an object, so the new object has no history. A request to replace a virtual card records its decline or expiry on the original card. The approval field returns the approval as it is now: Fluz never asks a requester to approve their own request, and rejects the decision if they try.

Ownership and access

Ownership and access events work the same way on every object type that supports them.
  • Ownership. assignObjectOwner records OWNER_ASSIGNED. transferObjectOwner records OWNER_TRANSFERRED. New virtual cards and gift cards also record OWNER_ASSIGNED. Spend accounts created in the Fluz app record it for the owner picked, or for the creator.
  • The owner’s access. An owner always gets at least SPENDER access. When that access is granted, raised, or removed, the access event carries "reason": "owner-floor". For example, a transfer revokes the previous owner’s SPENDER access.
  • Sharing. Sharing an object with a member of the account in the Fluz app records ACCESS_GRANTED, ACCESS_LEVEL_CHANGED, or ACCESS_REVOKED. subjectUserId is the member.
  • Invites. Sharing with someone who hasn’t registered yet records PENDING_ACCESS_* events. Those events have no subjectUserId; change.subject_non_registered_user_id identifies the invite. When the person registers, ACCESS_APPLIED_ON_REGISTRATION is recorded and attributed to the person who invited them.
  • Access requests. A member who asks for access to an object goes through an approval. The object records APPROVAL_REQUESTED, then APPROVAL_APPROVED or APPROVAL_DECLINED. If the request is approved, an ACCESS_GRANTED event follows, or ACCESS_LEVEL_CHANGED if the requester already had lower access. It’s attributed to the approver, with the requester as subjectUserId. If the requester already had that level or higher, no access event is recorded.
Access levels in change.old and change.new: Access a user has through a group isn’t recorded on the object.

Approval and authorized user history

Approvals and authorized users aren’t objects in activity history. There’s no objectType for them and no separate history query. What they did is recorded on the objects they touched.

Approvals

  • The trail behind one change. Every event in an approval’s trail carries the same approvalId. Ask for the approval field to get the approval’s type, status, requester, and each approver’s decision, channel, and time.
  • Approvals still waiting. approvalRequests lists the account’s open requests. Once a request is approved, declined, or expires, it drops off that list. Its record lives on in the object’s history.
  • Not available. A single list of every past approval on the account, and the history of an approval request that never touched one of the four objects, such as a transfer or reimbursement request.

Authorized users

  • What an authorized user did. Events where actor.userId is their user ID.
  • What was done for them. Events where subjectUserId is their user ID. For example, a card an admin issued to them, or access they were given.
  • Across objects. History is read one object at a time. To see everything a user did, query each object they can reach and filter on actor.userId.
  • Not recorded. Adding or removing an authorized user, changing their roles, supervisor assignments, and access they get through a group.

Good to know

  • History starts when recording started. Changes made before Fluz began recording an action don’t appear, and nothing is backfilled, with one exception. Virtual cards that existed when ownership launched have an OWNER_ASSIGNED event dated when ownership launched, not when the card was created.
  • Only real changes are recorded. An update that sets a field to its current value records nothing.
  • Recording doesn’t block most actions. If an event can’t be written, the action still succeeds. Most ownership and access events are the exception: they’re written together with the change. Use the object’s current state, not its history, as the source of truth for its current values.
  • The newest 50 events. The query returns at most 50 events, newest first, with no pagination.
  • Changes from every channel. The history includes changes made through the API, in the Fluz web and mobile apps, by Fluz support, and by Fluz systems.

Access rules

The object must belong to the account the credentials act on: For an OAuth grant restricted to specific spend accounts, SPEND_ACCOUNTS history is only available for those spend accounts. Asking for an object on another account returns the same error as asking for one that doesn’t exist, so the API never reveals whether the object exists.

Errors

See General API error codes for authentication errors shared by every operation.

Next steps

Event catalog

Every event on every object, in one place.

Virtual card activity history

Creation, settings, locks, PINs, wallet tokens, and expense details.

Gift card activity history

Purchase, archive, used status, balance, and expense details.

Spend account activity history

Creation, renames, default changes, images, and closure.

Funding source activity history

Bank cards, bank accounts, PayPal, and primary or backup changes.