List creator report rows
curl --request GET \
--url https://app.openlight.tech/api/creator/v1/reports \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.openlight.tech/api/creator/v1/reports"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.openlight.tech/api/creator/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.openlight.tech/api/creator/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.openlight.tech/api/creator/v1/reports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.openlight.tech/api/creator/v1/reports")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.openlight.tech/api/creator/v1/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"reports": [
{
"date": "2023-12-25",
"brand_id": "<string>",
"product_id": "<string>",
"asin": "<string>",
"marketplace": "<string>",
"currency": "<string>",
"sales_cents": 123,
"commission_cents": 123,
"commission_status": "<string>",
"orders": 123,
"units_sold": 123,
"clicks": 123,
"detail_page_views": 123,
"add_to_carts": 123,
"link": {
"id": "<string>",
"tracking_id": "<string>",
"short_url": "<string>",
"destination_url": "<string>"
}
}
],
"next_cursor": "<string>"
}Reports
List Reports
Query report data visible to the current creator token
GET
/
api
/
creator
/
v1
/
reports
List creator report rows
curl --request GET \
--url https://app.openlight.tech/api/creator/v1/reports \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.openlight.tech/api/creator/v1/reports"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.openlight.tech/api/creator/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.openlight.tech/api/creator/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.openlight.tech/api/creator/v1/reports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.openlight.tech/api/creator/v1/reports")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.openlight.tech/api/creator/v1/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"reports": [
{
"date": "2023-12-25",
"brand_id": "<string>",
"product_id": "<string>",
"asin": "<string>",
"marketplace": "<string>",
"currency": "<string>",
"sales_cents": 123,
"commission_cents": 123,
"commission_status": "<string>",
"orders": 123,
"units_sold": 123,
"clicks": 123,
"detail_page_views": 123,
"add_to_carts": 123,
"link": {
"id": "<string>",
"tracking_id": "<string>",
"short_url": "<string>",
"destination_url": "<string>"
}
}
],
"next_cursor": "<string>"
}Use this endpoint to query report rows visible to the current creator token owner. Rows are grouped by date, product, attribution link, and Amazon marketplace so integrations can show link performance and reconcile orders and commissions.
Pass both
start and end in YYYY-MM-DD format. Optional filters include brand_id, product_id, asin, link_id, and marketplace; marketplace is an Amazon country or region code such as US, UK, or DE.
Pagination uses limit and cursor: limit defaults to 100 and maxes out at 500; when next_cursor is not null, pass it as cursor on the next request.
Response fields:
date: Report date.brand_id: Brand ID.product_id: Product ID.asin: Amazon ASIN.marketplace: Amazon country or region code, such asUS,UK, orDE.currency: Currency for sales and commission amounts.sales_cents: Sales amount in minor currency units.commission_cents: Commission amount in minor currency units.commission_status: Commission settlement status.orders: Number of orders.units_sold: Number of units sold.clicks: Number of clicks.detail_page_views: Number of detail page views.add_to_carts: Number of add-to-cart events.link.id: Attribution link ID.link.tracking_id: Client-side tracking tag supplied at link creation; empty string when omitted.link.short_url: Shareable attribution short URL.link.destination_url: Amazon landing page URL for the attribution link.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
开始日期,格式为 YYYY-MM-DD。Start date in YYYY-MM-DD format.
结束日期,格式为 YYYY-MM-DD。End date in YYYY-MM-DD format.
每页返回报表行数,默认 100,最大 500。Number of report rows per page; defaults to 100 and maxes out at 500.
Required range:
1 <= x <= 500上一页响应返回的下一页游标。Cursor returned as next_cursor by the previous page.
按品牌 ID 筛选。Filter by brand ID.
按商品 ID 筛选。Filter by product ID.
按 Amazon ASIN 筛选。Filter by Amazon ASIN.
按归因链接 ID 筛选。Filter by attribution link ID.
按 Amazon 国家/地区码筛选,例如 US、UK、DE。Filter by Amazon marketplace country or region code, such as US, UK, or DE.