Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Genset Not Found
500 Internal Server Error.

Examples

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": []
  }
}

Params

Param name Description
genset
required

Validations:

  • Must be a Hash

genset[number]
required

The genset number. Must be unique.

Validations:

  • Must be a String

genset[seal]
optional

The genset seal.

Validations:

  • Must be a String

genset[has_battery]
optional

Whether the genset has a battery.

Validations:

  • Must be one of: true, false.

genset[active]
optional

Whether the genset is active or not.

Validations:

  • Must be one of: true, false.

genset[fuel_level]
optional

The genset fuel level.

Validations:

  • Must be one of: 0.0, 0.25, 0.5, 0.75, 1.0.

genset[hours]
optional

The number of hours on the genset.

Validations:

  • Must be a Float

genset[shipping_line_id]
optional

The shipping line id of this genset.

Validations:

  • Must be a Integer

genset[equipment_condition]
optional

The genset condition.

Validations:

  • Must be a String

genset[container]
optional

The container number for this genset.

Validations:

  • Must be a String

genset[current_location_type]
optional

The genset current location type.

Validations:

  • Must be one of: Consignee, Other, Port, Ship, Terminal, Voyage, YardArea, YardSlot, TrainVisit.

genset[current_location_id]
optional

The genset current location id.

Validations:

  • Must be a Integer

genset[yard_slot_id]
optional

The genset yard slot id.

Validations:

  • Must be a Integer

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:

  • Must be an array of Hash