Master data Customs
The following interfaces apply to API Data Integration
Create Customs
⚠️ The body should less than 20m (include picture)。
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs |
Request description
Method: POST
Content-Type: multipart/form-data
Param | key | Type | Required | Length | Description | Example |
---|---|---|---|---|---|---|
lenovoPn | Y | String | Y | 20 | Lenovo part number | SM10N01540 |
vendorCode | Y | String | Y | 20 | vendor code | 0001000340 |
countryIsoCode | Y | String | Y | 20 | country ISO code | CN |
inhouseSite | Y | String | Y | 20 | inhouse site | TJ |
hsCode | String | Y | 10 | house site code | 8541410000 | |
brand | Y | String | Y | 50 | brand | none |
commodityNameInChinese | String | Y | 100 | commodity name in chinese | 内存条 | |
partEnglishDescription | String | Y | 100 | commodity name in english | DRAM | |
declareElements | String | Y | 2000 | declare elements,seperator by slash / | ||
conversionRatioPerUnit | Number | Y | 15,4 | conversion ratio per unit | 1 | |
netWeightKgs | Number | Y | 21,10 | net weight(KGS) | 0.0164 | |
unitPrice | Number | Y | 15,4 | unit price | 19.75 | |
currency | String | Y | 20 | currency | USD | |
files | File | Y | files,pictures | - | ||
certificateNo | String | 100 | certificate number | 20220109085 | ||
expiryDate | String | 20 | expiry date | 2023-12-12 | ||
additionalInformation | String | 500 | addition information | - | ||
eccnCode | String | 100 | ECCN code | 5A992 |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
customsData:{
"lenovoPn": "SM10N01540",
"vendorCode": "0001000340",
"countryIsoCode": "CN",
"inhouseSite": "TJ",
"hsCode": "8541410000",
"brand": "无品牌",
"commodityNameInChinese": "内存条",
"partEnglishDescription": "DRAM",
"declareElements": "1|2|电脑用|直流稳压电源|65W|+/-0.1|LENOVO牌|ADLX65ULGC2A|||",
"conversionRatioPerUnit": 1,
"netWeightKgs": 0.0164,
"unitPrice": 19.75,
"currency": "USD",
"certificateNo": "20220109085",
"expiryDate": "2023-12-12",
"additionalInformation": "",
"eccnCode": "5A992"
}
files: [
photo01,photo02...
]
Response data description
JSON
{
"code": "0",
"msg": "ok"
}
Failed response sample
JSON
{
"code": "-1",
"msg": "Data already exists,please check!(数据已存在,请检查)"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Edit Customs
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs |
Method: PUT
Content-Type: application/json
Request data description
Param | Key | Type | Required | Length | Description | Example |
---|---|---|---|---|---|---|
lenovoPn | Y | String | Y | 20 | lenovo part number | SM10N01540 |
vendorCode | Y | String | Y | 20 | vendor code | 0001000340 |
countryIsoCode | Y | String | Y | 20 | country ISO code | CN |
inhouseSite | Y | String | Y | 20 | inhouse site | TJ |
hsCode | String | Y | 10 | inhouse site code | 8541410000 | |
brand | Y | String | Y | 50 | brand | none |
commodityNameInChinese | String | Y | 100 | commodity name in chinese | 内存条 | |
partEnglishDescription | String | Y | 100 | commodity name in english | DRAM | |
declareElements | String | Y | 2000 | declare elements | - | |
conversionRatioPerUnit | Number | Y | 15,4 | conversion ration per unit | 1 | |
netWeightKgs | Number | Y | 21,10 | net weights(KGS) | 0.0164 | |
unitPrice | Number | Y | 15,4 | unit price | 19.75 | |
currency | String | Y | 20 | currency | USD | |
certificateNo | String | 100 | certificate no | 20220109085 | ||
expiryDate | String | 20 | expiry date | 2023-12-12 | ||
additionalInformation | String | 500 | addition information | - | ||
eccnCode | String | 100 | ECCN code | 5A992 |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
{
"lenovoPn": "SM10N01540",
"vendorCode": "0001000340",
"countryIsoCode": "CN",
"inhouseSite": "TJ",
"hsCode": "8541410000",
"brand": "无品牌",
"commodityNameInChinese": "内存条",
"partEnglishDescription": "DRAM",
"declareElements": "1|2|电脑用|直流稳压电源|65W|+/-0.1|LENOVO牌|ADLX65ULGC2A|||",
"conversionRatioPerUnit": 1,
"netWeightKgs": 0.0164,
"unitPrice": 19.75,
"currency": "USD",
"certificateNo": "20220109085",
"expiryDate": "2023-12-12",
"additionalInformation": "",
"eccnCode": "5A992"
}
Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
Failed response sample
JSON
{
"code": "-1",
"msg": "备案信息正在LCCH审核中,不允许修改!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Delete Customs
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs |
**Method:**DELETE
Content-Type: application/json
Request data description
Param | Key | Type | Required | Length | Description | Example |
---|---|---|---|---|---|---|
lenovoPn | Y | String | Y | 20 | Lenovo part number | SM10N01540 |
vendorCode | Y | String | Y | 20 | vendor code | 0001000340 |
countryIsoCode | Y | String | Y | 20 | Country ISO code | CN |
inhouseSite | Y | String | Y | 20 | inhouse site | TJ |
brand | Y | String | Y | 50 | brand | none |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
{
"lenovoPn": "SM10N01540",
"vendorCode": "0001000340",
"countryIsoCode": "CN",
"inhouseSite": "TJ",
"brand": "无品牌"
}
Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
Failed response sample
JSON
{
"code": "-1",
"msg": "The filing information is under review by LCCH and is not allowed to be deleted!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Query Customs
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs |
Method: GET
Content-Type: application/json
Request data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
pageNum | Number | Y | 10 | page number | 1 |
pageSize | Number | Y | 4 | size per page | 20 |
lenovoPn | String | 20 | lenovo part number | SM10N01540 | |
vendorCode | String | 20 | vendor code | 0001000340 | |
inhouseSite | String | 20 | inhouse site | TJ | |
hsCode | String | 10 | inhouse code | 8541410000 | |
status | String | 50 | brand | none | |
creationDate | String | 50 | creation date | "["2023-03-15","2023-03-17"]" |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
{
"pageNum": 1,
"pageSize": 20,
"lenovoPn": "SM17A98404"
}
Successful response sample
JSON
{
"code": "0",
"msg": "ok",
"result": {
"total": 2,
"pageNum": 1,
"pageSize": 20,
"list": [
{
"customsId": "X00000000000000009915",
"status": "Approved",
"lenovoPn": "SM17A98404",
"vendorCode": "1000036734",
"countryIsoCode": "CN-中国",
"inhouseSite": "SZ",
"hsCode": "8473309000",
"commodityNameInChinese": "支架",
"partEnglishDescription": "MECH_ASM Backplate - SL SASHD to SAS",
"brand": "无品牌",
"declareElements": "{\"品牌类型\":\"无品牌\",\"出口享惠情况\":\"出口货物在最终目的国(地区)不享受优惠关税\",\"用途(适用于XX品牌XX机或通用于XX机等)\":\"通用于微型机\",\"品牌(中文或外文名称)\":\"无品牌\",\"型号\":\"无型号\",\"如为内存条需申报容量\":\"非内存条\"}",
"conversionRatioPerUnit": 1,
"netWeightKgs": 0.1705,
"unitPrice": 28.49,
"currency": "USD",
"creationDate": "2022-07-12",
"sysCreationBy": "lcfc",
"sysCreationDate": "2022-07-12 10:10:12",
"sysLastmodifiedBy": "lcfc",
"sysLastmodifiedDate": "2022-07-13 16:39:53"
},
...
]
}
}
Failed response sample
JSON
{
"code": "-1",
"msg": "creationDate格式化异常!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Query DeclareElements
Request address
Method: GET
Content-Type: application/json
Request data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
hsCode | String | Y | 10 | inhouse code | 8541410000 |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
{
"hsCode": "8541410000"
}
Successful response sample
JSON
{
"code": "0",
"msg": "ok",
"result": {
"cusElements": [
{
"textName": "Brand type",
"decfaccode": "0|1|2|3|4",
"snum": "0",
"codets": null,
"requireCheck": "1",
"decFacType": "1",
"decFacContent": "Unbranded | Domestic independent brands | Domestic acquired brands | Overseas brands (OEM) | Overseas brands (others)"
},
{
"textName": "Export preferential status",
"decfaccode": "0|1|2|3",
"snum": "1",
"codets": null,
"requireCheck": "1",
"decFacType": "1",
"decFacContent": "Exported goods do not enjoy preferential tariffs in the final destination country (region) | Exported goods enjoy preferential tariffs in the final destination country (region) | It is not certain that they will enjoy preferential tariffs in the final destination country (region) | Not applicable to import customs declarations"
},
{
"textName": "Purpose (applicable to XX brand XX machines or universally applicable to XX machines, etc.)",
"decfaccode": "",
"snum": "2",
"codets": null,
"requireCheck": "1",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "Brand (Chinese or foreign name)",
"decfaccode": "",
"snum": "3",
"codets": null,
"requireCheck": "1",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "型号",
"decfaccode": "",
"snum": "4",
"codets": null,
"requireCheck": "1",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "If it is a memory stick, the capacity needs to be declared",
"decfaccode": "",
"snum": "5",
"codets": null,
"requireCheck": "1",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "GTIN",
"decfaccode": "",
"snum": "6",
"codets": null,
"requireCheck": "0",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "CAS",
"decfaccode": "",
"snum": "7",
"codets": null,
"requireCheck": "0",
"decFacType": "",
"decFacContent": ""
},
{
"textName": "其他",
"decfaccode": "",
"snum": "8",
"codets": null,
"requireCheck": "0",
"decFacType": "",
"decFacContent": ""
}
],
"hsCode": "8473309000",
"inspMonitorCond": "\\0"
}
}
Failed response sample
JSON
{
"code": "-1",
"msg": "hsCode不能为空!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Upload Attachment
⚠️ clear origin attachment when upload new attachment!
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs/upload |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs/upload |
Method: POST
Content-Type: multipart/form-data
Request data description
Param | key | Type | Required | Length | Description | Example |
---|---|---|---|---|---|---|
lenovoPn | Y | String | Y | 20 | Lenovo part number | SM10N01540 |
vendorCode | Y | String | Y | 20 | vendor code | 0001000340 |
countryIsoCode | Y | String | Y | 20 | Country ISO code | CN |
inhouseSite | Y | String | Y | 20 | inhouse site | TJ |
brand | Y | String | Y | 50 | brand | none |
fileType | Number | Y | 1 | file type | 0 | |
files | File | Y | - | attachments | - |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
customsData:{
"lenovoPn": "SM10N01540",
"vendorCode": "0001000340",
"countryIsoCode": "CN",
"inhouseSite": "TJ",
"brand": "无品牌",
"fileType": 0
},
files: [
photo01,photo02
]
Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
Failed response sample
JSON
{
"code": "-1",
"msg": "Data Not Found!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |
Publish Customs
Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/master_data_pool/customs/publish |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/master_data_pool/customs/publish |
Method: POST
Content-Type: application/json
Request data description
Param | Key | Type | Required | Length | Description | Example |
---|---|---|---|---|---|---|
lenovoPn | Y | String | Y | 20 | lenovo part number | SM10N01540 |
vendorCode | Y | String | Y | 20 | vendor code | 0001000340 |
countryIsoCode | Y | String | Y | 20 | Country ISO code | CN |
inhouseSite | Y | String | Y | 20 | inhouse site | TJ |
brand | Y | String | Y | 50 | brand | none |
Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | response code | "0" |
msg | String | Y | 10 | response message | "ok"/"error" |
result | Object | N | response payload | refer to response sample |
Request sample
json
[
{
"lenovoPn": "SM10N01540",
"vendorCode": "0001000340",
"countryIsoCode": "CN",
"inhouseSite": "TJ",
"brand": "无品牌"
},
...
]
Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
Failed response sample
JSON
{
"code": "-1",
"msg": "Data Not Found!"
}
- Business error code
Error code | Error description | Resolution |
---|---|---|
-1 | result code | revise field value according to result message |
500 | server error | please contact IT with detail error message |