Example JSON Representation

{
  "id": 7977,
  "brand_id":478,
  "model_id":12432,
  "name":"Electric Lap Steel",
  "approved":true
}

GET /submodels
List submodels

GET /brands/:id/models/:model_id/submodels
List submodels

Params

Param name Description
page
optional

Value:

Must be Integer.

per_page
optional

Value:

Must be Integer.

name
optional

List submodels with names matching the provided string.


Value:

Must be String

name_like
optional

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


Value:

Must be String

model
optional

Value:

Must be String

model_id
optional

Value:

Must be Integer.

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.


GET /submodels/:id
Show a submodel


POST /submodels
Create a submodel

Errors

400

Examples

curl -X POST -H "Authorization: XXXXX" -H "Content-Type: application/json" -d '{"name": "New Submodel B", "brand_id": 549, "model_id": 5052}' "https://api.axefax.com/submodels"

Response:

{
  "submodel":{
    "id": 7977,
    "brand_id":478,
    "model_id":12432,
    "name":"Electric Lap Steel",
    "approved":true
  }
}
      

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be String

model_id
optional

Value:

Must be String


PUT /submodels/:id
Update a submodel

Errors

400

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be String

model_id
optional

Value:

Must be String


DELETE /submodels/:id
Destroy a submodel

Errors

405