Export Object

Data model description

AttributesDescriptionExample
id

Unique export ID.

exp_FFfp9o7daWuJqJCKp5xqqli4

object

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

created_at

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

2022-04-28T11:23:20.922Z

status

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 values: SCHEDULED, IN_PROGRESS, DONE, ERROR
channel

The channel through which the export was triggered.

Available values: API, WEBSITE
exported_object

The type of exported object.

Available values: order, voucher, publication, redemption, customer, points_expiration, voucher_transactions
parametersAny of:

order

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: -created_at, created_at, updated_at, -updated_at, status, -status
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:

FieldDefinitionExample Export
idUnique order ID.ord_A69RIxEdRsPuC6i8gFGVHUft
source_idUnique order source ID.8638
created_atTimestamp in ISO 8601 format representing the date and time when the order was created.2022-03-09T09:16:32.521Z
updated_atTimestamp in ISO 8601 format representing the date and time when the order was last updated.2022-03-09T09:16:33.331Z
statusOrder status.PAID, CREATED, FULFILLED, CANCELED
amountTotal amount of order items.7700
discount_amountRepresents total amount of the discount applied to whole cart.500
items_discount_amountRepresents total amount of the discount applied to order line items.100
total_discount_amountAll discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart.600
total_amountTotal order amount after applying all discounts.7100
customer_idCustomer unique ID.cust_2G4fUQdCXUqp35nXNleav7bO
referrer_idReferrer unique ID.cust_IkrTR674vvQvr9a4rDMiqglY
metadataReturns all order metadata.Response will include all order metadata.
metadata.XWhere X is the name of a particular order metadata property.The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. Read more here.
Available values: id,source_id,created_at,updated_at,status,amount,discount_amount,items_discount_amount,total_discount_amount,total_amount,customer_id,referrer_id,metadata
filtersAny of:

Filter by status

AttributesDescriptionExample
status
junction

Filter by order source ID

AttributesDescriptionExample
source_id
junction

Filter by order amount

AttributesDescriptionExample
amount
junction

Filter by order total amount

AttributesDescriptionExample
total_amount
junction

Filter by order discount amount

AttributesDescriptionExample
discount_amount
junction

Filter by order total discount amount

AttributesDescriptionExample
total_discount_amount
junction

Filter by order items discount amount

AttributesDescriptionExample
items_discount_amount
junction

voucher

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: created_at, -created_at, updated_at, -updated_at, code, -code
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields:

FieldDefinitionExample Export
idUnique voucher ID.v_HSnGD2vNIHYighTQxwcB4dtVAv8VOmZD
codeUnique voucher code.WELCOME100
voucher_typeType of voucher.DISCOUNT_VOUCHER, GIFT_VOUCHER, LOYALTY_CARD
valueValue of voucher.DISCOUNT_VOUCHER : amount, percent, unit
GIFT_VOUCHER: amount left to spend
LOYALTY_CARD: available usable points
discount_typeThe type of discount for a DISCOUNT_VOUCHER.AMOUNT, PERCENT, UNIT, FIXED
campaignUnique campaign name.Summer Discounts 20% off
categoryTag defining the category that this voucher belongs to.
start_dateStart date defines when the code starts to be active. Activation timestamp in ISO 8601 format. Voucher is inactive before this date.2020-12-10T23:00:00.000Z
expiration_dateExpiration date defines when the code expires. Expiration timestamp in ISO 8601 format. Voucher is inactive after this date.2023-12-31T23:00:00.000Z
gift_balanceAmount left to spend.1000
loyalty_balanceAvailable usable points.2000
redemption_quantityMaximum number of times a voucher can be redeemed.2
redemption_countTotal redemptions.59
activeBoolean indicating whether the voucher is available for use.true, false
qr_codeURL to QR representation of encrypted code.
bar_codeURL to barcode representation of encrypted code.
is_referral_codeBoolean indicating whether the voucher is a referral code.true, false
created_atTimestamp in ISO 8601 format representing the date and time when the voucher was created.2022-04-14T09:55:46.814Z
updated_atTimestamp in ISO 8601 format representing the date and time when the voucher was last updated.2022-04-14T10:02:18.036Z
validity_timeframe_intervalDefines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day.P2D
validity_timeframe_durationDefines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour.PT1H
validity_day_of_weekArray corresponding to the particular days of the week in which the voucher is valid."1,2,3,4,5"
discount_amount_limitFor PERCENT discount type, this is the maximum threshold allowed to be deducted.50
campaign_idParent campaign ID.camp_7s3uXI44aKfIk5IhmeOPr6ic
additional_infoAn optional field to keep any extra textual information about the code such as a code description and details.
customer_idUnique customer ID of the assigned owner to whom the voucher was published.cust_7iUa6ICKyU6gH40dBU25kQU1
discount_unit_typeFor UNIT discount type, either a shipping or product ID for a UNIT discount with one product.prod_5h1pp1ng, prod_0a9f9aeddb019a42db
discount_unit_effectUNIT discount effect.ADD_MANY_ITEMS, ADD_MISSING_ITEMS,ADD_NEW_ITEMS
customer_source_idUnique customer source id of the assigned owner to whom the voucher was published.[email protected]
metadataReturns all voucher metadata.Response will include all voucher metadata.
metadata.XWhere X is the name of a particular voucher metadata property.The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Voucher. Read more here.
Available values: code,voucher_type,value,discount_type,campaign,category,start_date,expiration_date,gift_balance,loyalty_balance,redemption_quantity,redemption_count,active,qr_code,bar_code,id,is_referral_code,created_at,updated_at,validity_timeframe_interval,validity_timeframe_duration,validity_day_of_week,discount_amount_limit,campaign_id,additional_info,customer_id,discount_unit_type,discount_unit_effect,customer_source_id,metadata
filters

