Get car models https://api.rrr.lt/get/car_models/{brand_id}

POST parameters

Name Type Required Data
username Text varchar(50) YES Username
password Text varchar(100) YES Password
user_token Text YES Token provided

URI values

Name Type Required Data
{brand_id} Numeric (int 11) NO Car brand ID (from '/get/car_brands')

PHP Curl example code

$post = [
'username' => '',
'password' => '',
'user_token' => '',
];

$ch = curl_init('https://api.rrr.lt/get/car_models/{brand_id}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);

Output

{
    "list": [
        {
            "id": "1",
            "brand": "3",
            "name": "A4, S4 (B5- 8D)",
            "year_start": "1994",
            "year_end": "1999"
        },
        {
            "id": "2",
            "brand": "3",
            "name": "A4, S4 (B5- 8D)",
            "year_start": "1999",
            "year_end": "2000"
        },
        {
            "id": "3",
            "brand": "3",
            "name": "A4, S4 (B6- 8E - 8H)",
            "year_start": "2001",
            "year_end": "2005"
        },
        {
            "id": "36",
            "brand": "3",
            "name": "A4, S4 (B7- 8E - 8H)",
            "year_start": "2005",
            "year_end": "2008"
        },
        ...
        {
            "id": "340",
            "brand": "3",
            "name": "Q3",
            "year_start": "2011",
            "year_end": ""
        }
    ],
    "msg": "OK",
    "status_code": "R200"
}