post https://{cluster}.voucherify.io/v1/loyalties//transactions/export
Export transactions is an asynchronous process that generates a CSV file with the data about or point movements on all loyalty cards in a given campaign.
To export transactions:
- In the export request, use parameters to select which fields will be exported, in what order, and which data will be filtered.
- Use the returned
id
to track the export status with the GET Export method. - In the GET Export method, when the returned
status
field has theDONE
value, the export file has been generated. - Use the URL in the
result
property to download the file. You must be logged to your Voucherify account on a given cluster in the browser to be able to download the file.
An export request will almost always result in a single file being generated by the system. However, when the data volume is large, the system may split the results into multiple files.
An example export file can look as follows:
Field | Definition | Example Export |
---|---|---|
id | Unique transaction ID. | vtx_0cb7811f1c07765800 |
type | Transaction type. | - POINTS_ACCRUAL - POINTS_REDEMPTION - POINTS_REFUND - POINTS_ADDITION - POINTS_REMOVAL - POINTS_EXPIRATION - POINTS_TRANSFER_IN - POINTS_TRANSFER_OUT |
source_id | Unique transaction source ID. Optional and only in manual operations: POINTS_ADDITION , POINTS_REMOVAL , POINTS_TRANSFER_OUT . | 8638 |
reason | Contains the reason for the transaction if one was included originally. Optional and only in the following manual operations: POINTS_ADDITION , POINTS_REMOVAL , POINTS_TRANSFER_OUT , POINTS_TRANSFER_IN . | Apology for sending a broken item |
balance | The gift card or loyalty card balance after the transaction. | |
amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | |
created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2024-10-09T09:16:32.521Z |
voucher_id | Unique voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |
source | Channel through which the transaction was initiated. | API |
details | More detailed information stored in the form of JSON. | Provides more details related to the transaction in the form of an object. |
related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |
Export Campaign Transactions
This method works in the same way the POST Export Campaign Transactions does, but it is limited to loyalty campaigns only. The POST Export Campaign Transactions method can also export gift card campaign transactions.