AME-SM Api

Car Models: Get all car models

https://www.ameinsure.com/api/Carmodels/getcarmodels
Post
'token' => string, **
car_bran_id => int (id of brand)
search_txt => string (name of model)

{
'code' => string (0x0000-00000 when success),
'message' => string,
'data' => array (
'id' => Id of model,
'name' => string,
'brand' => array (
'id' => Id of model,
'name' => string
),
'type' => array (
'id' => Id of type,
'name' => string
)
)
}

{
'code' : '0x0000-00000',
'message' : 'Success',
'data' : [
{
'id' : '1',
'name' : '156'
'brand': {
'id' => '1',
'name' => 'Alfa Romeo'
},
'type': {
'id' => '2',
'name' => 'กลุ่มที่ 2'
}
},
...
]
}

Car Models: Insert car model

https://www.ameinsure.com/api/Carmodels/insert
Post
{
'token' => string, **
name => string (name of model) **
car_brand_id => int (id of brand) **
car_type_id => int (id of type)
}
{
'code' => string (0x0000-00000 when success),
'message' => string,
'data' => Id of car model
}
{
'code' : '0x0000-00000',
'message' : 'Success',
'data' : 1
}

Car Models: Update car model

https://www.ameinsure.com/api/Carmodels/update
Post
{
'token' => string, **
id => int (id of model) **
name => string (name of model) **
car_brand_id => int (id of brand) **
car_type_id => int (id of type)
}
{
'code' => string (0x0000-00000 when success),
'message' => string,
'data' => Id of car model
}
{
'code' : '0x0000-00000',
'message' : 'Success',
'data' : 1
}

Car Models: Remove car model

https://www.ameinsure.com/api/Carmodels/remove
Post
{
'token' => string, **
id => int (id of model) **
}
{
'code' => string (0x0000-00000 when success),
'message' => string,
}
{
'code' : '0x0000-00000',
'message' : 'Success',
}