Get performance reports at the product/date/source granularity within a date range [start, end]. Filter by brand IDs and ASINs.

<aside> ⚠️ The click values in /reports is actually “detailedPageViews”, please use /reports/clicks to get the true click values.

</aside>

Method: GET (paginated)

Parameters:

Response:

{
  "reports": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "date": "string",
      "asin": "string",
      "marketplace": "amazon.com",
      "currency": "USD",
      "linkId": "string",
      "creatorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "brandId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "final": true,
      "sales": 0,
      "commissionAmount": 0,
      "conversions": 0,
      "clicks": 0,
      "detailPageViews": 0,
      "addToCarts": 0
    }
  ],
  "cursor": "string"
}

Errors:

Example:

const API_KEY = "LEVANTA_API_KEY"
const ENDPOINT = "<https://app.levanta.io/api/seller/v1/reports>"

let cursor;
const reports = [];

// Set up query parameters
const parameters = new URLSearchParams();
// Get 50 reports per response
parameters.set("limit", 50);
// Get reports from January 15, 2023 to February 15, 2023
parameters.set("start", "2023-01-15T00:00:00.000Z");
parameters.set("end", "2023-02-15T00:00:00.000Z");
// Narrow to only show reports for 3 given asins
parameters.set("asins", "B0B7CTHJ2V,B0B4WRTLNR,B086R3CBDB");

// Paginate through reports, stop when a value of null is returned for "cursor"
while (cursor !== null) {
    const response = await fetch(`${ENDPOINT}?${parameters.toString()}`, {
			method: "GET",
			headers: {
				Authorization: `Bearer ${API_KEY}`
			}
		});
	  const json = await response.json();
		// Store reports returned
	  reports.push(...json.reports);
    cursor = json.cursor;
    if (cursor) parameters.set("cursor", cursor);
}
console.log(reports);