Export transactions is an asynchronous process that generates a CSV file with the data about credit movements on all gift cards or point movements on all loyalty cards in a given campaign.
To export transactions:
id to track the export status with the GET Export method.status field has the DONE value, the export file has been generated.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. | Gift cards: - CREDITS_REMOVAL- CREDITS_ADDITION- CREDITS_REFUND- CREDITS_REDEMPTIONLoyalty cards: - 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: CREDITS_ADDITION, CREDITS_REMOVAL, 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: CREDITS_ADDITION, CREDITS_REMOVAL, 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 Loyalty Campaign Transactions
For loyalty campaigns, this method works in the same way the POST Export Loyalty Campaign Transactions does.
The access token received from the authorization server in the OAuth 2.0 flow.
You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
"camp_rRsfatlwN7unSeUIJDCYedal"
Specify the parameters for the transaction export.
Request body schema for POST v1/campaigns/{campaignId}/transactions/export.
List of available parameters containing fields and filters that can be exported for transactions in a gift card or loyalty card campaign, along with the sorting order of the returned data.
An object representing an export.
Response body schema for POST v1/campaigns/{campaignId}/transactions/export.
This is an object representing an export.
Unique export ID.
"exp_FFfp9o7daWuJqJCKp5xqqli4"
The type of object being represented. This object stores information about the export.
export Timestamp representing the date and time when the export was scheduled in ISO 8601 format.
"2022-04-28T11:23:20.922Z"
Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.
SCHEDULED The channel through which the export was triggered.
API The type of exported object.
voucher_transactions Contains the URL of the CSV file.
Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE.
"user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH"