API Name
QueryOrders
Overview
You can call this operation to retrieve the list of orders.
This api retrieves order created between latest one hour by default.
Request parameters
| Name |
Type |
Required |
Description |
| ProductCode |
String |
Yes |
The code of the specified product. |
| ProductType |
String |
No |
The type of the specified product. |
| SubscriptionType |
String |
Yes |
The type of billing method. Valid values: Subscription, PayAsYouGo |
| OrderType |
String |
No |
The type of order. Valid values: New, Renew, Upgrade, Refund |
| PaymentStatus |
String |
No |
The status of payment. Except refund order the valid values could be Unpaid, Paid, Cancelled. Use Null for refund order |
| CreateTimeStart |
String |
No |
The start time of the period when the specified orders were created. Will query latest 1 hour orders if blank. |
| CreateTimeEnd |
String |
No |
The end time of the period when the specified orders were created. Will query latest 1 hour orders if blank. |
| PageNum |
Integer |
No |
The current page number. |
| PageSize |
Integer |
No |
The number of items that are displayed on each page. |
| OwnerId |
Long |
No |
The ID of the owner. This parameter is required when a distributer calls this operation. |
Response parameters
| Name |
Type |
Required |
| OrderID |
String |
The ID of the specified order. |
| ProductCode |
String |
The code of the specified main product. |
| ProductType |
String |
The type of the specified main product. |
| SubscriptionType |
String |
The type of billing method. Valid values: Subscription and PayAsYouGo. |
| OrderType |
String |
The type of order. Valid values: New, Renew, Upgrade, Refund |
| CreateTime |
String |
The time when the specified order was created. |
| PaymentTime |
String |
The time of payment. |
| PaymentStatus |
String |
The status of payment. Valid values: Unpaid, Paid, Cancelled |
| PretaxGrossAmount |
String |
The pretax gross amount. |
| PretaxAmount |
String |
The pretax amount. |
| Currency |
String |
The type of currency. |
Error codes
| Error code |
Description |
HTTP status code |
Description |
| NotApplicable |
This API is not applicable for caller. |
400 |
The error message returned when you are not authorized to use the API. |
| MissingParameter |
The specified parameter xx is mandatory for this request. |
400 |
The error message returned when the xx parameter is not specified. |
| InvalidParameter |
The specified parameter xx is not valid. |
400 |
The error message returned when the xx parameter is invalid. |
| InvalidModuleCode |
The specified moduleCode is not valid. |
400 |
The error message returned when the specified moduleCode parameter is invalid. |
| InvalidConfigCode |
The specified configCode is not valid. |
400 |
The error message returned when the specified configCode parameter is invalid. |
| InvalidOwner |
The specified owner doesn’t belong to caller. |
400 |
The error message returned when the specified owner does not belong to the caller. |
| InvalidCaller |
The specified caller doesn’t exists. |
400 |
The error message returned when the caller is invalid. |
| InternalError |
The request processing has failed due to some unknown error, exception or failure. |
400 |
The error message returned when an unknown internal error occurs. |
| ProductNotFind |
Can not find inquired product, it may not exist. |
400 |
The error message returned when the specified product is invalid. |
Sample requests
https://business.ap-southeast-1.aliyuncs.com/?Action=QueryOrders&CreateTimeStart=2018-09-01T00:00:00Z
Sample responses
"Data": { "OrderList": { "Order": [ { "SubscriptionType": "Subscription", "PretaxAmountLocal": 0.11, "OrderId": "500491030250924", "PretaxAmount": 0.11, "Tax": 0.01, "AfterTaxAmount": 0.12, "PaymentStatus": "Cancelled", "PaymentTime": "2018-09-17T06:13:43Z", "PaymentCurrency": "USD", "ProductType": "", "OrderType": "New", "CreateTime": "2018-09-17T06:13:43Z", "PretaxGrossAmount": 0.1, "Currency": "USD" }, { "SubscriptionType": "Subscription", "ProductCode": "yunqimeeting_intl", "PretaxAmountLocal": 27.27, "OrderId": "500482925350924", "AfterTaxAmount": 27.54, "PretaxAmount": 27.27, "Tax": 0.27, "PaymentStatus": "Cancelled", "PaymentTime": "2018-09-07T02:14:05Z", "PaymentCurrency": "USD", "ProductType": "2018_hzyq_piao_single_intl", "OrderType": "New", "CreateTime": "2018-09-07T02:14:05Z", "PretaxGrossAmount": 27, "Currency": "USD" } ] }, "TotalCount": 2, "PageSize": 20, "PageNum": 1