This API is used to by the developer's server to send a delivery success notification to Huawei server after delivery is complete.
Protocol | HTTPS PUT |
Direction | Developer's server -> Huawei server |
URL | https://connect-api.cloud.huawei.com/api/dps/v1/usage/delivery/callback |
Data Format | Request: Content-Type: application/json Response: Content-Type: application/json |
This API can be called only after the API client is authenticated by Huawei server. For details, please refer to Obtaining a Token.
Parameters in the header:
Parameter | Mandatory (M)/Optional (O) | Type | Description |
developerId | M | String | CP ID of a developer account, which uniquely identifies the current developer. |
appId | M | String | App ID. For details about how to obtain an app ID, please refer to Querying App Information. |
client_id | M | String | Client ID generated in Creating an API Client. |
authorization | M | String | Authentication information in the format of Authorization: Bearer ${access_token}. The access token is obtained in Obtaining a Token. The validity period of the access token is determined by expires_in returned for Obtaining a Token. |
productId | M | String | ID of the product to which the app belongs. For details about how to query a product ID, please refer to Querying the Product ID. |
Parameters in the body:
Parameter | Mandatory (M)/Optional (O) | Type | Description |
orderId | M | String | Order ID. |
productNo | M | String | ID of a delivered product. |
openId | M | String | Unique ID of a user. The value of openId is passed. |
status | M | int | Delivery status. Currently, only 0 is supported, indicating that the delivery is successful. |
ts | M | long | Timestamp of the notification sending time. |
Parameter | Mandatory (M)/Optional (O) | Type | Description |
error | O | String | JSON character string containing the operation result when the processing fails. The format is {"errorCode": xxx, "errorMsg": xxxx}.
|
data | O | String | JSON character string containing the operation result when the processing is successful. The format is {"result": 0}. 0: success |
Result Code | Description |
1 | Authentication failed. |
2 | Timeout. |
3 | The service information is incorrect. For example, the order does not exist. |
11 | The product does not exist. |
12 | The user does not exist. |
94 | System error. |
95 | I/O error. |
96 | Incorrect request URL. |
97 | Incorrect response. |
98 | Incorrect parameter. |
99 | Other error. |
Type | Example |
Request |
|
Response |
|