| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Genset Not Found |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/gensets.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
"gensets": [
{
"id": 123,
"number": "G085",
"seal": "5885304",
"chassis": null,
"has_battery": true,
"created_by": "Peter Parker",
"updated_by": null,
"created_at": "2018-08-20T18:43:54.138-04:00",
"updated_at": "2019-05-31T17:23:49.144-04:00",
"equipment_condition": null,
"fuel_level": "1.5",
"container": null,
"current_location": "Terminal: Happy Terminals",
"shipping_line": "Shipping Line: Evergreen",
"active": false,
"hours": null,
"flex_fields": [
{
"label": "Custom Field",
"value": "Custom Value"
}
]
},
{
"id": 456,
"number": "G086",
"seal": null,
"chassis": null,
"has_battery": true,
"created_by": null,
"updated_by": null,
"created_at": "2019-09-11T15:37:59.355-04:00",
"updated_at": "2019-09-11T15:37:59.355-04:00",
"equipment_condition": null,
"fuel_level": null,
"container": null,
"current_location": null,
"shipping_line": "Shipping Line: King Ocean",
"active": true,
"hours": null,
"flex_fields": []
}
]
}
| Param name | Description |
|---|---|
|
page optional |
Specify which page of results to fetch. This value defaults to 1. Validations:
|
|
per optional |
The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100. Validations:
|
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Genset Not Found |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/gensets/MYGENSET123.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
"genset": {
"id": 1234,
"number": "G000123",
"seal": null,
"chassis": null,
"has_battery": true,
"created_by": null,
"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": null,
"fuel_level": null,
"container": null,
"current_location": null,
"active": true,
"shipping_line": null,
"hours": null,
"flex_fields": []
}
}
| 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:
|
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Genset Not Found |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/gensets/G000123.json" -X PATCH -d '{ "genset": { "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": null,
"updated_by": "Peter Parker",
"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] optional |
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:
|