{
"id": 7977,
"brand_id":478,
"model_id":12432,
"name":"Electric Lap Steel",
"approved":true
}
GET /submodels
200
{
"pagination": {
"per_page": 25,
"total_pages": 0,
"total_objects": 0
},
"submodels": []
}
| Param name | Description |
|---|---|
|
page optional |
Validations:
|
|
per_page optional |
Validations:
|
|
name optional |
List submodels with names matching the provided string. Validations:
|
|
name_like optional |
List submodels with names matching, or similar to, the provided string. Slower, but useful for correcting user input. Validations:
|
|
model optional |
Validations:
|
|
model_id optional |
Validations:
|
|
brand optional |
Validations:
|
|
brand_id optional |
Validations:
|
|
approved optional |
Validations:
|
|
pending optional |
Validations:
|
GET /submodels/1898
200
{
"id": 1898,
"name": "Genesis Weber3ed9c3a1-c9a6-467e-8a3b-d63fa2a3d082",
"approved": true,
"brand_id": 4321,
"model_id": 3446
}
| Code | Description |
|---|---|
| 400 |
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
}
}
POST /submodels
{
"name": "Lourdes Prohaska699354e4-9c69-49b8-bba6-3f529a053b82",
"model_id": 3447,
"submodel": {
"name": "Lourdes Prohaska699354e4-9c69-49b8-bba6-3f529a053b82",
"model_id": 3447
}
}
201
{
"id": 1900,
"name": "Lourdes Prohaska699354e4-9c69-49b8-bba6-3f529a053b82",
"approved": false,
"brand_id": 4322,
"model_id": 3447
}
| Param name | Description |
|---|---|
|
name optional |
Validations:
|
|
brand_id optional |
Validations:
|
|
model_id optional |
Validations:
|
| Code | Description |
|---|---|
| 400 |
PATCH /submodels/1903
{
"name": "Fender",
"submodel": {
"name": "Fender"
}
}
202
{
"id": 1903,
"name": "Fender",
"approved": false,
"brand_id": 4324,
"model_id": 3449
}
| Param name | Description |
|---|---|
|
name optional |
Validations:
|
|
brand_id optional |
Validations:
|
|
model_id optional |
Validations:
|
| Code | Description |
|---|---|
| 405 |
DELETE /submodels/1908
{
"submodel": {}
}
204