List Reports
Retrieve a paginated list of generated reports.
GET
https://api.zenpayz.com/merchant/api/v1/reportsBearer · API key
Request
Headers
| Header | Description |
|---|---|
Authorization REQUIRED | Bearer {api_key} |
X-Signature REQUIRED | HMAC-SHA256 signature |
X-Timestamp REQUIRED | ISO 8601 timestamp |
X-Secret-Salt REQUIRED | Secret salt for HMAC validation |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page OPTIONAL | integer1 | Page number |
limit OPTIONAL | integer20 | Items per page (max 100) |
type OPTIONAL | string- | Filter by report type |
status OPTIONAL | string- | Filter by status |
startDate OPTIONAL | string- | Created after (ISO 8601) |
endDate OPTIONAL | string- | Created before (ISO 8601) |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"id": "rep_550e8400-e29b-41d4-a716-446655440000",
"merchantId": "mer_xxxxx",
"type": "transactions",
"format": "csv",
"status": "completed",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"downloadUrl": "https://api.zenpayz.com/merchant/api/v1/reports/rep_550e8400/download",
"fileSize": 125000,
"rowCount": 1500,
"createdAt": "2024-01-15T10:30:00.000Z",
"completedAt": "2024-01-15T10:32:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}
Examples
- cURL
- SDK
curl -X GET "https://api.zenpayz.com/merchant/api/v1/reports?status=completed&limit=10" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"
const { data, pagination } = await zenpays.reports.list({
status: 'completed',
limit: 10,
});
console.log(`Found ${pagination.total} reports`);