All Products
Search
Document Center

Expenses and Costs:QueryOrders

Last Updated:Oct 10, 2026

Queries the orders of users or distribution 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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeOrderList

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

CreateTimeEnd

string

No

The end time of the creation time range. By default, orders created 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.

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: subscription

  • PayAsYouGo: pay-as-you-go

Subscription

OrderType

string

No

The order type. Valid values:

  • New: new purchase

  • Renew: renewal

  • Upgrade: upgrade

  • TempUpgrade: temporary upgrade

  • Downgrade: downgrade

  • Refund: refund

  • Convert: billing method conversion

  • ResizeDisk: disk resizing

  • CompensatoryRenew: compensatory renewal

  • IncreaseUpgrade: bandwidth upgrade

  • Exchange: exchange

  • ChangeOperatingSystem: operating system replacement

New

PaymentStatus

string

No

The payment status. For non-refund orders, valid values:

  • Unpaid: unpaid

  • Paid: paid

  • Cancelled: canceled

Note

For refund orders, this parameter can be set to NULL.

Paid

CreateTimeStart

string

No

The start time of the creation time range. By default, orders created 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 elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Data

object

The response data.

HostName

string

The hostname.

test

OrderList

object

Order

array<object>

The order list.

object

AfterTaxAmount

string

The after-tax amount.

66

CommodityCode

string

The commodity code.

ecs

CreateTime

string

The creation time in the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. The time is in UTC.

2017-06-08T09:41:30Z

Currency

string

The currency.

CNY

OrderId

string

The order ID.

34532532

OrderType

string

The order type. Valid values:

  • New: new purchase

  • Renew: renewal

  • Upgrade: upgrade

  • TempUpgrade: temporary upgrade

  • Downgrade: downgrade

  • Refund: refund

  • Convert: billing method conversion

  • ResizeDisk: disk resizing

  • CompensatoryRenew: compensatory renewal

  • IncreaseUpgrade: bandwidth upgrade

  • Exchange: exchange

  • ChangeOperatingSystem: operating system replacement

New

PaymentCurrency

string

The payment currency.

CNY

PaymentStatus

string

The payment status. For non-refund orders, valid values:

  • Unpaid: unpaid

  • Paid: paid

  • Cancelled: canceled

Note

For refund orders, this parameter can be set to NULL.

Paid

PaymentTime

string

The payment time in the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. The time is in UTC.

2017-06-08T09:41:30Z

PretaxAmount

string

The payable amount before tax.

0

PretaxAmountLocal

string

The local currency amount.

0

PretaxGrossAmount

string

The original amount.

0

ProductCode

string

The primary product code.

rds

ProductType

string

The primary product type.

rds

RelatedOrderId

string

The ID of the associated order.

234535345345342

SubscriptionType

string

The subscription type. Valid values:

  • Subscription: subscription

  • PayAsYouGo: pay-as-you-go

PayAsYouGo

Tax

string

The tax.

1

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

Message

string

The error message.

Successful!

RequestId

string

The request ID.

61293E7A-3406-4447-8620-EC88B0AA66AD

Success

boolean

Indicates whether the request is successful.

true

Examples

Success response

JSON format

{
  "Code": "Success",
  "Data": {
    "HostName": "test",
    "OrderList": {
      "Order": [
        {
          "AfterTaxAmount": "66",
          "CommodityCode": "ecs",
          "CreateTime": "2017-06-08T09:41:30Z",
          "Currency": "CNY",
          "OrderId": "34532532",
          "OrderType": "New",
          "PaymentCurrency": "CNY",
          "PaymentStatus": "Paid",
          "PaymentTime": "2017-06-08T09:41:30Z",
          "PretaxAmount": "0",
          "PretaxAmountLocal": "0",
          "PretaxGrossAmount": "0",
          "ProductCode": "rds",
          "ProductType": "rds",
          "RelatedOrderId": "234535345345342",
          "SubscriptionType": "PayAsYouGo",
          "Tax": "1"
        }
      ]
    },
    "PageNum": 1,
    "PageSize": 20,
    "TotalCount": 1
  },
  "Message": "Successful!",
  "RequestId": "61293E7A-3406-4447-8620-EC88B0AA66AD",
  "Success": true
}

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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.