List subscriptions¶
List the most recently created subscriptions for an account, with periods, prices, and entitlements, up to 1,000 entries.
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/subscriptions
Before you begin¶
Prepare a valid personal access token for the account owner.
Call List current accounts to obtain the target account’s ID.
Request example¶
Replace $MOI_PERSONAL_ACCESS_TOKEN and $ACCOUNT_ID in the example with your personal access token and the selected account’s ID.
curl -X GET \
"https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/subscriptions" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target account ID from |
Successful response¶
Returns HTTP 200 with the account’s subscriptions; the list is empty when no subscriptions exist.
{
"items": [],
"total": 0
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Records ordered by creation time, newest first, up to 1,000. |
|
string |
Subscription ID. |
|
string |
Billing account ID. |
|
string |
Subscription product code. |
|
string |
Product price ID. |
|
string |
Monthly subscription price in Credit, as a decimal string. |
|
string |
Subscription status. |
|
string |
Current subscription period start. |
|
string |
Current subscription period end. |
|
string |
Next charge time. |
|
boolean |
Whether cancellation is scheduled for the end of the current period. |
|
integer |
Entitlement version. |
|
object |
Product entitlements, with keys depending on the product. |
|
boolean |
Enterprise identity integration entitlement, when applicable. |
|
string |
Support priority. The period is part of the key. |
|
boolean |
Private model deployment entitlement, when applicable. Periods are part of the key. |
|
string |
Initial charge ID; may be omitted. |
|
string |
Associated subscription usage event ID; may be omitted. |
|
string |
Charged Credit; may be omitted. |
|
integer |
Creation time in Unix seconds. |
|
integer |
Update time in Unix seconds. |
|
integer |
Number of returned records, up to 1,000. |
In field paths, [] denotes each array item. For example, items[].subscription_id refers to the corresponding field in each item.
Error response¶
Missing authentication returns HTTP 401; provide a valid personal access token.
{
"code": "unauthenticated",
"message": "missing bearer token",
"error": "missing bearer token"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
string |
Compatibility error message, with the same content as message. |