Taxonomie HS10 Codes Import et Export¶
The SMC_TAXO V2 API allows you to have the HS10 Export and Import codes.
Base URL = https://taxo.imxpostal.fr/api
Api description¶
Method : GET
Url : https://taxo.imxpostal.fr/api/v1.0/get_hs10code
Parameters :
* hscode : the product hs6code. Can be obtained with the SMC TAXONOMY API
(endpoint :`api/v1.1/get_datas`).
* sc : source country code in ISO 3166-1 alpha 2.
* dc : destination country code in ISO 3166-1 alpha 2.
* desc : description of the product in english. It is not required if hscode is filled.
Headers : * x-api-key : Secret code given by IMX
Response in JSON format :
Property | Description |
---|---|
10digitExportCode | HS10Code Export of the hscode article entered as a parameter. |
10digitImportCode | HS10Code Import of the hscode article entered as parameter. |
destinationCountry | Destination Country code, the same value passed in parameter dc. |
sourceCountry | Country Source code, the same value passed in parameter sc. |
success | Boolean result of the request. False if there is an error, otherwise true. |
suitableDescription | The description of the item. |
suitableHS6code | The hs6code code, the same value passed in parameter hscode. |
message | Si success vaut false, alors message fournit la description de l’erreur. |
Example 1 : Correct case¶
By providing correct parameters:
* hscode = 420212
* sc = FR
* dc = CH
Call to api smc_taxo :
https://taxo.imxpostal.fr/api/v1.0/get_hs10code?hscode=420212&sc=FR&dc=CH
Response :
{
"10digitExportCode": "4202129110",
"10digitImportCode": "4202120000",
"destinationCountry": "CH",
"sourceCountry": "FR",
"success": true,
"suitableDescription": "attache case",
"suitableHS6code": "420212"
}
Example 2 : An error with HS6Code of param hscode¶
In case the hscode parameter does not match any of the existing products:
* hscode = 420210
* sc = FR
* dc = CH
Call to api smc_taxo :
https://taxo.imxpostal.fr/api/v1.0/get_hs10code?hscode=420210&sc=FR&dc=CH
Response :
{
"message": "Response from Zephyr is not correct.",
"success": false
}
Example 3 : An error with one of codes country¶
In the case one of the country, source or destination codes specified is not correct:
* hscode = 420212
* sc = FR
* dc = C
Appel api smc_taxo :
https://taxo.imxpostal.fr/api/v1.0/get_hs10code?hscode=420212&sc=FR&dc=C
Response :
{
"message": "The Source* Contry or Destination* Country does not exist.",
"success": false
}
Exemple 4 : Incorrect or missing header x-api-key¶
If no header value is passed or the value is incorrect.
Response :
```json { "message": "You doesn't have permission to access.", "success": false }