Skip to main content

Create Vehicle Type

POST 

https://secure.fleetio.com/api/v1/vehicle_types

Creates a new Vehicle Type

Request

Body

    namestringrequired

    The name of the Vehicle Type. Must be unique.

    Possible values: <= 255 characters

    defaultboolean

    Whether this Vehicle Type should be the default applied to new Vehicles.

    Default value: false

Responses

OK

Response Headers
    Schema
      idinteger

      Possible values: >= 1

      created_atdate-time

      The date and time at which this record was created.

      Example: 2023-03-14T13:46:27-06:00
      updated_atdate-time

      The date and time at which this record was most recently updated.

      Example: 2023-03-14T13:46:27-06:00
      account_idId (integer)required

      Possible values: >= 1

      namestringrequired

      The name of the Vehicle Type.

      defaultbooleanrequired

      Whether this Vehicle Type is the default applied to new Vehicles.

      Default value: false
      unarchived_vehicles_countintegerrequired

      The number of unarchived Vehicles that are of this Vehicle Type.

      Possible values: >= 0

      vehicles_countintegerrequired

      The total number of Vehicles that are of this Vehicle Type.

      Possible values: >= 0

    Authorization: Authorization

    name: Authorizationtype: apiKeyin: headerdescription: Prefix the value with "Token", for example: "Token 76cbe06c49a64".
    You can generate a new API key [here](https://secure.fleetio.com/api_keys).
    name: Account-Tokentype: apiKeyin: headerdescription: You can find your Account-Token [here](https://secure.fleetio.com/api_keys)
    curl -L 'https://secure.fleetio.com/api/v1/vehicle_types' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: <Authorization>' \
    -H 'Account-Token: <Authorization>' \
    -d '{
    "name": "string",
    "default": false
    }'
    Request Collapse all
    Base URL
    https://secure.fleetio.com/api
    Auth
    Body
    {
      "name": "string",
      "default": false
    }
    
    ResponseClear

    Click the Send API Request button above and see the response here!