This API allows management of Data Extracts in Cxense Advertising. Extracts can be generated, downloaded and deleted via this API.
Retrieving the list of Extracts
GET
Retrieves a list of details of available Extract. Details returned include the type, date range, locale, currency code and status of the extract. Use the Extract File API to download the actual Data Extract.
|
Parameters:
-
cxadbaseurl - the base URL of the Cxense Advertising system
-
extractType - optional filter for type - return extracts that match the type (ACCOUNT_BALANCES, ACCOUNT_LOW_BUDGET, ACCOUNT_TOTALS, ACCOUNT_TRANSACTIONS, ADVERTISER_CREATIVE_PERFORMANCE, ADVERTISER_CAMPAIGN_PERFORMANCE, INVENTORY_DISTRIBUTION or OPERATIONAL_FINANCE)
-
startDate - option filter for start date - returns extracts that have a start date after this startDate
-
endDate - option filter for end date - returns extracts that have a end date before this endDate
Example command:
|
The following XML example shows the contents returned from a typical GET call:
|
Individual Extracts
GET
Retrieves details of a specific Extract. Details returned include the type, date range, locale, currency code and status of the extract. Use the Extract File API to download the actual Data Extract.
|
Parameters:
-
cxadbaseurl - the base URL of the Cxense Advertising system
-
extractId - the unique id for the extract to be retrieved.
Example command:
|
The following XML example shows the contents returned from a typical GET call:
|
POST
Requests a new extract to be generated based on the parameters provided.
|
Parameters:
-
cxadbaseurl - the base URL of the Cxense Advertising system
This XML example shows the contents required to be supplied for a POST call:
|
Example command:
|
Fields
|
Required |
|---|
|
startDate |
|
endDate |
|
timeZoneId |
|
currencyCode |
|
locale |
|
Optional |
|---|
|
userId |
|
baseUrl |
DELETE
Remove an existing extract.
|
Parameters:
-
cxadbaseurl - the base URL of the Cxense Advertising system
-
extractId - the unique id for the extract to be deleted.
Requested extracts in progress cannot be removed. The DELETE will return successfully; however, the extract will not be removed if the extract status is:
|
For removal an extract status must be:
<cx:status>COMPLETE</cx:status>
Example command:
|
Individual Extract Files
GET
Retrieves the actual extract data file. This file is streamed as a zip compressed csv text file. Only extracts with a status of COMPLETED have files available for download.
|
Parameters:
-
cxadbaseurl - the base URL of the Cxense Advertising system
-
extractId - the unique id for the extract to be retrieved.
Example command:
|
This API method does not return any XML as only the streamed file is returned.
Email Notifications
The following fields are used for email notifications:
-
userId - the user id of the user to email when the extract is complete.
-
baseUrl - the url to use for the download link in the email. This is appended with the path to the extract download page in Cxense Advertising - manage/finance/extract/{extractId}
Both these fields are optional. If userId is not present then no email will be sent. If baseUrl is not present then an email without a download link will be sent.