Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying an Order

Updated on 2025-01-17 GMT+08:00

Function

KooGallery sellers can use this API to query all order information.

URI

GET:

https://mkt-intl.myhuaweicloud.com/api/mkp-openapi-public/global/v1/order/query

Table 1 describes the parameters.

NOTE:

Only the HTTPS protocol is supported.

The following figure shows the process of querying an order.

The following table lists the order data used for debugging.

Order No.

Order Line ID

Order Type

MOCKPERIODYEARNEW

MOCKPERIODYEARNEW-000001

Subscription - Yearly/Monthly

MOCKONETIMENEW

MOCKONETIMENEW-000001

Subscription - One-time

MOCKONDEMAND

MOCKONDEMAND-000001

Subscription - Pay-per-use specification

MOCKONDEMANDPKG

MOCKONDEMANDPKG-000001

Subscription - Pay-per-use package

MOCKPERIODDAYTRIAL

MOCKPERIODDAYTRIAL-000001

Trial use

MOCKMONTYTRIALTOFORMAL

MOCKMONTYTRIALTOFORMAL-000001

Change from trial use to commercial use

MOCKMONTYUNSUBSCRIBE

MOCKMONTYUNSUBSCRIBE-000001

Unsubscription

MOCKMONTYRENEW

MOCKMONTYRENEW-000001

Renewal

MOCKMONTYCHANGE

MOCKMONTYCHANGE-000001

Change and upgrade

Request Message

Request parameters

Request method: GET

Parameter

Mandatory

Type

Maximum Length

Description

orderId

Yes

String

64

KooGallery order ID.

orderLineId

No

String

64

KooGallery order line ID.

Notes

  • Strong verification must be performed on the HTTPS certificate of mkt-intl.myhuaweicloud.com to ensure that the real KooGallery service instead of a forged KooGallery service is called.

Example request

GET /api/mkp-openapi-public/global/v1/order/query?orderId=CS2207261447AUY4H&orderLineId=CS2207261447AUY4H-000001
Host: Host Server   
Content-Type: application/json charset=UTF-8  
X-Sdk-Date: request time    
Authorization: authorization   
Table 1 Response parameters

Parameter

Mandatory

Type

Maximum Length

Description

resultCode

Yes

String

16

Result code.

For details, see Table 3.

resultMsg

Yes

String

1,024

Result message.

For details, see Table 3.

orderInfo

No

OrderInfo

/

Additional information.

NOTE:

For details about the OrderInfo data structure, see the following table.

The following table describes the OrderInfo data structure.

Parameter

Mandatory

Type

Maximum Length

Description

orderId

Yes

String

64

KooGallery order ID.

orderType

Yes

String

32

Order type. The options are as follows:

  • NEW: new subscription.
  • TRIAL: trial use.
  • TRIAL_TO_FORMAL: commercial use after trial use.
  • UNSUBSCRIBE: unsubscription.
  • RENEW: renewal.
  • CHANGE: change.

createTime

Yes

DateTime

20

Time when an order is created.

Format: yyyyMMddHHmmss

NOTE:

It is not the time when the order takes effect but the time when the order is placed.

orderLine

  

List<OrderLine>

  

Order line information.

buyerInfo

No

BuyerInfo

/

Customer information.

The following table describes the OrderLine data structure.

Parameter

Mandatory

Type

Maximum Length

Description

orderLineId

Yes

String

64

KooGallery order line ID.

chargingMode

Yes

String

25

Billing mode.

ON_DEMAND: pay-per-use.

ONE_TIME: one-time payment.

PERIOD: yearly/monthly/daily.

ON_DEMAND_PKG: pay-per-use package.

expireTime

No

DateTime

20

Expiration time.

Format: yyyyMMddHHmmss

NOTE:
  • This parameter is required for a yearly/monthly/daily product.
  • This parameter is not required for a product billed by uses.

This parameter is determined based on the order creation time and the subscription duration and may differ from the actual expiration time of the order. It is for reference only.

periodType

No

String

2

Period type.

NOTE:

This parameter is only required for yearly/monthly/daily subscriptions (chargingMode is set to PERIOD).

Yearly subscription: year

Monthly subscription: month

extendParams

No

List<ExtendParam>

/

Extension parameters.

An extension parameter is an array in the key/value format.

Example: [{"name":"emailDomainName","value":"test.xxxx.com"},{"name":"ip","value":"192.168.1.1"}]

In the preceding information, emailDomainName and ip are set during product release.

periodNumber

No

integer

5

Number of periods.

NOTE:

This parameter is only required for yearly/monthly/daily subscriptions (chargingMode is set to PERIOD).

Enter a positive integer, for example, 1, 2, and 3.

currency

No

String

64

Order amount. In scenarios such as subscription, renewal, and specification change, the amount is positive. In scenarios such as unsubscription and renewal cancellation, the amount is empty.

currencyAfterDiscount

No

String

25

Order transaction amount, excluding cash coupons and discounts. In scenarios such as subscription, renewal, and specification change, the amount is positive. In scenarios such as unsubscription and renewal cancellation, the amount is negative.

productInfo

Yes

List<ProductInfo>

  

Product information associated with the order line.

The following table describes the ProductInfo data structure.

Parameter

Mandatory

Type

Maximum Length

