> For the complete documentation index, see [llms.txt](https://docs.w3lcome.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.w3lcome.com/integration/sbt.md).

# SBT

## The Host

The host object is the same as [here](/host/the-host-object.md#the-object) with the same methods (GET/POST/PATCH/DELETE) there are only 2 more properties `linesAllowed` and `driverLine`

| Attribute                     | Description                                                                                                                                                                                                                                                                                                                                |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **linesAllowed** *`[string]`* | <p>An array of allowed lines ids that indicates which lines this user can use. E.g.: <code>\["l01", "l03"]</code> so this user is allowed to use <strong>VILA NINO</strong> and <strong>TREMEMBÉ.</strong> <br>Default: <code>null</code> (This user is not allowed to use any line)</p><p>(Set as an empty array to remove all lines)</p> |
| **driverLine** *`string`*     | <p>This property indicates if this user is a driver and what is his line. <br>E.g.: <code>"l06"</code> so this is a driver of <strong>SAPOPEMA.</strong> <br>Default: <code>null</code> (This user is not a driver)</p><p>(Set as an empty string to remove it)</p>                                                                        |

## Available lines

Obs.: Every line id starts with lowercase **`L`**

| id          | Name                             |
| ----------- | -------------------------------- |
| ***`l01`*** | VILA NINO                        |
| ***`l02`*** | EDU CHAVES                       |
| ***`l03`*** | TREMEMBÉ                         |
| ***`l04`*** | CIDADE TIRA-DENTES               |
| ***`l05`*** | ITAIM PAULISTA                   |
| ***`l06`*** | SAPOPEMA                         |
| ***`l07`*** | GUARULHOS VIA DUTRA              |
| ***`l08`*** | METRÔ CONCEIÇÃO                  |
| ***`l09`*** | SANTO ANDRÉ / SÃO CAETANO DO SUL |
| ***`l10`*** | JUNDIAI                          |
| ***`l11`*** | SÃO MIGUEL                       |
| ***`l12`*** | OSASCO                           |
| ***`l13`*** | BARRA FUNDA                      |
| ***`l14`*** | TRANSPORTE NOTURNO               |

## Sample request

## Update a host

<mark style="color:purple;">`PATCH`</mark> `https://api.w3lcome.com/v1/host/:id`

This is the same endpoint as **Update a Host** but with the 2 extra parameters.

#### Path Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| id   | string | ID of the host |

#### Headers

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| Content-Type   | string | application/JSON |
| Authentication | string | Basic `token`    |

#### Request Body

| Name         | Type   | Description          |
| ------------ | ------ | -------------------- |
| linesAllowed | array  | An array of lines id |
| driverLine   | string | A single line id     |

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

```javascript
{
    "id": "5d13bad4ae9c50948f6edd67a16d6936",
    "email": "alisson@w3lcome.com",
    "name": "Alisson Enz Rossi",
    "isActive": true,
    "pictureUrl": "",
    "position": "CTO",
    "sector": "IT",
    "phone": "(43) 9 9982-0420",
    "countryCode": "+55",
    "isPhoneValid": true,
    "company": "W3lcome",
    "type": "host",
    "message": "HOST UPDATED",
    "role": "manager",
    "linesAllowed": ["l01", "l04"],
    "driverLine": "l06"
}
```

{% endtab %}

{% tab title="400 Error" %}

```javascript
{
    "type": "INVALID_LINE_ID"
}
```

{% endtab %}
{% endtabs %}

## Table of errors

| Methos         | Type              | Description                             |
| -------------- | ----------------- | --------------------------------------- |
| `POST` `PATCH` | INVALID\_LINE\_ID | The line id provided is not a valid one |
