# Nomenclature

## Get HScode nomenclature designation

<mark style="color:green;">`POST`</mark> `https://api.transiteo.io/v1/taxsrv/harmonizedSystemCodes`

**Headers**

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `application/json`    |
| Authorization | id token from cognito |

### JSON REQUEST FORMAT

```
{
  "hscode": "6505009090",
  "to_country": "FRA", // ISO2 or ISO3 country
  "lang": "fr"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "hscode_request": "6505009090",
    "to_country": "FRA",
    "version": "HS17",
    "hscode": {
        "chapter": "65",
        "heading": "05",
        "hscode_designation": "COIFFURES ET PARTIES DE COIFFURES - Chapeaux et autres coiffures en bonneterie ou confectionnés à l'aide de dentelles, de feutre ou d'autres produits textiles, en pièces (mais non en bandes), même garnis; résilles et filets à cheveux en toutes matières, même garnis - autres, autres - autres",
        "subdivision": "9090",
        "subheading": "00"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
1. Incorrect Json (json body request incorrect)

Response Example: 
{
    "code": "INCORRECT_JSON",
    "name": "ClientError",
    "message": "Incorrect Json Request",
    "details": [
        {
            "parameter": {
                "name": "to_country",
                "value": "FRANCE"
            },
            "causes": [
                "to_country should be ISO3 or ISO2"
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="403" %}

```
1. Max requests exceed
{
    "code": "MAX_REQUESTS_EXCEED",
    "httpCode": 403,
    "name": "ClientError",
    "message": "You've reached the max requests authorized for your account. Please contact our service to upgrade your account",
    "details": [
        {
            "parameter": {
                "name": "UserRequests",
                "value": "${leftCredits}"
            },
            "causes": [
                "Max requests authorized for your account is ${capacity}. Left credits is ${leftCredits}"
            ]
        }
    ]
}

2. TRIAL_LIMIT_EXCEED

{
    "code": "TRIAL_LIMIT_EXCEED",
    "httpCode": 403,
    "name": "ClientError",
    "message": "You have exceeded the trial limit. Please contact our service to upgrade your account",
    "details": [
        {
            "parameter": {
                "name": "UserTrialLimit",
                "value": "${validity} days"
            },
            "causes": [
                "User trial is limited to ${validity} days of usage"
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="404" %}

```
{
    "code": "DATA_NOT_FOUND",
    "name": "BusinessError",
    "message": "Sorry, we did not find the data you are trying to retrieve",
    "details": []
}
```

{% endtab %}

{% tab title="500" %}

```
{
    "code": "UNEXPECTED_ERROR",
    "httpCode": 500,
    "reason": "Please try again or contact our service",
}
```

{% endtab %}
{% endtabs %}
