Export points transactions
Description
Creates a task to generate a report of transactions for the selected points currency over a specified period. The response returns a task ID that can be used to track the task status.
Request URL
Method: POST
https://example.com/api/v1.1/loyalty/transactions_export
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abc123def456" | Yes | API token |
| loyalty_program_id | int | 123 | Yes | Loyalty program ID |
| points_currency_eid | string | "bonus_points" | Yes, if points_currency_iid is not provided | External points currency ID |
| points_currency_iid | int | 1 | Yes, if points_currency_eid is not provided | Internal points currency ID |
| from_id | string | "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8" | No | Transaction ID (UUID) for pagination; if omitted, export starts from the beginning of the period |
| date_from | string (RFC3339) | "2023-09-01T00:00:00Z" | Yes | Period start date (inclusive) |
| date_to | string (RFC3339) | "2023-09-30T23:59:59Z" | Yes | Period end date (inclusive) |
Request example
- JSON
- XML
{
"token": "abc123def456",
"loyalty_program_id": 123,
"points_currency_eid": "bonus_points",
"date_from": "2023-09-01T00:00:00Z",
"date_to": "2023-09-30T23:59:59Z",
"from_id": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8"
}
<xml>
<token>abc123def456</token>
<loyalty_program_id>123</loyalty_program_id>
<points_currency_eid>bonus_points</points_currency_eid>
<date_from>2023-09-01T00:00:00Z</date_from>
<date_to>2023-09-30T23:59:59Z</date_to>
<from_id>a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8</from_id>
</xml>
Response example
- JSON
- XML
{
"data": {
"task_id": "task_b2f9fd6a-2499-4a63-b592-f15d4e3b69c5"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<task_id>task_b2f9fd6a-2499-4a63-b592-f15d4e3b69c5</task_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| task_id | string (UUID) | Export task ID |