OfficeGest
Workshop/Models

Create vehicle model

Creates a new vehicle model.

POST
/workshop/models
namestring

Model name.

brand_idinteger

Brand ID.

active?boolean

Whether the model is active.

is_component?boolean

Whether this is a component model (ECOAUTO module).

Response Body

curl -X POST "https://og-tenant1.test:8003/api/v2/workshop/models" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "brand_id": 0
  }'
{
  "data": {
    "id": 0,
    "name": "string",
    "brand_id": 0,
    "active": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "is_component": true
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}