Create
POST https://api.pegasusgateway.com/vehicles
Parameters
Field | Required | Type | Description |
---|---|---|---|
name | required | String | Name of the Vehicle |
alias | optional | String | Vehicle alias (alternative name) |
device | optional | Number | IMEI of the device for this vehicle |
year | optional | String | Year |
make | optional | String | Make |
model | optional | String | Model |
license_plate | optional | String | License plate |
color | optional | String | Color |
vin | optional | String | VIN |
tank_volume | optional | Number | Tank volume |
primary | optional | Number | Primary group id |
tank_unit | optional | String | Tank unit. Default value: liter. Allowed values: 'liter', 'gallon' |
range | optional | Number | Distance vehicle can travel on a full tank of gas |
description | optional | String | Description |
groups | optional | Number[] | Groups vehicle belongs to |
properties | optional | Object | Custom vehicle properties |
Request Body
{"name"=>"Vehicle unit test LR", "alias"=>"", "device"=>353897871260263, "year"=>"", "make"=>"", "model"=>"", "license_plate"=>"", "color"=>"", "vin"=>"", "tank_volume"=>nil, "primary"=>nil, "tank_unit"=>nil, "range"=>nil, "description"=>"", "groups"=>[70, 28, 64]}
RESPONSES
status: OK
{"info":{"range_unit":null,"description":null,"tank_volume":null,"color":null,"make":null,"vin":null,"license_plate":null,"alias":null,"range":null,"year":"2022","model":null,"tank_unit":null},"associations":[],"__updated":1659971404.168041,"associated_at":null,"name":"New Vehicle","id":5776,"primary":null,"__created":1659971403.619295,"device":null,"token":null,"groups":[3],"__version":"6.11.3-gm","images":{"photo":false,"on_icon":false,"idle_icon":false,"icon":false,"off_icon":false},"type":"vehicle","properties":{}}