Description

productId

Yes

String

64

Product ID. The value of productId varies between products of different billing modes under the same skuCode.

For example, when you release a product and add a new specification, an skuCode value is generated. After yearly and monthly billing prices are configured, two productId values are generated.

NOTE:

Log in to the Seller Console. Then, choose Product Management > My Products. In the row of your product, click Details in the Operation column. On the product details page, you can view the value of this parameter.

skuCode

Yes

String

64

Specification ID. When renewing the subscription of a yearly/monthly product, a customer can change the billing mode (for example, from monthly to yearly). In this case, productId corresponding to instanceId of the instance enabled by the customer changes, but the value of skuCode does not change.

NOTE:

Log in to the Seller Console. Then, choose Product Management > My Products. In the row of your product, click Details in the Operation column. On the product details page, you can view the value of this parameter.

linearValue

No

Integer

  

Linear value that the customer selected when placing the order for a product with the quantity attribute.

productName

Yes

String

64

Product name.

The following table describes the ExtendParam data structure.

Table 2 Response parameters

Parameter

Mandatory

Type

Maximum Length

Description

name

Yes

String

64

Parameter name.

value

Yes

String

64

Parameter value.

The following table describes the BuyerInfo data structure.

Parameter

Mandatory

Type

Maximum Length

Description

customerId

Yes

String

64

Customer ID.

customerName

Yes

String

64

Customer account name, for example, Sam.

customerRealName

Yes

String

64

Real customer name, for example, xxxxx Company.

customerType

Yes

integer

64

Unknown: -1. Individual: 0. Enterprise: 1.

mobilePhone

No

String

64

Mobile number of the customer.

NOTE:

You can specify whether customers must authorize you to obtain this information when you release a product.

email

No

String

64

Email address of the customer.

NOTE:

You can specify whether customers must authorize you to obtain this information when you release a product.

userId

No

String

64

IAM user ID.

NOTE:

You can specify whether customers must authorize you to obtain this information when you release a product. This parameter is returned only for new subscriptions (instance creation scenario).

userName

No

String

64

IAM user name.

NOTE:

You can specify whether customers must authorize you to obtain this information when you release a product. This parameter is returned only for new subscriptions (instance creation scenario).

Error Codes

Table 3 Error codes

HTTP Status Code

resultCode

resultMsg

Description

200

MKT.0000

Success.

Request successful.

500

MKT.0999

System internal error.

Other internal errors.

500

MKT.0100

Failure of input parameter

Input parameter verification failed.

Invalid value.

400

MKT.0101

Invalid parameter

Invalid parameter.

The parameter is not defined by the API, there are more parameters than required, or a mandatory parameter is missing.

400

MKT.0199

Request parameter error

Incorrect request parameter.

Other parameter errors.

401

MKT.0150

Illegal operation

You are trying to perform an unauthorized operation. For example, the product corresponding to instanceId is not released by the seller corresponding to the AK/SK.

401

MKT.0151

No authority

Insufficient permissions to access the interface.

The token does not belong to a seller.

401

MKT.0154

Illegal token

Authentication failed.

Invalid token.

406

MKT. 0250

Access frequency overlimit

Too many access requests.

500

MKT.9001

Instance ID not found.

The instance ID does not exist. (This result code may be returned when the renewal, expiration, or resource release interface is called.)

500

MKT.9002

Invalid usage entities.

Invalid usage entities.

500

MKT.9003

Usage records extend size limit.

Too many records. Max. records: 100.

500

MKT.9004

Record beginTime extends Limit.

The start time exceeds the validity period (last 21 days).

A failure response contains the extra_info parameter only when the value of resultCode is MKT.0100, MKT.0150, MKT.0250, MKT.9001, MKT.9002, MKT.9004, or MKT.9005. In addition to the parameter description, resultMsg in the failure response also contains the failure details. You can locate and rectify the fault based on the failure details and extra_info content.

Successful response example

HTTP/1.1 200 OK 
Content-Type: application/json;charset=UTF-8 
Content-Length: length 
Date: response time  
 
{
  "resultCode": "MKT.0000",
  "resultMsg": "Success",
  "orderInfo": {
    "orderId": "CS2207261447AUY4H",
    "orderType": "NEW",
    "createTime": "20220726064736",
    "orderLine": [
      {
        "orderLineId": "CS2207261447AUY4H-000001",
        "chargingMode": "PERIOD",
        "periodType": "year",
        "periodNumber": 1,
        "expireTime": "20230726155959",
        "productInfo": [
          {
            "productId": "OFFI758576253042421760",
            "skuCode": "da9b4d34-ee8a-4355-a823-13e034e49986",
            "linearValue": 10,
            "productName": "Test SaaS, Test Specification, Basic Edition, Yearly/Monthly"
          }
        ],
        "extendParams": []
      }
    ],
    "buyerInfo": {
      "mobilePhone": "18699999999",
      "email": 123@test.com,
      "customerId": "688055390f3049f283fe9f1aa90f7ds3",
      "customerName": "hw1235sd3123"
 
    }
  }
}

Failed response example

HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=UTF-8Content-Length: lengthDate: response time { 
    "resultCode": "CBC.0150", 
    "resultMsg": "Illegal operation. param[isvId] and param[instanceId] do not match."  }

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback