Skip to main content

Get Total Purchase Count

Returns the total number of purchases made by a user across all tokens.

Request

GET /v2/users/purchases/users/{userID}/count

Parameters

NameTypeInDescription
userIDstringpathRequired. The ID of the user

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication

Example

curl --request GET \
--url '\{\{baseUrl\}\}/v2/users/purchases/users/665b372f3a72d7d0791596ba/count' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Response

{
"total": 42
}

Response Fields

FieldTypeDescription
totalintegerTotal number of purchases across all tokens for the user

Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid userID
401Unauthorized - Invalid or missing authentication token
409Conflict - Purchase data could not be aggregated
500Internal Server Error