API Overview
This document is ZYL’s external standard interface document, describing the data exchange between ZYL and external systems.
API Specifications
API Technical Details
| Field |
Formats |
| Communication Protocols |
HTTP |
| Method |
Post |
Authorization and HTTP header
| Field |
Description |
eg. |
| Content-Type |
application/json;charset=UTF-8 |
application/json;charset=UTF-8 |
| ApiKey |
Vendor’s api key |
key-1234-7B08-4E69-915E-65C191F96B6D |
| Authorization |
Md5Utils.sign(Request URI “|” + ApiKey + “|” + SecretKey) |
Md5Utils.sign(/openapi/v1/order/label/info|key-1234-7B08-4E69-915E-65C191F96B6D|1234E67D-7E07-4A14-93F7-E2A9EA38EB1D) |
| TimeStamp |
Timestamp with millisecond. |
1503560233000 |
General API Request Requirements
| Field |
Description |
Type |
Max Length |
| timestamp |
Timestamp with millisecond. |
Long |
|
| messageId |
Serial number for each requests. |
String |
100.0 |
| data{} |
Detailed business fields |
Object |
|
Request Example
{
"timestamp":1503560233000,
"messageId":"20220220001",
"data":{
}
}
General API Response Requirements
| Field |
Description |
Type |
Max Length |
| code |
Result status code.See definition |
Integer |
|
| message |
Detailed business fields |
String |
200.0 |
| messageId |
Serial number for each requests. |
String |
100.0 |
| timestamp |
Timestamp with millisecond. |
Long |
|
| data{} |
Detailed business fields |
Object |
|
| errors[] |
Error details |
List< Object > |
|
Success Response
{
"code":0,
"message":"success",
"timestamp":1503560234000,
"messageId":"20220220001",
"data":{
},
"errors":[]
}
Failure Response
{
"code":4,
"message":"Data error",
"timestamp":1503560234000,
"messageId":"20220220001",
"errors":[{
"code":4019999,
"message":"{propertyName} cannot be empty"
},
{
"code":4019998,
"message":"{propertyName} format error"
}]
}
作者:conghui 创建时间:2024-09-12 14:23
最后编辑:ZYL 更新时间:2025-12-16 17:30