> For the complete documentation index, see [llms.txt](https://transiteo.gitbook.io/transiteo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://transiteo.gitbook.io/transiteo/management-system/customers-crm.md).

# 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>\
***Type :** string*\
***Required :** yes*

#### "website"

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

#### "firstname"

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

#### "lastname"

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

#### "gender"

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

#### "age"

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

#### "phoneNumber"

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

#### "zipCode"

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

#### "address"

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

#### "city"

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

#### "state"

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

#### "country"

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

#### "companyName"

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

#### "companyId"

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

#### "companyTaxId"

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

#### "pro"

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

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

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

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

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

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

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

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

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

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

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

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

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

#### "awaitingOrders" / "orderId"

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

#### "awaitingOrders" / "orderDutyAmount"

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

#### "awaitingOrders" / "orderVatAmount"

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

#### "awaitingOrders" / "orderSpecialTaxesAmount"

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

#### "awaitingOrders" / "orderTotalAmount"

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

#### "awaitingOrders" / "orderCurrency"

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

#### "canceledOrders" / "orderId"

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

#### "canceledOrders" / "orderDutyAmount"

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

#### "canceledOrders" / "orderVatAmount"

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

#### "canceledOrders" / "orderSpecialTaxesAmount"

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

#### "canceledOrders" / "orderTotalAmount"

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

#### "canceledOrders" / "orderCurrency"

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

#### "buyedProducts" / "productId"

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

#### "buyedProducts" / "productQuantity"

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

#### "buyedProducts" / "productPrice"

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

#### "buyedProducts" / "productCurrency"

Fill this value with the currency of the unit price.\
**Exemple :** EUR\
***Type :** string*\
***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 %}
