GET
/merchants/{id}/transactions
List merchant transactions
Merchants
Description
Retrieve a paginated list of transactions for a specific merchant.
Returns transaction data from the analytics database.
Authentication Required: User must be authenticated and have the 'merchant' feature flag.
Authorization: Merchant users can only view transactions for their own merchant account.
Parameters
id
integer
path
required
Merchant ID
page
integer
query
Page number for pagination (defaults to 1)
start_date
string
query
Start date for filtering transactions (ISO 8601 format)
end_date
string
query
End date for filtering transactions (ISO 8601 format)
Responses
200
Successful response with paginated transactions
application/jsonstatusstring
Example:
successdataarray
current_pageinteger
Current page number
Example:
1total_resultsinteger
Total number of transactions
Example:
150total_pagesinteger
Total number of pages
Example:
5Example:
{
"status": "success",
"data": [
{
"id": "8MIZ2XUMFV7",
"tracking_id": "599M6MDU8J6BRGP6",
"basket_price": 129.99,
"affiliate_id": 42,
"basket_items": [
{
"id": 1,
"name": "Laptop Stand",
"ean": "1234567890123",
"price": 49.99,
"quantity": 2,
"commission_rate": 10.0,
"status": "accepted"
},
{
"id": 2,
"name": "Wireless Mouse",
"ean": "9876543210987",
"price": 80.0,
"quantity": 1,
"commission_rate": 12.5,
"status": "accepted"
}
],
"status": "accepted",
"reward": "pending",
"total_commission": 20.0,
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T14:30:00Z"
},
{
"id": "9NJA3YVNGW8",
"tracking_id": "3Q0OZW3IFOHTIZWT",
"basket_price": 49.5,
"affiliate_id": 38,
"basket_items": [
{
"id": 3,
"name": "USB Cable",
"ean": "5432109876543",
"price": 49.5,
"quantity": 1,
"commission_rate": 8.0,
"status": "pending"
}
],
"status": "pending",
"total_commission": 0.0,
"reward": "pending",
"created_at": "2024-01-15T12:15:00Z",
"updated_at": "2024-01-15T12:15:00Z"
}
],
"current_page": 1,
"total_results": 150,
"total_pages": 5
}
401
Authentication required
application/jsonExample:
{
"status": "error",
"message": "Not authenticated or insufficient permissions"
}
404
Merchant not found or page not found
application/jsonExample:
{
"status": "error",
"message": "Merchant not found"
}
500
Internal server error
application/jsonstatusstring
Example:
errormessagestring
Example:
Failed to fetch transactionserrorstring
Example:
Database connection failed