describe-seats
Call this API to query the seat list under the master account. Filtering by sub-user, plan resource, plan type, and seat state is supported, as well as pagination.
Authentication
This API requires API Key authentication. Log in to the Baidu AI Cloud Console to obtain your API Key:
- If you already have an API Key, click Show in the API Key column and copy it.
- If you have not created an API Key yet, click Create API Key. After it is created, click Show in the API Key column and copy it.
Keep your API Key secure. Do not share it publicly or commit it to code repositories.
Request Parameters
Filters by sub-user cloudId. Pass an empty array or omit this field to disable this filter.
Show Sub-properties
Hide Sub-properties
Filters by plan resource ID. A plan resource ID is a string prefixed with tps-.
Show Sub-properties
Hide Sub-properties
Filters by plan type. Valid values: lite, pro, max, ultra.
Show Sub-properties
Hide Sub-properties
Filters by seat state.0: Unallocated.1: In use.2: Expired.3: Deactivated.
If omitted, seats with states 0/1/2 are returned by default (state 3 is excluded).
Show Sub-properties
Hide Sub-properties
The page number, starting from 1.
The number of items per page.
POST /v2/overseas/team/tokenplan?Action=DescribeSeats HTTP/1.1
Host: api.baiduqianfan.ai
Authorization: Bearer <API Key>
Content-Type: application/json
{
"cloudIds": [],
"pageNo": 1,
"pageSize": 10
}
Sample Code
curl -X POST 'https://api.baiduqianfan.ai/v2/overseas/team/tokenplan?Action=DescribeSeats' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <API Key>' \
-d '{
"cloudIds": [],
"pageNo": 1,
"pageSize": 10
}'
Response
The request ID in UUID format, used for troubleshooting.
The business data object.
Show Sub-properties
Hide Sub-properties
The total number of items.
The seat list.
Show Sub-properties
Hide Sub-properties
Show Sub-properties
Hide Sub-properties
The seat ID.
The plan type: lite, pro, max, ultra.
The seat state.0: Unallocated.1: In use.2: Expired.3: Deactivated.
The ID of the plan resource the seat belongs to, a string prefixed with tps-.
The cloudId of the bound member. An empty string if the seat is unallocated (seatState is 0).
The login name of the bound member. An empty string if the seat is unallocated.
The binding time, in yyyy-MM-dd HH:mm:ss format. An empty string if the seat is unallocated.
The subscription start time.
The subscription end time.
The total credits of the seat, a DECIMAL string with two decimal places (e.g., 20000.00). Passed through as-is to avoid precision loss; process it as a string.
The used credits of the seat, a DECIMAL string with two decimal places (e.g., 0.00). Passed through as-is to avoid precision loss; process it as a string.
{
"requestId": "98186cde-f322-4022-be90-0d944555bcee",
"result": {
"total": 2,
"items": [
{
"seatId": "tpst-w25ysj7mghkt",
"planType": "lite",
"seatState": 1,
"memberName": "fluxa_f1_e2e_user"
},
{
"seatId": "tpst-f77gwdgksmri",
"planType": "lite",
"seatState": 0,
"memberName": ""
}
]
}
}
Error Codes
If a request fails, the server will return a JSON object with a code field identifying the error.
Common Error Codes for This API
| Error Code | Description |
|---|---|
ParamError |
Failed to parse or validate request parameters. |
Complete Error Code Reference
The table below lists all possible values of the code field returned by TokenPlan APIs. The common error codes of each API are a subset of this list.
| Error Code | HTTP Status Code | Description |
|---|---|---|
ParamError |
400 | Failed to parse or validate request parameters. |
ParamValueError |
400 | Invalid parameter value. |
RateLimitExceeded |
429 | Too many concurrent requests; rate limiting triggered. |
TokenPlanSeatNotFound |
400 | The seat does not exist. |
TokenPlanSeatNoPermission |
400 | No permission to operate on this seat. |
TokenPlanSeatNotAvailable |
400 | The seat is not in an operable state (deactivated, expired, or modified by a concurrent operation). |
TokenPlanSeatMemberMismatch |
400 | The member bound to the seat does not match the request. |
TokenPlanMemberNotFound |
400 | The member does not exist. |
TokenPlanMemberNoPermission |
400 | No permission to operate on this member. |
TokenPlanParamDuplicated |
400 | The request contains duplicate items (e.g., seatId). |
TokenPlanApiKeyRespError |
500 | The API Key service returned an error. |
TokenPlanApiKeyRespNull |
500 | The API Key service returned an empty response. |
TokenPlanApiKeyIsEmpty |
500 | The API Key is an empty string. |
TokenPlanMemberListError |
500 | An error occurred while querying the member list. |
TokenPlanIamQuerySubusersWithContactError |
500 | An error occurred while querying sub-user information from IAM. |
TokenPlanResourceNotFound |
400 | The plan resource does not exist. |
TokenPlanResourceAlreadyExists |
400 | The plan resource already exists and cannot be purchased again. |
TokenPlanResourceNotAvailable |
400 | The plan resource has been unsubscribed or has expired and cannot be operated on. |
TokenPlanSeatPlanMismatch |
400 | The seat's plan type does not match the request. |
TokenPlanSeatPlanNotUpgradable |
400 | The seat's plan type does not support upgrades. |
TokenPlanLogNoAction |
400 | Unsupported log action. |
TokenPlanLogParseTimeError |
500 | An error occurred while parsing the log time. |
TokenPlanLimitAdminError |
500 | The limitServer service encountered an error. |
TokenPlanMysqlMemberError |
500 | An error occurred while querying member data. |
TokenPlanDomainHasActivePlan |
400 | The master account already has an active plan and cannot purchase another one. |
TokenPlanMemberAlreadyBound |
400 | The member is already bound to a seat under the current plan and cannot be bound again. |
TokenPlanSeatResourceMismatch |
400 | Seats bound in the same batch must belong to the same plan. |
TokenPlanChooseAndBindError |
500 | An error occurred while adding a member from an existing sub-user. |
TokenPlanCreateAndBindError |
400 | An error occurred while creating the sub-user or adding the member. |
