Example JSON Representation

{
  "id": 5052,
  "brand_id":549,
  "name":"New Model A",
  "approved":false
}

GET /models
List models

GET /brands/:id/models
List models

Params

Param name Description
page
optional

Value:

Must be Integer.

per_page
optional

Value:

Must be Integer.

name
optional

List models with names matching the provided string.


Value:

Must be String

name_like
optional

List models with names matching, or similar to, the provided string. Slower, but useful for correcting user input.


Value:

Must be String

brand
optional

Value:

Must be String

brand_id
optional

Value:

Must be Integer.

approved
optional

Value:

Must be true or false.

pending
optional

Value:

Must be true or false.

in_use
optional

Value:

Must be true or false.


GET /models/:id
Show a model


POST /models
Create a model

Errors

400

Examples

curl -X POST -H "Authorization: XXXX" -H "Content-Type: application/json" -d '{"name": "New Model A", "brand_id": 549}' "https://api.axefax.com/models"

Response:

{
  "model":{
    "id": 5052,
    "brand_id":549,
    "name":"New Model A",
    "approved":false
  }
}
      

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be String


PUT /models/:id
Update a model

Errors

400

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be String


DELETE /models/:id
Destroy a model

Errors

405