VersionUpdate TimeStatusAuthorDescription

1.0

2022-02-16 10:30

创建

Weasley J

创建api文档

1.1

2023-06-11 15:36

创建

Weasley J

更新api文档

1. Ukey健康Controller

1.1. ukey健康指令

Type: POST

Author: lwj

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 


    支持command类型
  • RESTART:重启控件(较多使用)

  • START: 启动控件

  • STOP: 停止控件

  • REPAIR: 修复证书

Response-fields:

FieldTypeDescriptionSince

message

string

返回消息

-

success

boolean

是否成功

-

timestamp

string

响应时间戳

-

code

int32

状态码

-

data

object

响应数据

-

└─stdOutList

array

标准输出流信息

-

└─errorOutList

array

错误输出流信息

-

Response-example:

{
  "message": "success",
  "success": true,
  "timestamp": "2023-06-11 15:47:37",
  "code": 23,
  "data": {
    "stdOutList": [
      "f716hp"
    ],
    "errorOutList": [
      "rzbpo0"
    ]
  }
}

Curl-example:

curl -X POST -i http://localhost:8080/rpc/ukey/health/endpoint/

2. 电子口岸报文加签Controller

2.1. 海关数据加签

Type: POST

Author: lwj

Content-Type: application/json; charset=utf-8

Description: 此接口已经整合"海关总署XML"和"海关179数据抓取"的加签

    支持的加签类型
  • 1.海关CEBXxxMessage XML数据加签
  • 2. 海关179数据加签

Body-parameters:

ParameterTypeRequiredDescription

id

int32

false

唯一id, 用来区分是哪一次发送的消息,默认值=1,从1开始,{@code int} 最大, 231-1.

data

string

true

加签源数据


    支持的加签数据类型
  • 1. 不带ds:Signature节点的CEBXxxMessage.xml原文;待加签xml报文样例

  • 2. 海关179加签数据; 数据格式请传符合「海关179数据规范」的标准字符串,入参示例:
    "sessionID":"ad2254-8hewyf32-55616249"||"payExchangeInfoHead":"{"guid":"9D55BA71-22DE-41F4-8B50-C36C83B3B530","initalRequest":"原始请求","initalResponse":"ok","ebpCode":"4404840022","payCode":"312226T001","payTransactionId":"2018121222001354081010726129","totalAmount":100,"currency":"142","verDept":"3","payType":"1","tradingTime":"20181212041803","note":"批量订单,测试订单优化,生成多个so订单"}"||"payExchangeInfoLists":"[{"orderNo":"SO1710301150602574003","goodsInfo":[{"gname":"lhy-gnsku3","itemLink":"http://m.yunjiweidian.com/yunjibuyer/static/vue-buyer/idc/index.html#/detail?itemId=999761&shopId=453"},{"gname":"lhy-gnsku2","itemLink":"http://m.yunjiweidian.com/yunjibuyer/static/vue-buyer/idc/index.html#/detail?itemId=999760&shopId=453"}],"recpAccount":"OSA571908863132601","recpCode":"","recpName":"YUNJIHONGKONGLIMITED"}]"||"serviceTime":"1544519952469"


Request-body:

{
  "id": 262,
  "data": "ggbuki"
}

Response-fields:

FieldTypeDescriptionSince

message

string

返回消息

-

success

boolean

是否成功

-

timestamp

string

响应时间戳

-

code

int32

状态码

-

data

object

响应数据

-

└─success

boolean

本次加签是否成功

-

└─certNo

string

签名的ukey的卡序列号

-

└─x509Certificate

string

签名的ukey证书

-

└─digestValue

string

xml的数字摘要,先对不包含Signature节点的原始报文,进行C14n格式化,然后取shal二进制摘要,然后对sha1的值进行base64编码

-

└─signatureValue

string

调用ukey获取的签名值

-

Response-example:

{
  "message": "success",
  "success": true,
  "timestamp": "2023-06-11 15:47:37",
  "code": 593,
  "data": {
    "success": true,
    "certNo": "fzex4q",
    "x509Certificate": "7wj4ki",
    "digestValue": "rakt0t",
    "signatureValue": "pbyy9u"
  }
}

Curl-example:

curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/rpc/eport/signature --data '{
  "id": 262,
  "data": "ggbuki"
}'

2.2. 海关总署XML数据加签(测试)

Type: GET

Author: lwj

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 非正式调用API,只为了让你看到海关总署XML加密的数据返回格式

Response-fields:

FieldTypeDescriptionSince

message

string

返回消息

-

success

boolean

是否成功

-

timestamp

string

响应时间戳

-

code

int32

状态码

-

data

object

响应数据

-

└─any object

object

any object.

-

Response-example:

{
  "message": "success",
  "success": true,
  "timestamp": "2023-06-11 15:47:37",
  "code": 835,
  "data": {}
}

Curl-example:

curl -X GET -i http://localhost:8080/rpc/eport/signature/test/ceb

2.3. 海关179数据抓取加签(测试)

Type: GET

Author: lwj

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 非正式调用API,只为了让你看到179加密的数据返回格式

Response-fields:

FieldTypeDescriptionSince

message

string

返回消息

-

success

boolean

是否成功

-

timestamp

string

响应时间戳

-

code

int32

状态码

-

data

object

响应数据

-

└─any object

object

any object.

-

Response-example:

{
  "message": "success",
  "success": true,
  "timestamp": "2023-06-11 15:47:37",
  "code": 250,
  "data": {}
}

Curl-example:

curl -X GET -i http://localhost:8080/rpc/eport/signature/test/179
Top