Help Center > > API Reference> Transaction Management> Managing Yearly/Monthly Orders> Querying Order Details

Querying Order Details

Updated at: Dec 15, 2021 GMT+08:00

Function

Customers can view order details on the partner sales platform.

For details about how to view order details in Billing Center, see Viewing Order Details.

If you want to query the resource information of a specified order, invoke the API described in Querying Customer's Yearly/Monthly Resources and enter the order ID in the request to query the resource information.

Constraints

This API can be invoked using the AK/SK or token of the partner or AK/SK or token of the partner's customer.

URI

GET /v2/orders/customer-orders/details/{order_id}

The following table describes the parameters.

Table 1 Path parameters

Parameter

Mandatory

Value Range

Description

order_id

Yes

A maximum of 64 characters

Order ID.

The system will return the orders if the orders are queried.

Table 2 Query parameters

Parameter

Mandatory

Value Range

Description

offset

No

0 to a maximum integer

Offset, which starts from 0. The default value is 0.

NOTE:

This parameter is used for pagination. Retain its default value 0 if pagination is not required. offset indicates the offset relative to the first data record among all that meets the conditions configured. If you set offset to 1, the second and subsequent data records are returned.

For example, there are 10 data records, and if you set limit to 10 and offset to 1, the second to the tenth data records are returned.

limit

No

1 to 100

Number of records displayed per page. The default value is 10.

Table 3 Message header parameter

Parameter

Mandatory

Type

Value Range

Description

X-Language

No

String

A maximum of 10 characters

Language.

en_US: English

zh_CN: Chinese

If this parameter is not set, the default value Chinese is used

Request

Request Parameters

None

Example Request

GET https://bss-intl.myhuaweicloud.com/v2/orders/customer-orders/details/CS19040119281JMYC?limit=10&offset=0 HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

Response

Response Parameters

Parameter

Type

Value Range

Description

error_code

String

A maximum of 20 characters

Status code.

For details, see Returned Values.

error_msg

String

A maximum of 2,000 characters

Error description.

order_info

CustomerOrderEntityV2 Object

-

Order details.

For details, see Table 4.

total_count

Integer

-

Order item ID array.

order_line_items

List<OrderLineItemEntityV2>

-

ID of the primary order item mapping the order item.

For details, see Table 5.

Table 4 CustomerOrderEntityV2

Parameter

Type

Value Range

Description

order_id

String

A maximum of 64 characters

Order ID.

customer_id

String

A maximum of 64 characters

Customer account ID.

service_type_code

String

-

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

source_type

Integer

-

Customer order source type. The value can be:

  • 1. Customer
  • 2. Agent
  • 3: Contract
  • 4: Distributor

status

Integer

-

Order status. The value can be:

  • 1: Pending approval
  • 3: Processing
  • 4: Canceled
  • 5: Completed
  • 6: Pending payment
  • 9: To be confirmed

order_type

Integer

-

Order type. The value can be:

  • 1: New purchase
  • 2: Renewal
  • 3: Change
  • 4: Unsubscription
  • 11: Pay-per-use to yearly/monthly
  • 13: Trial
  • 14: Commercial use
  • 15: Price adjustment

official_amount

Double

-

Order amount (list price).

In the unsubscription order, this amount equals the value of amount_after_discount.

amount_after_discount

Double

-

Order amount after a discount (excluding the vouchers or cards).

measure_id

Integer

-

Order amount unit.

  • 1: 1 Yuan/Dollar

create_time

String

A maximum of 20 characters

Creation time.

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z

The range of HH is 0-23, and the range of mm and ss is 0-59.

payment_time

String

A maximum of 20 characters

Payment time.

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z

The range of HH is 0-23, and the range of mm and ss is 0-59.

amount_info

AmountInfoV2 Object

-

Order deduction details.

For details, see Table 6.

currency

String

A maximum of 4 characters

Currency code.

contract_id

String

A maximum of 64 characters

Contract ID.

user_name

String

A maximum of 64 characters

Order creator name

  • If the order is placed by the customer, the login name of the operator who places the order is returned.
  • If the order is placed by the operation personnel at the background, Operation personnel is returned.
  • If the order is automatically placed by the operation system, Operation system is returned.
Table 5 OrderLineItemEntityV2

Parameter

Type

Value Range

Description

order_line_item_id

String

A maximum of 64 characters

Order ID.

service_type_code

String

A maximum of 64 characters

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

product_id

String

A maximum of 64 characters

Product ID.

product_spec_desc

String

A maximum of 512 characters

Product specification description.

period_type

Integer

-

Period type. The options are as follows:

  • 0: Day
  • 1: Week
  • 2: Month
  • 3: Year
  • 4: Hour
  • 5: One-off
  • 6: Pay-per-use (reserved)
  • 7: By usage report (reserved)

period_num

Integer

-

Number of periods.

NOTE:

The value of this parameter is null for an unsubscription order.

effective_time

String

A maximum of 20 characters

Effective time.

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z

The range of HH is 0-23, and the range of mm and ss is 0-59.

expire_time

String

A maximum of 20 characters

Expiration time.

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z

The range of HH is 0-23, and the range of mm and ss is 0-59.

subscription_num

Integer

-

Number of subscriptions.

amount_after_discount

Double

-

