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>"
}报表
列出报表
查询当前创作者 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>"
}使用该接口查询当前创作者 Token owner 可见的报表行。每行按日期、商品、归因链接和 Amazon 站点聚合,可用于接入方展示链接表现、核对订单和佣金。
必须传入
start 和 end,日期格式为 YYYY-MM-DD。可使用 brand_id、product_id、asin、link_id、marketplace 进一步筛选;marketplace 使用 Amazon 国家/地区码,例如 US、UK、DE。
分页使用 limit 和 cursor:limit 默认 100,最大 500;当响应里的 next_cursor 不为 null 时,把它作为下一次请求的 cursor 继续读取。
响应字段:
date:报表日期。brand_id:品牌 ID。product_id:商品 ID。asin:Amazon ASIN。marketplace:Amazon 国家/地区码,例如US、UK、DE。currency:销售额和佣金的币种。sales_cents:销售额,单位为最小货币单位。commission_cents:佣金金额,单位为最小货币单位。commission_status:佣金结算状态。orders:订单数。units_sold:售出件数。clicks:点击数。detail_page_views:商品详情页浏览数。add_to_carts:加购数。link.id:归因链接 ID。link.tracking_id:创建链接时传入的客户侧追踪标识;未传入时为空字符串。link.short_url:可分发的归因短链接 URL。link.destination_url:归因链接跳转的 Amazon 落地页 URL。
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
开始日期,格式为 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.
必填范围:
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.