keyfil/教程/电商/20250310-eBay接入指南.md

76 lines
2.3 KiB
Markdown
Raw Normal View History

<!-- Space: qifu -->
<!-- Parent: 后端技术&知识&规范 -->
<!-- Parent: 技术方案 -->
<!-- Parent: 基建 -->
<!-- Parent: 03-接入指南 -->
<!-- Parent: 0301-电商接入指南 -->
<!-- Title: 20250310-eBay接入指南 -->
<!-- Macro: :anchor\((.*)\):
Template: ac:anchor
Anchor: ${1} -->
<!-- Macro: \!\[.*\]\((.+)\)\<\!\-\- width=(.*) \-\-\>
Template: ac:image
Url: ${1}
Width: ${2} -->
<!-- Macro: \<\!\-\- :toc: \-\-\>
Template: ac:toc
Printable: 'false'
MinLevel: 2
MaxLevel: 4 -->
<!-- Include: 杂项/声明文件.md -->
<!-- :toc: -->
# eBay接入指南
> 官方文档https://developer.ebay.com/develop/guides
## eBay授权流程
- 文档链接https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
### 授权码授权流程
![](https://picture.texous.cn/blog/20250310110545915.png)
### 访问令牌获取限制
![](https://picture.texous.cn/blog/20250310110745510.png)
#### 访问令牌注意事项
- 由于访问令牌获取限制,如果用户数量过多时,需要有多个应用来承载
- 所以设计时需要考虑该问题
- 后续运维也需要注意该问题
## 接口梳理
- 沙箱环境https://api.sandbox.ebay.com
- 生产环境https://api.ebay.com
### 授权接口
#### 获取授权链接
- 文档https://developer.ebay.com/api-docs/static/oauth-consent-request.html
- 接口GET /oauth2/authorize
#### 获取AccessToken
- 文档https://developer.ebay.com/api-docs/static/oauth-auth-code-grant-request.html
- 接口POST /identity/v1/oauth2/token
#### 根据RefreshToken获取AccessToken
- 文档https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html
- 接口POST /identity/v1/oauth2/token
### 拉单接口
- 文档https://developer.ebay.com/api-docs/sell/fulfillment/resources/order/methods/getOrders
- 接口GET /sell/fulfillment/v1/order
### 发货接口
- 文档https://developer.ebay.com/api-docs/sell/fulfillment/resources/order/shipping_fulfillment/methods/createShippingFulfillment
- 接口POST /sell/fulfillment/v1/order/{orderId}/shipping_fulfillment
## 接口流程
### 电商用户授权流程
![](https://picture.texous.cn/blog/20250310161855028.png)
### 接口交互流程
![](https://picture.texous.cn/blog/20250310164117594.png)