recordBuyerActivity
Requires a customer (portal or buyer app) session.
Records a batch of buyer-app interaction events, such as views and searches, for the signed-in buyer. Any signed-in buyer can call it, and calls are rate limited.
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
mutation RecordBuyerActivity($input: RecordBuyerActivityInput!) {
recordBuyerActivity(input: $input) {
accepted
rejected
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RecordBuyerActivity($input: RecordBuyerActivityInput!) {\n recordBuyerActivity(input: $input) {\n accepted\n rejected\n }\n}",
"variables": {
"input": {
"events": [
{
"name": "string",
"occurredAt": "2025-01-15T00:00:00Z"
}
]
}
}
}
EOF
Variables:
{
"input": {
"events": [
{
"name": "string",
"occurredAt": "2025-01-15T00:00:00Z"
}
]
}
}
Response:
{
"data": {
"recordBuyerActivity": {
"accepted": 0,
"rejected": 0
}
}
}
recordBuyerActivity(
input: RecordBuyerActivityInput!
): RecordBuyerActivityResult!
Arguments
recordBuyerActivity.input ● RecordBuyerActivityInput! non-null input
The events to record.
Type
RecordBuyerActivityResult object
The result of recording events.