Data filters used to narrow the data records to be returned in the export. You can filter the following parameters:

  • categories

  • vouchers

  • type

  • holder_id

  • is_referral_code

  • published_for_customer_id

  • validity_timeframe

  • category_ids

publication

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: id, -id, voucher_code, -voucher_code, tracking_id, -tracking_id, customer_id, -customer_id, created_at, -created_at, channel, -channel
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields:

FieldDefinitionExample Export
voucher_codeUnique voucher code.WELCOME100
customer_idCustomer unique ID.cust_7iUa6ICKyU6gH40dBU25kQU1
customer_source_idUnique customer source id of the assigned owner to whom the voucher was published.[email protected]
dateTimestamp in ISO 8601 format representing the date and time when the voucher was published.2022-04-28T10:19:30.792Z
channelPublication channel.voucherify-website
campaignUnique campaign name.Summer Discounts 20% off
is_winner
metadataReturns all publication metadata.Response will include all publication metadata.
metadata.XWhere X is the name of a particular publication metadata property.The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Publication. Read more here
Available values: voucher_code,customer_id,customer_source_id,date,channel,campaign,is_winner,metadata
filters

Data filters used to narrow the data records to be returned in the export. You can filter the following parameters:

  • failure_code

  • result

  • customer_id

  • campaign_name

  • voucher_type

  • is_referral_code

  • parent_object_id

  • related_object_id

  • source_id

Any of:

Filter by failure code

AttributesDescriptionExample
failure_code
junction

Filter by result

AttributesDescriptionExample
result
junction

Filter by customer ID

AttributesDescriptionExample
customer_id
junction

Filter by campaign name

AttributesDescriptionExample
campaign_name
junction

Filter by voucher type

AttributesDescriptionExample
voucher_type
junction

Filter if the code is a referral code

AttributesDescriptionExample
is_referral_code
junction

Filter by parent object ID

AttributesDescriptionExample
parent_object_id
junction

Filter by related object ID

AttributesDescriptionExample
related_object_id
junction

Filter by publication source ID

AttributesDescriptionExample
source_id
junction

redemption

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: id, -id, voucher_code, -voucher_code, tracking_id, -tracking_id, customer_id, -customer_id, created_at, -created_at
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields:

