Get User Transactions
Retrieve transactions for a specific user with filtering options.
Endpoint
GET /v2/users/users/{user_id}/transactions
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | The unique identifier of the user |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Yes | Page number for pagination |
| per_page | integer | Yes | Number of items per page |
| types | integer[] | No | Filter by transaction types (can be multiple) |
Response
Returns a paginated list of transactions for the specified user.
Success Response (200 OK)
{
"data": [
{
"id": "68da490b2690ac9ed917101d",
"user_id": "680c02896d91ca0145cfeb81",
"type": 2,
"status": 1,
"environment": 2,
"external_id": "68ae06cfcccf4e8fc19362d1",
"is_api": false,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 10
}
Response Fields
| Field | Type | Description |
|---|---|---|
| data | array | Array of transaction objects |
| total | integer | Total number of transactions |
| page | integer | Current page number |
| per_page | integer | Number of items per page |
Transaction Object Structure
| Field | Type | Description |
|---|---|---|
| id | string | Unique transaction identifier |
| user_id | string | User identifier |
| type | integer | Transaction type (Type enum) |
| status | integer | Transaction status (Status enum) |
| environment | integer | Transaction environment (Environment enum) |
| external_id | string | External reference identifier |
| is_api | boolean | Whether transaction was created via API |
| created_at | string | Creation timestamp (ISO 8601) |
| updated_at | string | Last update timestamp (ISO 8601) |
Type (Transaction Type)
| Value | Description |
|---|---|
| 1 | PurchaseOnPrimaryMarket - Primary market purchase |
| 2 | PurchaseOnSecondaryMarket - Secondary market purchase |
| 3 | SellOnSecondaryMarket - Secondary market sale |
| 4 | DelistOnSecondaryMarket - Secondary market delisting |
| 5 | ClaimRent - Rent claim |
| 6 | CreateOtcOffer - Create OTC offer |
| 7 | CancelOtcOffer - Cancel OTC offer |
| 8 | Burn - Token burn |
Status (Transaction Status)
| Value | Description |
|---|---|
| 1 | Started - Transaction started |
| 2 | InProgress - Transaction in progress |
| 3 | Done - Transaction completed |
| 4 | Error - Transaction failed |
Environment (Transaction Environment)
| Value | Description |
|---|---|
| 0 | DefaultEnvironment - Default environment |
| 1 | OtcEnvironment - OTC environment |
| 2 | SecondaryMarketEnvironment - Secondary market environment |
Example
Request
curl -X GET "{{baseUrl}}/v2/users/users/680c02896d91ca0145cfeb81/transactions?page=1&per_page=10&types=1&types=2" \
-H "Authorization: Bearer \{\{token\}\}"
Response
{
"data": [
{
"id": "68da490b2690ac9ed917101d",
"user_id": "680c02896d91ca0145cfeb81",
"type": 2,
"status": 1,
"environment": 2,
"external_id": "68ae06cfcccf4e8fc19362d1",
"is_api": false,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 10
}
Error Responses
400 Bad Request
{
"error": "Invalid user ID format"
}
401 Unauthorized
{
"error": "Authentication required"
}
403 Forbidden
{
"error": "Access denied"
}
404 Not Found
{
"error": "User not found"
}
500 Internal Server Error
{
"error": "Internal server error"
}