productActivityHistory
Requires at least one of the permissions audit:activity_log:read or products:product:read.
Returns the audit history of a product, newest first, with who made each change. Fails if the product does not exist. Needs the products read or the activity log read permission.
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:
- GraphQL
- cURL
query ProductActivityHistory($productId: String!) {
productActivityHistory(productId: $productId) {
id
createdAt
action
changes
user {
id
firstName
lastName
email
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ProductActivityHistory($productId: String!) {\n productActivityHistory(productId: $productId) {\n id\n createdAt\n action\n changes\n user {\n id\n firstName\n lastName\n email\n }\n }\n}",
"variables": {
"productId": "string"
}
}
EOF
Variables:
{
"productId": "string"
}
Response:
{
"data": {
"productActivityHistory": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"changes": {},
"user": {
"id": "id",
"firstName": "string",
"lastName": "string",
"email": "string"
}
}
]
}
}
productActivityHistory(
productId: String!
): [ActivityLog!]!
Arguments
productActivityHistory.productId ● String! non-null scalar
The ID of the product.
Type
ActivityLog object
One entry of a record's activity history.