Supported Formats

json

GET /api/v1/vehicles/:vehicle_id/flex_fields/:label.json
Get a specific flex field value for a vehicle

This API endpoint allows you to get a specific flex field value for a vehicle.

Supported Formats

json

Errors

Code Description
404 Not found.
400 Bad request.
422 Unprocessable entity.
500 Internal server error.

Examples

curl "https://app.octopi.co/api/v1/vehicles/4337813/flex_fields/color.json" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Token token=YOUR_TOKEN"

Params

Param name Description
vehicle_id
required

The Octopi ID of the vehicle.

Validations:

  • Must be a String

label
required

The label of the flex field.

Validations:

  • Must be a String


PUT /api/v1/vehicles/:vehicle_id/flex_fields/:label.json
Create or update a flex field value for a vehicle

This API endpoint allows you to create or update a flex field value for a vehicle.

Supported Formats

json

Errors

Code Description
404 Not found.
400 Bad request.
422 Unprocessable entity.
500 Internal server error.

Examples

curl "https://app.octopi.co/api/v1/vehicles/4337813/flex_fields/color.json" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Token token=YOUR_TOKEN" \
-d '{"value": "Red"}'

Params

Param name Description
vehicle_id
required

The Octopi ID of the vehicle.

Validations:

  • Must be a String

label
required

The label of the flex field.

Validations:

  • Must be a String

value
required

The value to set for the flex field.

Validations:

  • Must be a String


DELETE /api/v1/vehicles/:vehicle_id/flex_fields/:label.json
Delete a flex field value for a vehicle

This API endpoint allows you to delete a flex field value for a vehicle. This removes the value but does not delete the flex field definition.

Supported Formats

json

Errors

Code Description
404 Not found.
400 Bad request.
422 Unprocessable entity.
500 Internal server error.

Examples

curl "https://app.octopi.co/api/v1/vehicles/4337813/flex_fields/color.json" \
-X DELETE \
-H "Accept: application/json" \
-H "Authorization: Token token=YOUR_TOKEN"

Params

Param name Description
vehicle_id
required

The Octopi ID of the vehicle.

Validations:

  • Must be a String

label
required

The label of the flex field.

Validations:

  • Must be a String