FieldDefinitionExample Export
idUnique redemption ID.r_0acf3a6dae00e679c8, rf_0acf3a495740e679b8
objectObject being exported; by default redemption.redemption
dateTimestamp in ISO 8601 format representing the date and time when the voucher was redeemed.2022-03-23T08:52:24.867Z
voucher_codeUnique voucher code redeemed.WELCOME100
campaignParent campaign name of voucher if applicable.Summer Discounts 20% off
promotion_tier_idpromo_Mwy9XpA0TLctSGriM5kum0qp
customer_idUnique customer ID of redeeming customer.cust_nk0N1uNQ1YnupAoJGOgvsODC
customer_source_idUnique source ID of redeeming customer.[email protected]
customer_nameCustomer name.John Smith
tracking_idtrack_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy
order_amountTotal order amount before applying all discounts.1000
gift_amountGift credits used for redemption.10
loyalty_points12
resultTells you whether the redemption succeeded.SUCCESS, FAILURE
failure_codeInternal Voucherify code for reason why redemption failed.invalid_customer
failure_messageA human-readable message providing a short description explaining why the redemption failed.Customer must be a holder of a loyalty card.
metadataReturns all redemption metadata.Response will include all redemption metadata.
metadata.XWhere X is the name of a particular redemption metadata property.The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Redemption. Read more here
Available values: id,object,date,voucher_code,campaign,promotion_tier_id,customer_id,customer_source_id,customer_name,tracking_id,order_amount,gift_amount,loyalty_points,result,failure_code,failure_message,metadata
filters

Data filters used to narrow the data records to be returned in the export. You can filter the following parameters:

  • voucher_code

  • related_object_id

  • related_object_parent_id

  • parent_redemption_id

  • failure_code

  • result

  • object

  • customer_id

  • campaign_name

  • user_login

customer

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: name, -name, id, -id, email, -email, source_id, -source_id, created_at, -created_at, updated_at, -updated_at
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields:

FieldDefinitionExample Export
nameCustomer name.John Smith
idUnique customer ID.cust_J1CDUdbqn5Exva8ASWk1Fq0j
descriptionAn arbitrary string that you can attach to a customer object.Customer requesting to be added to VIP tier.
emailCustomer's email.[email protected]
source_idUnique custom customer identifier.[email protected]
created_atTimestamp in ISO 8601 format representing the date and time when the customer was created.2022-02-03T13:10:11.928Z
address_cityCityHouston
address_stateStateTX
address_line_1First line of customer's address.72738 Main St
address_line_2Second line of customer's address.Bld 2, Apt 4
address_countryCountryUnited States of America
address_postal_codePostal code (ZIP code)77042-4143
redemptions_total_redeemedTotal customer redemptions.5
redemptions_total_failedTotal customer failed redemptions.2
redemptions_total_succeededTotal customer succeeded redemptions.3
redemptions_total_rolled_backTotal customer redemptions that were rolled back.3
redemptions_total_rollback_failedTotal customer redemptions that were unsuccessfully rolled back.2
redemptions_total_rollback_succeededTotal customer redemptions that were successfully rolled back.1
orders_total_amountTotal sum of order amounts over customer lifetime. Value is multiplied by 100 to precisely represent 2 decimal places.10000 (represents $100)
orders_total_countTotal number of customer orders. Value is multiplied by 100 to precisely represent 2 decimal places.2
orders_average_amountAverage amount spent on orders. Value is multiplied by 100 to precisely represent 2 decimal places.50
orders_last_order_amountHow much did the customer spend on their last order. Value is multiplied by 100 to precisely represent 2 decimal places.50
orders_last_order_dateWhen was the last customer order; timestamp in ISO 8601 format representing the date and time.2022-02-03T13:17:30.630Z
loyalty_pointsSum of customer's loyalty points to go across all loyalty cards.
loyalty_referred_customersHow many customers were referred by this customer.
updated_atTimestamp in ISO 8601 format representing the date and time when the customer was updated.2022-02-14T14:10:14.305Z
phoneCustomer's phone number.+1 (294) 752-1846
birthdayCustomer's birthday.2022-01-01
birthdateCustomer's birthdate.2022-04-29
metadataReturns all customer metadata.Response will include all customer metadata.
metadata.XWhere X is the name of a particular customer metadata property.The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Customer. Read more here
Available values: name,id,description,email,source_id,created_at,address_city,address_state,address_line_1,address_line_2,address_country,address_postal_code,redemptions_total_redeemed,redemptions_total_failed,redemptions_total_succeeded,redemptions_total_rolled_back,redemptions_total_rollback_failed,redemptions_total_rollback_succeeded,orders_total_amount,orders_total_count,orders_average_amount,orders_last_order_amount,orders_last_order_date,loyalty_points,loyalty_referred_customers,updated_at,phone,birthday,metadata,birthdate
filters

