| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Genset Not Found |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/gensets.json" -X POST -d '{ "genset": { "number": "G000123", "seal": "5885304", "has_battery": true, "active": true, "fuel_level": 0.5, "hours": 120.5, "shipping_line_id": 12345, "equipment_condition": "good", "container": "ABC12345", "flex_fields": [ {"flex_field_label": "value"} ] } }' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"genset": {
"id": 1234,
"number": "G000123",
"seal": "5885304",
"chassis": null,
"has_battery": true,
"created_by": "Peter Parker",
"updated_by": null,
"created_at": "2022-09-23T11:09:57.098-04:00",
"updated_at": "2022-09-23T11:09:57.098-04:00",
"equipment_condition": "Good",
"fuel_level": "0.5",
"container": "ABC12345",
"current_location": null,
"active": true,
"shipping_line": "Shipping Line: Evergreen",
"hours": "120.5",
"flex_fields": []
}
}
| Param name | Description |
|---|---|
|
genset required |
Validations:
|
|
genset[number] required |
The genset number. Must be unique. Validations:
|
|
genset[seal] optional |
The genset seal. Validations:
|
|
genset[has_battery] optional |
Whether the genset has a battery. Validations:
|
|
genset[active] optional |
Whether the genset is active or not. Validations:
|
|
genset[fuel_level] optional |
The genset fuel level. Validations:
|
|
genset[hours] optional |
The number of hours on the genset. Validations:
|
|
genset[shipping_line_id] optional |
The shipping line id of this genset. Validations:
|
|
genset[equipment_condition] optional |
The genset condition. Validations:
|
|
genset[container] optional |
The container number for this genset. Validations:
|
|
genset[current_location_type] optional |
The genset current location type. Validations:
|
|
genset[current_location_id] optional |
The genset current location id. Validations:
|
|
genset[yard_slot_id] optional |
The genset yard slot id. Validations:
|
|
genset[flex_fields] optional |
An array of hashes, where each hash contains a flex field’s canonical name and the corresponding value to be set on the genset. Validations:
|