OfficeGest
Workshop/Models

List vehicle models

Returns a list of vehicle models with optional filtering.

GET
/workshop/models

Query Parameters

search?string
id?string
brand_id?integer

Filter by brand ID.

is_component?boolean

Filter by component flag.

active?boolean

Filter by active status.

name?stringDeprecated
created_at?stringDeprecated
Formatdate
updated_at?stringDeprecated
Formatdate
filter[name][operator]?string

Operators: sw, ew, ct, eq. Example: filter[name][sw]=value

filter[created_at][operator]?string

Operators: gte, lte, eq. Example: filter[created_at][gte]=value

Formatdate
filter[updated_at][operator]?string

Operators: gte, lte, eq. Example: filter[updated_at][gte]=value

Formatdate
filter?object

Advanced filters (name, created_at, updated_at).

Empty Object

page?integer

Page number. Default 1; a value below 1 counts as 1.

Default1
Range1 <= value
limit?integer

Items per page. Default 50, maximum 250; a larger value is truncated to 250.

Default50
Range1 <= value <= 250

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/models?search=string&id=string&brand_id=0&is_component=true&active=true&name=string&created_at=2019-08-24&updated_at=2019-08-24&filter%5Bname%5D%5Boperator%5D=string&filter%5Bcreated_at%5D%5Boperator%5D=2019-08-24&filter%5Bupdated_at%5D%5Boperator%5D=2019-08-24&page=1&limit=50"
{
  "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
    }
  ],
  "meta": {
    "per_page": 50,
    "current_page": 1,
    "has_more": 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"
  }
}