新蛋商城API端點和時間標準
新蛋商城API的端點是區分大小寫的。請確保您的請求URL(不包括Seller ID)全都使用小寫。並且此URL不能包含任何空格和分行符號。Seller ID除外,可以大寫。
Newegg.com, NeweggBusiness.com, Newegg.ca三個平台的端點/URLs
在提交不同平台的請求時,請使用正確的端點或者URLs:
Newegg.com: https://api.newegg.com/marketplace/ Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/ Newegg.ca: https://api.newegg.com/marketplace/can/
示例:XML, Request
POST https://api.newegg.com/marketplace/contentmgmt/item/inventory?sellerid=A006 Authorization: 727ddc067f4d115bd544aff46bc15634 SecretKey: 1B6B1383-01D1-4A1E-BA53-05DECE9BD765 Content-Type: application/xml Accept: application/xml
認證失敗錯誤資訊
錯誤代碼 | 描述 |
InvalidConsumerKey | The provided consumer key is incorrect or invalid
提供的使用者金鑰是錯誤的或是無效的 |
InvalidToken | Seller ID is null
商家編號為空值 |
InvalidToken | Secret Key is null
金鑰為空值 |
InvalidToken | Invalid Secret Key
無效的金鑰 |
AccessDenied | The specified seller ID is invalid or you do not have authorization from this seller
指定的商家編號無效或者您沒有該商家的授權 |
AccessDenied | The API services for this seller account has been deactivated
該商家帳戶的API服務已停用 |
示例:XML, Response
<?xml version="1.0" encoding="utf-8"?> <Errors> <Error> <Code>InvalidToken</Code> <Message>Secret Key is null.</Message> </Error> </Errors>
示例:Json,Response
[ { "Code": "InvalidConsumerKey", "Message": "The provided consumer key is malformed or otherwise invalid." } ]
端點/URLs須區分大小寫
新蛋商城API URLs是區分大小寫的。 請確保您的請求URL(不包括Seller ID)全都使用小寫。並且URL不能包含任何空格或者分行符號。Seller ID除外,可以大寫。
Newegg.com示例
https://api.newegg.com/marketplace/contentmgmt/item https://api.newegg.com/marketplace/contentmgmt/item/inventory?sellerid={sellerid} https://api.newegg.com/marketplace/contentmgmt/item/price?sellerid={sellerid} https://api.newegg.com/marketplace/contentmgmt/item/inventoryandprice?sellerid={sellerid} https://api.newegg.com/marketplace/ordermgmt/orderstatus https://api.newegg.com/marketplace/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
NeweggBusiness.com示例
https://api.newegg.com/marketplace/b2b/contentmgmt/item https://api.newegg.com/marketplace/b2b/contentmgmt/item/inventory?sellerid={sellerid} https://api.newegg.com/marketplace/b2b/contentmgmt/item/price?sellerid={sellerid} https://api.newegg.com/marketplace/b2b/contentmgmt/item/inventoryandprice?sellerid={sellerid} https://api.newegg.com/marketplace/b2b/ordermgmt/orderstatus https://api.newegg.com/marketplace/b2b/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
Newegg.ca示例
https://api.newegg.com/marketplace/can/contentmgmt/item https://api.newegg.com/marketplace/can/contentmgmt/item/inventory?sellerid={sellerid} https://api.newegg.com/marketplace/can/contentmgmt/item/price?sellerid={sellerid} https://api.newegg.com/marketplace/can/contentmgmt/item/inventoryandprice?sellerid={sellerid} https://api.newegg.com/marketplace/can/ordermgmt/orderstatus https://api.newegg.com/marketplace/can/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
進入連接的TLS需求
與新蛋商城API端點的進入連接需要TLS 1.2版本或者更高。
註:TLS 1.1版本 已在10/01/2020後停用
太平洋標準時間(美國西部標準時間)要求
新蛋商城API服務要求日期與時間欄位在所有的請求和回覆內容中都顯示為美國西部標準時間(太平洋標準時間)。請確認在所有的文件和請求中,日期與時間欄位都使用的是美國西部標準時間(太平洋標準時間)。
更新日期:08/28/2020