接口说明
获取企业报关单明细信息
API 方法名:nuonuo.OpeMplatform.getDeclaration 版本:V2.0
请求地址
| 环境 | 请求地址 |
|---|
| 正式环境 | https://sdk.nuonuo.com/open/v1/services |
| 沙箱环境 | https://sandbox.nuonuocs.cn/open/v1/services |
公共请求参数(消息头)
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| Content-type | String | 否 | - | MIME类型【消息头】 | - |
公共请求参数(消息体)
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| senid | String | 否 | - | 唯一标识,由企业自己生成32位随机码【消息体】 | - |
私有请求参数
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| declarationNo | String | 是 | - | 报关单号。注:查询优先级:declarationNo最高级,(exportDateStart,exportDateEnd)次级, (downloadDateStart,downloadDateEnd)最低级。当接收到两组以上值时,按照优先级高的条件来查询 | 090820150082694459 |
| exportDateStart | String | 是 | 10 | 出口日期(起) (格式:yyyy-MM-dd) | 2021-12-01 |
| exportDateEnd | String | 是 | 10 | 出口日期(止) (格式:yyyy-MM-dd) | 2021-12-08 |
| downloadDateStart | String | 是 | 10 | 下载日期(起) (格式:yyyy-MM-dd) | 2021-12-01 |
| downloadDateEnd | String | 是 | 10 | 下载日期(止) (格式:yyyy-MM-dd) | 2021-12-08 |
响应参数
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| code | String | 否 | - | 结果代码 | E0000 |
| describe | String | 否 | - | 结果描述 | 查询成功 |
| result | Array | 否 | - | 返回数据 | 报关单数据列表的JSON字符串 |
| └ declarationNo | String | 否 | - | 报关单号 | - |
| └ customsCode | String | 否 | - | 企业海关代码 | - |
| └ taxNo | String | 否 | - | 纳税人识别号(税号) | - |
| └ socialCreditNo | String | 否 | - | 社会信用代码 | - |
| └ customsRegisterNo | String | 否 | - | 海关登记册号 | - |
| └ exportDate | String | 否 | - | 出口日期(格式:yyyy-MM-dd) | - |
| └ declareDate | String | 否 | - | 申报日期(格式:yyyy-MM-dd) | - |
| └ downloadDate | String | 否 | - | 下载日期 | - |
| └ tradeNatureCode | String | 否 | - | 贸易性质代码 | - |
| └ tradeNatureName | String | 否 | - | 贸易性质名称 | - |
| └ contractNo | String | 否 | - | 合同号码 | - |
| └ conveyance | String | 否 | - | 运输工具 | - |
| └ exchangeType | String | 否 | - | 成交方式 | - |
| └ overseasConsignee | String | 否 | - | 境外收发货人 | - |
| └ exportCustomsPort | String | 否 | - | 出口口岸 | - |
| └ destinationCountry | String | 否 | - | 运抵国 | - |
| └ loadingPort | String | 否 | - | 装运港 | - |
| └ destinationPort | String | 否 | - | 指运港 | - |
| └ wayBillNo | String | 否 | - | 提运单号 | - |
| └ remark | String | 否 | - | 备注 | - |
| └ freightCurrency | String | 否 | - | 运费币制 | - |
| └ freightAmount | String | 否 | - | 运费金额 | - |
| └ freightType | String | 否 | - | 运费类型(运费标志) | - |
| └ insurancePremiumCurrency | String | 否 | - | 保费币制 | - |
| └ insurancePremiumAmount | String | 否 | - | 保费金额 | - |
| └ insurancePremiumType | String | 否 | - | 保费类型(保费标志) | - |
| └ otherChargeCurrency | String | 否 | - | 杂费币制 | - |
| └ otherChargeAmount | String | 否 | - | 杂费金额 | - |
| └ OtherChargeType | String | 否 | - | 杂费类型(杂费标志) | - |
| └ originalCurrency | String | 否 | - | 原币币制 | - |
| └ transportationMode | String | 否 | - | 运输方式 | - |
| └ customsDeclarationDetail | Array | 否 | - | 报关单明细信息 | - |
| └ itemNo | String | 否 | - | 商品项号 | - |
| └ itemCode | String | 否 | - | 商品代码 | - |
| └ itemName | String | 否 | - | 项目名称(商品名称) | - |
| └ itemNameOfDeclaration | String | 否 | - | 报关单商品名称 | - |
| └ legalUtil | String | 否 | - | 法定单位 | - |
| └ legalQuantity | String | 否 | - | 法定单位数量 | - |
| └ secondUtil | String | 否 | - | 第二单位 | - |
| └ secondQuantity | String | 否 | - | 第二单位数量 | - |
| └ transactionUnit | String | 否 | - | 成交单位 | - |
| └ transactionQuantity | String | 否 | - | 成交数量 | - |
| └ originalAmount | String | 否 | - | 原币金额 | - |
| └ Spec | String | 否 | - | 规格型号 | - |
请求报文示例
NNOpenSDK sdk = NNOpenSDK.getIntance();
String taxnum = "23***789"; // 授权企业税号
String appKey = "Hn***XL";
String appSecret = "F65***65F";
String method = "nuonuo.OpeMplatform.getDeclaration"; // API方法名
String token = "2d484e**************pdui"; // 访问令牌
String content = "{
\"downloadDateStart\": \"2021-12-01\",
\"exportDateStart\": \"2021-12-01\",
\"downloadDateEnd\": \"2021-12-08\",
\"exportDateEnd\": \"2021-12-08\",
\"declarationNo\": \"090820150082694459\"
}";
String url = "https://sdk.nuonuo.com/open/v1/services"; // SDK请求地址
String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
String result = sdk.sendPostSyncRequest(url, senid, appKey, appSecret, token, taxnum, method, content);
System.out.println(result);
响应报文示例
{
"code": "E0000",
"describe": "查询成功",
"result": "[{\"declarationNo\":\"090820150082694459\",\"customsCode\":\"2102888888\",\"taxNo\":\"210288888888888\",\"socialCreditNo\":\"150301199811285326\",\"customsRegisterNo\":\"1\",\"exportDate\":\"2015-09-01\",\"downloadDate\":\"2021-08-27\",\"tradeNatureCode\":\"0110\",\"tradeNatureName\":\"一般贸易\",\"contractNo\":\"MLXY20150821\",\"conveyance\":\"MSC MARGRIT\",\"exchangeType\":\"C&F\",\"freightCurrency\":\"USD\",\"freightAmount\":520.00,\"freightType\":\"3\",\"insurancePremiumAmount\":0.00,\"otherChargeCurrency\":\"\",\"otherChargeAmount\":0.00,\"OtherChargeType\":\"\",\"originalCurrency\":\"USD\",\"customsDeclarationDetail\":[{\"itemNo\":\"01\",\"itemCode\":\"7202999900\",\"itemName\":\"111\",\"itemNameOfDeclaration\":\"其他铁合金111111111111111111111111111111111111111111111111111111111111111111111111111111111\",\"legalUtil\":\"千克\",\"legalQuantity\":50000.0000,\"secondUtil\":\"1\",\"secondQuantity\":0.0000,\"transactionUnit\":\"千克\",\"transactionQuantity\":50000.0000,\"originalAmount\":119500.00}],\"transportationMode\":\"水路运输\"}]"
}
返回码说明
| 返回码 | 说明 | 处理建议 |
|---|
E9607 | 企业税号不能为空 | 检查参数请求报文中taxNo是否正确 |
E9301 | 企业信息备案错误 | 请联系诺诺网 |