Companies

Fields

Field Type Description Example
id string Company ID 5gurdSf6trI1xa2yFkgVfY
name string Company name My First Company
timeZone string Time zone Europe/Berlin
countryCode string Country code de

Create a new company

curl \
    -X POST \
    -H 'Authorization: Token ...' \
    -H 'Content-Type: application/json' \
    -d '{"name": "My Company"}' \
   https://api.xfleet.io/api/v1/companies
{
    "name": "My Company",
    "timeZone": "Europe/Bucharest",
    "countryCode": "ro",
    "weight": 1,
    "createdAt": "2021-11-06T21:46:09+00:00",
    "id": "5gurdSf6trI1xa2yFkgVfY"
}

List companies

curl \
    -H 'Authorization: Token ...' \
   https://api.xfleet.io/api/v1/companies
[
    {
        "name": "My Company",
        "timeZone": "Europe/Berlin",
        "countryCode": "de",
        "createdAt": "2021-11-06T21:46:09+00:00",
        "id": "5gurdSf6trI1xa2yFkgVfY"
    }
]