Data filters used to narrow the data records to be returned in the export. You can filter the following parameters:

  • name (string)

  • email (string)

  • phone (string)

  • metadata (json)

  • metadata.X (?)

  • address (json)

  • address.state (string)

  • address.country (string)

  • address.postal_code (string)

  • birthday (string - date-time)

  • birthdate (string date-time)

  • created_at (date)

  • source_id (string)

  • system.metadata (json)

  • system.metadata.source (string)

  • system.metadata.consents.unsubscribed (boolean)

  • loyalty_points (json)

  • loyalty (json)

  • summary.orders.total_amount (json)

  • summary.orders.last_order_date (date)

  • summary.orders.last_order_amount (json)

  • summary.redemptions.gift.redeemed_amount (integer)

  • summary.redemptions.total_succeeded (integer)

  • events.cart_abandoned.last_occurred (integer)

  • events.newsletter_subscribed.count (integer)

  • events.sign_up.last_occurred (integer)

points expiration

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: expires_at, -expires_at
fields

Array of strings containing the data that was exported. These fields define the headers in the CSV file.

The array can be a combintation of any of the following available fields:

FieldDefinitionExample Export
idLoyalty points bucket ID.lopb_Wl1o3EjJIHSNjvO5BDLy4z1n
campaign_idCampaign ID of the parent loyalty campaign.camp_7s3uXI44aKfIk5IhmeOPr6ic
voucher_idVoucher ID of the parent loyalty card.v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655
statusStatus of the loyalty points bucket.ACTIVE or INACTIVE
expires_atTimestamp in ISO 8601 format representing the date when the points expire.2022-06-30
pointsNumber of points.1000
Available values: id,campaign_id,voucher_id,status,expires_at,points
filters

Data filters used to narrow the data records to be returned in the export. You can filter the following parameters:

  • campaign_id

  • voucher_id

Any of:

Filter by campaign ID

AttributesDescriptionExample
campaign_id
junction

Filter by voucher ID

AttributesDescriptionExample
voucher_id
junction

gift card transactions

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: -created_at, created_at
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:

FieldDefinitionExample Export
idUnique transaction ID.vtx_0cb7811f1c07765800
typeTransaction type.- CREDITS_REMOVAL
- CREDITS_ADDITION
- CREDITS_REFUND
- CREDITS_REDEMPTION
source_idUnique transaction source ID.8638
reasonContains the reason for the transaction if one was included originally.
balanceThe gift card balance after the transaction.
amountThe amount of gift card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction.
created_atTimestamp in ISO 8601 format representing the date and time when the transaction was created.2022-03-09T09:16:32.521Z
voucher_idUnique Voucher ID.v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp
campaign_idParent campaign ID.camp_FNYR4jhqZBM9xTptxDGgeNBV
sourceChannel through which the transaction was initiated.API
detailsMore detailed information stored in the form of a JSON.Provides more details related to the transaction in the form of an object.
Available values: id,type,source_id,reason,balance,amount,created_at,voucher_id,campaign_id,source,details
filters

loyalty card transactions

AttributesDescriptionExample
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Available values: -created_at, created_at
fields

Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:

FieldDefinitionExample Export
idUnique transaction ID assigned by Voucherify.vtx_0cb7811f1c07765800
typeTransaction type.- POINTS_EXPIRATION
- POINTS_ADDITION
- POINTS_REMOVAL
- POINTS_TRANSFER_OUT
- POINTS_ACCRUAL
- POINTS_REFUND
- POINTS_REDEMPTION
source_idCustom source ID of the transaction if one was included originally.source_id_custom
reasonContains the reason for the transaction if one was included originally.
balanceThe loyalty card balance after the transaction.
amountThe amount of loyalty points being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction.
created_atTimestamp in ISO 8601 format representing the date and time when the transaction was created.2022-03-09T09:16:32.521Z
voucher_idUnique Voucher ID.v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp
campaign_idParent campaign ID.camp_FNYR4jhqZBM9xTptxDGgeNBV
sourceChannel through which the transaction was initiated.- API
- voucherify-web-ui
- Automation
detailsMore detailed information stored in the form of a JSON.Provides more details related to the transaction in the form of an object.
related_transaction_idUnique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card.vtx_0c9afe802593b34b80
Available values: id,type,source_id,reason,balance,amount,created_at,voucher_id,campaign_id,details,related_transaction_id
filters
result

Contains the URL of the CSV file.

AttributesDescriptionExample
url

URL of the CSV file location. It contains the token used for authorization in the Download export method.

user_id

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

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

Language
URL
Click Try It! to start a request and see the response here!