Export Voucher Transactions
curl --request POST \
--url https://{cluster}.voucherify.io/v1/vouchers/{code}/transactions/export \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"parameters": {
"order": "-created_at",
"fields": [
"id",
"type",
"source_id",
"reason",
"balance",
"amount",
"created_at",
"voucher_id",
"campaign_id",
"details",
"source"
]
}
}
'{
"id": "exp_ARi2UbRjgfrHQJoVcKFrBUgA",
"object": "export",
"created_at": "2023-05-16T08:30:21.496Z",
"status": "SCHEDULED",
"channel": "API",
"exported_object": "voucher_transactions",
"parameters": {
"order": "-created_at",
"fields": [
"id",
"type",
"source_id",
"reason",
"balance",
"amount",
"created_at",
"voucher_id",
"campaign_id",
"details",
"related_transaction_id",
"source"
],
"filters": {
"voucher_id": {
"conditions": {
"$in": [
"HRwc0oHz"
]
}
}
}
},
"result": null,
"user_id": null
}Export Voucher Transactions
Export transactions that are associated with credit movements on a gift card or loyalty card (legacy loyalty).
| Field | Definition | Example Export |
|---|---|---|
| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |
| type | Transaction type. | - CREDITS_REMOVAL - CREDITS_ADDITION - CREDITS_REFUND - CREDITS_REDEMPTION - POINTS_ACCRUAL - POINTS_REDEMPTION- POINTS_REFUND- POINTS_ADDITION- POINTS_REMOVAL- POINTS_EXPIRATION- POINTS_TRANSFER_IN- POINTS_TRANSFER_OUT |
| source_id | Unique transaction source ID. | 8638 |
| reason | Contains the reason for the transaction if one was included originally. | |
| balance | The gift card or loyalty card (legacy loyalty) balance after the transaction. | |
| amount | The amount of gift card or loyalty card (legacy loyalty) 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. | 2022-03-09T09:16:32.521Z |
| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |
| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |
| source | Channel through which the transaction was initiated. | API |
| details | More detailed information stored in the form of a 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 |
POST
/
v1
/
vouchers
/
{code}
/
transactions
/
export
Export Voucher Transactions
curl --request POST \
--url https://{cluster}.voucherify.io/v1/vouchers/{code}/transactions/export \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"parameters": {
"order": "-created_at",
"fields": [
"id",
"type",
"source_id",
"reason",
"balance",
"amount",
"created_at",
"voucher_id",
"campaign_id",
"details",
"source"
]
}
}
'{
"id": "exp_ARi2UbRjgfrHQJoVcKFrBUgA",
"object": "export",
"created_at": "2023-05-16T08:30:21.496Z",
"status": "SCHEDULED",
"channel": "API",
"exported_object": "voucher_transactions",
"parameters": {
"order": "-created_at",
"fields": [
"id",
"type",
"source_id",
"reason",
"balance",
"amount",
"created_at",
"voucher_id",
"campaign_id",
"details",
"related_transaction_id",
"source"
],
"filters": {
"voucher_id": {
"conditions": {
"$in": [
"HRwc0oHz"
]
}
}
}
},
"result": null,
"user_id": null
}Authorizations
X-App-Id & X-App-TokenX-Voucherify-OAuth
Scopes
Path Parameters
Body
application/json
Specify the parameters for the camapign transaction export.
Response
Returns an export object.
Response body schema for POST v1/vouchers/{code}/transactions/export.

