Amazon Selling Partner API (SP-API)-中文
工具首页问答社区广告API开发者申请AI智能助手官方文档TokenApi Reference
工具首页问答社区广告API开发者申请AI智能助手官方文档TokenApi Reference
  1. Auth Token
  • Auth Token
    • 获取Token
      POST
    • 刷新Token
      POST
    • 获取无授权Token
      POST
  • 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
    • 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. Auth Token

获取Token

北美(North America)
https://sellingpartnerapi-na.amazon.com
北美(North America)
https://sellingpartnerapi-na.amazon.com
POST
https://sellingpartnerapi-na.amazon.com
/auth/o2/token

欢迎来到SP-API中文接口文档工作台。文档最新更新时间:2025年4月26日#

提示
当前是SP-API的Token接口部分。
如果需要调用其他Order Listing FBA Report Feed 等等接口,请移步 Api Reference(默认按照字母排序)

使用之前必须先切换 右上方环境和设置环境变量#

环境分为: 北美,远东,欧洲
环境变量根据接口不同:
调用Api Reference,只需要设置 access_token
调用Token接口需要设置:client_id 和 client_secert
根据授权返回的code获取refresh_token和access_token
注意:请先切换[环境变量]为Token接口 。 代理开发者,请使用Token代理接口
授权后的参数:
state 步骤 2 中的状态值。
selling_partner_id 授权您的应用程序的销售伙伴的标识符。
mws_auth_token (仅限卖家申请)在为 Amazon Marketplace Web Service 调用创建查询字符串时指定的值。
spapi_oauth_code 用于生成 LWA 刷新令牌的 Login with Amazon (LWA) 授权代码
这里包含了所有的SP-API的接口,便于您快速调试和调研数据。有疑问可以联系作者:微信号 sfgoods. 欢迎骚扰

作者可以提供👻#

[ √] > SP-API开发者API技术咨询
[ √] > SP-API开发者申请协助(PII/非PII/品牌分析等)-
[ √] > SP-API开发者二审协助、审计协助

MarketplaceIDs#

国家英文名 (Country)国家代码 (Country Code)Marketplace ID
加拿大 (Canada)CAA2EUQ1WTGCTBG2
美国 (United States of America)USATVPDKIKX0DER
墨西哥 (Mexico)MXA1AM78C64UM0Y8
巴西 (Brazil)BRA2Q3Y263D00KWC
爱尔兰 (Ireland)IEA28R8C7NBKEWEA
西班牙 (Spain)ESA1RKKUPIHCS9HS
英国 (United Kingdom)UKA1F83G8C2ARO7P
法国 (France)FRA13V1IB3VIYZZH
比利时 (Belgium)BEAMEN7PMS3EDWL
荷兰 (Netherlands)NLA1805IZSGTT6HS
德国 (Germany)DEA1PA6795UKMFR9
意大利 (Italy)ITAPJ6JRA9NG5V4
瑞典 (Sweden)SEA2NODRKZP88ZB9
南非 (South Africa)ZAAE08WJ6YKNBMC
波兰 (Poland)PLA1C3SOZRARQ6R3
埃及 (Egypt)EGARBP9OOSHTCHU
土耳其 (Turkey)TRA33AVAJ2PDY3EV
沙特阿拉伯 (Saudi Arabia)SAA17E79C6D8DWNP
阿联酋 (United Arab Emirates)AEA2VIGQ35RCS4UG
印度 (India)INA21TJRUUN4KGV
新加坡 (Singapore)SGA19VAU5U5O7RUS
澳大利亚 (Australia)AUA39IBJ37TRP1C6
日本 (Japan)JPA1VC38T7YXB528

不同销售地区的端点#

销售区域端点 (Endpoint)AWS 区域 (AWS Region)
北美地区(加拿大、美国、墨西哥和巴西市场)https://sellingpartnerapi-na.amazon.comus-east-1
欧洲(爱尔兰、西班牙、英国、法国、比利时、荷兰、德国、意大利、瑞典、南非、波兰、沙特阿拉伯、埃及、土耳其、阿联酋和印度市场)https://sellingpartnerapi-eu.amazon.comeu-west-1
远东(新加坡、澳大利亚和日本市场)https://sellingpartnerapi-fe.amazon.comus-west-2

请求参数

Body 参数application/json
grant_type
string 
授权类型
必需
code
string 
授权code
必需
client_id
string 
开发者ID
必需
client_secret
string 
开发者密钥
必需
示例
{
  "grant_type": "authorization_code",
  "code": "ANDRasffGNatieRieOYBG",
  "client_id": "{{client_id}}",
  "client_secret": "{{client_secret}}"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sellingpartnerapi-na.amazon.com/auth/o2/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "grant_type":"authorization_code",
    "code":"ANDRasffGNatieRieOYBG",
    "client_id":"{{client_id}}",
    "client_secret":"{{client_secret}}"   
}'

返回响应

🟢200成功
application/json
Body
access_token
string 
必需
token_type
string 
必需
expires_in
integer 
必需
refresh_token
string 
必需
示例
{
  "access_token": "Atza|IQEBLjAsAexampleHpi0U-Dme37rR6CuUpSR",
  "token_type": "bearer",
  "expires_in": 3600,
  "refresh_token": "Atzr|IQEBLzAtAhexamplewVz2Nn6f2y-tpJX2DeX"
}

技术咨询扫码联系作者

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

扫码加入交流群
下一页
刷新Token
Built with