# Customers (CRM)

## Add a product in its transiteo catalog

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

This endpoint allows you to add a product in your catalog. And thanks to product SKU you could calculate duties and taxes from & to every countries in the world.

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-type  | string | application/json |
| Authorization | string | "your id\_token" |

### Json Request Format

```
{
    "customerMail": string,
    "website": string,
    "firstname": string,
    "lastname": string,
    "gender": string,
    "age": number,
    "phoneNumber": string,
    "zipCode": string,
    "address": string,
    "city": string,
    "state": string,
    "country": string,
    "companyName": string,
    "companyId": string,
    "companyTaxId": string,
    "pro": boolean,
    "paidOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "awaitingOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "canceledOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "buyedProducts": [
        {
            "productId": string,
            "productQuantity": number,
            "productPrice": number,
            "productCurrency": string
        }
    ]
}
```

### Request fields & values

#### "customerMail"

Fill this value with the customer mail\
**Exemple :** <john.do@gmail.com>\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "website"

Fill this value with the website attached to the customer\
**Exemple :** <https://www.transiteo.com\\>
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "firstname"

Fill this value with the customer firstname\
**Exemple :** John\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "lastname"

Fill this value with the customer lastname\
**Exemple :** Do\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "gender"

Fill this value with the customer lastname\
**Exemple :** Male or Female\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** no*

#### "age"

Fill this value with the customer age\
**Exemple :** 45\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "phoneNumber"

Fill this value with the customer phone number\
**Exemple :** +33678987654\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** no*

#### "zipCode"

Fill this value with the customer postal code\
**Exemple :** FR67000\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "address"

Fill this value with the customer adress\
**Exemple :** 4 rue des moulins\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "city"

Fill this value with the customer city\
**Exemple :** Strasbourg\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "state"

Fill this value with the customer state\
**Exemple :** Alsace\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "country"

Fill this value with the customer country\
**Exemple :** France\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "companyName"

Fill this value with the customer company name\
**Exemple :** Transiteo\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "companyId"

Fill this value with the customer company id\
**Exemple :** 465 789 346\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "companyTaxId"

Fill this value with the customer company tax id\
**Exemple :** FR465789346\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "pro"

Fill this value with true or false if the customer is or is not a company \
**Exemple :** true\
\&#xNAN;***Type :** boolean*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderId"

Fill this value with the customer paid order id\
**Exemple :** OR004\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderDutyAmount"

Fill this value with the customer paid order duty amount\
**Exemple :** 67.45\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderVatAmount"

Fill this value with the customer paid order locals taxes amount\
**Exemple :** 34.88\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderSpecialTaxesAmount"

Fill this value with the customer paid order special taxes amount\
**Exemple :** 9.32\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderTotalAmount"

Fill this value with the customer paid order total amount\
**Exemple :** 98.64\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "paidOrders" */* "orderCurrency"

Fill this value with the customer paid order currency\
**Exemple :** EUR\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderId"

Fill this value with the customer awaiting order id\
**Exemple :** OR004\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderDutyAmount"

Fill this value with the customer awaiting order duty amount\
**Exemple :** 67.45\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderVatAmount"

Fill this value with the customer awaiting order locals taxes amount\
**Exemple :** 34.88\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderSpecialTaxesAmount"

Fill this value with the customer awaiting order special taxes amount\
**Exemple :** 9.32\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderTotalAmount"

Fill this value with the customer awaiting order total amount\
**Exemple :** 98.64\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "awaitingOrders" / "orderCurrency"

Fill this value with the customer awaiting order currency\
**Exemple :** EUR\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderId"

Fill this value with the customer canceled order id\
**Exemple :** OR004\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderDutyAmount"

Fill this value with the customer canceled order duty amount\
**Exemple :** 67.45\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderVatAmount"

Fill this value with the customer canceled order locals taxes amount\
**Exemple :** 34.88\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderSpecialTaxesAmount"

Fill this value with the customer canceled order special taxes amount\
**Exemple :** 9.32\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderTotalAmount"

Fill this value with the customer canceled order total amount\
**Exemple :** 98.64\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "canceledOrders" / "orderCurrency"

Fill this value with the customer canceled order currency\
**Exemple :** EUR\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "buyedProducts" / "productId"

Fill this value with the id of the buyed product\
**Exemple :** H76TYUJH3\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

#### "buyedProducts" / "productQuantity"

Fill this value with the quantity of the buyed product\
**Exemple :** 3\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "buyedProducts" / "productPrice"

Fill this value with the unit price of the buyed product\
**Exemple :** 4.87\
\&#xNAN;***Type :** number*\
\&#xNAN;***Required :** yes*

#### "buyedProducts" / "productCurrency"

Fill this value with the currency of the unit price.\
**Exemple :** EUR\
\&#xNAN;***Type :** string*\
\&#xNAN;***Required :** yes*

### JSON Examples - Request & Response

```
{
    “mail”: string,
    "customerMail": string,
    "website": string,
    "firstname": string,
    "lastname": string,
    "gender": string,
    "age": number,
    "phoneNumber": string,
    "zipCode": string,
    "address": string,
    "city": string,
    "state": string,
    "country": string,
    "companyName": string,
    "companyId": string,
    "companyTaxId": string,
    "pro": boolean,
    "paidOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "awaitingOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "canceledOrders": [
        {
            "orderId": string,
            "orderDutyAmount": number,
            "orderVatAmount": number,
            "orderSpecialTaxesAmount": number,
            "orderTotalAmount": number,
            "orderCurrency": string
        }
    ],
    "buyedProducts": [
        {
            "productId": string,
            "productQuantity": number,
            "productPrice": number,
            "productCurrency": string
        }
    ]
}
```

### Video explainer

in progress...

## Update a customer

<mark style="color:orange;">`PUT`</mark> `https://api.transiteo.io/v1/customer/customers?website={url}`

This endpoint allows you tu update a product in its catalog

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-type  | string | application/json |
| Authorization | string | "your id\_token" |

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

```
```

{% endtab %}
{% endtabs %}

## Get customer informations

<mark style="color:blue;">`GET`</mark> `https://api.transiteo.io/v1/customer/customers?website={url}`

This endpoint allows you to get informations of specific product

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-type  | string | application/json |
| Authorization | string | "your id\_token" |

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

```
```

{% endtab %}
{% endtabs %}

## Get all products in its catalog

<mark style="color:blue;">`GET`</mark> `https://api.transiteo.io/v1/customer/customers`

This endpoint allows you to get a list of all product in its catalog

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-type  | string | application/json |
| Authorization | string | "your id\_token" |

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

```
```

{% endtab %}
{% endtabs %}

## Delete a product in its catalog

<mark style="color:red;">`DELETE`</mark> `https://api.transiteo.io/v1/customer/products/{sku}`

This endpoint allows to delete a specific product inn its catalog

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-type  | string | application/json |
| Authorization | string | "your id\_token" |

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

```
```

{% 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/management-system/customers-crm.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.
