GetOrders
Queries the orders of users or reseller customers. By default, this operation queries orders created within the last hour. To query orders over a longer period, specify the CreateTimeStart and CreateTimeEnd parameters.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bssapi:QueryOrders |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CreateTimeEnd |
string |
No |
The end of the time range during which the orders were created. By default, orders created within the last hour are queried. Specify the time 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. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
20 |
| ProductCode |
string |
No |
The product code. |
rds |
| ProductType |
string |
No |
The product type. |
rds |
| SubscriptionType |
string |
No |
The subscription type. Valid values:
|
Subscription |
| OrderType |
string |
No |
The order type. Valid values:
|
New |
| PaymentStatus |
string |
No |
The payment status. For non-refund orders, valid values:
Note
For refund orders, this parameter can be set to NULL. |
Paid |
| CreateTimeStart |
string |
No |
The start of the time range during which the orders were created. By default, orders created within the last hour are queried. Specify the time in the YYYY-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
2016-05-23T13:00:00Z |
| MemberUid |
integer |
No |
The UID of the member accounts in an enterprise multi-account architecture. If this scenario does not apply, you do not need to specify this parameter. |
1779628988149763 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. |
Success |
| Message |
string |
The error message. |
Successful! |
| RequestId |
string |
The request ID. |
6000EE23-274B-4E07-A697-FF2E999520A4 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Data |
object |
The returned data. |
|
| HostName |
string |
The hostname. |
test |
| PageNum |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. Set this parameter to a maximum of 20. A larger value may cause a timeout. |
20 |
| TotalCount |
integer |
The total number of entries. |
1 |
| OrderList |
object |
||
| Order |
array<object> |
The order list. |
|
|
object |
|||
| AfterTaxAmount |
string |
The after-tax amount. |
66 |
| ProductCode |
string |
The primary product code. |
rds |
| CreateTime |
string |
The creation time. The time is in the YYYY-MM-DDTHH:mm:ssZ format and in UTC. |
2017-06-08T09:41:30Z |
| ProductType |
string |
The primary product type. |
rds |
| RelatedOrderId |
string |
The ID of the associated order. |
234535345345342 |
| PaymentCurrency |
string |
The payment currency. CNY: Chinese yuan. USD: US dollar. JPY: Japanese yen. |
CNY |
| PaymentTime |
string |
The payment time. The time is in the YYYY-MM-DDTHH:mm:ssZ format and in UTC. |
2017-06-08T09:41:30Z |
| Tax |
string |
The tax. This parameter is used only on the international site. |
1 |
| OrderId |
string |
The order ID. |
237258627070169 |
| SubscriptionType |
string |
The subscription type. Valid values:
|
Subscription |
| PretaxGrossAmount |
string |
The original amount. |
0 |
| OrderType |
string |
The order type. Valid values:
|
New |
| PretaxAmount |
string |
The payable amount of the order. |
0 |
| Currency |
string |
The currency. |
CNY |
| CommodityCode |
string |
The commodity code. |
rds |
| PaymentStatus |
string |
The payment status. For non-refund orders, valid values:
Note
For refund orders, this parameter can be set to NULL. |
Paid |
| PretaxAmountLocal |
string |
The local currency amount. |
0 |
Examples
Success response
JSON format
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "6000EE23-274B-4E07-A697-FF2E999520A4",
"Success": true,
"Data": {
"HostName": "test",
"PageNum": 1,
"PageSize": 20,
"TotalCount": 1,
"OrderList": {
"Order": [
{
"AfterTaxAmount": "66",
"ProductCode": "rds",
"CreateTime": "2017-06-08T09:41:30Z",
"ProductType": "rds",
"RelatedOrderId": "234535345345342",
"PaymentCurrency": "CNY",
"PaymentTime": "2017-06-08T09:41:30Z",
"Tax": "1",
"OrderId": "237258627070169",
"SubscriptionType": "Subscription",
"PretaxGrossAmount": "0",
"OrderType": "New",
"PretaxAmount": "0",
"Currency": "CNY",
"CommodityCode": "rds",
"PaymentStatus": "Paid",
"PretaxAmountLocal": "0"
}
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidOwner | The specified owner doesn't belong to caller. | Invalid user identity. |
| 401 | InvalidCaller | The caller's primary account is invalid or does not have permission to query enterprise member account information. | The caller's primary account is invalid or does not have permission to query enterprise member account information. |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.