快工助手跨境电商知识与商机助手

v2.account_health.get_metric_source_detail

Shopee 官方资料 · Shopee Open Platform 接口参考 · 适合开发者

stable本次发布有变化全部展示

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.api_reference
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/api_doctopic/apitopic/developer

资料正文

§1 v2.account_health.get_metric_source_detail

Get the Affected Orders / Relevant Listings / Relevant Violations details of metrics.

#

§2 Overview

Overview

FieldValue
ModuleAccountHealth
API typeShop
HTTP methodGET
Path/api/v2/account_health/get_metric_source_detail
Production URLhttps://partner.shopeemobile.com/api/v2/account_health/get_metric_source_detail
Sandbox URLhttps://partner.test-stable.shopeemobile.com/api/v2/account_health/get_metric_source_detail
PermissionERP System; Seller In House System; Product Management; Order Management; Customized APP; Swam ERP
#

§3 Request parameters

Request parameters

NameTypeRequiredSampleDescription
metric_idint64Yes1ID 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_noint32No1Specifies 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_sizeint32No10Each 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

NameTypeRequiredSampleDescription
errorstringIndicate error type if hit error. Empty if no error happened.
messagestringIndicate error details if hit error. Empty if no error happened.
request_idstringThe identifier for an API request for error tracking.
responseobject
response.metric_idint641ID of metric.
response.nfr_order_listobject[]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_snstringOrder SN.
response.nfr_order_list.non_fulfillment_typeint32Non-fulfilment type. Applicable values: 1: System Cancellation; 2: Seller Cancellation; 3: Return Refunds
response.nfr_order_list.detailed_reasonint32Reason. 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_listobject[]Affected Orders for Cancellation Rate.; Supported metric_id: 42: Cancellation Rate (All Channels); 91: Cancellation Rate (NDD)
response.cancellation_order_list.order_snstringOrder SN.
response.cancellation_order_list.cancellation_typeint32Cancellation Type. Applicable values: 1: System Cancellation; 2: Seller Cancellation
response.cancellation_order_list.detailed_reasonint32Reason. 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_listobject[]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_snstringOrder SN.
response.return_refund_order_list.detailed_reasonint32Reason. 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_listobject[]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_snstringOrder SN.
response.lsr_order_list.shipping_deadlinetimestampShip by date.
response.lsr_order_list.actual_shipping_timetimestampSeller arrange shipment time.
response.lsr_order_list.late_by_daysint64Late-by Days.
response.lsr_order_list.actual_pick_up_timetimestampCourier actual pick up time.
response.lsr_order_list.shipping_channelstringLogistics Company.
response.lsr_order_list.first_mile_typestringFirst mile shipping type. Applicable values: Pickup; Drop off
response.lsr_order_list.diagnosis_scenariostring[]Diagnosis of the issue.
response.fhr_order_listobject[]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_snstringOrder SN.
response.fhr_order_list.parcel_idint64Parcel ID.
response.fhr_order_list.parcel_display_idstringDisplay Parcel ID.
response.fhr_order_list.confirm_timetimestampConfirmed Date.
response.fhr_order_list.handover_deadlinetimestampHandover Deadline.
response.fhr_order_list.fast_handover_due_datetimestampFast Handover Due Date.
response.fhr_order_list.arrange_pick_up_timetimestampSeller arrange pick up time.
response.fhr_order_list.handover_timetimestampParcel drop off / pickup time.
response.fhr_order_list.shipping_channelstringLogistics Company.
response.fhr_order_list.first_mile_typestringFirst mile shipping type. Applicable values: Pickup; Drop off
response.fhr_order_list.first_mile_tracking_nostringFirst Mile Tracking No.
response.fhr_order_list.diagnosis_scenariostring[]Diagnosis of the issue.
response.opfr_day_detail_data_listobject[]Relevant Violations for OPFR Violation Value.; Supported metric_id: 28: On-time Pickup Failure Rate Violation Value
response.opfr_day_detail_data_list.datestring19/10/2024Date.
response.opfr_day_detail_data_list.scheduled_pickup_numint3248Number of scheduled pickups.
response.opfr_day_detail_data_list.failed_pickup_numint3211Number of failed pickups.
response.opfr_day_detail_data_list.opfrint32OPFR.
response.opfr_day_detail_data_list.targetstring49.90%Target.
response.violation_listing_listobject[]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_idint64Item ID.
response.violation_listing_list.detailed_reasonint32Reason. 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_timetimestampUpdated on.
response.pre_order_listing_violation_data_listobject[]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.datestring03/11/2024Date.
response.pre_order_listing_violation_data_list.live_listing_countint64100Number of Live Listings.
response.pre_order_listing_violation_data_list.pre_order_listing_countint3210Number of pre-order Listings.
response.pre_order_listing_violation_data_list.pre_order_listing_rateint32Pre-order Listing %.
response.pre_order_listing_violation_data_list.targetstring13.00%Target.
response.pre_order_listing_listobject[]Relevant Listings for Pre-order Listing.; Supported metric_id: 12: Pre-order Listing %
response.pre_order_listing_list.item_idint64Item ID.
response.pre_order_listing_list.current_pre_order_statusint32Current Pre-order Status. Applicable values: 1: Yes; 2: No
response.sdd_listing_listobject[]Relevant Listings for % SDD Listings.; Supported metric_id: 96: % SDD Listings.
response.sdd_listing_list.item_idint64Item ID.
response.sdd_listing_list.current_sdd_statusint32Current SDD Status. Applicable values: 1: Yes; 0: No
response.ndd_listing_listobject[]Relevant Listings for % NDD Listings.; Supported metric_id: 97: % NDD Listings.
response.ndd_listing_list.item_idint64Item ID.
response.ndd_listing_list.current_ndd_statusint32Current NDD Status. Applicable values: 1: Yes; 0: No
response.apt_order_listobject[]Affected Parcels for Preparation Time.; Supported metric_id: 4: Preparation Time
response.apt_order_list.order_snstringOrder SN.
response.apt_order_list.order_create_timetimestampOrder Paid Time.
response.apt_order_list.arrange_pick_up_timetimestampSeller arrange pick up time.
response.apt_order_list.actual_pick_up_timetimestampCourier actual pick up time.
response.apt_order_list.preparation_daysfloatPreparation Days.
response.apt_order_list.shipping_channelstringLogistics Company.
response.apt_order_list.first_mile_typestringFirst mile shipping type. Applicable values: Pickup; Drop off
response.apt_order_list.first_mile_tracking_nostringFirst Mile Tracking No.
response.hd_listing_listobjectRelevant 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_idint64Item ID.
response.hd_listing_list.current_statusint32For 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_listobject[]Affected Parcels for Saturday Shipment; Supported metric_id: 2032: Saturday Shipment
response.saturday_shipment_list.order_snstringOrder SN.
response.saturday_shipment_list.order_create_timetimestampOrder Paid Time.
response.saturday_shipment_list.arrange_pick_up_timetimestampSeller arrange pick up time.
response.saturday_shipment_list.actual_pick_up_timetimestampCourier actual pick up time.
response.saturday_shipment_list.preparation_daysfloatPreparation Days.
response.saturday_shipment_list.shipping_channelstringLogistics Company.
response.saturday_shipment_list.first_mile_typestringFirst mile shipping type. Applicable values: Pickup; Drop off
response.saturday_shipment_list.first_mile_tracking_nostringFirst Mile Tracking No.
response.otdr_order_listobject[]
response.otdr_order_list.order_idstringOrder ID.
response.otdr_order_list.order_snstringOrder SN.
response.otdr_order_list.paid_timetimestampOrder Paid Time.
response.otdr_order_list.estimated_delivery_datetimestampEstimated delivery date
response.otdr_order_list.actual_pick_up_timetimestampActual pick up time
response.otdr_order_list.real_delivery_timetimestampReal delivery time
response.otdr_order_list.difference_between_edd_rdtstringDifference days between estimated delivery date and real delivery time
response.total_countint32Total number of Affected Orders or Relevant Listings.
#

