suning.cts.record.get 链上数据查询接口
¥免费

链上数据查询接口

公共参数
请求参数
名称 类型 是否必须 示例值 描述
timestampStringY2018-05-08 10:26:30时间戳
channelNameStringYmychannel通道
sizeStringY50查询条数,每次最多100条
响应参数
名称 类型 示例值 描述
resultStringYY成功N失败
itemsString
idString3记录ID
memberCodeString844223商户编码
memberNameString苏宁商户名称
traceIdString4567333溯源ID
roleIdString4流通角色
channelNameStringmychannel通道名称
lastRoleIdString3上个环节流通角色
lastMemberIdString787878上个环节商户编码
lastPointString5656上个环节环节编码
pointString7767本环节编码
timestampString2018-05-08 10:35:22时间戳
transactionIdString47da0ec257c457c1fcdae49ae499ca5ff4db7771be1983e62a32ba48c16b1004区块链交易ID
blockCodeString3eb6d6dc283564d8d384b38a445ff1cdd330e7668d52edd792b656854062a00b所在区块编码
writeTimeString2018-05-08 10:35:30落账时间
blockNumString5区块编号
msgString { "roleId":"3" ,"traceId":"96248500","quaCert":"2321344" ,"productDate":"2018-05-09 11:11:11","expireDate":"2019-05-09 11:11:11" ,"manufacturer":"海青公司" }本环节提交的信息
请求示例
  • XML示例
  • JSON示例
复制全部代码
                                
<sn_request>
  <sn_body>
    <getRecord>
      <timestamp>2018-05-08 10:26:30</timestamp>
      <channelName>mychannel</channelName>
      <size>50</size>
    </getRecord>
  </sn_body>
</sn_request>

			
                                
                                
{
  "sn_request": {
    "sn_body": {
      "getRecord": {
        "timestamp": "2018-05-08 10:26:30",
        "channelName": "mychannel",
        "size": "50"
      }
    }
  }
}
			
                                
响应示例
  • XML示例
  • JSON示例
复制全部代码
                              
<sn_responseContent>
  <sn_body>
    <getRecord>
      <result>Y</result>
      <items>
        <lastRoleId>3</lastRoleId>
        <channelName>mychannel</channelName>
        <transactionId>47da0ec257c457c1fcdae49ae499ca5ff4db7771be1983e62a32ba48c16b1004</transactionId>
        <lastPoint>5656</lastPoint>
        <blockCode>3eb6d6dc283564d8d384b38a445ff1cdd330e7668d52edd792b656854062a00b</blockCode>
        <msg> { "roleId":"3" ,"traceId":"96248500","quaCert":"2321344" ,"productDate":"2018-05-09 11:11:11","expireDate":"2019-05-09 11:11:11" ,"manufacturer":"海青公司" }</msg>
        <id>3</id>
        <timestamp>2018-05-08 10:35:22</timestamp>
        <point>7767</point>
        <writeTime>2018-05-08 10:35:30</writeTime>
        <blockNum>5</blockNum>
        <traceId>4567333</traceId>
        <memberName>苏宁</memberName>
        <lastMemberId>787878</lastMemberId>
        <memberCode>844223</memberCode>
        <roleId>4</roleId>
      </items>
    </getRecord>
  </sn_body>
</sn_responseContent>

			
                              
                              
{
  "sn_responseContent": {
    "sn_body": {
      "getRecord": {
        "result": "Y",
        "items": [
          {
            "lastRoleId": "3",
            "channelName": "mychannel",
            "transactionId": "47da0ec257c457c1fcdae49ae499ca5ff4db7771be1983e62a32ba48c16b1004",
            "lastPoint": "5656",
            "blockCode": "3eb6d6dc283564d8d384b38a445ff1cdd330e7668d52edd792b656854062a00b",
            "msg": " { \"roleId\":\"3\" ,\"traceId\":\"96248500\",\"quaCert\":\"2321344\" ,\"productDate\":\"2018-05-09 11:11:11\",\"expireDate\":\"2019-05-09 11:11:11\" ,\"manufacturer\":\"海青公司\" }",
            "id": "3",
            "timestamp": "2018-05-08 10:35:22",
            "point": "7767",
            "writeTime": "2018-05-08 10:35:30",
            "blockNum": "5",
            "traceId": "4567333",
            "memberName": "苏宁",
            "lastMemberId": "787878",
            "roleId": "4",
            "memberCode": "844223"
          }
        ]
      }
    }
  }
}
			
                              
异常示例
  • XML示例
  • JSON示例
复制全部代码

  
  	API异常码
  	异常码中文描述
  

                           	  
{
  "sn_responseContent": {
    "sn_error": {
      "error_code": "API异常码",
      "error_msg": "异常码中文描述"
    }
  }
}
                           		
业务异常码
异常码 错误描述 解决方案
biz.cts.getrecord.missing-parameter:* 参数必填 请检查此参数的值,*号表示参数字段名
biz.cts.getrecord.format-error:* 参数格式错误 请检查此参数的值,*号表示参数字段名
biz.cts.getrecord.length-overlong:* 参数的值超过规定长度 请检查此参数的值,*号表示参数字段名
biz.handler.data-get:no-result 查询没结果 请检查查询参数
isp.sys.service.unavailable.cts 服务不可用 请联系苏宁技术人员
biz.cts.getrecord.invalid-biz:100 系统异常 请联系苏宁技术人员
biz.cts.getrecord.invalid-biz:101 参数异常 请检查此参数的值,*号表示参数字段名
公共异常码
API工具
FAQ