# A.I Customs Code Control

## Control with A.I if the HSCode be equivalent to product title or description

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

**Headers**

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

### JSON REQUEST FORMAT

```
{
    "requests": [
        {
            "hscode": "9506620090",
            "to_country": "FRA",
            "text": "Ballon de football"
        },
        {
            "hscode": "6505003100",
            "to_country": "FRA",
            "text": "Boite de thon"
        }
    ]
}
```

**Response**

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

```json
[
    {
        "scoring_control": 86.9,
        "hscodes_proposals": [
            {
                "hscode": "9506620000",
                "score": 69
            },
            {
                "hscode": "9506699000",
                "score": 25.9
            },
            {
                "hscode": "9506999000",
                "score": 1.2
            }
        ]
    },
    {
        "scoring_control": 3.56,
        "hscodes_proposals": [
            {
                "hscode": "1604142100",
                "score": 35.6
            },
            {
                "hscode": "1604142800",
                "score": 24.7
            },
            {
                "hscode": "1604144890",
                "score": 14.1
            }
        ]
    }
]
```

{% endtab %}

{% tab title="400" %}

```json
Incorrect Json (json body request incorrect) : a description of the error will be returned
```

{% endtab %}

{% tab title="403" %}

```
wrong token id or token has expired
```

{% endtab %}

{% tab title="500" %}

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://transiteo.gitbook.io/transiteo/duties-and-taxes-services/hscode-services/a.i-customs-code-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
