Transactions API Documentation
Overview
The Transactions API provides access to affiliate transaction data from major networks including FlexOffers, CJ, Rakuten, Impact, Awin, Partnerize, Pepperjam, and ShareASale. This endpoint is optimized for AI agents and analytics with offset-style pagination, Searchkick-backed filtering, and comprehensive sort options.
Key Features
- Offset Pagination - Predictable
meta.current_page,next_page, andper_pagepagination - Advanced Filtering - Filter by date range, advertiser, network, commission amount, and more
- Analytics Ready - Structured data perfect for AI analysis and reporting
- Real-time Data - Always up-to-date transaction information
- Multi-Network - Unified view across all affiliate networks
Endpoint Details
Base Endpoint
GET /api/v1/transactions
Retrieve paginated list of transactions
Authentication
API Playground
Use the table below to see how to perform common actions. Click Test to run a request and preview the JSON response, or Open to open the URL in a new tab. Sign in to enable live testing with your API key.
| Action | Method | Endpoint | Description |
|---|---|---|---|
| List transactions (first page) | GET |
/api/v1/transactions |
Offset pagination with page/per_page or limit. |
| Get single transaction | GET |
/api/v1/transactions/:id |
Fetch one transaction by ID. |
| Filter by advertiser | GET |
/api/v1/transactions?advertiser_id=... |
Transactions for an advertiser (ID or slug). |
| Filter by date range | GET |
/api/v1/transactions?start_date=...&end_date=... |
Filter by start_date and end_date (YYYY-MM-DD). |
| Filter by network | GET |
/api/v1/transactions?network_id=... |
Transactions for a specific network ID. |
| Filter by currency | GET |
/api/v1/transactions?currency=USD |
Filter by commission/sale currency. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
integer | No | Number of results per page (clamped to 500, default: 20) |
page |
integer | No | Offset pagination page number (default: 1). |
per_page |
integer | No | Offset pagination page size (clamped to 500). Use with page. If omitted, limit acts as the page-size alias. |
advertiser_id |
string | No | Filter transactions by advertiser (supports numeric ID or slug) |
advertiser_slug |
string | No | Legacy alias for advertiser_id (supports advertiser slug) |
network_id |
string | No | Filter by network (supports numeric ID or slug) |
network_slug |
string | No | Legacy alias for network_id (supports network slug) |
start_date |
date | No | Start date filter (YYYY-MM-DD format) |
end_date |
date | No | End date filter (YYYY-MM-DD format) |
currency |
string | No | Filter by currency (e.g., "USD", "EUR", "GBP") |
sort_by |
string | No | Sort field: transaction_date, commission_amount, sale_amount |
sort_order |
string | No | Sort direction: asc or desc |
Response Format
All responses follow a consistent JSON structure optimized for AI agents and analytics:
{
"transactions": {
"data": [
{
"id": "123",
"type": "transaction",
"attributes": {
"transaction_date": "2024-01-15",
"sale_amount": 125.5,
"commission_amount": 6.28,
"commission_rate": 5.0,
"currency": "USD",
"advertiser": {
"id": 12345,
"name": "Fashion Store",
"slug": "fashion-store"
},
"network": {
"id": 1,
"name": "FlexOffers"
}
}
}
]
},
"meta": {
"current_page": 1,
"next_page": 2,
"prev_page": null,
"per_page": 20,
"total_count": 2500,
"total_pages": 125
}
}
Examples
Basic Request
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://app.hienergy.ai/api/v1/transactions?limit=10"
Get first 10 transactions
Date Range Request
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://app.hienergy.ai/api/v1/transactions?start_date=2024-01-01&end_date=2024-01-31"
Get January 2024 transactions
High Value Request
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://app.hienergy.ai/api/v1/transactions?sort_by=commission_amount&sort_order=desc&limit=50"
Sort transactions by commission amount
Advertiser Specific
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://app.hienergy.ai/api/v1/transactions?advertiser_id=amazon&start_date=2024-01-01&end_date=2024-01-31"
Get advertiser transactions within a date range
Advanced Filtering
By Date Range
Filter transactions by specific time periods:
?start_date=2024-01-01
?end_date=2024-01-31
?start_date=2024-01-01&end_date=2024-01-31
Sorting
Sort transactions for analytics:
?sort_by=commission_amount&sort_order=desc
?sort_by=sale_amount&sort_order=desc
?sort_by=transaction_date&sort_order=asc
By Advertiser
Filter by specific advertisers:
?advertiser_id=amazon
?advertiser_id=nike
?advertiser_id=12345
By Network
Filter by affiliate network:
?network_slug=flexoffers
?network_slug=cj
?network_slug=rakuten
?advertiser_id=amazon&start_date=2024-01-01&end_date=2024-01-31&sort_by=commission_amount&sort_order=desc
Analytics Features
Summary Statistics
Each response includes aggregated analytics:
- Total transaction count
- Total sale amount
- Total commission amount
- Average commission rate
- Currency breakdown
AI-Friendly Data
Structured for AI analysis:
- Consistent JSON format
- Normalized data across networks
- Rich metadata for context
- Efficient pagination for large datasets
Pagination
The Transactions API uses offset-style pagination with page-based metadata:
How It Works
- Send
pageandper_page, or justlimitto cap page size - Read
meta.next_pageto continue - Use
include_total=truewhen you need exact totals inmeta
Pagination Response
{
"meta": {
"current_page": 1,
"next_page": 2,
"prev_page": null,
"per_page": 20,
"total_count": null,
"total_pages": null
}
}
meta in the API response.
Error Handling
The API returns structured error responses with clear codes and messages:
Common Error Codes
UNAUTHORIZED- Invalid or missing API credentialsRATE_LIMITED- Too many requestsINVALID_PARAMETERS- Invalid parameter valuesNOT_FOUND- Resource not found
Error Response Format
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key",
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456"
}
}