Queries the orders of your Alibaba Cloud account or distributors. By default, orders within the last hour are queried. To query earlier orders, specify the CreateTimeStart and CreateTimeEnd parameters.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
bssapi:QueryOrders | READ |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CreateTimeEnd | string | No | The end time of the period during which the orders were created. By default, orders within the last hour are queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2016-05-23T12:00:00Z |
PageNum | integer | No | The page number of the page to return. | 1 |
PageSize | integer | No | The number of entries to return per page. | 20 |
ProductCode | string | No | The code of the service. | rds |
ProductType | string | No | The type of the service. | rds |
SubscriptionType | string | No | The billing method. Valid values:
| Subscription |
OrderType | string | No | The type of the order. Valid values:
| New |
PaymentStatus | string | No | The status of payment. Valid values for a non-refund order:
Note
: You can set this parameter to NULL for a refund order.
| Paid |
CreateTimeStart | string | No | The start time of the period during which the orders were created. By default, orders within the last hour are queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2016-05-23T13:00:00Z |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "61293E7A-3406-4447-8620-EC88B0AA66AD",
"Success": true,
"Data": {
"HostName": "test",
"PageNum": 1,
"PageSize": 20,
"TotalCount": 1,
"OrderList": {
"Order": [
{
"PretaxAmount": "0",
"CommodityCode": "ecs",
"RelatedOrderId": "234535345345342",
"CreateTime": "2017-06-08T09:41:30Z",
"Currency": "CNY",
"SubscriptionType": "PayAsYouGo",
"PaymentCurrency": "CNY",
"ProductType": "rds",
"AfterTaxAmount": "66",
"PaymentTime": "2017-06-08T09:41:30Z",
"PretaxGrossAmount": "0",
"OrderType": "New",
"PaymentStatus": "Paid",
"OrderId": "34532532",
"Tax": "1",
"PretaxAmountLocal": "0",
"ProductCode": "rds"
}
]
}
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOwner | The specified owner doesn't belong to caller. | Invalid user identity. |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|