Skip to main content
POST
/
v1
/
loyalties
/
members
/
{memberId}
/
transactions
/
export
Export Loyalty Card Transactions
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/loyalties/members/{memberId}/transactions/export \
  --header 'Authorization: Bearer <token>' \
  --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",
      "related_transaction_id"
    ]
  }
}'
{
"id": "exp_8Fwd6Z8NS67ZH314KRtm5xXE",
"object": "export",
"created_at": "2023-03-21T13:50:43.286Z",
"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"
],
"filters": {
"voucher_id": {
"conditions": {
"$in": [
"LOYALTY-CARD-2IAoDNF"
]
}
}
}
},
"result": null,
"user_id": null
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

memberId
string
required

A unique code identifying the loyalty card that you are looking to export transaction data for.

Example:

"MmFAzfDe"

Body

application/json

Specify the parameters and filters for the transaction export.

Request body schema for POST v1/loyalties/members/{memberId}/transactions/export and for POST v1/loyalties/{campaignId}/members/{memberId}/transactions/export.

parameters
object

List of available fields and filters that can be exported with an order along with the sorting order of the returned data.

Response

Returns an export object.

Response body schema for POST v1/loyalties/members/{memberId}/transactions/export and for POST v1/loyalties/{campaignId}/members/{memberId}/transactions/export.

id
string
required

Unique export ID.

object
enum<string>
default:export
required

The type of object being represented. This object stores information about the export.

Available options:
export
created_at
string<date-time>
required

Timestamp representing the date and time when the export was scheduled in ISO 8601 format.

status
enum<string>
default:SCHEDULED
required

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.

Available options:
SCHEDULED
result
null
required

Contains the URL of the CSV file.

user_id
string
required

Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE.

exported_object
enum<string>
default:voucher_transactions
required

The type of object to be exported.

Available options:
voucher_transactions
channel
string

The channel through which the export was triggered.

parameters
object

List of available fields and filters that can be exported with an order along with the sorting order of the returned data.

I