Amazon Selling Partner API (SP-API)-中文
工具首页问答社区广告API开发者申请AI智能助手官方文档TokenApi Reference
工具首页问答社区广告API开发者申请AI智能助手官方文档TokenApi Reference
  1. Sales
  • Auth Token
    • 获取Token
    • 刷新Token
    • 获取无授权Token
  • Api Reference
    • Orders
      • getOrders
      • getOrder
      • getOrderBuyerInfo
      • getOrderAddress
      • getOrderItems
      • getOrderItemsBuyerInfo
      • updateShipmentStatus
      • getOrderRegulatedInfo
      • updateVerificationStatus
      • confirmShipment
    • Reports 2021-06-30
      • getReports
      • createReport
      • cancelReport
      • getReport
      • getReportSchedules
      • createReportSchedule
      • cancelReportSchedule
      • getReportSchedule
      • getReportDocument
    • Feeds 2021-06-30
      • getFeeds
      • createFeed
      • cancelFeed
      • getFeed
      • createFeedDocument
      • getFeedDocument
    • Sellers
      • getMarketplaceParticipations
    • Pricing 2022-05-01
      • getFeaturedOfferExpectedPriceBatch
      • getCompetitiveSummary
    • Notifications
      • getSubscription
      • createSubscription
      • getSubscriptionById
      • deleteSubscriptionById
      • getDestinations
      • createDestination
      • getDestination
      • deleteDestination
    • A+ Content Management
      • searchContentDocuments
      • createContentDocument
      • getContentDocument
      • updateContentDocument
      • listContentDocumentAsinRelations
      • postContentDocumentAsinRelations
      • validateContentDocumentAsinRelations
      • searchContentPublishRecords
      • postContentDocumentApprovalSubmission
      • postContentDocumentSuspendSubmission
    • Application Management
      • rotateApplicationClientSecret
    • The AWD
      • getInboundShipment
      • listInboundShipments
      • listInventory
    • Catalog Items V0
      • listCatalogItems
      • getCatalogItem
      • listCatalogCategories
    • Catalog Items 2020-12-01
      • searchCatalogItems
      • getCatalogItem
    • Catalog Items 2022-04-01
      • searchCatalogItems
      • getCatalogItem
    • Data Kiosk
      • getQueries
      • createQuery
      • cancelQuery
      • getQuery
      • getDocument
    • Product Type Definitions
      • searchDefinitionsProductTypes
      • getDefinitionsProductType
    • Automotive.
      • getVehicles
    • Easy Ship
      • listHandoverSlots
      • getScheduledPackage
      • createScheduledPackage
      • updateScheduledPackages
      • createScheduledPackageBulk
    • FBA Inbound Eligibilty
      • getItemEligibilityPreview
    • FBA Inventory
      • getInventorySummaries
      • createInventoryItem
      • deleteInventoryItem
      • addInventory
    • Finances
      • listFinancialEventGroups
      • listFinancialEventsByGroupId
      • listFinancialEventsByOrderId
      • listFinancialEvents
    • Finances 2024-06-19
      • listTransactions
    • Fulfillment Inbound V0
      • createInboundShipmentPlan
      • createInboundShipment
      • updateInboundShipment
      • getPreorderInfo
      • confirmPreorder
      • getPrepInstructions
      • getTransportDetails
      • putTransportDetails
      • voidTransport
      • estimateTransport
      • confirmTransport
      • getLabels
      • getBillOfLading
      • getShipments
      • getShipmentItemsByShipmentId
      • getShipmentItems
    • Listings Items 2021-08-01
      • deleteListingsItem
      • getListingsItem
      • patchListingsItem
      • putListingsItem
      • searchListingsItems
    • Listings Restrictions
      • getListingsRestrictions
    • Merchant Fulfillment
      • getEligibleShipmentServices
      • getShipment
      • cancelShipment
      • createShipment
      • getAdditionalSellerInputs
    • Messaging
      • getMessagingActionsForOrder
      • confirmCustomizationDetails
      • createConfirmDeliveryDetails
      • createLegalDisclosure
      • createNegativeFeedbackRemoval
      • createConfirmOrderDetails
      • createConfirmServiceDetails
      • CreateAmazonMotors
      • CreateWarranty
      • GetAttributes
      • createDigitalAccessKey
      • createUnexpectedProblem
      • sendInvoice
    • Product Fees
      • getMyFeesEstimateForSKU
      • getMyFeesEstimateForASIN
      • getMyFeesEstimates
    • Pricing V0
      • getPricing
      • getCompetitivePricing
      • getListingOffers
      • getItemOffers
      • getItemOffersBatch
      • getListingOffersBatch
    • Replenishment
      • getSellingPartnerMetrics
      • listOfferMetrics
      • listOffers
    • Sales
      • getOrderMetrics
        GET
    • Services
      • getServiceJobByServiceJobId
      • cancelServiceJobByServiceJobId
      • completeServiceJobByServiceJobId
      • getServiceJobs
      • addAppointmentForServiceJobByServiceJobId
      • rescheduleAppointmentForServiceJobByServiceJobId
      • assignAppointmentResources
      • setAppointmentFulfillmentData
      • getRangeSlotCapacity
      • getFixedSlotCapacity
      • updateSchedule
      • createReservation
      • updateReservation
      • cancelReservation
      • getAppointmmentSlotsByJobId
      • getAppointmentSlots
      • createServiceDocumentUploadDestination
    • Shipment Invoicing
      • getShipmentDetails
      • submitInvoice
      • getInvoiceStatus
    • Shipping
      • createShipment
      • getShipment
      • cancelShipment
      • purchaseLabels
      • retrieveShippingLabel
      • purchaseShipment
      • getRates
      • getAccount
      • getTrackingInformation
    • Amazon Shipping API V2
      • getRates
      • directPurchaseShipment
      • purchaseShipment
      • oneClickShipment
      • getTracking
      • getShipmentDocuments
      • cancelShipment
      • getAdditionalInputs
      • getCarrierAccountFormInputs
      • getCarrierAccounts
      • linkCarrierAccount
      • unlinkCarrierAccount
      • generateCollectionForm
      • getCollectionFormHistory
      • getUnmanifestedShipments
      • getCollectionForm
      • getAccessPoints
    • Solicitations
      • getSolicitationActionsForOrder
      • createProductReviewAndSellerFeedbackSolicitation
    • Supply Sources
      • getSupplySources
      • createSupplySource
      • getSupplySource
      • updateSupplySource
      • archiveSupplySource
      • updateSupplySourceStatus
    • Transfers. transfers_2024-06-01
      • initiatePayout
      • getPaymentMethods
    • Tokens
      • createRestrictedDataToken
    • Uploads
      • createUploadDestinationForResource
    • Invoices.
      • getInvoicesAttributes
      • getInvoicesDocument
      • createInvoicesExport
      • getInvoicesExports
      • getInvoicesExport
      • getInvoices
      • getInvoice
    • FBA inbound operations. 2024-03-20
      • listInboundPlans
      • createInboundPlan
      • getInboundPlan
      • listInboundPlanBoxes
      • cancelInboundPlan
      • listInboundPlanItems
      • updateInboundPlanName
      • listPackingGroupBoxes
      • listPackingGroupItems
      • setPackingInformation
      • listPackingOptions
      • generatePackingOptions
      • confirmPackingOption
      • listInboundPlanPallets
      • listPlacementOptions
      • generatePlacementOptions
      • confirmPlacementOption
      • getShipment
      • listShipmentBoxes
      • listShipmentContentUpdatePreviews
      • generateShipmentContentUpdatePreviews
      • getShipmentContentUpdatePreview
      • confirmShipmentContentUpdatePreview
      • getDeliveryChallanDocument
      • listDeliveryWindowOptions
      • generateDeliveryWindowOptions
      • confirmDeliveryWindowOptions
      • listShipmentItems
      • updateShipmentName
      • listShipmentPallets
      • cancelSelfShipAppointment
      • getSelfShipAppointmentSlots
      • generateSelfShipAppointmentSlots
      • scheduleSelfShipAppointment
      • updateShipmentSourceAddress
      • updateShipmentTrackingDetails
      • listTransportationOptions
      • generateTransportationOptions
      • confirmTransportationOptions
      • listItemComplianceDetails
      • updateItemComplianceDetails
      • createMarketplaceItemLabels
      • getInboundOperationStatus
    • Fulfillment Outbound
      • getFulfillmentPreview
      • deliveryOffers
      • listAllFulfillmentOrders
      • createFulfillmentOrder
      • getPackageTrackingDetails
      • listReturnReasonCodes
      • createFulfillmentReturn
      • getFulfillmentOrder
      • updateFulfillmentOrder
      • cancelFulfillmentOrder
      • submitFulfillmentOrderStatusUpdate
      • getFeatures
      • getFeatureInventory
      • getFeatureSKU
    • Feeds 2020-09-04
      • getFeeds
      • createFeed
      • getFeed
      • cancelFeed
      • createFeedDocument
      • getFeedDocument
    • Reports 2020-09-04
      • getReports
      • createReport
      • getReport
      • cancelReport
      • getReportSchedules
      • createReportSchedule
      • getReportSchedule
      • cancelReportSchedule
      • getReportDocument
    • Listings Items 2020-09-01
      • deleteListingsItem
      • patchListingsItem
      • putListingsItem
    • Application integrations.
      • createNotification
      • deleteNotifications
      • recordActionFeedback
    • Direct Fulfillment Inventory Updates
      • submitInventoryUpdate
    • Direct Fulfillment Orders V1
      • getOrders
      • getOrder
      • submitAcknowledgement
    • Direct Fulfillment Orders 2021-12-28
      • getOrders
      • getOrder
      • submitAcknowledgement
    • Direct Fulfillment Payments
      • submitInvoice
    • Vendor Direct Fulfillment Sandbox Test Data
      • generateOrderScenarios
      • getOrderScenarios
    • Direct Fulfillment Shipping V1
      • getShippingLabels
      • submitShippingLabelRequest
      • getShippingLabel
      • submitShipmentConfirmations
      • submitShipmentStatusUpdates
      • getCustomerInvoices
      • getCustomerInvoice
      • getPackingSlips
      • getPackingSlip
    • Direct Fulfillment Shipping 2021-12-28
      • getShippingLabels
      • submitShippingLabelRequest
      • getShippingLabel
      • createShippingLabels
      • submitShipmentConfirmations
      • submitShipmentStatusUpdates
      • getCustomerInvoices
      • getCustomerInvoice
      • getPackingSlips
      • getPackingSlip
    • Direct Fulfillment Transaction Status V1
      • getTransactionStatus
    • Direct Fulfillment Transaction Status 2021-12-28
      • getTransactionStatus
    • Retail Procurement Payments
      • submitInvoices
    • Retail Procurement Orders
      • getPurchaseOrders
      • getPurchaseOrder
      • submitAcknowledgement
      • getPurchaseOrdersStatus
    • Retail Procurement Shipments
      • SubmitShipmentConfirmations
      • SubmitShipments
      • GetShipmentDetails
    • Retail Procurement Transaction Status
      • getTransaction
  1. Sales

