stable本次发布有变化全部展示
来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 v2.account_health.get_metric_source_detail
Get the Affected Orders / Relevant Listings / Relevant Violations details of metrics.
§2 Overview
Overview
| Field | Value |
|---|---|
| Module | AccountHealth |
| API type | Shop |
| HTTP method | GET |
| Path | /api/v2/account_health/get_metric_source_detail |
| Production URL | https://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail |
| Sandbox URL | https://partner.test-stable.shopeemobile.com/api/v2/account_health/get_metric_source_detail |
| Permission | ERP System; Seller In House System; Product Management; Order Management; Customized APP; Swam ERP |
§3 Request parameters
Request parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| metric_id | int64 | Yes | 1 | ID of metric. Supported values: 1: Late Shipment Rate (All Channels); 3: Non-Fulfilment Rate (All Channels); 4: Preparation Time; 12: Pre-order Listing %; 15: Days of Pre-order Listing Violation; 25: Fast Handover Rate; 28: On-time Pickup Failure Rate Violation Value; 42: Cancellation Rate (All Channels); 43: Return-refund Rate (All Channels); 52: Severe Listing Violations; 53: Other Listing Violations; 85: Late Shipment Rate (NDD); 88: Non-fulfilment Rate (NDD; 91: Cancellation Rate (NDD); 92: Return-refund Rate (NDD); 96: % SDD Listings; 97: % NDD Listings; 2001: Fast Handover Rate - SLS; 2002: Fast Handover Rate - FBS; 2003: Fast Handover Rate - 3PF; 2030: % HD Listings; 2031: % HD Free Shipping Enabled; 2032: Saturday Shipment; 2033: Preparation Time PS; 2033: Preparation Time PS; 2036: OTDR Logistic Rate; 2037: OTDR DD Rate |
| page_no | int32 | No | 1 | Specifies the page number of data to return in the current call. Starting from 1. if data is more than one page, the page_no can be some entry to start next call.; Default is 1. |
| page_size | int32 | No | 10 | Each result set is returned as a page of entries. Use the "page_size" filters to control the maximum number of entries to retrieve per page (i.e., per call), and the "page_no" to start next call. This integer value is used to specify the maximum number of entries to return in a single "page" of data.; The limit of page_size if between 1 and 100. Default is 10. |
§4 Response parameters
Response parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| error | string | Indicate error type if hit error. Empty if no error happened. | ||
| message | string | Indicate error details if hit error. Empty if no error happened. | ||
| request_id | string | The identifier for an API request for error tracking. | ||
| response | object | |||
| response.metric_id | int64 | 1 | ID of metric. | |
| response.nfr_order_list | object[] | Affected Orders for Non-fulfilment Rate.; Supported metric_id: 3: Non-Fulfilment Rate (All Channels); 88: Non-fulfilment Rate (NDD) | ||
| response.nfr_order_list.order_sn | string | Order SN. | ||
| response.nfr_order_list.non_fulfillment_type | int32 | Non-fulfilment type. Applicable values: 1: System Cancellation; 2: Seller Cancellation; 3: Return Refunds | ||
| response.nfr_order_list.detailed_reason | int32 | Reason. Applicable values: 1001: Return Refund; 1002: Parcel Split Cancellation; 1003: First Mile Pick up fail; 1004: Order inclusion; 10005: Out of Stock 10006: Undeliverable area 10007: Cannot support COD 10008: Logistics request cancelled 10009: Logistics pickup failed 10010: Logistics not ready 10011: Inactive seller 10012: Seller did not ship order 10013: Order did not reach warehouse; 10014: Seller asked to cancel; 10015: Non-receipt 10016: Wrong item 10017: Damaged item 10018: Incomplete product 10019: Fake item 10020: Functional Damage 10021: Return Refund | ||
| response.cancellation_order_list | object[] | Affected Orders for Cancellation Rate.; Supported metric_id: 42: Cancellation Rate (All Channels); 91: Cancellation Rate (NDD) | ||
| response.cancellation_order_list.order_sn | string | Order SN. | ||
| response.cancellation_order_list.cancellation_type | int32 | Cancellation Type. Applicable values: 1: System Cancellation; 2: Seller Cancellation | ||
| response.cancellation_order_list.detailed_reason | int32 | Reason. Applicable values: 1001: Return Refund; 1002: Parcel Split Cancellation; 1003: First Mile Pick up fail; 1004: Order inclusion; 10005: Out of Stock 10006: Undeliverable area 10007: Cannot support COD 10008: Logistics request cancelled 10009: Logistics pickup failed 10010: Logistics not ready 10011: Inactive seller 10012: Seller did not ship order 10013: Order did not reach warehouse; 10014: Seller asked to cancel; 10015: Non-receipt 10016: Wrong item 10017: Damaged item 10018: Incomplete product 10019: Fake item 10020: Functional Damage 10021: Return Refund | ||
| response.return_refund_order_list | object[] | Affected Orders for Return-refund Rate.; Supported metric_id: 43: Return-refund Rate (All Channels); 92: Return-refund Rate (NDD) | ||
| response.return_refund_order_list.order_sn | string | Order SN. | ||
| response.return_refund_order_list.detailed_reason | int32 | Reason. Applicable values: 1001: Return Refund; 1002: Parcel Split Cancellation; 1003: First Mile Pick up fail; 1004: Order inclusion; 10005: Out of Stock 10006: Undeliverable area 10007: Cannot support COD 10008: Logistics request cancelled 10009: Logistics pickup failed 10010: Logistics not ready 10011: Inactive seller 10012: Seller did not ship order 10013: Order did not reach warehouse; 10014: Seller asked to cancel; 10015: Non-receipt 10016: Wrong item 10017: Damaged item 10018: Incomplete product 10019: Fake item 10020: Functional Damage 10021: Return Refund | ||
| response.lsr_order_list | object[] | Affected Orders for Late Shipment Rate.; Supported metric_id: 1: Late Shipment Rate (All Channels); 85: Late Shipment Rate (NDD) | ||
| response.lsr_order_list.order_sn | string | Order SN. | ||
| response.lsr_order_list.shipping_deadline | timestamp | Ship by date. | ||
| response.lsr_order_list.actual_shipping_time | timestamp | Seller arrange shipment time. | ||
| response.lsr_order_list.late_by_days | int64 | Late-by Days. | ||
| response.lsr_order_list.actual_pick_up_time | timestamp | Courier actual pick up time. | ||
| response.lsr_order_list.shipping_channel | string | Logistics Company. | ||
| response.lsr_order_list.first_mile_type | string | First mile shipping type. Applicable values: Pickup; Drop off | ||
| response.lsr_order_list.diagnosis_scenario | string[] | Diagnosis of the issue. | ||
| response.fhr_order_list | object[] | Affected Orders for Fast Handover Rate.; Supported metric_id: 25: Fast Handover Rate; 2001: Fast Handover Rate - SLS; 2002: Fast Handover Rate - FBS; 2003: Fast Handover Rate - 3PF | ||
| response.fhr_order_list.order_sn | string | Order SN. | ||
| response.fhr_order_list.parcel_id | int64 | Parcel ID. | ||
| response.fhr_order_list.parcel_display_id | string | Display Parcel ID. | ||
| response.fhr_order_list.confirm_time | timestamp | Confirmed Date. | ||
| response.fhr_order_list.handover_deadline | timestamp | Handover Deadline. | ||
| response.fhr_order_list.fast_handover_due_date | timestamp | Fast Handover Due Date. | ||
| response.fhr_order_list.arrange_pick_up_time | timestamp | Seller arrange pick up time. | ||
| response.fhr_order_list.handover_time | timestamp | Parcel drop off / pickup time. | ||
| response.fhr_order_list.shipping_channel | string | Logistics Company. | ||
| response.fhr_order_list.first_mile_type | string | First mile shipping type. Applicable values: Pickup; Drop off | ||
| response.fhr_order_list.first_mile_tracking_no | string | First Mile Tracking No. | ||
| response.fhr_order_list.diagnosis_scenario | string[] | Diagnosis of the issue. | ||
| response.opfr_day_detail_data_list | object[] | Relevant Violations for OPFR Violation Value.; Supported metric_id: 28: On-time Pickup Failure Rate Violation Value | ||
| response.opfr_day_detail_data_list.date | string | 19/10/2024 | Date. | |
| response.opfr_day_detail_data_list.scheduled_pickup_num | int32 | 48 | Number of scheduled pickups. | |
| response.opfr_day_detail_data_list.failed_pickup_num | int32 | 11 | Number of failed pickups. | |
| response.opfr_day_detail_data_list.opfr | int32 | OPFR. | ||
| response.opfr_day_detail_data_list.target | string | 49.90% | Target. | |
| response.violation_listing_list | object[] | Relevant Listings for Severe Listing Violations and Other Listing Violations.; Supported metric_id: 52: Severe Listing Violations; 53: Other Listing Violations | ||
| response.violation_listing_list.item_id | int64 | Item ID. | ||
| response.violation_listing_list.detailed_reason | int32 | Reason. Applicable values: 1: Prohibited; 2: Counterfeit; 3: Spam; 4: Inappropriate Image; 5: Insufficient Info; 6: Mall Listing Improvement; 7: Other Listing Improvement; 8: PQR Products | ||
| response.violation_listing_list.update_time | timestamp | Updated on. | ||
| response.pre_order_listing_violation_data_list | object[] | Relevant Listings for Days of Pre-order Listing Violation.; Supported metric_id: 15: Days of Pre-order Listing Violation | ||
| response.pre_order_listing_violation_data_list.date | string | 03/11/2024 | Date. | |
| response.pre_order_listing_violation_data_list.live_listing_count | int64 | 100 | Number of Live Listings. | |
| response.pre_order_listing_violation_data_list.pre_order_listing_count | int32 | 10 | Number of pre-order Listings. | |
| response.pre_order_listing_violation_data_list.pre_order_listing_rate | int32 | Pre-order Listing %. | ||
| response.pre_order_listing_violation_data_list.target | string | 13.00% | Target. | |
| response.pre_order_listing_list | object[] | Relevant Listings for Pre-order Listing.; Supported metric_id: 12: Pre-order Listing % | ||
| response.pre_order_listing_list.item_id | int64 | Item ID. | ||
| response.pre_order_listing_list.current_pre_order_status | int32 | Current Pre-order Status. Applicable values: 1: Yes; 2: No | ||
| response.sdd_listing_list | object[] | Relevant Listings for % SDD Listings.; Supported metric_id: 96: % SDD Listings. | ||
| response.sdd_listing_list.item_id | int64 | Item ID. | ||
| response.sdd_listing_list.current_sdd_status | int32 | Current SDD Status. Applicable values: 1: Yes; 0: No | ||
| response.ndd_listing_list | object[] | Relevant Listings for % NDD Listings.; Supported metric_id: 97: % NDD Listings. | ||
| response.ndd_listing_list.item_id | int64 | Item ID. | ||
| response.ndd_listing_list.current_ndd_status | int32 | Current NDD Status. Applicable values: 1: Yes; 0: No | ||
| response.apt_order_list | object[] | Affected Parcels for Preparation Time.; Supported metric_id: 4: Preparation Time | ||
| response.apt_order_list.order_sn | string | Order SN. | ||
| response.apt_order_list.order_create_time | timestamp | Order Paid Time. | ||
| response.apt_order_list.arrange_pick_up_time | timestamp | Seller arrange pick up time. | ||
| response.apt_order_list.actual_pick_up_time | timestamp | Courier actual pick up time. | ||
| response.apt_order_list.preparation_days | float | Preparation Days. | ||
| response.apt_order_list.shipping_channel | string | Logistics Company. | ||
| response.apt_order_list.first_mile_type | string | First mile shipping type. Applicable values: Pickup; Drop off | ||
| response.apt_order_list.first_mile_tracking_no | string | First Mile Tracking No. | ||
| response.hd_listing_list | object | Relevant Listings for % HD Listings and % HD Free Shipping Enabled.; Supported metric_id: 2030: % HD Listings; 2031: % HD Free Shipping Enabled | ||
| response.hd_listing_list.item_id | int64 | Item ID. | ||
| response.hd_listing_list.current_status | int32 | For 2030: % HD Listings, it refer to Current HD Status.; For 2031: % HD Free Shipping Enabled, it refer to Free Shipping Enabled Status.; Applicable values: 1: Yes; 2: No | ||
| response.saturday_shipment_list | object[] | Affected Parcels for Saturday Shipment; Supported metric_id: 2032: Saturday Shipment | ||
| response.saturday_shipment_list.order_sn | string | Order SN. | ||
| response.saturday_shipment_list.order_create_time | timestamp | Order Paid Time. | ||
| response.saturday_shipment_list.arrange_pick_up_time | timestamp | Seller arrange pick up time. | ||
| response.saturday_shipment_list.actual_pick_up_time | timestamp | Courier actual pick up time. | ||
| response.saturday_shipment_list.preparation_days | float | Preparation Days. | ||
| response.saturday_shipment_list.shipping_channel | string | Logistics Company. | ||
| response.saturday_shipment_list.first_mile_type | string | First mile shipping type. Applicable values: Pickup; Drop off | ||
| response.saturday_shipment_list.first_mile_tracking_no | string | First Mile Tracking No. | ||
| response.otdr_order_list | object[] | |||
| response.otdr_order_list.order_id | string | Order ID. | ||
| response.otdr_order_list.order_sn | string | Order SN. | ||
| response.otdr_order_list.paid_time | timestamp | Order Paid Time. | ||
| response.otdr_order_list.estimated_delivery_date | timestamp | Estimated delivery date | ||
| response.otdr_order_list.actual_pick_up_time | timestamp | Actual pick up time | ||
| response.otdr_order_list.real_delivery_time | timestamp | Real delivery time | ||
| response.otdr_order_list.difference_between_edd_rdt | string | Difference days between estimated delivery date and real delivery time | ||
| response.total_count | int32 | Total number of Affected Orders or Relevant Listings. |
§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. | |
| shop_id | int | 600000 | Shopee's unique identifier for a shop. Required param for most APIs. | |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by partner_id, api path, timestamp, access_token, shop_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
§6 Request samples
Request samples
§7 Java
Java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail?access_token=access_token&metric_id=1&page_no=1&page_size=10&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp")
.asString();
§8 PHP
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail?access_token=access_token&metric_id=1&page_no=1&page_size=10&partner_id=partner_id&shop_id=shop_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 => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
§9 cURL
cURL
curl --location --request GET 'https://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail?access_token=access_token&metric_id=1&page_no=1&page_size=10&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp'
§10 Python
Python
import requests
url = "https://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail?access_token=access_token&metric_id=1&page_no=1&page_size=10&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp"
payload={}
headers = {
}
response = requests.RPCRequest("GET",url,headers=headers, data=payload, allow_redirects=False)
print(response.text)
§11 Response sample
Response sample
§12 JSON
JSON
{
"error": "",
"message": "",
"request_id": "e3e3e7f325439861d492269eb3785901:010002a0b7410e5c:0000005427c9774e",
"response": {
"lsr_order_list": [
{
"actual_shipping_time": 1729735946,
"late_by_days": 9,
"order_sn": "220809NFRFE424",
"shipping_deadline": 1728933145
},
{
"actual_shipping_time": 1729737070,
"late_by_days": 4,
"order_sn": "220809NFQ2M26U",
"shipping_deadline": 1729366269
},
{
"actual_shipping_time": 1729737718,
"late_by_days": 2,
"order_sn": "220809NF6K7TGD",
"shipping_deadline": 1729539717
},
{
"actual_shipping_time": 1729651353,
"late_by_days": 2,
"order_sn": "220809NFS5C3EP",
"shipping_deadline": 1729453352
},
{
"actual_shipping_time": 1729565201,
"late_by_days": 10,
"order_sn": "220809NFGRE4A6",
"shipping_deadline": 1728676000
},
{
"actual_shipping_time": 1729654127,
"late_by_days": 9,
"order_sn": "220809NFTG9CEW",
"shipping_deadline": 1728851326
},
{
"actual_shipping_time": 1729654181,
"late_by_days": 2,
"order_sn": "220809NFFEFF12",
"shipping_deadline": 1729456180
},
{
"actual_shipping_time": 1729568025,
"late_by_days": 2,
"order_sn": "220809NF801W6F",
"shipping_deadline": 1729370024
},
{
"actual_shipping_time": 1729741935,
"late_by_days": 2,
"order_sn": "220809NFJV4X01",
"shipping_deadline": 1729543934
},
{
"actual_shipping_time": 1729743050,
"late_by_days": 1,
"order_sn": "220809NFKJ2W9J",
"shipping_deadline": 1729631449
}
],
"metrics_id": 1,
"total_count": 13
}
}
§13 Error example
Error example
§14 JSON
JSON
{
"error": "SERVER_ERROR",
"message": "invalid metrics id",
"request_id": "e3e3e7f325acaf339b7bc8e8c563d601:010002b0cc7134b5:000000f93458068c",
"response": null
}
§15 Errors
Errors
| Error | Description | Solution |
|---|---|---|
| error_data | parse data failed | |
| error_data | data not exist | |
| error_param | parameter invalid | |
| error_param | The information you queried is not found. | |
| error_param | Wrong parameters, detail: {msg}. | |
| error_server | Something wrong. Please try later. | |
| error_shop | shopid is invalid | |
| error_param | request not from gateway |
§16 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. | |
| error_param | There is no access_token in query. | |
| error_auth | Invalid access_token. | |
| error_auth | Invalid partner_id or shopid. | |
| shop_no_linked | Partner and shop has no linked. | |
| shop_banned | The shop account has been banned. Permissions for shop authorization and API calls have been suspended until the shop account is restored. | |
| invalid_acceess_token | Invalid access_token, please have a check. | |
| partner_shop_no_link | Invalid partner_id or shop_id, please have a check. | |
| error_ashop_api_permission | The shop is Affiliate shop has no permission to call this API. | |
| error_kyc_auth | No permission. Please inform the seller to complete the Seller Registration on Shopee Seller Center first, then this shop can call for this API. | |
| error_auth | System error, please try again later. | |
| error_param | There is no shop_id in query. | |
| error_param | shop_id is invalid, should be an integer between 0 and 4294967295. |
§17 Update log
Update log
| Date | Change |
|---|---|
| 2026-06-29 | add otdr |
| 2026-02-06 | Add Metric 2032 and 2033 |
| 2025-12-31 | Support getting "hd_listing_list" for "% HD Listings" and "% HD Free Shipping Enabled" metrics |
| 2025-11-21 | Add new option: 4: Preparation Time for “metric_id”, add new response parameter “apt_order_list”, add more response parameters under “lsr_order_list” and “fhr_order_list” |
| 2025-05-16 | Support getting "sdd_listing_list" for "% SDD Listings" metric |
