Reporting Frontend API that allows you to pull your transaction data into your own back office system. You can request aggregated or line by line transaction data; include Timezone, date/time and specify from a large number of available fields. Data can be retrieved as JSON, CSV, XLS, XLSX.
Reporting API account required, please ask our Client Management team if you would like this enabled.
Report Metadata
The report metadata determines the fields that are available for reporting and the filters that can be used. For a full list of the available reporting fields you will need to call the metadata endpoint (see example below). There are currently over 140 fields available.
Custom Fields
You can also report on custom fields if they are configured on your account. When you request the report metadata, your configured custom fields will be returned and will contain the available filters which are based on the data type of the custom field. The custom fields can then be used in the search request like any other field. Note that to prevent name clashes with the other available report fields custom fields are all prefixed with ‘custom_field_’ when used in reporting. See below for full API examples.
GET /reporting/transactions/metadata
HTTP/1.1 200
{
"description": "Reporting API Metadata",
"version": "1.0",
"fields": [
{
"field": "txn_volume",
"description": "Number of Transactions",
"type": "NUMBER",
"filters": [
"EQUALS",
"NOT_EQUALS",
"GT",
"GTE",
"IN",
"NOT_IN",
"LT",
"LTE"
]
},
{
"field": "txn_id",
"description": "Transaction ID",
"type": "NUMBER",
"filters": [
"EQUALS",
"NOT_EQUALS",
"GT",
"GTE",
"IN",
"NOT_IN",
"LT",
"LTE"
]
},
...
]
}
GET /reporting/transactions/metadata
HTTP/1.1 200
{
"description": "Reporting API Metadata",
"version": "1.0",
"fields": [
{
"field": "txn_volume",
"description": "Number of Transactions",
"type": "NUMBER",
"filters": [
"EQUALS",
"NOT_EQUALS",
"GT",
"GTE",
"IN",
"NOT_IN",
"LT",
"LTE"
]
},
{
"field": "txn_id",
"description": "Transaction ID",
"type": "NUMBER",
"filters": [
"EQUALS",
"NOT_EQUALS",
"GT",
"GTE",
"IN",
"NOT_IN",
"LT",
"LTE"
]
},
...
{
"field": "custom_field_myCustomField",
"description": "My custom field",
"type": "STRING",
"filters": [
"EQUALS",
"NOT_EQUALS",
"IN",
"NOT_IN",
"IS_NULL",
"IS_NOT_NULL"
]
}
]
}
POST /reporting/transactions/search
{
"limit": 2,
"startFrom": 1,
"fields": [
{
"field": "txn_id",
"display": true,
"sort": "ASC",
"sortOrder": 2,
"filter": {
"operation": "NOT_EQUALS",
"value": [
"1"
]
}
},
{
"field": "txn_date",
"display": true,
"sort": "ASC",
"sortOrder": 1
}
],
"includeFieldNames": true,
"timezone": "+00:00"
}
HTTP/1.1 200
{
"status": "SUCCESS",
"reasonCode": "S100",
"reasonMessage": "Successful report",
"resultsReturned": 2,
"resultsAvailable": 20001,
"startFrom": 1,
"fieldNames": [
"txn_id",
"txn_date",
"txn_date"
],
"data": [
[
"7749",
"2021-07-21"
],
[
"10720",
"2021-08-10"
]
]
}
POST /reporting/transactions/search
{
"limit": 2,
"startFrom": 1,
"fields": [
{
"field": "txn_id",
"display": true,
"sort": "ASC",
"sortOrder": 2,
"filter": {
"operation": "NOT_EQUALS",
"value": [
"1"
]
}
},
{
"field": "txn_date",
"display": true,
"sort": "ASC",
"sortOrder": 1
},
{
"field": "custom_field_myCustomField",
"display": true,
"sort": "ASC",
"sortOrder": 3
},
],
"includeFieldNames": true,
"timezone": "+00:00"
}
HTTP/1.1 200
{
"status": "SUCCESS",
"reasonCode": "S100",
"reasonMessage": "Successful report",
"resultsReturned": 2,
"resultsAvailable": 20001,
"startFrom": 1,
"fieldNames": [
"txn_id",
"txn_date",
"txn_date",
"custom_field_myCustomField"
],
"data": [
[
"7749",
"1000-10-31",
"Custom field value 1"
],
[
"10720",
"1002-05-07",
"Custom field value 2"
]
]
}
{ | |
description | string Description of current request |
version | string Version of current metadata |
fields[{ | array of objects List of fields |
field | string Name of field |
description | string Description of field |
type | string Type of field |
values | array List of possible values if field type is ENUM |
filters | array List of possible filters applied on the field |
liveFilters | string Possible Values: EQUALS, NOT_EQUALS, GT, GTE, IN, NOT_IN, LT, LTE The current state of the transaction. |
}] | |
} |
{ | |
limit | number (Mandatory) The number of maximum results returned |
startFrom | number The start from record number, defaults to the first record number |
includeFieldNames | boolean Specify whether or not to include in the response the returned field names Default value is false If set to “true” in case of search response contains a list named “fieldNames” If set to “true” in case of export column names are present in the downloaded file |
timezone | string Possibility to translate all dates specified on the request and response to a specific timezone offset from the UTC one, for example (+01:00, -01:45) – minimum value: -12:00, maximum value: +14:00 – when timezone set on request: – all values in response are transformed in this timezone – if datetime filter value present 1. when no timezone specified on filter value (which is in ISO format) apply timezone from request on filter value when searching in database E.g.: when “timezone” set to “+02:00” and filter value “2016-07-21T14:19:19” filter value is converted to “2016-07-21T14:19:19+02:00” and results are returned in “+02:00” timezone 2. when timezone present on filter value apply E.g.: when “timezone” set to “+02:00” and filter value “2016-07-21T14:19:19+03:00” filter value is not changed “2016-07-21T14:19:19+03:00” and results are returned in “+02:00” timezone 3. when relative datetime, relative date or relative time, timezone is not applied relative datetime is relative to the moment of the request in UTC E.g.: when “timezone” set to “+02:00” filter value is “[-2d][-5h]” current datetime in UTC is “2016-08-18T14:30:00” filter value is converted to “2016-08-16T09:30:00” and results are returned in “+02:00” timezone – when no timezone set: – values in response are returned in UTC E.g.: when no “timezone” specified on request and filter value “2016-07-21T14:19:19” filter value is converted to “2016-07-21T14:19:19+00:00” and results are returned in UTC(+00:00) timezone E.g.: when no “timezone” specified on request and filter value “2016-07-21T14:19:19-02:00” filter value is not changed “2016-07-21T14:19:19-02:00” and results are returned in UTC(+00:00) timezone |
outputFormat | string Possible Values: CSV, XLS, XLSX Specify export type If not present data is retrieved as JSON |
outputFileName | string Possibility to specify the name of the export file In case of export request and file name not specified it defaults to: “TransactionReport_” + date and UTC time + specific file extension for request output format (.csv, .xls, or .xlsx) When specified the file returned will have “outputFileName” + specific file extension (.csv, .xls, or .xlsx) |
fields[{ | array of objects (Mandatory) List of fields to be retrieved The order of the retrieved fields will be set based on the order of the fields from this array |
field | string (Mandatory) Name of field |
display | boolean Possibility to specify if the field will be present in the results, or is only used for filtering or sorting |
aggregation | string Possible Values: MIN, MAX, AVERAGE, SUM, COUNT, COUNT_DISTINCT Type of aggregation desired |
sort | string Possible Values: ASC, DESC Possibility to sort by the specified field If not specified, it will be set to “ASC” If “sortOrder” is not specified, the sorting order will be prioritized based on setting this field or not. All items from array with “sort” field set, will have higher priority then the ones with the “sort” field not set Example: if array contains “sort” fields like this one [1:not_set,2:’DESC’,3:’ASC’,4:not_set] the order result will be [2:’DESC’,3:’ASC’,1:’ASC’,4:’ASC’] |
sortOrder | number Possibility to specify the sort order of the field, can also be a negative number. If not set, the sorting order will be inherit from the “sort” field rule All items from array with “sortOrder” field set, will have higher priority the the ones with the “sortOrder” field not set Example: if the request contains fields with “sortOrder” like this [1:not_set,2:’10’,3:’-7′,4:not_set] the response will contain the fields in the following order [3:’-7′,2:’10’,1:not_set,4:not_set] |
filter { | |
operation (mandatory) | string Possible Values: EQUALS, NOT_EQUALS, BETWEEN, LT, LTE, GT, GTE, IN, NOT_IN, IS_NULL, IS_NOT_NULL The name of the operation |
value | array List of strings where required – for ISO_DATE column type value can be one of the following: – relative format: “[-2y][+12m][-3d]” – relative to the current day – all or some of the above – order must be the same as in the example – date in ISO format: 2016-07-21, 20160721 2016-W29-4, 2016-203 – for ISO_TIME column type value can be one of the following: – relative format: “[-2h][+12mim][-3s]” – relative to the current time – all or some of the above – order must be the same as in the example – date in ISO format: 23:59:59 (HH-mm-ss) or 23:59 (HH-mm) – for ISO_DATETIME column type value can be one of the following: – relative format: “[-2y][+12m][-3d][-2h][+12mim][-3s]” – relative to the current datetime – all or some of the above – order must be the same as in the example – date in ISO format: 2016-07-21T14:19:19, 2016-07-21T14:19:19Z, 2016-07-21T14:19:19+02:00 |
} | |
}] | |
} |
{ | |
status | string Status of the request |
reasonCode | string Error code in case of failier |
reasonMessage | string Error message in case of failier |
resultsReturned | number Number of result returned |
resultsAvailable | number Number of total result available |
startFrom | number Results starting point |
fieldNames | array of strings List of fields to be displayed |
data | array of array of strings List of list of data equivalent of the fieldNames from the above |
} |