POST Purchase or renew a bundle subscription
POST /loom/v1/users/me/subscriptions
所属分组:Subscriptions · 买家订阅
BASE URL
https://router.shengsuanyun.com/api认证方式
Authorization: Bearer YOUR_API_KEY端点列表
POST/loom/v1/users/me/subscriptionsPurchase or renew a bundle subscription
请求体 · 必填
Purchase
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
bundleId | string | |
clientRequestId | string | |
expectedRevision | integer | |
renewalOf | string | |
tierType | string |
{
"bundleId": "string",
"clientRequestId": "string",
"expectedRevision": 0,
"renewalOf": "string",
"tierType": "string"
}请求示例
参考地址:https://loomloom.shengsuanyun.com。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://loomloom.shengsuanyun.com/loom/v1/users/me/subscriptions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"bundleId": "string",
"clientRequestId": "string",
"expectedRevision": 0,
"renewalOf": "string",
"tierType": "string"
}'响应
201 Created
application/json
| 字段 | 类型 | 说明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
billingPaymentId | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bundleId | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bundleSnapshot | object | 展开结构
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
buyerUserId | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
creatorUserId | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiresAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfilledAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfillmentConfirmedAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfillmentRevision | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lastErrorCode | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentDeadline | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
revision | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
snapshotHash | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
startsAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string |
{
"billingPaymentId": "string",
"bundleId": "string",
"bundleSnapshot": {
"accountingTimezone": "string",
"bundleId": "string",
"bundleName": "string",
"bundleRevision": 0,
"creatorUserId": 0,
"durationDays": 0,
"members": [
{
"listingId": "string",
"name": "string",
"saleStatus": "string"
}
],
"platformFeeBps": 0,
"policyVersion": "string",
"price": {
"amount": "1.7027920",
"currency": "CNY"
},
"schemaVersion": 0,
"tierType": "string"
},
"buyerUserId": 0,
"createdAt": "string",
"creatorUserId": 0,
"expiresAt": "string",
"fulfilledAt": "string",
"fulfillmentConfirmedAt": "string",
"fulfillmentRevision": 0,
"id": "string",
"lastErrorCode": "string",
"paymentDeadline": "string",
"revision": 0,
"snapshotHash": "string",
"startsAt": "string",
"state": "string",
"updatedAt": "string"
}202 Accepted
application/json
| 字段 | 类型 | 说明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
billingPaymentId | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bundleId | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bundleSnapshot | object | 展开结构
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
buyerUserId | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
creatorUserId | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiresAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfilledAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfillmentConfirmedAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fulfillmentRevision | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lastErrorCode | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentDeadline | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
revision | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
snapshotHash | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
startsAt | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string |
{
"billingPaymentId": "string",
"bundleId": "string",
"bundleSnapshot": {
"accountingTimezone": "string",
"bundleId": "string",
"bundleName": "string",
"bundleRevision": 0,
"creatorUserId": 0,
"durationDays": 0,
"members": [
{
"listingId": "string",
"name": "string",
"saleStatus": "string"
}
],
"platformFeeBps": 0,
"policyVersion": "string",
"price": {
"amount": "1.7027920",
"currency": "CNY"
},
"schemaVersion": 0,
"tierType": "string"
},
"buyerUserId": 0,
"createdAt": "string",
"creatorUserId": 0,
"expiresAt": "string",
"fulfilledAt": "string",
"fulfillmentConfirmedAt": "string",
"fulfillmentRevision": 0,
"id": "string",
"lastErrorCode": "string",
"paymentDeadline": "string",
"revision": 0,
"snapshotHash": "string",
"startsAt": "string",
"state": "string",
"updatedAt": "string"
}