general
The MP API system currently only supports functions such as orders, traffic, and alerts.
API request
Among all APIs, the following are common request headers and their descriptions:
| Name | Type | Required | Description |
|---|---|---|---|
| Access-key | string | true | accessKey serves as the identity of the client application, and it is paired with secretKey |
| Content-Type | string | true | application/json |
generate signature
- Signature algorithm(sign)
| Name | Type | Required | Description |
|---|---|---|---|
| timestamp | Long | true | 当前时间戳,10位数字 |
| data | Object | true | 参数 |
- Rules:
- Sort the values of the array by key Request example:
{"data": {"page": "1","limit": "10"},"timestamp": 1752833996}
- Generate the format of the URL
data%5Bpage%5D=1&data%5Blimit%5D=10×tamp=1752833996
- MD5 algorithm is used to encrypt and generate the sign: a concatenation of the string and the private key
sign = md5('data%5Bpage%5D=1&data%5Blimit%5D=10×tamp=1752833996' + secret_key)
Request Example
{
"timestamp": 1752833996,
"data": {
"page": 1,
"limit": 10
},
"sign": "df0a31b6c4b5810c2d8e318247a9ad4f"
}
API responses typically follow the following format:
{
"code": 200,
"msg": "string",
"data": {}
}
| Name | Type | Required | Description |
|---|---|---|---|
| code | int | true | The response code 200 indicates success |
| msg | string | true | response message |
| data | json or null | true | response data |
Response verification signature
The response header returns the parameters required for signature calculation. For specific steps, please refer to:
HTTP code
| Name | Description |
|---|---|
| 200 | Success |
| 401 | Authentication failed |
| 403 | Access denied |
| 404 | Not found |
Business code
| Name | Description |
|---|---|
| 500 | Service exception |
| 60001 | Missing parameter |
| 60002 | Illegal parameter |
| 60003 | Data does not exist |