stable本次发布有变化全部展示
来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 v2.principal.get_shop_sales_performance_detail
Queries the business performance data of stores under the specified entity within the selected time range. Supports request granularity by day, week, month, quarter, year, or customize, and returns both overall summary metrics and store-level detailed metrics.
§2 Overview
Overview
| Field | Value |
|---|---|
| Module | BrandPortal |
| API type | Principal |
| HTTP method | POST |
| Path | /api/v2/principal/get_shop_sales_performance_detail |
| Production URL | https://partner.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail |
| Sandbox URL | https://partner.test-stable.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail |
| Permission | Brand Portal Service |
§3 Request parameters
Request parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| start_date | string | Yes | 2026-01-01 | Start date of the requested period in YYYY-MM-DD format. Limitations: - Must use the YYYY-MM-DD format.; - Must be a valid calendar date.; - Must not be later than end_date .; - Validation is based on the requested timezone.; - The earliest selectable date is calculated as: current day in timezone - 1 day - 2 years.; - The exact boundary rules depend on granularity: -- For customize, start_date must not be earlier than the earliest selectable date.; -- For day, start_date must equal end_date.; -- For week, start_date must be a Sunday.; -- For month, start_date must be the first day of the month.; -- For quarter, start_date must be the first day of the quarter.; -- For year, start_date must be the first day of the year. |
| end_date | string | Yes | 2026-01-01 | End date of the requested period in YYYY-MM-DD format. Limitations: - Must use the YYYY-MM-DD format. - Must be a valid calendar date. - Must not be earlier than start_date. - Validation is based on the requested timezone. - For customize, end_date must not be later than the day before the current day in the requested timezone. The inclusive date range from start_date to end_date must not exceed 366 days. - For day, end_date must equal start_date. - For week, end_date must be within the selected week range: from start_date (Sunday) to the end of that Sunday-to-Saturday week, or to the latest selectable day if the week extends beyond today. Formally: startDate ≤ endDate ≤ min(startDate + 6 days, today - 1 day). - For month, end_date must be within the selected month: from the 1st day of the month to the last calendar day of that month, or to the latest selectable day for the current month. Formally: startDate ≤ endDate ≤ min(month end, today - 1 day). - For quarter, end_date must be within the selected quarter: from the 1st day of the quarter to the last calendar day of that quarter, or to the latest selectable day for the current quarter. Formally: startDate ≤ endDate ≤ min(quarter end, today - 1 day). - For year, end_date must be within the selected year: from January 1st to December 31st of that year, or to the latest selectable day for the current year. Formally: startDate ≤ endDate ≤ min(Dec 31, today - 1 day). |
| timezone | string | Yes | GMT+8 | Timezone used for date boundary calculation, selectable date validation, and timestamp conversion.; Limitations: - Enum values: ["GMT+7", "GMT+8", "GMT-3"]; - All date validation rules are evaluated in the requested timezone. |
| granularity | string | Yes | day | Aggregation granularity that determines the validation rules for the requested date range and the reporting period.; Limitations: - Supported values are customize, day, week, month, quarter, and year.; - customize is validated as a free date range and is internally queried as daily data.; - day represents a single calendar day.; - week requires a Sunday-based calendar week.; - month requires a calendar month range.; - quarter requires a calendar quarter range.; - year requires a calendar year range.; -Any other value is rejected as invalid_parameter. |
| shop_list | object[] | No | List of shops to be queried. This field is optional. If omitted or passed as an empty array, the API will return data for all shops under the specified principal_id.; Limitations: - If provided, must contain at most 50 shops.; - If omitted or passed as [], all shops under the specified principal_id will be queried.; - If provided as a non-empty array, all shops must belong to the specified principal_id.; Duplicate shops are not allowed. | |
| shop_list.shop_id | int64 | Yes | 181050132 | Shop identifier of the target shop to be queried.; Limitations: - Required for every shop object when shop_list is provided as a non-empty array.; - Must belong to the specified principal_id. |
| shop_list.currency | string | No | USD | Currency used for amount-based metrics for the shop.; Limitations: - Supported values are LOCAL and USD.; - Invalid currency values are rejected as invalid_parameter.; - default USD |
§4 Response parameters
Response parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| request_id | string | d9572a36-1f32-4a81-8703-2626839661ff | The identifier for an API request, used for troubleshooting and log tracing. | |
| error | string | error_auth | Indicate error type if any error happened. Empty string if no error. | |
| message | string | System error, please try again later. | Indicate error details if any error happened. Empty string if no error. | |
| response | object | Business response payload. See Business Response Parameters below. | ||
| response.summary | object[] | Aggregated summary metrics for the requested date range and selected granularity, representing the overall performance of the requested shop set. | ||
| response.summary.currency | string | USD | currency code used for all monetary metrics of this shop item | |
| response.summary.sales | float | 308731.453553 | Total order value (paid and unpaid) within the selected time period, reflecting the sales amount received by sellers after deducting seller rebates.; Note: This value includes sales from cancelled and return/refund orders. | |
| response.summary.orders | int64 | 1672 | The number of placed orders, including unpaid orders. | |
| response.summary.units_sold | int64 | 1718 | The number of units associated with the orders placed, including unpaid orders. | |
| response.summary.average_basket_size | float | 184.64799853648324 | Average Basket Size = Sales ÷ Orders. It measures average sales per order | |
| response.summary.items_per_order | float | 1.027511961722488 | Items Per Order = Units Sold ÷ Orders. It measures the average number of items sold per transaction. | |
| response.summary.average_selling_price | float | 179.70398926251454 | Average selling price=Sales ÷ Units Sold. It measures average sales per unit. | |
| response.summary.product_clicks | int64 | 168951 | Total number of times your item cards were clicked over the selected time period, on both App and PC. This metric is only available after 31/12/2023. | |
| response.summary.product_views | int64 | 302274 | The number of visits to the product page. | |
| response.summary.unique_visitors | int64 | 381436 | Total number of unique visitors who viewed your shop, product detail pages, or item cards in Live or Video over the selected time period. Multiple views of one page by the same visitor is counted as 1 unique visitor. This metric is only available after 31/12/2023 | |
| response.summary.item_conversion_rate | float | 0.005683585091671795 | Item conversion rate = Units Sold ÷ Product Views. | |
| response.summary.order_conversion_rate | float | 0.009896360483217027 | Number of orders divided by total number of product clicks, over the selected time period. This metric is only available after 31/12/2023 | |
| response.summary.flash_sale_sales | float | 25065.505308 | Total flash sale order value (paid and unpaid) within the selected time period (done by both seller and platform flash sale), reflecting the sales amount received by sellers after deducting seller rebates. Note: This value includes sales from cancelled and return/refund orders. | |
| response.summary.flash_sale_orders | int64 | 239 | The number of placed orders, including unpaid orders.This includes flash sales done by seller and platform. | |
| response.summary.flash_sale_units_sold | int64 | 242 | The number of units associated with the orders placed, including unpaid orders.This includes flash sales done by seller and platform. | |
| response.summary.voucher_sales | float | 270680.340725 | Total value of all placed orders using your vouchers, including shipping fees and excluding other promotions, over the selected time period. | |
| response.summary.voucher_buyers | int64 | 1411 | Total number of unique buyers who applied your vouchers at least once, in all placed orders over the selected time period. | |
| response.summary.voucher_usage_rate | float | 0.019406593960154143 | Usage Rate = Vouchers Redeemed / Vouchers Claimed * 100% | |
| response.summary.voucher_cir | float | 0.057889526978686705 | Cost to Income Ratio (Voucher Cost/Gross Sales) measures the cost of vouchers relative to the revenue generated by the voucher from the sales of your shop's products. | |
| response.summary.voucher_cost | float | 15669.556886999999 | Total cost of vouchers applied at checkout, including shipping fees and excluding other promotions, over the selected time period. | |
| response.details | object[] | List of shop-level detail records that returns performance metrics for each selected shop within the requested date range. | ||
| response.details.shop_id | int64 | 123456789 | Shop identifier. | |
| response.details.shop_name | string | OFFICIAL STORE | Shop name. | |
| response.details.shop_region_code | string | MY | Shop region code. | |
| response.details.currency | string | USD | currency code used for all monetary metrics of this shop item | |
| response.details.sales | float | 264223.328658 | Total order value (paid and unpaid) within the selected time period, reflecting the sales amount received by sellers after deducting seller rebates.; Note: This value includes sales from cancelled and return/refund orders. | |
| response.details.orders | int64 | 1483 | The number of placed orders, including unpaid orders. | |
| response.details.units_sold | int64 | 123793634 | The number of units associated with the orders placed, including unpaid orders. | |
| response.details.average_basket_size | float | 178.16812451652055 | Average Basket Size = Sales ÷ Orders. It measures average sales per order | |
| response.details.items_per_order | float | 1.0296695886716116 | Items Per Order = Units Sold ÷ Orders. It measures the average number of items sold per transaction. | |
| response.details.average_selling_price | float | 173.0342689312377 | Average selling price=Sales ÷ Units Sold. It measures average sales per unit. | |
| response.details.product_clicks | int64 | 144826 | Total number of times your item cards were clicked over the selected time period, on both App and PC. This metric is only available after 31/12/2023. | |
| response.details.product_views | int64 | 267188 | The number of visits to the product page. | |
| response.details.unique_visitors | int64 | 297432 | Total number of unique visitors who viewed your shop, product detail pages, or item cards in Live or Video over the selected time period. Multiple views of one page by the same visitor is counted as 1 unique visitor. This metric is only available after 31/12/2023 | |
| response.details.item_conversion_rate | float | 0.005715077024417264 | Item conversion rate = Units Sold ÷ Product Views. | |
| response.details.order_conversion_rate | float | 0.010239874055763468 | Number of orders divided by total number of product clicks, over the selected time period. This metric is only available after 31/12/2023 | |
| response.details.atp_top_skus_l1d | float | 0.9790209790209791 | Average daily ATP% of top 80% GMV-contributing SKUs in the selected timeframe, the data will begin from 2023-10-01. | |
| response.details.atp_top_skus_l30d | float | 0.8980855855855856 | Average ATP% of top 80% GMV SKUs over a rolling 30-day period in the selected timeframe, the data will begin from 2023-10-01. | |
| response.details.atp_live_skus_l1d | float | 0.9644097222222222 | Average daily ATP% of all GMV-contributing SKUs in the selected timeframe, the data will begin from 2023-10-01. | |
| response.details.atp_live_skus_l30d | float | 0.7195289206917114 | Average ATP% of all-GMV SKUs over a rolling 30-day period in the selected timeframe, the data will begin from 2023-10-01. | |
| response.details.flash_sale_sales | float | 17250.836517 | Total flash sale order value (paid and unpaid) within the selected time period (done by both seller and platform flash sale), reflecting the sales amount received by sellers after deducting seller rebates. Note: This value includes sales from cancelled and return/refund orders. | |
| response.details.flash_sale_orders | int64 | 200 | The number of placed orders, including unpaid orders.This includes flash sales done by seller and platform. | |
| response.details.flash_sale_units_sold | int64 | 202 | The number of units associated with the orders placed, including unpaid orders.This includes flash sales done by seller and platform. | |
| response.details.voucher_sales | float | 236492.24125199998 | Total value of all placed orders using your vouchers, including shipping fees and excluding other promotions, over the selected time period. | |
| response.details.voucher_buyers | int64 | 1229 | Total number of unique buyers who applied your vouchers at least once, in all placed orders over the selected time period. | |
| response.details.voucher_usage_rate | float | 0.018527764658255178 | Usage Rate = Vouchers Redeemed / Vouchers Claimed * 100% | |
| response.details.voucher_cir | float | 0.057245252027419355 | Cost to Income Ratio (Voucher Cost/Gross Sales) measures the cost of vouchers relative to the revenue generated by the voucher from the sales of your shop's products. | |
| response.details.voucher_cost | float | 13538.057953 | Total cost of vouchers applied at checkout, including shipping fees and excluding other promotions, over the selected time period. |
§5 Common parameters
Common parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. | |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. | |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours. | |
| principal_id | int | 1 | Shopee's unique identifier for a principal. | |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by(depends on different APIs) partner_id, api path, timestamp, access_token, principal_id and partner_key via HMAC-SHA256 hashing algorithm. |
§6 Request samples
Request samples
§7 Payload
Payload
{
"start_date": "2026-01-01",
"end_date": "2026-01-01",
"timezone": "GMT+8",
"granularity": "day",
"shop_list": [
{
"shop_id": 181050132,
"currency": "USD"
},
{
"shop_id": 1494995608,
"currency": "USD"
}
]
}
§8 Java
Java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://partner.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp")
.header("Content-Type","application/json")
.body("{
\"end_date\": \"2026-01-01\",
\"granularity\": \"day\",
\"shop_list\": [
{
\"currency\": \"USD\",
\"shop_id\": 181050132
}
],
\"start_date\": \"2026-01-01\",
\"timezone\": \"GMT+8\"
}")
.asString();
§9 PHP
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"end_date": "2026-01-01",
"granularity": "day",
"shop_list": [
{
"currency": "USD",
"shop_id": 181050132
}
],
"start_date": "2026-01-01",
"timezone": "GMT+8"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
§10 cURL
cURL
curl --location --request POST 'https://partner.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp' \
--header 'Content-Type: application/json' \
--data-raw '{
"end_date": "2026-01-01",
"granularity": "day",
"shop_list": [
{
"currency": "USD",
"shop_id": 181050132
}
],
"start_date": "2026-01-01",
"timezone": "GMT+8"
}'
§11 Python
Python
import requests
import json
url = "https://partner.shopeemobile.com/api/v2/principal/get_shop_sales_performance_detail?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp"
payload=json.dumps({
"end_date": "2026-01-01",
"granularity": "day",
"shop_list": [
{
"currency": "USD",
"shop_id": 181050132
}
],
"start_date": "2026-01-01",
"timezone": "GMT+8"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.RPCRequest("POST",url,headers=headers, data=payload, allow_redirects=False)
print(response.text)
§12 Response sample
Response sample
§13 JSON
JSON
{
"request_id": "d9572a36-1f32-4a81-8703-2626839661ff",
"error": "",
"message": "",
"response": {
"summary": [
{
"currency": "USD",
"sales": 308731.453553,
"orders": 1672,
"units_sold": 1718,
"average_basket_size": 184.64799853648324,
"items_per_order": 1.027511961722488,
"average_selling_price": 179.70398926251454,
"product_clicks": 168951,
"product_views": 302274,
"unique_visitors": 381436,
"item_conversion_rate": 0.005683585091671795,
"order_conversion_rate": 0.009896360483217027,
"flash_sale_sales": 25065.505308,
"flash_sale_orders": 239,
"flash_sale_units_sold": 242,
"voucher_sales": 270680.340725,
"voucher_buyers": 1411,
"voucher_usage_rate": 0.019406593960154143,
"voucher_cir": 0.057889526978686705,
"voucher_cost": 15669.556886999999
}
],
"details": [
{
"shop_id": 123456789,
"shop_name": "OFFICIAL STORE",
"shop_region_code": "MY",
"currency": "USD",
"sales": 264223.328658,
"orders": 1483,
"units_sold": 123793634,
"average_basket_size": 178.16812451652055,
"items_per_order": 1.0296695886716116,
"average_selling_price": 173.0342689312377,
"product_clicks": 144826,
"product_views": 267188,
"unique_visitors": 297432,
"item_conversion_rate": 0.005715077024417264,
"order_conversion_rate": 0.010239874055763468,
"atp_top_skus_l1d": 0.9790209790209791,
"atp_top_skus_l30d": 0.8980855855855856,
"atp_live_skus_l1d": 0.9644097222222222,
"atp_live_skus_l30d": 0.7195289206917114,
"flash_sale_sales": 17250.836517,
"flash_sale_orders": 200,
"flash_sale_units_sold": 202,
"voucher_sales": 236492.24125199998,
"voucher_buyers": 1229,
"voucher_usage_rate": 0.018527764658255178,
"voucher_cir": 0.057245252027419355,
"voucher_cost": 13538.057953
}
]
}
}
§14 Error example
Error example
§15 JSON
JSON
{
"request_id": "e40282af-d42c-4995-a74c-bf6fd528f3f8",
"error": "error_param",
"message": "for day granularity, start_date must equal end_date.",
"response": null
}
§16 Errors
Errors
| Error | Description | Solution |
|---|---|---|
| error_param | timezone is required | |
| error_param | timezone is invalid. allowed values: GMT+7, GMT+8, GMT-3. | |
| error_param | granularity is required | |
| error_param | request body is invalid | |
| error_param | shop_id is required | |
| error_param | shop_list contains shop that does not belong to the principal. | |
| error_param | shop_list contains duplicate shop_id | |
| error_param | currency is invalid | |
| error_param | end_date is not ready, please retry later | |
| error_param | for day granularity, start_date must equal end_date. | |
| error_param | day range is outside the allowed selectable range. | |
| error_param | for week granularity, end_date must be within the selected week range | |
| error_param | for week granularity, start_date must be a Sunday. | |
| error_param | week start_date is earlier than the earliest allowed week. | |
| error_param | start_date cannot be later than end_date. | |
| error_param | month range is outside the allowed selectable range. | |
| error_param | for month granularity, start_date must be the first day of month. | |
| error_param | for month granularity, end_date must be within the selected month range. | |
| error_param | for quarter granularity, end_date must be within the selected quarter range. | |
| error_param | year range is outside the allowed selectable range. | |
| error_param | for quarter granularity, start_date must be the first day of quarter. | |
| error_param | for quarter granularity, end_date must be within the selected quarter range. | |
| error_param | start_date is earlier than the earliest allowed date | |
| error_param | for year granularity, end_date must be within the selected year range. | |
| error_param | end_date must not be later than the latest selectable day. | |
| error_permission | auth failed | |
| error_param | start_date is required | |
| error_param | start_date is required; start_date must use YYYY-MM-DD | |
| error_param | end_date is required | |
| error_param | end_date must use YYYY-MM-DD |
§17 Common errors
Common errors
| Error | Description | Solution |
|---|---|---|
| error_auth | partner_id is invalid | |
| error_auth | The App is deleted, and you'll be unable to make any API call. | |
| error_auth | App developer’s permissions for authorizations have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| error_param | There is no partner_id in query. | |
| error_param | Invalid partner_id. | |
| error_param | no timestamp | |
| error_param | Invalid timestamp | |
| error_param | There is no sign in query. | |
| error_sign | Wrong sign. | |
| invalid_partner_id | Invalid partner_id, please have a check. | |
| error_auth | No permission to current api. | |
| error_api_call_restricted | The App permission for api call have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| api_suspended | The API is offline. Please call v2 API instead. | |
| error_limit | The total API call number made by your APP has reached the daily API call limit, please try again after 00: 00 (UTC+08:00) | |
| error_rate_limit | Too many requests. You have reached the rate limit. Please try again later. | |
| source_ip_undeclared | Request Source IP ({ip}) is undeclared. Please declare all your IP addresses in the Shopee Open Platform Console > App list > IP Address Whitelist | |
| error_param | Permission denied. This API is currently offline or the request path is incorrect. | |
| error_param | Partner_id is invalid, should be an integer between 0 and 4294967295. | |
| error_param | no timestamp. | |
| error_param | Timestamp is invalid, should be an integer between 0 and 4294967295. | |
| error_param | Timestamp is expired. | |
| error_partner_key_expired | Your API partner key has expired, please reset the Live API Partner Key in Console to get a new valid partner key to call open api. | |
| error_api_permission | This app type has no permission to this API. |
§18 Update log
Update log
| Date | Change |
|---|---|
| 2026-07-09 | New API |
