| Version | Update Time | Status | Author | Description |
|---|---|---|---|---|
1.0 |
2022-02-16 10:30 |
创建 |
Weasley J |
创建api文档 |
1. 电子口岸报文加签Controller
1.1. 海关数据加签
Type: POST
Author: lwj
Content-Type: application/json; charset=utf-8
Description: 此接口已经整合"海关总署XML"和"海关179数据抓取"的加签
Body-parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int32 |
false |
唯一id, 用来区分是哪一次发送的消息,默认值=1,从1开始,{@code int} 最大, 231-1. |
data |
string |
true |
加签源数据
支持的加签数据类型 |
Request-body:
{
"id": 149,
"data": "mx99rm"
}
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message |
string |
返回消息 |
- |
success |
boolean |
是否成功 |
- |
timestamp |
string |
响应时间戳 |
- |
code |
int32 |
状态码 |
- |
data |
object |
响应数据 |
- |
└─success |
boolean |
本次加签是否成功 |
- |
└─certNo |
string |
签名的ukey的卡序列号 |
- |
└─x509Certificate |
string |
签名的ukey证书
如需导出.cer证书,文件格式:卡序列号.cer |
- |
└─digestValue |
string |
xml的数字摘要,先对不包含Signature节点的原始报文,进行C14n格式化,然后取shal二进制摘要,然后对sha1的值进行base64编码 |
- |
└─signatureValue |
string |
调用ukey获取的签名值 |
- |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2022-02-18 02:43:03",
"code": 48,
"data": {
"success": true,
"certNo": "wrn19g",
"x509Certificate": "b775d6",
"digestValue": "yltbn9",
"signatureValue": "xabn0v"
}
}
Curl-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/rpc/eport/signature --data '{
"id": 149,
"data": "mx99rm"
}'
1.2. 海关总署XML数据加签测试
Type: GET
Author: lwj
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 非正式调用API,只为了让你看到海关总署XML加密的数据返回格式
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message |
string |
返回消息 |
- |
success |
boolean |
是否成功 |
- |
timestamp |
string |
响应时间戳 |
- |
code |
int32 |
状态码 |
- |
data |
object |
响应数据 |
- |
└─any object |
object |
any object. |
- |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2022-02-18 02:43:03",
"code": 132,
"data": {}
}
Curl-example:
curl -X GET -i http://localhost:8080/rpc/eport/signature/test/ceb
1.3. 海关179数据抓取加签测试
Type: GET
Author: lwj
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 非正式调用API,只为了让你看到179加密的数据返回格式
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message |
string |
返回消息 |
- |
success |
boolean |
是否成功 |
- |
timestamp |
string |
响应时间戳 |
- |
code |
int32 |
状态码 |
- |
data |
object |
响应数据 |
- |
└─any object |
object |
any object. |
- |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2022-02-18 02:43:03",
"code": 349,
"data": {}
}
Curl-example:
curl -X GET -i http://localhost:8080/rpc/eport/signature/test/179