§5 Common parameters

Common parameters

NameTypeRequiredSampleDescription
partner_idint1Partner ID is assigned upon registration is successful. Required for all requests.
timestamptimestamp1610000000This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours.
shop_idint600000Shopee's unique identifier for a shop. Required param for most APIs.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature 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&timestamp=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&timestamp=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&timestamp=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&timestamp=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

ErrorDescriptionSolution
error_dataparse data failed
error_datadata not exist
error_paramparameter invalid
error_paramThe information you queried is not found.
error_paramWrong parameters, detail: {msg}.
error_serverSomething wrong. Please try later.
error_shopshopid is invalid
error_paramrequest not from gateway
#

§16 Common errors

Common errors

ErrorDescriptionSolution
error_authpartner_id is invalid
error_authThe App is deleted, and you'll be unable to make any API call.
error_authApp 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_paramThere is no partner_id in query.
error_paramInvalid partner_id.
error_paramno timestamp
error_paramInvalid timestamp
error_paramThere is no sign in query.
error_signWrong sign.
invalid_partner_idInvalid partner_id, please have a check.
error_authNo permission to current api.
error_api_call_restrictedThe 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_suspendedThe API is offline. Please call v2 API instead.
error_limitThe 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_limitToo many requests. You have reached the rate limit. Please try again later.
source_ip_undeclaredRequest Source IP ({ip}) is undeclared. Please declare all your IP addresses in the Shopee Open Platform Console > App list > IP Address Whitelist
error_paramPermission denied. This API is currently offline or the request path is incorrect.
error_paramPartner_id is invalid, should be an integer between 0 and 4294967295.
error_paramno timestamp.
error_paramTimestamp is invalid, should be an integer between 0 and 4294967295.
error_paramTimestamp is expired.
error_partner_key_expiredYour 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_permissionThis app type has no permission to this API.
error_paramThere is no access_token in query.
error_authInvalid access_token.
error_authInvalid partner_id or shopid.
shop_no_linkedPartner and shop has no linked.
shop_bannedThe shop account has been banned. Permissions for shop authorization and API calls have been suspended until the shop account is restored.
invalid_acceess_tokenInvalid access_token, please have a check.
partner_shop_no_linkInvalid partner_id or shop_id, please have a check.
error_ashop_api_permissionThe shop is Affiliate shop has no permission to call this API.
error_kyc_authNo permission. Please inform the seller to complete the Seller Registration on Shopee Seller Center first, then this shop can call for this API.
error_authSystem error, please try again later.
error_paramThere is no shop_id in query.
error_paramshop_id is invalid, should be an integer between 0 and 4294967295.
#

§17 Update log

Update log

DateChange
2026-06-29add otdr
2026-02-06Add Metric 2032 and 2033
2025-12-31Support getting "hd_listing_list" for "% HD Listings" and "% HD Free Shipping Enabled" metrics
2025-11-21Add 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-16Support getting "sdd_listing_list" for "% SDD Listings" metric
#