Querying an Order
Function
KooGallery sellers can use this API to query all order information.
URI
GET:
https://mkt.myhuaweicloud.eu/api/mkp-openapi-public/global/v1/order/query
Response Message describes the parameters.
Only the HTTPS protocol is supported.
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. |
To facilitate interconnection and commissioning, KooGallery provides simulated order data. The simulated orders vary according to scenarios.
- Yearly/monthly subscription
orderId |
MOCKPERIODYEARNEW |
---|---|
orderLine |
MOCKPERIODYEARNEW-000001 |
- One-time subscription
orderId |
MOCKONETIMENEW |
---|---|
orderLine |
MOCKONETIMENEW-000001 |
- Trial use
orderId |
MOCKPERIODDAYTRIAL |
---|---|
orderLine |
MOCKPERIODDAYTRIAL-000001 |
- Change from trial use to commercial use
orderId |
MOCKMONTYTRIALTOFORMAL |
---|---|
orderLine |
MOCKMONTYTRIALTOFORMAL-000001 |
- Unsubscription
orderId |
MOCKMONTYUNSUBSCRIBE |
---|---|
orderLine |
MOCKMONTYUNSUBSCRIBE-000001 |
- Renewal
orderId |
MOCKMONTYRENEW |
---|---|
orderLine |
MOCKMONTYRENEW-000001 |
- Change
orderId |
MOCKMONTYCHANGE |
---|---|
orderLine |
MOCKMONTYCHANGE-000001 |
Strong verification must be performed on the mkt.myhuaweicloud.eu HTTPS certificate 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
Response Message
Parameter |
Mandatory |
Type |
Maximum Length |
Description |
---|---|---|---|---|
resultCode |
Yes |
String |
16 |
Result code. |
resultMsg |
Yes |
String |
1024 |
Result message. |
orderInfo |
No |
OrderInfo |
/ |
Additional information. OrderInfo data structure definition. |
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:
|
createTime |
Yes |
DateTime |
20 |
Time when an order is created. Format: yyyyMMddHHmmss 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. The options are as follows: 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
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 (the value of chargingMode is set to PERIOD). Daily subscription: day 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 (the value of chargingMode is set to PERIOD). Enter a positive integer, for example, 1, 2, and 3. |
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 product specifications of the same skuCode depending on the billing mode. 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. 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, the productId corresponding to the instanceId of the instance enabled by the customer changes, but the value of skuCode does not change. 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 |
Product name. |
The following table describes the ExtendParam data structure.
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 |
---|---|---|---|---|
mobilePhone |
No |
String |
64 |
Mobile number of the customer. |
customerId |
No |
String |
64 |
Customer ID. |
customerName |
No |
String |
64 |
Customer account name. |
|
No |
String |
64 |
Email address of the customer. |
Successful response example
{ "resultCode": "MKT.0000", "resultMsg": "Success", "orderInfo": { "orderId": "MOC*******RNEW", "orderType": "NEW", "createTime": "20230713082130", "orderLine": [ { "orderLineId": "MOCKP*********001", "chargingMode": "PERIOD", "periodType": "year", "periodNumber": 1, "expireTime": "20240713082130", "productInfo": [ { "productId": "OFFI84******911168", "skuCode": "0a4d1578-5295-46a7-92d4-7c803dccc51d", "linearValue": 50, "productName": "****,*****,*****,******" } ], "extendParams": [ { "name": "emailDomainName", "value": "test.xxxx.com" }, { "name": "ip", "value": "127.0.0.1" } ] } ], "buyerInfo": { "mobilePhone": "1868*****88", "email": "*****t.com", "customerId": "459bbbec25********37b602a8", "customerName": "mock_******" } } }
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] does not match." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.