Check
Check if the hscode is a right hscode for a specific country
Check if the hscode is a right hscode for a specific country
POST https://api.transiteo.io/v1/taxsrv/verifyhscode
Headers
Name
Value
Content-Type
application/json
Authorization
id token from cognito
JSON REQUEST FORMAT
{
"origin_country": "FRA",
"hscode": "6505009090"
}Response
{
"isRightHscode": false
}1. Incorrect Json (json body request incorrect
a)
@ValidateNested()
product: {
identification: HsCodeFinderIdentification
};
@IsNotEmpty()
@Length(3, 3, {message: "to_country should be ISO3"})
to_country: string;
@ValidateIf(o => o.product.identification.type == HsCodeFinderEnum.HSCODE)
@IsNotEmpty()
@Length(3, 3, {message: "from_country should be ISO3"})
from_country: string;
@IsEnum(LANG_ENUM, {
message: `Lang is required and should be fill with one of these values : ${JSON.stringify(Object.keys(LANG_ENUM).map(k => k.toLowerCase()))}`
})
lang: string;
b) Error Response Example:
{
"code": "INCORRECT_JSON",
"httpCode": 400,
"name": "ClientError",
"message": "Requête Json incorrecte",
"details": [
{
"parameter": {
"name": "Product",
"value": {
"value": "TEXT",
"type": "Voiture de sport"
}
},
"causes": [
"[\"from_country should be ISO3"]"
]
}
]
}
2. The barcode given in the request is not a barcode
{
"code": "NOT_BARCODE",
"httpCode": 400,
"name": "ClientError",
"message": "This is not a valid barcode",
"details": []
}{
"code": "UNEXPECTED_ERROR",
"httpCode": 500,
"reason": "Please try again or contact our service",
}Last updated