Customer Operation Capabilities
| Details
  • Registering a Customer (Partner)
    • CheckUserIdentity
    • CreateSubCustomer
    • SendVerificationMessageCode
  • Managing Customers (Partner)
    • FreezeSubCustomers
    • ListSubCustomers
    • UnfreezeSubCustomers
  • Real-Name Authentication (Partner)
    • ChangeEnterpriseRealnameAuthentication
    • CreateEnterpriseRealnameAuthentication
    • CreatePersonalRealnameAuth
    • ShowRealnameAuthenticationReviewResult
  • Managing Coupons (Public)
    • ListSubCustomerCoupons
  • Managing Customer Budgets (Partner)
    • ListSubCustomerBudget
    • ShowSubCustomerBudget
    • UpdateSubCustomerBudget
  • Managing Accounts (Customer)
    • ShowCustomerAccountBalances
  • Purchasing a Cloud Service (Public)
    • ListFreeResourceUsages
    • ListOnDemandResourceRatings
    • ListRateOnPeriodDetail
    • ListRenewRateOnPeriod
  • Managing Yearly/Monthly Orders (Public)
    • ListCustomerOrders
    • ShowCustomerOrderDetails
    • ShowRefundOrderDetails
  • Managing Yearly/Monthly Orders (Customer)
    • AutoRenewalResources
    • CancelAutoRenewalResources
    • CancelCustomerOrder
    • CancelResourcesSubscription
    • ListOrderDiscounts
    • ListPayPerUseCustomerResources
    • PayOrders
    • RenewalResources
    • UpdatePeriodToOnDemand
  • Managing Pay-Per-Use Resources (Partner)
    • ListCustomerOnDemandResources
  • Managing Bills (Partner)
    • ListPostpaidBillSum
  • Managing Bills (Customer)
    • ListCustomerselfResourceRecordDetails
    • ListCustomerselfResourceRecords
    • ListMonthlyExpenditures
  • Managing Enterprise Projects (Customer)
    • CreateEnterpriseProjectAuth
  • Managing Enterprise Accounts (Customer)
    • ListEnterpriseSubCustomers
  • Managing Products (Public)
    • ListConversions
    • ListMeasureUnits
    • ListResourceTypes
    • ListServiceResources
    • ListServiceTypes
    • ListUsageTypes
  • Managing Resource Packages (Customer)
    • ListFreeResourceInfos
    • ListFreeResourcesUsageRecords
  • Managing Huawei Cloud Resellers (Partner)
    • ListIndirectPartners
  • Cost Management (Customer)
    • ListCosts
  • Managing Credits(Partner)
    • ShowPartnerConsumptionQuota
  • Managing Invoices (Public)
    • ListInvoices

ListOrderDiscounts

GET
https://bss-intl.myhuaweicloud.com/v2/orders/customer-orders/order-discounts
Advanced
Required parameters only
Default
Encrypt sensitive parameters
*
Region
Headers
*
Authorization
Parameters
*
order_id
API Description

A customer can query available discounts when paying an order on the partner sales platform.

NOTE:

No discount is available to reseller customers.

Constraints

This API can be invoked only by the customer AK/SK or token.

URL
GET  https://bss-intl.myhuaweicloud.com/v2/orders/customer-orders/order-discounts
Request Parameters
NameTypeINMandatoryDescription
X-Auth-Token
stringheader Yes

Call with customer token

order_id
stringquery Yes

Order ID.

Response Parameters
Status code: 200

ListOrderDiscounts Responses

NameTypeDescription
discounts
Array of DiscountInfoV3 objects

List of available discounts. For details, see Table 2.

200 discounts
NameTypeDescription
discount_id
string

ID of the available order discount. To use a discount, enter the value of this parameter when paying an order.

discount_value
string

Discount percentage or reduction. Leave this parameter empty if the discount model is set to 1.

discount_type
integer

Discount type. The options are as follows: 0: promotion discount1: contract discount2: commercial discount3: discount granted by a partner609: discount for adjusting an order price

orders
Array of OrderV3 objects

List of the orders that can use discounts. For details, see Table 3.

200 discounts.orders
NameTypeDescription
order_id
string

ID of the order that can use discounts.

order_line_items
Array of OrderLineItemV3 objects

List of the order items that can use the same discount. For details, see Table 4.

200 discounts.orders.order_line_items
NameTypeDescription
order_line_item_ids
Array of strings

List of the IDs of the combined order items that can use the same discount. Order items with the same product, same specifications (for linear products), and same final price (for example, price adjustment for a featured product) will be combined.

discount_mode
integer

Available discount model of an order. 0: discount1: buy-it-now price2: reduction for specific amount

discount_amount
number

Discount amount of an order, that is, the deducted amount.

discount_ratio
number

Discount ratio of an order.

Status code: 400

CBC.0100:parameter error

Example Request
Example 1
"GET https://bss-intl.myhuaweicloud.com/v2/orders/customer-orders/order-discounts?order_id=CS2011091132EMKL9"
Example Response
Status code: 200

ListOrderDiscounts Responses

Example 1
{
"discounts": [
{
"discount_id": "PDP2011260815047721TYT48G0BA02EI",
"discount_value": "0.9",
"discount_type": 0,
"orders": [
{
"order_id": "CS2011091132EMKL9",
"order_line_items": [
{
"order_line_item_ids": [
"CS2011091132EMKL9-000002"
],
"discount_mode": 0,
"discount_amount": null,
"discount_ratio": 0.9
},
{
"order_line_item_ids": [
"CS2011091132EMKL9-000001"
],
"discount_mode": 0,
"discount_amount": null,
"discount_ratio": 0.9
}
]
}
]
}
]
}
SDK
Click Customer Operation Capabilities (BSSINTL) SDK to download the SDK in your programming language or view the SDK documentation. To learn how to install an SDK and perform authentication, read Usage.
Error Code
Change History
Jun 21, 2024
Querying Available Discounts of an Order
GET
   ListOrderDiscounts
Modify
Modified Parameters

Outline

API Description
Constraints
URL
Request Parameters
Response Parameters
Example Request
Example Response
SDK
Error Code
Change History