getOrderMetrics

北美(North America)
https://sellingpartnerapi-na.amazon.com
北美(North America)
https://sellingpartnerapi-na.amazon.com
GET
https://sellingpartnerapi-na.amazon.com
/sales/v1/orderMetrics
Sales
返回给定间隔内的聚合订单指标,按粒度分解,针对特定买方类型。
使用计划:
速率(每秒请求数)突发
.515
x-amzn-RateLimit-Limit 响应头返回对请求的操作应用的使用计划速率限制(如适用)。上表指示了此操作的默认速率和突发值。业务需求较高的销售合作伙伴可能会看到比此处显示的更高的速率和突发值。有关更多信息,请参阅销售合作伙伴 API 中的使用计划和速率限制。

请求参数

Query 参数
marketplaceIds
array[string]
必需
一个市场标识符。这指定了下单的市场。只能指定一个市场。
例如,ATVPDKIKX0DER表示美国市场。
interval
string 
必需
用于选择订单指标的时间间隔。它的形式为两个日期,由两个连字符分隔(第一个日期包含在内;第二个日期不包含在内)。日期采用ISO8601格式,并且必须表示绝对时间(可以是Z表示法或偏移表示法)。例:2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 请求-07:00时区内9月1日、2日和3日的订单指标。
granularityTimeZone
string 
可选
用于确定日界限的IANA兼容时区。当指定的粒度值大于小时时,必需使用。granularityTimeZone值必须与指定区间值的偏移量对齐。例如,如果区间值使用Z表示法,则granularityTimeZone必须为UTC。如果区间值使用偏移量,则granularityTimeZone必须是一个与该偏移量匹配的IANA兼容时区。例如:US/Pacific用于计算US/Pacific区域的日界限,同时考虑夏令时。
granularity
enum<string> 
必需
订单指标分组的粒度,基于时间单位。指定粒度=小时仅在指定的时间间隔小于或等于现在起30天时请求成功。对于所有其他粒度,指定的时间间隔必须小于或等于现在起2年。指定粒度=总计会返回在您指定的整个时间间隔内聚合的订单指标。如果时间间隔的开始和结束日期与指定的粒度不一致,则响应时间间隔的开头和结尾将包含部分数据。示例:按天获取请求间隔的每日细分,其中天的边界由granularityTimeZone定义。
枚举值:
HourDayWeekMonthYearTotal
buyerType
enum<string> 
可选
根据您指定的买家类型过滤结果,B2B(企业对企业)或B2C(企业对客户)。例如:B2B,如果您希望响应仅包含B2B买家的订单指标。
枚举值:
B2BB2CAll
默认值:
All
fulfillmentNetwork
string 
可选
过滤您指定的履行网络的结果,即 MFN(商家履行网络)或 AFN(亚马逊履行网络)。如果您希望响应包含所有履行网络的订单指标,请不要包括此过滤器。例如:AFN,如果您希望响应仅包含亚马逊履行网络的订单指标。
firstDayOfWeek
enum<string> 
可选
指定当 granularity=Week 时一周开始的日子,可以是星期一或星期天。默认值:星期一。示例:如果您希望一周从星期天开始,请选择星期天。
枚举值:
MondaySunday
默认值:
Monday
asin
string 
可选
通过您指定的ASIN过滤结果。指定ASIN和SKU会返回错误。如果您希望响应包含所有ASIN的订单指标,请不要包含此过滤器。例如:B0792R1RSN,如果您希望响应仅包含ASIN B0792R1RSN的订单指标。
sku
string 
可选
按您指定的SKU过滤结果。指定ASIN和SKU会返回错误。如果您希望响应包含所有SKU的订单指标,请不要包含此过滤器。例如:TestSKU,如果您希望响应仅包含SKU TestSKU的订单指标。

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://sellingpartnerapi-na.amazon.com/sales/v1/orderMetrics?marketplaceIds&interval&granularity'

