本户订单列表(带 x-tansr-org 头 = org 订单);行数上限 50(近序截断,无 limit 参数;上限常量单点 src/contract/limits.ts ORDERS_LIST_LIMIT,消费方勿假设 100)
GET
/v1/orders
const url = 'https://api.tansr.com/v1/orders';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tansr.com/v1/orders \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-tansr-org
string
Org 作用域声明(org 公开 id);服务端校验成员资格与角色,非成员恒 404、角色不够 403
Responses
Section titled “Responses”列表(≤50 行)
Media typeapplication/json
object
data
Array<object>
object
id
required
string
sku
required
string
amount
required
string
currency
required
string
channel
required
string
createdAt
required
string
planOffer
object
catalogRevision
required
integer
caps
required
Example
{ "data": [ { "status": "created", "planOffer": { "giftTokens": { "grantOn": "purchase" } } } ]}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。