Export configuration
This topic describes how to configure data exports using the Rebilly API.
Date ranges
Use date ranges to limit the export data to a specific time frame. To ensure that the data is current and processed quickly, always set date ranges for data exports.
Relative date range examples
Export data from yesterday:
'dateRange': { 'start': 'yesterday', 'end': 'today' }
Export data from the previous month:
'dateRange': { 'start': 'first day of last month midnight', 'end': 'first day of this month midnight' }
Export data from the last three days, starting at midnight:
'dateRange': { 'start': '3 days ago midnight', 'end': 'now' }
Additional valid date inputs:
yesterday
midnight
today
now
noon
tomorrow
back of
front of
first day of
last day of
ago
dayname
Absolute date range examples
Do not use absolute date ranges to create a recurring schedule for a data export. If an absolute range is used, it will result in the same exact data exporting each period.
When supplying a start
or end
date in absolute format, use the ISO 8601 format.
From 2018-01-21
at 15:15:15
until now:
This example combines absolute and relative dates.
'dateRange': { 'start': '2018-01-21T15:15:15Z', 'end': 'now' }
From 2018-01-21
at 15:15:15
until 2018-02-21
at 15:15:15
:
This example uses two absolute dates.
'dateRange': { 'start': '2018-01-21T15:15:15Z', 'end': '2018-02-21T15:15:15Z' }
Date range field example
By default, the date range applies to the time at which a transaction is processed. To select another field, use the field
attribute. This example describes how to apply a date range filter to the time at which a transaction is created.
For more information, see Fields.
'dateRange': { 'start': 'yesterday', 'end': 'today', 'field': 'createdTime' }
Fields
Use fields to specify the data to export in your request.
'fields': ['id', 'email', 'firstName', 'lastName', 'createdTime', 'averageValue/amount']
If you need a field that is not available in Rebilly, create your own Custom fields.
Arguments
Use arguments to filter, search, and sort the data in your export request.
For more detailed information on how to use filters, see Search filters.
'arguments': { 'filter': 'string', 'sort': 'string', 'q': 'string' }
Filter by approved:
'arguments': { 'filter': 'result:approved' }
Filter voids and refunds:
To filter by multiple values for the same field, separate filter names using a comma.
'arguments': { 'filter': 'type:void,refund' }
Filter approved voids and refunds:
To filter by multiple values on more than one field, separate filter names using a semicolon. For more information, see Compound filters.
'arguments': { 'filter': 'result:approved;type:void,refund' }