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
| Name | Type | In | Description |
|---|---|---|---|
userID | string | path | Required. The ID of the user |
Headers
| Name | Description |
|---|---|
Authorization | Required. 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
| Field | Type | Description |
|---|---|---|
total | integer | Total number of purchases across all tokens for the user |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid userID |
| 401 | Unauthorized - Invalid or missing authentication token |
| 409 | Conflict - Purchase data could not be aggregated |
| 500 | Internal Server Error |