Skip to main content

returnAuditLogs

Requires at least one of the permissions purchase:debit_note:read or sales:credit_note:read.

Lists the audit trail of one return: who changed it, when, and what changed. Limited to the directions your read permissions allow.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query ReturnAuditLogs($returnId: String!) {
returnAuditLogs(returnId: $returnId) {
id
createdAt
action
changes
deletedBy
enteredBy
user {
id
firstName
lastName
email
}
}
}

Variables:

{
"returnId": "string"
}

Response:

{
"data": {
"returnAuditLogs": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"changes": {},
"deletedBy": "string",
"enteredBy": "string",
"user": {
"id": "id",
"firstName": "string",
"lastName": "string",
"email": "string"
}
}
]
}
}
returnAuditLogs(
returnId: String!
): [AuditLog!]!

Arguments​

returnAuditLogs.returnId ● String! non-null scalar​

The ID of the return.

Type​

AuditLog object​

One entry in the audit log.