Git Product home page Git Product logo

amazon-sp-api's Introduction

Introduction:

Amazon published a new API used to replace MWS at 2020-10,Called Selling Partner API(SP-API). SP-API must use the AWS IAM to integration. this is a java version client SDK can make integration easily.
(亚马逊(amazon)在2020年10月推出了新的替代mws的api方案,称为Selling Partner API(SP-API)。 sp-api在修改原mws的接口方式的基础上引入了aws的IAM权限管理,增加了开发者的对接门坎和学习成本。 这里整理了一份java版的对接信息,供大家借鉴)

MWS:

document:http://docs.developer.amazonservices.com/en_US/dev_guide/index.html
sdk library:https://developer.amazonservices.com/javaclients

SP-API:

document: https://developer.amazonservices.com/
GitHub: https://github.com/amzn/selling-partner-api-docs
models: https://github.com/amzn/selling-partner-api-models/
Hands-on training camp:https://www.spapi.org.cn/cn/intro.html
(This training camp station is from AWS china team, the guide of the process and initialization of SP-API)
java version client sdk:https://github.com/penghaiping/amazon-sp-api

Different between MWS and SP-API:

1.SP-API是rest方式,mws是特殊的结构有xml也有xsd
2.SP-API授权利用了LWA,即Amazon对OAuth 2.0的实现。该模型消除了Amazon MWS所要求的手工交换认证令牌(mwsAuthToken)的需要
3.SP-API提供比Amazon MWS更好的数据访问控制。开发人员只能请求访问他们需要的数据,而销售商可以在API部分、操作或数据资源级别授予权限
4.SP-API允许您使用AWS身份和访问管理(IAM)直接获取和管理自己的身份验证凭据。对于Amazon MWS,您可以使用特殊的注册工作流接收Amazon提供的身份验证凭证,并且通过打开与Amazon MWS支持的联系方式获得新的凭证
5.SP-API使用AWS签名版本4进行身份验证。Amazon MWS使用签名版本2

Directions for use:

1.All the api class at path:src/main/java/com/amazon/spapi/api
(所有references相关的api的调用类都在src/main/java/com/amazon/spapi/api)
2.All the api test case class at path:src/test/java/com/amazon/spapi/api
(所有references相关的api的调用测试类都在src/test/java/com/amazon/spapi/api)
3.sellersApiTest is a call API test case class
(sellersApiTest写了个测试调用类,可参考)
4.docs directory include all the api and models documents
(所有md文档,包括api文档及models文档都在docs文件目录下)
5.documents directory include the Utils for upload and download files.
(在FeedApi及reportApi中上传和下载文件的工具类在documents目录下,里面是amazon提供的java case,包含了加解密)

amazon-sp-api's People

Contributors

chxbca avatar penghaiping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amazon-sp-api's Issues

请问限速如何处理

返回429,TooManyRequestsException,拉取过去一年的订单,但是订单里没有地址,然后每个订单调用一次获取地址的接口这里就超过限速了。加了sleep 1秒也无效。

possible to have .jar up to date

Hello,

I would like to use the sp api for my project : get feeds, upload catalog etc.. is it possible to have a .jar of this project and use it on my java final project?

Thanks

Some feedback on using CatalogApi

Thank you very much for your api package, which saved me a lot of development time. I hope to do better. There is currently a [2020-12-1] version of CatalogApi, I hope to join it, thank you

Api 更新

需要增加 product-type-definitions-api 相对应的接口实现。

"code": "InvalidSignature"

大佬,您好,我能请教一下你有遇到过,同样的amazon签名程序,其它接口通用正常调用,就listings接口返回"code": "InvalidSignature"么?

dataElement is RDT request

@penghaiping Hi, do you have the latest generated code with dataElement when generating the RDT? I tried to use your lib, but missing the dataElement. I tried to generate the code myself, I am able to call other SP-APIs without any issue but when I try to get RDT I am getting this InvalidSignature error:

The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

Do you know what could be wrong? Thanks

Report以及Feed API 更新

兄弟,帮忙更新一下这两个API~ 自己用swagger-codegen-cli不知道为啥生成不了。谢谢啦~

listingApi.getListingsItem方法获取item报签名异常

当sku 包含空格时(比如:YY - W28222284),通过getListingsItem 方法获取item 信息时,会返回以下错误:

{
"errors": [
{
"message": "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

The Canonical String for this request should have been
'GET
/listings/2021-08-01/items/xxx/YY%2520-%2520W28222284
includedData=summaries%2Cattributes%2Cissues%2Coffers%2CfulfillmentAvailability%2Cprocurement&marketplaceIds=ATVPDKIKX0DER
accept:application/json
content-type:application/json
host:sellingpartnerapi-na.amazon.com
The String-to-Sign should have been
'AWS4-HMAC-SHA256
20230518T034940Z
20230518/us-east-1/execute-api/aws4_request
da52ea62e120f455260d7cfa2e99892741981e262d3c8b4e13ad5fbbba53ec42'
",
"code": "InvalidSignature"
}
]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.