Order amount after a discount (excluding the vouchers or cards).

official_amount

Double

-

Order amount (list price).

In the unsubscription order, the amount is equal to the value of currencyAfterDiscount.

amount_info

AmountInfoV2 Object

-

Order deduction details.

For details, see Table 6.

currency

String

A maximum of 4 characters

Currency code.

category_code

String

A maximum of 64 characters

Product catalog code.

product_owner_service

String

A maximum of 64 characters

Type code of a cloud service.

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

commercial_resource

string

A maximum of 64 characters

Type code of a commercial resource.

Resource type code. For example, the VM resource type code of ECS is hws.resource.type.vm. To obtain a specific resource type, call the API in Querying Resource Types.

Table 6 AmountInfoV2

Parameter

Type

Value Range

Description

discounts

List<DiscountItemV2>

-

Fee item.

For details, see Table 7.

flexipurchase_coupon_amount

Double

-

Flexi-purchase coupon amount (reserved).

coupon_amount

Double

-

Cash coupon amount.

stored_card_amount

Double

-

Stored-value card amount (reserved).

commission_amount

Double

-

Handling fee (only for unsubscription orders).

consumed_amount

Double

-

Consumption amount (only for unsubscription orders).

Table 7 DiscountItemV2

Parameter

Type

Value Range

Description

discount_type

String

A maximum of 8 characters

Discount type.

  • 200: Promotion product discount
  • 300: Promotion discount coupon
  • 301: Promotion coupon
  • 302: Promotion flexi-purchase coupon
  • 500: Specified discount for agent subscription
  • 501: Specified exemption for agent subscription
  • 502: Specified buy-it-now price for agent subscription
  • 600: Discount specified in the discount and rebate contract
  • 601: Discount specified in the channel frame contract
  • 602: Discount specified in the designated-purpose fund contract
  • 603: Discount specified in the directly signed offline contract
  • 604: Discount specified in the authorized telemarketing contract
  • 605: Discount specified in the commercial contract
  • 606: Discount specified in the channel commercial contract
  • 607: Partner authorized discount
  • 609: Discount for order price adjusting
  • 610: Discount amount
  • 700: Promotion discount
  • 800: Top-up account discount
  • 900: Product discount
  • 901: Buy-it-now price based on the benchmark price

discount_amount

Double

-

Discounted amount.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
    "total_count": 2,
    "order_info": {
        "order_id": "CS18122203217MRPB",
        "customer_id": "982f05775ec94da390c3f174b058fb46",
        "service_type_code": "hws.service.type.obs",
        "source_type": 1,
        "status": 5,
        "order_type": 4,
        "amount_after_discount": -277.92,
        "official_amount": -277.92,
        "measure_id": 1,
        "create_time": "2018-12-21T19:21:03Z",
        "payment_time": null,
        "currency": "USD",
        "contract_id": null,
        "amount_info": {
            "discounts": [],
            "flexipurchase_coupon_amount": null,
            "coupon_amount": null,
            "stored_card_amount": null,
            "commission_amount": 30.88,
            "consumed_amount": 0.0
        },
        "user_name": "h******55"
    },
    "order_line_items": [
        {
            "order_line_item_id": "CS18122203217MRPB-000001",
            "service_type_code": "hws.service.type.ebs",
            "product_id": "00301-01026-0--1",
            "product_spec_desc": "High I/O|40.0GB",
            "period_type": 3,
            "period_num": null,
            "effective_time": "2018-12-21T19:21:03Z",
            "expire_time": "2019-12-22T15:59:59Z",
            "subscription_num": 1,
            "amount_after_discount": -33.12,
            "official_amount": -33.12,
            "amount_info": {
                "discounts": [],
                "flexipurchase_coupon_amount": null,
                "coupon_amount": null,
                "stored_card_amount": null,
                "commission_amount": 3.68,
                "consumed_amount": 0.0
            },
            "currency": "USD",
            "category_code": "hws.resource.storage1.evs",
            "product_owner_service": null,
            "commercial_resource": null
        },
        {
            "order_line_item_id": "CS18122203217MRPB-000002",
            "service_type_code": "hws.service.type.ec2",
            "product_id": "00301-02019-0--1",
            "product_spec_desc": "General Computing|s2.medium.4|1vCPUs|4GB|linux",
            "period_type": 3,
            "period_num": null,
            "effective_time": "2018-12-21T19:21:03Z",
            "expire_time": "2019-12-22T15:59:59Z",
            "subscription_num": 1,
            "amount_after_discount": -244.8,
            "official_amount": -244.8,
            "amount_info": {
                "discounts": [],
                "flexipurchase_coupon_amount": null,
                "coupon_amount": null,
                "stored_card_amount": null,
                "commission_amount": 27.2,
                "consumed_amount": 0.0
            },
            "currency": "USD",
            "category_code": "hws.resource.computing.ecs",
            "product_owner_service": null,
            "commercial_resource": null
        }
    ]
}

Returned Values

HTTP Value

Error Code

Description

400

CBC.0100

Parameter error.

400

CBC.0101

Invalid parameter.

403

CBC.0151

Access denied.

403

CBC.0155

Request denied.

The possible causes are as follows: The account authentication information is incorrect. The account or member account does not have the permission to call the API.

500

CBC.0999

Other errors.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel