# Reverse Landed Cost Calculator

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

This endpoint allows to get a reverse landed cost

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-Type  | String | application/json |
| Authorization | String | idToken          |

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

```javascript
# landed cost request : ecommerce_type = MARKETPLACE
{
    "refund": [
        {
            "order_id": "My_Order_0000001",
            "identification": {
                "type": "HSCODE",
                "value": "6505009090"
            },
            "product_statut": "Autorisé à l'importation dans ce pays",
            "amount_exclusive": 1013,
            "amount_inclusive_vat": 1215.6,
            "amount_duty_and_tax": 202.6,
            "amount_ecoTax": 0,
            "amount_total": 1215.6,
            "percentage_duty_and_tax": 20,
            "duty": {
                "label": "duty",
                "percentage": 0,
                "product_taxes_amount": 0,
                "shipping_taxes_amount": 0,
                "packaging_taxes_amount": 0,
                "insurance_taxes_amount": 0,
                "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                "vat_product_taxes_amount": 0,
                "vat_shipping_taxes_amount": 0,
                "vat_packaging_taxes_amount": 0,
                "vat_insurance_taxes_amount": 0,
                "vat_taxes_amount": 0,
                "agreement": "No agreement"
            },
            "transit_fees": null,
            "special_taxes": [],
            "vat": [
                {
                    "label": "VAT",
                    "percentage": 20,
                    "product_taxes_amount": 200,
                    "shipping_taxes_amount": 2,
                    "packaging_taxes_amount": 0.6,
                    "insurance_taxes_amount": 0,
                    "message": null
                }
            ]
        },
        {
            "order_id": "My_Order_0000002",
            "identification": {
                "type": "HSCODE",
                "value": "6505009090"
            },
            "product_statut": "Restreint à l'importation dans ce pays",
            "amount_exclusive": 613,
            "amount_inclusive_vat": 741.73,
            "amount_duty_and_tax": 128.74,
            "amount_ecoTax": 0,
            "amount_total": 741.73,
            "percentage_duty_and_tax": 21.01,
            "duty": {
                "label": "duty",
                "percentage": 0,
                "product_taxes_amount": 0,
                "shipping_taxes_amount": 0,
                "packaging_taxes_amount": 0,
                "insurance_taxes_amount": 0,
                "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                "vat_product_taxes_amount": 0,
                "vat_shipping_taxes_amount": 0,
                "vat_packaging_taxes_amount": 0,
                "vat_insurance_taxes_amount": 0,
                "vat_taxes_amount": 0,
                "agreement": "No agreement"
            },
            "transit_fees": null,
            "special_taxes": [],
            "vat": [
                {
                    "label": "VAT",
                    "percentage": 21,
                    "product_taxes_amount": 126,
                    "shipping_taxes_amount": 2.1,
                    "packaging_taxes_amount": 0.63,
                    "insurance_taxes_amount": 0,
                    "message": null
                }
            ]
        }
    ],
    "landedCostResponse": [
        {
            "orders": [
                {
                    "order_id": "My_Order_0000001",
                    "identification": {
                        "type": "HSCODE",
                        "value": "6112499000"
                    },
                    "product_statut": "Autorisé à l'importation dans ce pays",
                    "amount_exclusive": 10013,
                    "amount_inclusive_vat": 12015.6,
                    "amount_duty_and_tax": 2002.61,
                    "amount_ecoTax": 0,
                    "amount_total": 12015.6,
                    "percentage_duty_and_tax": 20.01,
                    "duty": {
                        "label": "duty",
                        "percentage": 0,
                        "product_taxes_amount": 0,
                        "shipping_taxes_amount": 0,
                        "packaging_taxes_amount": 0,
                        "insurance_taxes_amount": 0,
                        "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                        "vat_product_taxes_amount": 0,
                        "vat_shipping_taxes_amount": 0,
                        "vat_packaging_taxes_amount": 0,
                        "vat_insurance_taxes_amount": 0,
                        "vat_taxes_amount": 0,
                        "agreement": "No agreement"
                    },
                    "transit_fees": null,
                    "special_taxes": [],
                    "vat": [
                        {
                            "label": "VAT",
                            "percentage": 20,
                            "product_taxes_amount": 2000,
                            "shipping_taxes_amount": 2,
                            "packaging_taxes_amount": 0.6,
                            "insurance_taxes_amount": 0,
                            "message": null
                        }
                    ]
                }
            ],
            "incoterm": "CIF",
            "global": {
                "amount": 2002.6,
                "amount_exclusive": 10013,
                "amount_inclusive_vat": 12015.6,
                "amount_total": 12015.6,
                "amount_duty_and_tax": 2002.61,
                "percentage_duty_and_tax": 20.01,
                "amount_ecoTax": 0
            },
            "timestamp": 1661377002588
        }
    ],
    "global_refund": {
        "amount": 331.33,
        "amount_duty_and_tax": 331.34,
        "amount_exclusive": 1626,
        "amount_inclusive_vat": 1957.33,
        "amount_total": 1957.33,
        "amount_ecoTax": 0
    }
}



# landed cost request with ecommerce_type != MARKETPLACE
{
    "refund": [
        {
            "order_id": "My_Order_0000001",
            "identification": {
                "type": "HSCODE",
                "value": "6505009090"
            },
            "product_statut": "Autorisé à l'importation dans ce pays",
            "amount_exclusive": 1013,
            "amount_inclusive_vat": 1215.6,
            "amount_duty_and_tax": 202.6,
            "amount_ecoTax": 0,
            "amount_total": 1215.6,
            "percentage_duty_and_tax": 20,
            "duty": {
                "label": "duty",
                "percentage": 0,
                "product_taxes_amount": 0,
                "shipping_taxes_amount": 0,
                "packaging_taxes_amount": 0,
                "insurance_taxes_amount": 0,
                "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                "vat_product_taxes_amount": 0,
                "vat_shipping_taxes_amount": 0,
                "vat_packaging_taxes_amount": 0,
                "vat_insurance_taxes_amount": 0,
                "vat_taxes_amount": 0,
                "agreement": "No agreement"
            },
            "transit_fees": null,
            "special_taxes": [],
            "vat": [
                {
                    "label": "VAT",
                    "percentage": 20,
                    "product_taxes_amount": 200,
                    "shipping_taxes_amount": 2,
                    "packaging_taxes_amount": 0.6,
                    "insurance_taxes_amount": 0,
                    "message": null
                }
            ]
        },
        {
            "order_id": "My_Order_0000002",
            "identification": {
                "type": "HSCODE",
                "value": "6505009090"
            },
            "product_statut": "Autorisé à l'importation dans ce pays",
            "amount_exclusive": 613,
            "amount_inclusive_vat": 735.6,
            "amount_duty_and_tax": 122.61,
            "amount_ecoTax": 0,
            "amount_total": 735.6,
            "percentage_duty_and_tax": 20.01,
            "duty": {
                "label": "duty",
                "percentage": 0,
                "product_taxes_amount": 0,
                "shipping_taxes_amount": 0,
                "packaging_taxes_amount": 0,
                "insurance_taxes_amount": 0,
                "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                "vat_product_taxes_amount": 0,
                "vat_shipping_taxes_amount": 0,
                "vat_packaging_taxes_amount": 0,
                "vat_insurance_taxes_amount": 0,
                "vat_taxes_amount": 0,
                "agreement": "No agreement"
            },
            "transit_fees": null,
            "special_taxes": [],
            "vat": [
                {
                    "label": "VAT",
                    "percentage": 20,
                    "product_taxes_amount": 120,
                    "shipping_taxes_amount": 2,
                    "packaging_taxes_amount": 0.6,
                    "insurance_taxes_amount": 0,
                    "message": null
                }
            ]
        }
    ],
    "landedCostResponse": {
        "orders": [
            {
                "order_id": "My_Order_0000001",
                "identification": {
                    "type": "HSCODE",
                    "value": "6112499000"
                },
                "product_statut": "Autorisé à l'importation dans ce pays",
                "amount_exclusive": 10013,
                "amount_inclusive_vat": 12015.6,
                "amount_duty_and_tax": 2002.61,
                "amount_ecoTax": 0,
                "amount_total": 12015.6,
                "percentage_duty_and_tax": 20.01,
                "duty": {
                    "label": "duty",
                    "percentage": 0,
                    "product_taxes_amount": 0,
                    "shipping_taxes_amount": 0,
                    "packaging_taxes_amount": 0,
                    "insurance_taxes_amount": 0,
                    "message": "Votre marchandise n'est pas soumise aux droits et taxes de douanes dans la même union douanière",
                    "vat_product_taxes_amount": 0,
                    "vat_shipping_taxes_amount": 0,
                    "vat_packaging_taxes_amount": 0,
                    "vat_insurance_taxes_amount": 0,
                    "vat_taxes_amount": 0,
                    "agreement": "No agreement"
                },
                "transit_fees": null,
                "special_taxes": [],
                "vat": [
                    {
                        "label": "VAT",
                        "percentage": 20,
                        "product_taxes_amount": 2000,
                        "shipping_taxes_amount": 2,
                        "packaging_taxes_amount": 0.6,
                        "insurance_taxes_amount": 0,
                        "message": null
                    }
                ]
            }
        ],
        "shipping_global": {
            "vat": null,
            "duty": null,
            "special_taxes": null
        },
        "packaging_global": {
            "vat": null,
            "duty": null,
            "special_taxes": null
        },
        "insurance_global": {
            "vat": null,
            "duty": null,
            "special_taxes": null
        },
        "transit_fees_global": null,
        "incoterm": "CIF",
        "global": {
            "amount": 2002.6,
            "amount_exclusive": 10013,
            "amount_inclusive_vat": 12015.6,
            "amount_total": 12015.6,
            "amount_duty_and_tax": 2002.61,
            "percentage_duty_and_tax": 20.01,
            "amount_ecoTax": 0
        },
        "timestamp": 1661377132600
    },
    "global_refund": {
        "amount": 325.2,
        "amount_duty_and_tax": 325.2,
        "amount_exclusive": 1626,
        "amount_inclusive_vat": 1951.2,
        "amount_total": 1951.2,
        "amount_ecoTax": 0
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
value in json is not recognized or incorrect

{
    "code": "INCORRECT_JSON",
    "name": "ClientError",
    "message": "Incorrect Json Request",
    "details": [
        {
            "parameter": {
                "name": "timestamp"
            },
            "causes": [
                "timestamp must be a positive number"
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="403: Forbidden " %}

```javascript
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: Not Found " %}

```javascript
DATA_NOT_FOUND when timestamp does not correspond to any User-Request-History-V2 landed cost

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

{% endtab %}

{% tab title="500: Internal Server Error " %}

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

{% endtab %}
{% endtabs %}

## JSON Body Request Exemple

```
{
    "timestamp": 1661361450508,
    "refund_items": [
        {
            "order_id": "My_Order_0000001",
            "items": [
                {
                    "identification": {
                        "type": "HSCODE",
                        "value": "6505009090"
                    }
                }
            ]
        },
        {
            "order_id": "My_Order_0000002",
            "items": [
                {
                    "identification": {
                        "type": "HSCODE",
                        "value": "6505009090"
                    }
                }
            ]
        }
    ]
}
```


---

# 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/duty-and-taxes-calculator/reverse-landed-cost-calculator.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.
