API / Reference / Purchase Orders
List purchase order activity events
GET
https://api.light.inc/v1/purchase-orders/{purchaseOrderId}/activity-events
The purchase order's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this purchase order. The entityId and entityType filters are fixed by the path here; passing them can only narrow the result.
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Path parameters
-
purchaseOrderIdstring · uuidrequired
Query parameters
-
filterstringFilter string in the format
field:operator:value. To provide multiple filters, separate them with commas.Available operators:
eq,ne,in,not_in,gt,gte,lt,lte.- For
inandnot_inoperators, provide multiple values separated by the pipe character (|).
Available fields:
action,actorId,correlationId,createdAt,entityId,entityType. - For
-
limitinteger · int32Maximum number of items to return. Default is 50, maximum is 200.
-
offsetinteger · int64deprecatedNumber of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.
-
cursorstringThe cursor position to start returning results from. To opt-in into cursor-based pagination, provide
0for the initial request. For subsequent requests, usenextCursorandprevCursorfrom the previous response to navigate. Cursor values are opaque and should not be constructed manually.
Response
-
recordsarray of objectList of records for the current page
-
idstring · uuidUnique identifier of the event. Ids are time-ordered, so a later event always has a greater id.
-
entityTypestringType of the record the event belongs to
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
AI_AGENTAI_ARTIFACTASSISTANT_INSTRUCTIONBANK_ACCOUNTBANK_PAYMENTCARDCARD_INTENTCARD_TRANSACTIONCONTRACTCREDIT_NOTECUSTOMERCUSTOMER_CREDITDEFERRED_ENTRYDOCUMENT_TEMPLATEFX_REVALUATIONHUBSPOT_CONNECTIONINTERCOMPANY_JOURNAL_ENTRYINVOICE_PAYABLEINVOICE_RECEIVABLEJOURNAL_ENTRYLCI_MEMORYPRODUCTPURCHASE_ORDERPURCHASE_REQUESTSALESFORCE_CONNECTIONSKILLUSER_REIMBURSEMENT_CONFIGVENDORWORKFLOWYEAR_CLOSING_ENTRY -
entityIdstring · uuidID of the record the event belongs to
-
actionstringWhat was done to the record
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ACTIVATEADD_TO_PAYMENT_BATCHAGENT_REVIEWAPPLY_CREDIT_NOTEAPPLY_CUSTOMER_CREDITAPPROVEAPPROVE_PAYMENTARCHIVEATTACH_FILECANCELCANCEL_TERMINATIONCLEARCLOSECONFIRM_GOODS_RECEIPTCREATEDECLINE_APPROVALDECLINE_PAYMENTDELETEFAILFLAG_GOODS_RECEIPT_ISSUEINITIATE_PAYMENTLOCKMARK_AS_PAIDMARK_AS_PAID_IN_STRIPEMARK_AS_PARTIALLY_PAIDMATCH_BILLMATCH_PURCHASE_ORDEROPENPARTIALLY_CLEARPAUSE_PAYMENTPAYPOSTPUBLISHRECONCILEREMOVE_CREDIT_NOTEREMOVE_CUSTOMER_CREDITRENEWRESETRESUME_PAYMENTREVERSE_CLEARINGREVERTSCHEDULE_TERMINATIONSEND_CUSTOMER_CREDITSEND_DUNNING_EMAILSEND_INVOICESEND_PURCHASE_ORDERSUBMIT_FOR_APPROVALTERMINATETRIGGER_SYNCUNARCHIVEUNMATCH_BILLUNMATCH_PURCHASE_ORDERUNRECONCILEUPDATE -
actorobjectWho did it
-
idstring · uuidID of the principal that acted
-
typestringKind of principal that acted
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
AI_AGENTINTEGRATIONLIGHT_TEAMSYSTEMUSER -
namestringDisplay name of the actor
-
-
correlationIdstring · uuidID of the operation this event belongs to, e.g. an approval run or an assistant tool call. Events sharing it were caused by that one operation.
-
createdAtstring · date-timeTimestamp when the event happened
-
changesarray of objectField changes recorded with the event, each with the value before and after
-
objectTypestringWhether the changed field belongs to the record itself or to one of its lines
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
HEADERLINE -
objectIdstring · uuidID of the record or line the field belongs to
-
objectPositioninteger · int32Position of the line within the record, for line fields
-
fieldstringMachine name of the changed field
-
fieldLabelstringHuman-readable label of the changed field
-
oldValueobjectA field value, discriminated by
type: TEXT, DATE, ENUM, MONEY, REFERENCE or REFERENCE_LIST-
typestringrequired
-
-
newValueobjectA field value, discriminated by
type: TEXT, DATE, ENUM, MONEY, REFERENCE or REFERENCE_LIST-
typestringrequired
-
-
-
-
hasMorebooleanBoolean flag indicating if there are more records available
-
totalinteger · int64deprecatedTotal number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.
-
nextCursorstringCursor for fetching the next page (only for cursor pagination)
-
prevCursorstringCursor for fetching the previous page (only for cursor pagination)