Create
POST https://api.pegasusgateway.com/groups
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"=>"Group test 2", "company_name"=>"ABC Trucks", "city"=>"Miami", "country"=>"USA", "contact_name"=>"Dr Truck", "contact_email"=>"truck.dr@abc.com", "address_1"=>"123 Truck St", "address_2"=>"Suite 456", "vehicles"=>[1, 2, 3], "assets"=>[4, 5, 6], "users"=>[7, 8, 9]}
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":{}}