š Transaction Report (Server-to-Server)
POST {{API_BASE_URL}}/api/v1/report-generator/s2s
Note: Please contact your Facilero account manager to obtain the correct production or sandbox API base URL.
š§¾ Overview
This endpoint allows merchants to programmatically download transaction reports for a specific date range in either CSV or XLS format.
It replicates the Export Transactions feature available in the Facilero Merchant Portal, but is designed for server-to-server (S2S) use. This is ideal for merchants looking to automate:
- Reconciliation workflows
- Accounting/reporting processes
- Internal or third-party integrations
š Authentication & Headers
| Header Name | Required | Description |
|---|---|---|
x-merchant-key | ā | Your public merchant API key |
x-merchant-secret | ā | Your private merchant API secret |
Content-Type | ā | Must be set to application/json |
š¤ Request Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dateFrom | string | Yes | Start date (YYYY-MM-DD) |
dateTo | string | Yes | End date (YYYY-MM-DD) |
dateSource | string | Yes | Date types: createdDate (default) or lastModifiedDate |
format | string | No | Report format: CSV (default) or XLS |
š„ Response
- Success: HTTP
200 OK
Returns the report file as a binary stream. - Error: HTTP
4xx/5xx
Returns a JSON error message.
ā
Example ā Download CSV with Original Filename
curl -OJ '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
-H 'x-merchant-key: YOUR_KEY' \
-H 'x-merchant-secret: YOUR_SECRET' \
-H 'Content-Type: application/json' \
--data '{"dateFrom":"2025-07-05 00:00:00","dateTo":"2025-07-06 23:59:59", "dateSource":"createdDate"}'
This will save the file using the name provided by the API (e.g.,transaction-report-YYYY-MM-DD.csv), assuming theContent-Dispositionheader is returned.
š Optional ā Download XLS Format
curl -OJ '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
-H 'x-merchant-key: YOUR_KEY' \
-H 'x-merchant-secret: YOUR_SECRET' \
-H 'Content-Type: application/json' \
--data '{"dateFrom":"2025-07-01","dateTo":"2025-07-07","dateSource":"createdDate" ,"format":"XLS"}'ā Error Examples
1. Missing Fields
curl -X POST '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
-H "Content-Type: application/json" \
-H "x-merchant-key: YOUR_KEY" \
-H "x-merchant-secret: YOUR_SECRET" \
-d '{"dateFrom":"","dateTo":"2025-07-07"}'Response:
{
"error": "Invalid or missing 'dateFrom' field"
}2. Invalid Credentials
curl -X POST '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
-H "Content-Type: application/json" \
-H "x-merchant-key: INVALID" \
-H "x-merchant-secret: INVALID" \
-d '{"dateFrom":"2025-07-01","dateTo":"2025-07-07"}'Response:
{
"error": "Invalid merchant credentials"
}š Final Notes
- This API is designed for automation, not manual use ā perfect for scheduled reconciliation or integration with external systems.
- The output format matches what is downloadable from the Merchant Portal.
- Include timestamps in your date range if you need more precise filtering.
- For access to the sandbox or production environment, please contact your Facilero account manager.