返回响应

🟢200成功
application/json
对资源 OrderMetrics 采取的 OrderMetric 操作。
Headers
x-amzn-RateLimit-Limit
string 
可选
您对此操作的速率限制(每秒请求数)。
x-amzn-RequestId
string 
唯一请求引用ID。
可选
Body
getOrderMetrics 操作的响应架构。
payload
array[object (OrderMetricsInterval) {6}] 
可选
一组订单指标,每个指标限于特定的时间区间。
interval
string 
必需
基于请求的粒度(例如,小时、天等)的时间间隔。如果这是列表中的第一个或最后一个时间间隔,如果请求的时间间隔与请求的粒度不一致(例如,请求的时间间隔为2018-09-01T02:00:00Z--2018-09-04T19:00:00Z,粒度为天,将导致9月1日的UTC天和9月4日的UTC天具有部分数据),则可能包含不完整的数据。
unitCount
integer 
必需
基于指定过滤条件的订单中单位数量。
orderItemCount
integer 
必需
根据指定过滤器的订单商品数量。
orderCount
integer 
必需
根据指定过滤器的订单数量。
averageUnitPrice
object (Money) 
货币类型和金额。
必需
totalSales
object (Money) 
货币类型和金额。
必需
errors
array[object (Error) {3}] 
可选
请求失败时返回的错误响应列表。
code
string 
必需
一个识别所发生错误类型的错误代码。
message
string 
必需
一种以人类可读的形式描述错误状态的消息。
details
string 
可选
可以帮助拨打者理解或解决问题的附加细节。
示例
{
    "payload": [
        {
            "interval": "string",
            "unitCount": 0,
            "orderItemCount": 0,
            "orderCount": 0,
            "averageUnitPrice": {
                "currencyCode": "string",
                "amount": "string"
            },
            "totalSales": {
                "currencyCode": "string",
                "amount": "string"
            }
        }
    ],
    "errors": [
        {
            "code": "string",
            "message": "string",
            "details": "string"
        }
    ]
}
🟠400请求有误
🟠403禁止访问
🟠404记录不存在
🟠413413
🟠415415
🟠429429
🔴500服务器错误
🔴503服务器故障

技术咨询扫码联系作者

SP-API技术咨询,开发者申请,Amazon ERP源码

扫码加入交流群
上一页
listOffers
下一页
getServiceJobByServiceJobId
Built with