E-commerce events report
const url = 'https://restapi.affattr.com/v1/report/ecom_events';const options = { method: 'POST', headers: {'API-KEY': '<API-KEY>', 'Content-Type': 'application/json'}, body: '{"filter[applications]":[1],"filter[conversion_id]":"example","filter[countries]":["example"],"filter[date_from]":"example","filter[date_to]":"example","filter[environment]":"example","filter[events]":["example"],"filter[order_id]":"example","filter[partners]":[1],"filter[product_id]":"example","format":"example","limit":1,"offset":1,"page":1,"tz":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://restapi.affattr.com/v1/report/ecom_events \ --header 'API-KEY: <API-KEY>' \ --header 'Content-Type: application/json' \ --data '{ "filter[applications]": [ 1 ], "filter[conversion_id]": "example", "filter[countries]": [ "example" ], "filter[date_from]": "example", "filter[date_to]": "example", "filter[environment]": "example", "filter[events]": [ "example" ], "filter[order_id]": "example", "filter[partners]": [ 1 ], "filter[product_id]": "example", "format": "example", "limit": 1, "offset": 1, "page": 1, "tz": "example" }'Order, OrderCancel, OrderReturnRequest and OrderReturnRequestCancel events with their order, product, quantity and revenue, by affise_event_timestamp; limit/offset or page. Formats: json (default), csv. filter[environment]: default all. Client API key only.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Request
object
All (default), production, sandbox
"", csv
Example generated
{ "filter[applications]": [ 1 ], "filter[conversion_id]": "example", "filter[countries]": [ "example" ], "filter[date_from]": "example", "filter[date_to]": "example", "filter[environment]": "example", "filter[events]": [ "example" ], "filter[order_id]": "example", "filter[partners]": [ 1 ], "filter[product_id]": "example", "format": "example", "limit": 1, "offset": 1, "page": 1, "tz": "example"}Responses
Section titled “ Responses ”Report data
object
Example generated
{}Bad request
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}No credentials (answered with 403 until default-deny is enabled)
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}Invalid credentials or no access
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}Internal server error
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}