MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Authentication

Register

Example request:
curl --request POST \
    "http://carento.test/api/v1/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Smith\",
    \"name\": \"consequatur\",
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
    \"phone\": \"consequatur\",
    \"password_confirmation\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Smith",
    "name": "consequatur",
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,",
    "phone": "consequatur",
    "password_confirmation": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": null,
    "message": "Registered successfully! We emailed you to verify your account!"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ]
    }
}
 

Request      

POST api/v1/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string  optional  

The first name of the user. This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: John

last_name   string  optional  

The last name of the user. This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: Smith

name   string   

The name of the user. Example: consequatur

email   string   

The email of the user. Example: qkunze@example.com

password   string   

The password of user to create. Example: O[2UZ5ij-e/dl4m{o,

phone   string   

The phone of the user. Example: consequatur

password_confirmation   string   

The password confirmation. Example: consequatur

Login

Example request:
curl --request POST \
    "http://carento.test/api/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://carento.test/api/v1/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "token": "1|aF5s7p3xxx1lVL8hkSrPN72m4wPVpTvTs..."
    },
    "message": null
}
 

Request      

POST api/v1/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

password   string   

The password of user to create. Example: O[2UZ5ij-e/dl4m{o,

Check email existing or not

Example request:
curl --request POST \
    "http://carento.test/api/v1/email/check" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://carento.test/api/v1/email/check"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "exists": true
    },
    "message": null
}
 

Request      

POST api/v1/email/check

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

Forgot password

Send a reset link to the given user.

Example request:
curl --request POST \
    "http://carento.test/api/v1/password/forgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://carento.test/api/v1/password/forgot"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/password/forgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

Resend email verification

Resend the email verification notification.

Example request:
curl --request POST \
    "http://carento.test/api/v1/resend-verify-account-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://carento.test/api/v1/resend-verify-account-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/resend-verify-account-email

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

Logout

requires authentication

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Blog

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "consequatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "No results found, please try with different keywords."
}
 

List posts

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/posts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/posts"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "Top 5 New Cars to Look Out for in 2024",
            "slug": "top-5-new-cars-to-look-out-for-in-2024",
            "description": "Discover the most anticipated car models coming in 2024, featuring cutting-edge technology and stunning designs.",
            "image": "http://carento.test/storage/news/1.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Car Rentals",
                    "slug": "car-rentals",
                    "url": "http://carento.test/news/car-rentals",
                    "description": "Facere animi voluptates autem autem. Culpa velit nemo sit vel sunt consequuntur architecto. Dolorem sunt saepe quae et."
                },
                {
                    "id": 8,
                    "name": "Off-Road Vehicles",
                    "slug": "off-road-vehicles",
                    "url": "http://carento.test/news/off-road-vehicles",
                    "description": "Sed quia porro accusantium impedit. Et consequatur ut veritatis in ipsa facilis ratione. Vero suscipit eos labore quae odit. Atque atque est maxime ut iure delectus."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "2024 Cars",
                    "slug": "2024-cars",
                    "description": null
                },
                {
                    "id": 3,
                    "name": "Self-Driving Cars",
                    "slug": "self-driving-cars",
                    "description": null
                },
                {
                    "id": 9,
                    "name": "Holiday Rentals",
                    "slug": "holiday-rentals",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 2,
            "name": "How to Choose the Best Car Rental Service for Your Trip",
            "slug": "how-to-choose-the-best-car-rental-service-for-your-trip",
            "description": "A comprehensive guide on selecting the right car rental service based on your travel needs and budget.",
            "image": "http://carento.test/storage/news/2.jpg",
            "categories": [
                {
                    "id": 10,
                    "name": "Car Innovations",
                    "slug": "car-innovations",
                    "url": "http://carento.test/news/car-innovations",
                    "description": "Tempora nihil aliquid aut et unde. Voluptas officia quasi velit explicabo nam autem dolorem. Ut eaque sit iusto vel delectus."
                },
                {
                    "id": 3,
                    "name": "Electric Vehicles",
                    "slug": "electric-vehicles",
                    "url": "http://carento.test/news/electric-vehicles",
                    "description": "Provident dolorem qui perferendis aut neque in doloremque eveniet. Repudiandae id modi quidem laborum nihil. Ut optio eveniet aut nemo. Sint enim hic est quis et ratione voluptates."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "2024 Cars",
                    "slug": "2024-cars",
                    "description": null
                },
                {
                    "id": 2,
                    "name": "Car Leasing",
                    "slug": "car-leasing",
                    "description": null
                },
                {
                    "id": 10,
                    "name": "Cross-Country Trips",
                    "slug": "cross-country-trips",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 3,
            "name": "The Evolution of Electric Vehicles: A New Era",
            "slug": "the-evolution-of-electric-vehicles-a-new-era",
            "description": "Explore how electric cars are transforming the auto industry and why they are the future of transportation.",
            "image": "http://carento.test/storage/news/3.jpg",
            "categories": [
                {
                    "id": 4,
                    "name": "Car Maintenance",
                    "slug": "car-maintenance",
                    "url": "http://carento.test/news/car-maintenance",
                    "description": "Voluptatem tempore tempore ducimus illo recusandae enim sapiente. Provident sit nihil et expedita iure aperiam. Nihil animi cupiditate nostrum est veritatis."
                },
                {
                    "id": 9,
                    "name": "Hybrid Cars",
                    "slug": "hybrid-cars",
                    "url": "http://carento.test/news/hybrid-cars",
                    "description": "Quam quia quis consequatur amet amet inventore qui. Maxime modi maxime maxime possimus. Repellat excepturi quidem consequatur sed architecto laboriosam."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "2024 Cars",
                    "slug": "2024-cars",
                    "description": null
                },
                {
                    "id": 3,
                    "name": "Self-Driving Cars",
                    "slug": "self-driving-cars",
                    "description": null
                },
                {
                    "id": 8,
                    "name": "Car Detailing",
                    "slug": "car-detailing",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 4,
            "name": "Leasing vs. Buying a Car: Which Is Right for You?",
            "slug": "leasing-vs-buying-a-car-which-is-right-for-you",
            "description": "An in-depth comparison of leasing and buying a car, helping you decide which option suits your lifestyle.",
            "image": "http://carento.test/storage/news/4.jpg",
            "categories": [
                {
                    "id": 3,
                    "name": "Electric Vehicles",
                    "slug": "electric-vehicles",
                    "url": "http://carento.test/news/electric-vehicles",
                    "description": "Provident dolorem qui perferendis aut neque in doloremque eveniet. Repudiandae id modi quidem laborum nihil. Ut optio eveniet aut nemo. Sint enim hic est quis et ratione voluptates."
                },
                {
                    "id": 1,
                    "name": "New Cars",
                    "slug": "new-cars",
                    "url": "http://carento.test/news/new-cars",
                    "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Car Leasing",
                    "slug": "car-leasing",
                    "description": null
                },
                {
                    "id": 4,
                    "name": "Eco-Friendly",
                    "slug": "eco-friendly",
                    "description": null
                },
                {
                    "id": 7,
                    "name": "Used Cars",
                    "slug": "used-cars",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 5,
            "name": "The Ultimate Road Trip Checklist",
            "slug": "the-ultimate-road-trip-checklist",
            "description": "Everything you need to pack and check before embarking on an unforgettable road trip adventure.",
            "image": "http://carento.test/storage/news/5.jpg",
            "categories": [
                {
                    "id": 9,
                    "name": "Hybrid Cars",
                    "slug": "hybrid-cars",
                    "url": "http://carento.test/news/hybrid-cars",
                    "description": "Quam quia quis consequatur amet amet inventore qui. Maxime modi maxime maxime possimus. Repellat excepturi quidem consequatur sed architecto laboriosam."
                },
                {
                    "id": 1,
                    "name": "New Cars",
                    "slug": "new-cars",
                    "url": "http://carento.test/news/new-cars",
                    "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "2024 Cars",
                    "slug": "2024-cars",
                    "description": null
                },
                {
                    "id": 4,
                    "name": "Eco-Friendly",
                    "slug": "eco-friendly",
                    "description": null
                },
                {
                    "id": 5,
                    "name": "Car Subscription",
                    "slug": "car-subscription",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 6,
            "name": "The Benefits of Renting a Luxury Car for Special Occasions",
            "slug": "the-benefits-of-renting-a-luxury-car-for-special-occasions",
            "description": "Find out why renting a luxury vehicle can make your events even more memorable and stylish.",
            "image": "http://carento.test/storage/news/6.jpg",
            "categories": [
                {
                    "id": 3,
                    "name": "Electric Vehicles",
                    "slug": "electric-vehicles",
                    "url": "http://carento.test/news/electric-vehicles",
                    "description": "Provident dolorem qui perferendis aut neque in doloremque eveniet. Repudiandae id modi quidem laborum nihil. Ut optio eveniet aut nemo. Sint enim hic est quis et ratione voluptates."
                },
                {
                    "id": 2,
                    "name": "Car Rentals",
                    "slug": "car-rentals",
                    "url": "http://carento.test/news/car-rentals",
                    "description": "Facere animi voluptates autem autem. Culpa velit nemo sit vel sunt consequuntur architecto. Dolorem sunt saepe quae et."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Car Leasing",
                    "slug": "car-leasing",
                    "description": null
                },
                {
                    "id": 3,
                    "name": "Self-Driving Cars",
                    "slug": "self-driving-cars",
                    "description": null
                },
                {
                    "id": 6,
                    "name": "Car Insurance",
                    "slug": "car-insurance",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 7,
            "name": "Tips for Maintaining Your Car to Extend Its Lifespan",
            "slug": "tips-for-maintaining-your-car-to-extend-its-lifespan",
            "description": "Essential tips on how to keep your car in top condition, ensuring it lasts longer and performs better.",
            "image": "http://carento.test/storage/news/7.jpg",
            "categories": [
                {
                    "id": 1,
                    "name": "New Cars",
                    "slug": "new-cars",
                    "url": "http://carento.test/news/new-cars",
                    "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim."
                },
                {
                    "id": 8,
                    "name": "Off-Road Vehicles",
                    "slug": "off-road-vehicles",
                    "url": "http://carento.test/news/off-road-vehicles",
                    "description": "Sed quia porro accusantium impedit. Et consequatur ut veritatis in ipsa facilis ratione. Vero suscipit eos labore quae odit. Atque atque est maxime ut iure delectus."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Car Leasing",
                    "slug": "car-leasing",
                    "description": null
                },
                {
                    "id": 9,
                    "name": "Holiday Rentals",
                    "slug": "holiday-rentals",
                    "description": null
                },
                {
                    "id": 10,
                    "name": "Cross-Country Trips",
                    "slug": "cross-country-trips",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 8,
            "name": "Top Safety Features to Look for in a Family Car",
            "slug": "top-safety-features-to-look-for-in-a-family-car",
            "description": "A guide to the latest safety innovations in family vehicles and how they protect your loved ones on the road.",
            "image": "http://carento.test/storage/news/8.jpg",
            "categories": [
                {
                    "id": 1,
                    "name": "New Cars",
                    "slug": "new-cars",
                    "url": "http://carento.test/news/new-cars",
                    "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim."
                },
                {
                    "id": 6,
                    "name": "Luxury Cars",
                    "slug": "luxury-cars",
                    "url": "http://carento.test/news/luxury-cars",
                    "description": "Maiores ea asperiores maxime voluptatem quis omnis explicabo sit. Modi fuga odio temporibus aliquam. Qui consectetur quia possimus et quia voluptate."
                }
            ],
            "tags": [
                {
                    "id": 5,
                    "name": "Car Subscription",
                    "slug": "car-subscription",
                    "description": null
                },
                {
                    "id": 6,
                    "name": "Car Insurance",
                    "slug": "car-insurance",
                    "description": null
                },
                {
                    "id": 7,
                    "name": "Used Cars",
                    "slug": "used-cars",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 9,
            "name": "How Self-Driving Cars Are Changing the Future of Transportation",
            "slug": "how-self-driving-cars-are-changing-the-future-of-transportation",
            "description": "An overview of autonomous vehicles and the potential they have to reshape the way we travel.",
            "image": "http://carento.test/storage/news/9.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Car Rentals",
                    "slug": "car-rentals",
                    "url": "http://carento.test/news/car-rentals",
                    "description": "Facere animi voluptates autem autem. Culpa velit nemo sit vel sunt consequuntur architecto. Dolorem sunt saepe quae et."
                },
                {
                    "id": 7,
                    "name": "Family Cars",
                    "slug": "family-cars",
                    "url": "http://carento.test/news/family-cars",
                    "description": "Nulla et repellendus dolorem tempore velit sunt. Est qui quod omnis."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Car Leasing",
                    "slug": "car-leasing",
                    "description": null
                },
                {
                    "id": 8,
                    "name": "Car Detailing",
                    "slug": "car-detailing",
                    "description": null
                },
                {
                    "id": 10,
                    "name": "Cross-Country Trips",
                    "slug": "cross-country-trips",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        },
        {
            "id": 10,
            "name": "The Best Cars for Off-Road Adventures",
            "slug": "the-best-cars-for-off-road-adventures",
            "description": "Discover the top vehicles that offer exceptional performance on rough terrains for your next outdoor adventure.",
            "image": "http://carento.test/storage/news/10.jpg",
            "categories": [
                {
                    "id": 8,
                    "name": "Off-Road Vehicles",
                    "slug": "off-road-vehicles",
                    "url": "http://carento.test/news/off-road-vehicles",
                    "description": "Sed quia porro accusantium impedit. Et consequatur ut veritatis in ipsa facilis ratione. Vero suscipit eos labore quae odit. Atque atque est maxime ut iure delectus."
                },
                {
                    "id": 7,
                    "name": "Family Cars",
                    "slug": "family-cars",
                    "url": "http://carento.test/news/family-cars",
                    "description": "Nulla et repellendus dolorem tempore velit sunt. Est qui quod omnis."
                }
            ],
            "tags": [
                {
                    "id": 5,
                    "name": "Car Subscription",
                    "slug": "car-subscription",
                    "description": null
                },
                {
                    "id": 8,
                    "name": "Car Detailing",
                    "slug": "car-detailing",
                    "description": null
                },
                {
                    "id": 10,
                    "name": "Cross-Country Trips",
                    "slug": "cross-country-trips",
                    "description": null
                }
            ],
            "created_at": "2025-07-06T08:32:49.000000Z",
            "updated_at": "2025-07-06T08:32:49.000000Z"
        }
    ],
    "links": {
        "first": "http://carento.test/api/v1/posts?page=1",
        "last": "http://carento.test/api/v1/posts?page=2",
        "prev": null,
        "next": "http://carento.test/api/v1/posts?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/posts?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://carento.test/api/v1/posts?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/posts?page=2",
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/posts",
        "per_page": 10,
        "to": 10,
        "total": 20
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/posts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List categories

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "New Cars",
            "slug": "new-cars",
            "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 2,
            "name": "Car Rentals",
            "slug": "car-rentals",
            "description": "Facere animi voluptates autem autem. Culpa velit nemo sit vel sunt consequuntur architecto. Dolorem sunt saepe quae et.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 3,
            "name": "Electric Vehicles",
            "slug": "electric-vehicles",
            "description": "Provident dolorem qui perferendis aut neque in doloremque eveniet. Repudiandae id modi quidem laborum nihil. Ut optio eveniet aut nemo. Sint enim hic est quis et ratione voluptates.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 4,
            "name": "Car Maintenance",
            "slug": "car-maintenance",
            "description": "Voluptatem tempore tempore ducimus illo recusandae enim sapiente. Provident sit nihil et expedita iure aperiam. Nihil animi cupiditate nostrum est veritatis.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 5,
            "name": "Road Trips",
            "slug": "road-trips",
            "description": "Ullam dolorum cumque et odio assumenda. Natus rerum suscipit itaque. Rem sapiente et neque similique est assumenda non ipsam. Doloremque eveniet placeat ut error porro.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 6,
            "name": "Luxury Cars",
            "slug": "luxury-cars",
            "description": "Maiores ea asperiores maxime voluptatem quis omnis explicabo sit. Modi fuga odio temporibus aliquam. Qui consectetur quia possimus et quia voluptate.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 7,
            "name": "Family Cars",
            "slug": "family-cars",
            "description": "Nulla et repellendus dolorem tempore velit sunt. Est qui quod omnis.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 8,
            "name": "Off-Road Vehicles",
            "slug": "off-road-vehicles",
            "description": "Sed quia porro accusantium impedit. Et consequatur ut veritatis in ipsa facilis ratione. Vero suscipit eos labore quae odit. Atque atque est maxime ut iure delectus.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 9,
            "name": "Hybrid Cars",
            "slug": "hybrid-cars",
            "description": "Quam quia quis consequatur amet amet inventore qui. Maxime modi maxime maxime possimus. Repellat excepturi quidem consequatur sed architecto laboriosam.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        },
        {
            "id": 10,
            "name": "Car Innovations",
            "slug": "car-innovations",
            "description": "Tempora nihil aliquid aut et unde. Voluptas officia quasi velit explicabo nam autem dolorem. Ut eaque sit iusto vel delectus.",
            "children": [],
            "parent": {
                "id": null,
                "name": null,
                "slug": "",
                "url": "http://carento.test",
                "description": null
            }
        }
    ],
    "links": {
        "first": "http://carento.test/api/v1/categories?page=1",
        "last": "http://carento.test/api/v1/categories?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/categories?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/categories",
        "per_page": 10,
        "to": 10,
        "total": 10
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List tags

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/tags"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "2024 Cars",
            "slug": "2024-cars",
            "description": null
        },
        {
            "id": 2,
            "name": "Car Leasing",
            "slug": "car-leasing",
            "description": null
        },
        {
            "id": 3,
            "name": "Self-Driving Cars",
            "slug": "self-driving-cars",
            "description": null
        },
        {
            "id": 4,
            "name": "Eco-Friendly",
            "slug": "eco-friendly",
            "description": null
        },
        {
            "id": 5,
            "name": "Car Subscription",
            "slug": "car-subscription",
            "description": null
        },
        {
            "id": 6,
            "name": "Car Insurance",
            "slug": "car-insurance",
            "description": null
        },
        {
            "id": 7,
            "name": "Used Cars",
            "slug": "used-cars",
            "description": null
        },
        {
            "id": 8,
            "name": "Car Detailing",
            "slug": "car-detailing",
            "description": null
        },
        {
            "id": 9,
            "name": "Holiday Rentals",
            "slug": "holiday-rentals",
            "description": null
        },
        {
            "id": 10,
            "name": "Cross-Country Trips",
            "slug": "cross-country-trips",
            "description": null
        }
    ],
    "links": {
        "first": "http://carento.test/api/v1/tags?page=1",
        "last": "http://carento.test/api/v1/tags?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/tags?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/tags",
        "per_page": 10,
        "to": 10,
        "total": 10
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Filters posts

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/posts/filters?page=17&per_page=17&search=consequatur&after=consequatur&author=consequatur&author_exclude=consequatur&before=consequatur&exclude=consequatur&include=consequatur&order=consequatur&order_by=consequatur&categories=consequatur&categories_exclude=consequatur&tags=consequatur&tags_exclude=consequatur&featured=consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/posts/filters"
);

const params = {
    "page": "17",
    "per_page": "17",
    "search": "consequatur",
    "after": "consequatur",
    "author": "consequatur",
    "author_exclude": "consequatur",
    "before": "consequatur",
    "exclude": "consequatur",
    "include": "consequatur",
    "order": "consequatur",
    "order_by": "consequatur",
    "categories": "consequatur",
    "categories_exclude": "consequatur",
    "tags": "consequatur",
    "tags_exclude": "consequatur",
    "featured": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [],
    "links": {
        "first": "http://carento.test/api/v1/posts/filters?page=1",
        "last": "http://carento.test/api/v1/posts/filters?page=1",
        "prev": "http://carento.test/api/v1/posts/filters?page=16",
        "next": null
    },
    "meta": {
        "current_page": 17,
        "from": null,
        "last_page": 1,
        "links": [
            {
                "url": "http://carento.test/api/v1/posts/filters?page=16",
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/posts/filters?page=1",
                "label": "1",
                "active": false
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/posts/filters",
        "per_page": 17,
        "to": null,
        "total": 0
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/posts/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

Current page of the collection. Default: 1 Example: 17

per_page   integer  optional  

Maximum number of items to be returned in result set.Default: 10 Example: 17

search   string  optional  

Limit results to those matching a string. Example: consequatur

after   string  optional  

Limit response to posts published after a given ISO8601 compliant date. Example: consequatur

author   string  optional  

Limit result set to posts assigned to specific authors. Example: consequatur

author_exclude   string  optional  

Ensure result set excludes posts assigned to specific authors. Example: consequatur

before   string  optional  

Limit response to posts published before a given ISO8601 compliant date. Example: consequatur

exclude   string  optional  

Ensure result set excludes specific IDs. Example: consequatur

include   string  optional  

Limit result set to specific IDs. Example: consequatur

order   string  optional  

Order sort attribute ascending or descending. Default: desc .One of: asc, desc Example: consequatur

order_by   string  optional  

Sort collection by object attribute. Default: updated_at. One of: author, created_at, updated_at, id, slug, title Example: consequatur

categories   string  optional  

Limit result set to all items that have the specified term assigned in the categories taxonomy. Example: consequatur

categories_exclude   string  optional  

Limit result set to all items except those that have the specified term assigned in the categories taxonomy. Example: consequatur

tags   string  optional  

Limit result set to all items that have the specified term assigned in the tags taxonomy. Example: consequatur

tags_exclude   string  optional  

Limit result set to all items except those that have the specified term assigned in the tags taxonomy. Example: consequatur

featured   string  optional  

Limit result set to items that are sticky. Example: consequatur

Get post by slug

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/posts/consequatur?slug=consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/posts/consequatur"
);

const params = {
    "slug": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Not found"
}
 

Request      

GET api/v1/posts/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the post. Example: consequatur

Query Parameters

slug   string  optional  

Find by slug of post. Example: consequatur

Filters categories

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/categories/filters" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/categories/filters"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 5,
            "name": "Road Trips",
            "slug": "road-trips",
            "url": "http://carento.test/news/road-trips",
            "description": "Ullam dolorum cumque et odio assumenda. Natus rerum suscipit itaque. Rem sapiente et neque similique est assumenda non ipsam. Doloremque eveniet placeat ut error porro."
        },
        {
            "id": 8,
            "name": "Off-Road Vehicles",
            "slug": "off-road-vehicles",
            "url": "http://carento.test/news/off-road-vehicles",
            "description": "Sed quia porro accusantium impedit. Et consequatur ut veritatis in ipsa facilis ratione. Vero suscipit eos labore quae odit. Atque atque est maxime ut iure delectus."
        },
        {
            "id": 1,
            "name": "New Cars",
            "slug": "new-cars",
            "url": "http://carento.test/news/new-cars",
            "description": "Quae rem aut aut. Ipsum aliquam minus sit enim temporibus quisquam atque. Ab ipsum harum aut deserunt deleniti. Corrupti suscipit repudiandae distinctio nostrum enim."
        },
        {
            "id": 6,
            "name": "Luxury Cars",
            "slug": "luxury-cars",
            "url": "http://carento.test/news/luxury-cars",
            "description": "Maiores ea asperiores maxime voluptatem quis omnis explicabo sit. Modi fuga odio temporibus aliquam. Qui consectetur quia possimus et quia voluptate."
        },
        {
            "id": 9,
            "name": "Hybrid Cars",
            "slug": "hybrid-cars",
            "url": "http://carento.test/news/hybrid-cars",
            "description": "Quam quia quis consequatur amet amet inventore qui. Maxime modi maxime maxime possimus. Repellat excepturi quidem consequatur sed architecto laboriosam."
        },
        {
            "id": 7,
            "name": "Family Cars",
            "slug": "family-cars",
            "url": "http://carento.test/news/family-cars",
            "description": "Nulla et repellendus dolorem tempore velit sunt. Est qui quod omnis."
        },
        {
            "id": 3,
            "name": "Electric Vehicles",
            "slug": "electric-vehicles",
            "url": "http://carento.test/news/electric-vehicles",
            "description": "Provident dolorem qui perferendis aut neque in doloremque eveniet. Repudiandae id modi quidem laborum nihil. Ut optio eveniet aut nemo. Sint enim hic est quis et ratione voluptates."
        },
        {
            "id": 2,
            "name": "Car Rentals",
            "slug": "car-rentals",
            "url": "http://carento.test/news/car-rentals",
            "description": "Facere animi voluptates autem autem. Culpa velit nemo sit vel sunt consequuntur architecto. Dolorem sunt saepe quae et."
        },
        {
            "id": 4,
            "name": "Car Maintenance",
            "slug": "car-maintenance",
            "url": "http://carento.test/news/car-maintenance",
            "description": "Voluptatem tempore tempore ducimus illo recusandae enim sapiente. Provident sit nihil et expedita iure aperiam. Nihil animi cupiditate nostrum est veritatis."
        },
        {
            "id": 10,
            "name": "Car Innovations",
            "slug": "car-innovations",
            "url": "http://carento.test/news/car-innovations",
            "description": "Tempora nihil aliquid aut et unde. Voluptas officia quasi velit explicabo nam autem dolorem. Ut eaque sit iusto vel delectus."
        }
    ],
    "links": {
        "first": "http://carento.test/api/v1/categories/filters?page=1",
        "last": "http://carento.test/api/v1/categories/filters?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/categories/filters?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/categories/filters",
        "per_page": 10,
        "to": 10,
        "total": 10
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/categories/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get category by slug

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/categories/consequatur?slug=consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/categories/consequatur"
);

const params = {
    "slug": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Not found"
}
 

Request      

GET api/v1/categories/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the category. Example: consequatur

Query Parameters

slug   string  optional  

Find by slug of category. Example: consequatur

Car Rentals

List cars

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/car-rentals/cars

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pickup_date\": \"2106-08-06\",
    \"return_date\": \"2106-08-06\",
    \"location\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup_date": "2106-08-06",
    "return_date": "2106-08-06",
    "location": "consequatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (422):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "The return date must be a date after pickup date.",
    "errors": {
        "return_date": [
            "The return date must be a date after pickup date."
        ]
    }
}
 

Get car filters

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/filters" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/filters"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": {
        "makes": [
            {
                "id": 1,
                "name": "Lexus"
            },
            {
                "id": 2,
                "name": "Mercedes"
            },
            {
                "id": 3,
                "name": "Bugatti"
            },
            {
                "id": 4,
                "name": "Jaguar"
            },
            {
                "id": 5,
                "name": "Honda"
            },
            {
                "id": 6,
                "name": "Chevrolet"
            },
            {
                "id": 7,
                "name": "Acura"
            },
            {
                "id": 8,
                "name": "BMW"
            },
            {
                "id": 9,
                "name": "Toyota"
            },
            {
                "id": 10,
                "name": "Ford"
            },
            {
                "id": 11,
                "name": "Nissan"
            },
            {
                "id": 12,
                "name": "Opel"
            },
            {
                "id": 13,
                "name": "BMW"
            },
            {
                "id": 14,
                "name": "Toyota"
            }
        ],
        "types": [
            {
                "id": 1,
                "name": "SUV"
            },
            {
                "id": 2,
                "name": "Hatchback"
            },
            {
                "id": 3,
                "name": "Sedan"
            },
            {
                "id": 4,
                "name": "Crossover"
            },
            {
                "id": 5,
                "name": "Minivan"
            },
            {
                "id": 6,
                "name": "Coupe"
            },
            {
                "id": 7,
                "name": "Sport Cars"
            },
            {
                "id": 8,
                "name": "Pickup Truck"
            }
        ],
        "transmissions": [
            {
                "id": 1,
                "name": "Automatic"
            },
            {
                "id": 2,
                "name": "Manual"
            }
        ],
        "fuels": [
            {
                "id": 1,
                "name": "Gasoline"
            },
            {
                "id": 2,
                "name": "Diesel"
            },
            {
                "id": 3,
                "name": "Electric"
            }
        ],
        "amenities": [
            {
                "id": 1,
                "name": "Leather upholstery"
            },
            {
                "id": 2,
                "name": "Heated seats"
            },
            {
                "id": 3,
                "name": "Sunroof/Moonroof"
            },
            {
                "id": 4,
                "name": "Heads-up display"
            },
            {
                "id": 5,
                "name": "Adaptive cruise control"
            }
        ],
        "categories": [
            {
                "id": 1,
                "name": "Sport"
            },
            {
                "id": 2,
                "name": "Maserati"
            },
            {
                "id": 3,
                "name": "Ferrari"
            },
            {
                "id": 4,
                "name": "Classic"
            },
            {
                "id": 5,
                "name": "New"
            }
        ],
        "price_range": {
            "min": 30,
            "max": 99
        },
        "year_range": {
            "min": 2010,
            "max": 2024
        }
    },
    "message": null
}
 

Request      

GET api/v1/car-rentals/cars/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/featured" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/featured"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/popular" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/popular"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Find car by slug

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/car-rentals/cars/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the car. Example: consequatur

Get car details

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/id/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/id/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Car not found"
}
 

Request      

GET api/v1/car-rentals/cars/id/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the id. Example: 1562

Check car availability

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/id/1562/availability" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pickup_date\": \"2106-08-06\",
    \"return_date\": \"2106-08-06\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/id/1562/availability"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup_date": "2106-08-06",
    "return_date": "2106-08-06"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (422):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "The return date must be a date after pickup date.",
    "errors": {
        "return_date": [
            "The return date must be a date after pickup date."
        ]
    }
}
 

Request      

GET api/v1/car-rentals/cars/id/{id}/availability

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the id. Example: 1562

Body Parameters

pickup_date   string   

Must be a valid date. Must be a date after or equal to today. Example: 2106-08-06

return_date   string   

Must be a valid date. Must be a date after pickup_date. Example: 2106-08-06

Get similar cars

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/id/1562/similar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/id/1562/similar"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Car not found"
}
 

Request      

GET api/v1/car-rentals/cars/id/{id}/similar

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the id. Example: 1562

List car makes

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-makes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-makes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 7,
            "name": "Acura",
            "logo": "icons/acura.png",
            "website": null,
            "cars_count": 6
        },
        {
            "id": 8,
            "name": "BMW",
            "logo": "icons/bmw.png",
            "website": null,
            "cars_count": 7
        },
        {
            "id": 13,
            "name": "BMW",
            "logo": "icons/bmw.png",
            "website": null,
            "cars_count": 1
        },
        {
            "id": 3,
            "name": "Bugatti",
            "logo": "icons/bugatti.png",
            "website": null,
            "cars_count": 7
        },
        {
            "id": 6,
            "name": "Chevrolet",
            "logo": "icons/chevrolet.png",
            "website": null,
            "cars_count": 7
        },
        {
            "id": 10,
            "name": "Ford",
            "logo": "icons/ford-i.png",
            "website": null,
            "cars_count": 10
        },
        {
            "id": 5,
            "name": "Honda",
            "logo": "icons/honda.png",
            "website": null,
            "cars_count": 6
        },
        {
            "id": 4,
            "name": "Jaguar",
            "logo": "icons/jaguar.png",
            "website": null,
            "cars_count": 8
        },
        {
            "id": 1,
            "name": "Lexus",
            "logo": "icons/lexus.png",
            "website": null,
            "cars_count": 4
        },
        {
            "id": 2,
            "name": "Mercedes",
            "logo": "icons/mer.png",
            "website": null,
            "cars_count": 9
        },
        {
            "id": 11,
            "name": "Nissan",
            "logo": "icons/nissan-i.png",
            "website": null,
            "cars_count": 7
        },
        {
            "id": 12,
            "name": "Opel",
            "logo": "icons/opel-i.png",
            "website": null,
            "cars_count": 8
        },
        {
            "id": 9,
            "name": "Toyota",
            "logo": "icons/toyota.png",
            "website": null,
            "cars_count": 10
        },
        {
            "id": 14,
            "name": "Toyota",
            "logo": "icons/toyota.png",
            "website": null,
            "cars_count": 10
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-makes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List car types

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-types" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-types"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 6,
            "name": "Coupe",
            "icon": null,
            "cars_count": 9
        },
        {
            "id": 4,
            "name": "Crossover",
            "icon": null,
            "cars_count": 17
        },
        {
            "id": 2,
            "name": "Hatchback",
            "icon": null,
            "cars_count": 13
        },
        {
            "id": 5,
            "name": "Minivan",
            "icon": null,
            "cars_count": 17
        },
        {
            "id": 8,
            "name": "Pickup Truck",
            "icon": null,
            "cars_count": 11
        },
        {
            "id": 3,
            "name": "Sedan",
            "icon": null,
            "cars_count": 9
        },
        {
            "id": 7,
            "name": "Sport Cars",
            "icon": null,
            "cars_count": 15
        },
        {
            "id": 1,
            "name": "SUV",
            "icon": null,
            "cars_count": 9
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-types

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List car categories

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 4,
            "name": "Classic",
            "description": "Classic cars model",
            "cars_count": 17
        },
        {
            "id": 3,
            "name": "Ferrari",
            "description": "",
            "cars_count": 20
        },
        {
            "id": 2,
            "name": "Maserati",
            "description": "",
            "cars_count": 21
        },
        {
            "id": 5,
            "name": "New",
            "description": "New cars model",
            "cars_count": 17
        },
        {
            "id": 1,
            "name": "Sport",
            "description": "Sport cars model",
            "cars_count": 25
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List car transmissions

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-transmissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-transmissions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 1,
            "name": "Automatic",
            "cars_count": 30
        },
        {
            "id": 2,
            "name": "Manual",
            "cars_count": 46
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-transmissions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List car fuel types

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-fuels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-fuels"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 2,
            "name": "Diesel",
            "cars_count": 34
        },
        {
            "id": 3,
            "name": "Electric",
            "cars_count": 31
        },
        {
            "id": 1,
            "name": "Gasoline",
            "cars_count": 35
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-fuels

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List car amenities

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/car-amenities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/car-amenities"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 5,
            "name": "Adaptive cruise control",
            "icon": null,
            "cars_count": 0
        },
        {
            "id": 4,
            "name": "Heads-up display",
            "icon": null,
            "cars_count": 0
        },
        {
            "id": 2,
            "name": "Heated seats",
            "icon": null,
            "cars_count": 0
        },
        {
            "id": 1,
            "name": "Leather upholstery",
            "icon": null,
            "cars_count": 0
        },
        {
            "id": 3,
            "name": "Sunroof/Moonroof",
            "icon": null,
            "cars_count": 0
        }
    ],
    "message": null
}
 

Request      

GET api/v1/car-rentals/car-amenities

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List locations

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/locations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/locations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/car-rentals/locations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/locations/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/locations/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Get car reviews

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/cars/1562/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/cars/1562/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Car not found"
}
 

Request      

GET api/v1/car-rentals/cars/{car_id}/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

car_id   string   

The ID of the car. Example: 1562

Validate coupon code (alias for check)

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/coupons/validate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/coupons/validate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/coupons/validate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List customer bookings

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/bookings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/bookings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create a new booking

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/bookings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"car_id\": \"consequatur\",
    \"pickup_date\": \"2106-08-06\",
    \"return_date\": \"2106-08-06\",
    \"pickup_time\": \"consequatur\",
    \"return_time\": \"consequatur\",
    \"coupon_code\": \"consequatur\",
    \"note\": \"mqeopfuudtdsufvyvddqa\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "car_id": "consequatur",
    "pickup_date": "2106-08-06",
    "return_date": "2106-08-06",
    "pickup_time": "consequatur",
    "return_time": "consequatur",
    "coupon_code": "consequatur",
    "note": "mqeopfuudtdsufvyvddqa"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/bookings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

car_id   string   

The id of an existing record in the cr_cars table. Example: consequatur

pickup_date   string   

Must be a valid date. Must be a date after or equal to today. Example: 2106-08-06

return_date   string   

Must be a valid date. Must be a date after pickup_date. Example: 2106-08-06

pickup_time   string  optional  

Example: consequatur

return_time   string  optional  

Example: consequatur

services   string[]  optional  

The id of an existing record in the cr_services table.

coupon_code   string  optional  

Example: consequatur

note   string  optional  

Must not be greater than 1000 characters. Example: mqeopfuudtdsufvyvddqa

Get booking details

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/bookings/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/bookings/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Update booking

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/bookings/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pickup_date\": \"2106-08-06\",
    \"return_date\": \"2106-08-06\",
    \"pickup_time\": \"consequatur\",
    \"return_time\": \"consequatur\",
    \"note\": \"mqeopfuudtdsufvyvddqa\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup_date": "2106-08-06",
    "return_date": "2106-08-06",
    "pickup_time": "consequatur",
    "return_time": "consequatur",
    "note": "mqeopfuudtdsufvyvddqa"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/bookings/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Body Parameters

pickup_date   string  optional  

Must be a valid date. Must be a date after or equal to today. Example: 2106-08-06

return_date   string  optional  

Must be a valid date. Must be a date after pickup_date. Example: 2106-08-06

pickup_time   string  optional  

Example: consequatur

return_time   string  optional  

Example: consequatur

note   string  optional  

Must not be greater than 1000 characters. Example: mqeopfuudtdsufvyvddqa

Delete booking

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/bookings/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/bookings/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Cancel booking

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/bookings/1562/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"vmqeopfuudtdsufvyvddq\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings/1562/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "vmqeopfuudtdsufvyvddq"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/bookings/{id}/cancel

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Body Parameters

reason   string  optional  

Must not be greater than 500 characters. Example: vmqeopfuudtdsufvyvddq

Get booking invoice

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/bookings/1562/invoice" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/bookings/1562/invoice"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/bookings/{id}/invoice

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Create a review

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"car_id\": \"consequatur\",
    \"star\": 3,
    \"comment\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "car_id": "consequatur",
    "star": 3,
    "comment": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

car_id   string   

The id of an existing record in the cr_cars table. Example: consequatur

star   integer   

Must be at least 1. Must not be greater than 5. Example: 3

comment   string   

Must not be greater than 1000 characters. Example: qeopfuudtdsufvyvddqam

Update a review

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/reviews/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"star\": 5,
    \"comment\": \"mqeopfuudtdsufvyvddqa\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/reviews/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "star": 5,
    "comment": "mqeopfuudtdsufvyvddqa"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/reviews/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the review. Example: 1562

Body Parameters

star   integer   

Must be at least 1. Must not be greater than 5. Example: 5

comment   string   

Must not be greater than 1000 characters. Example: mqeopfuudtdsufvyvddqa

Delete a review

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/reviews/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/reviews/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/reviews/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the review. Example: 1562

Apply coupon to current session

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/coupons/apply" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/coupons/apply"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/coupons/apply

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Remove coupon from current session

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/coupons/remove" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/coupons/remove"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/coupons/remove

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Car Rentals - Authentication

Register a new customer

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"password\": \"consequatur\",
    \"phone\": \"mqeopfuudtdsufvyv\",
    \"dob\": \"2025-07-08T05:30:27\",
    \"is_vendor\": false
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "password": "consequatur",
    "phone": "mqeopfuudtdsufvyv",
    "dob": "2025-07-08T05:30:27",
    "is_vendor": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string   

Example: consequatur

phone   string  optional  

Must not be greater than 20 characters. Example: mqeopfuudtdsufvyv

dob   string  optional  

Must be a valid date. Example: 2025-07-08T05:30:27

is_vendor   boolean  optional  

Example: false

Login customer

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: qkunze@example.com

password   string   

Example: consequatur

Send password reset link

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/forgot-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: qkunze@example.com

Reset password

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\",
    \"email\": \"carolyne.luettgen@example.org\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "consequatur",
    "email": "carolyne.luettgen@example.org",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/reset-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

Example: consequatur

email   string   

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string   

Example: consequatur

Verify email

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/verify-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 17,
    \"hash\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/verify-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 17,
    "hash": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/verify-email

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

Example: 17

hash   string   

Example: consequatur

Resend email verification

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/resend-verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/resend-verification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/resend-verification

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Social login

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/social-login/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"access_token\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/social-login/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "access_token": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/social-login/{provider}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

provider   string   

Example: consequatur

Body Parameters

access_token   string   

Example: consequatur

Refresh token

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/refresh-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/refresh-token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/refresh-token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Logout customer

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Log out from all devices

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/auth/logout-all" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/auth/logout-all"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/auth/logout-all

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Car Rentals - Favorites

List user's favorite cars

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/favorites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/favorites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/favorites

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Add car to favorites

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/favorites/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/favorites/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/favorites/{car_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

car_id   string   

The ID of the car. Example: 1562

Remove car from favorites

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/favorites/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/favorites/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/favorites/{car_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

car_id   string   

The ID of the car. Example: 1562

Check if car is in favorites

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/favorites/check/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/favorites/check/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/favorites/check/{car_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

car_id   string   

The ID of the car. Example: 1562

Car Rentals - Inquiries

Submit an inquiry

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/inquiries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/inquiries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/inquiries

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get custom fields for inquiry form

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/inquiries/custom-fields" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/inquiries/custom-fields"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": {
        "inquiry_types": [
            {
                "value": "general",
                "label": "General Inquiry",
                "description": "General questions about our services"
            },
            {
                "value": "car_inquiry",
                "label": "Car Specific Inquiry",
                "description": "Questions about a specific car"
            },
            {
                "value": "rental_question",
                "label": "Rental Process",
                "description": "Questions about the rental process"
            },
            {
                "value": "support",
                "label": "Technical Support",
                "description": "Technical issues or support requests"
            }
        ],
        "form_fields": [
            {
                "name": "name",
                "type": "text",
                "label": "Full Name",
                "required": true,
                "placeholder": "Enter your full name"
            },
            {
                "name": "email",
                "type": "email",
                "label": "Email Address",
                "required": true,
                "placeholder": "Enter your email address"
            },
            {
                "name": "phone",
                "type": "tel",
                "label": "Phone Number",
                "required": false,
                "placeholder": "Enter your phone number (optional)"
            },
            {
                "name": "inquiry_type",
                "type": "select",
                "label": "Inquiry Type",
                "required": true,
                "options": [
                    {
                        "value": "general",
                        "label": "General Inquiry",
                        "description": "General questions about our services"
                    },
                    {
                        "value": "car_inquiry",
                        "label": "Car Specific Inquiry",
                        "description": "Questions about a specific car"
                    },
                    {
                        "value": "rental_question",
                        "label": "Rental Process",
                        "description": "Questions about the rental process"
                    },
                    {
                        "value": "support",
                        "label": "Technical Support",
                        "description": "Technical issues or support requests"
                    }
                ]
            },
            {
                "name": "subject",
                "type": "text",
                "label": "Subject",
                "required": true,
                "placeholder": "Brief subject of your inquiry"
            },
            {
                "name": "message",
                "type": "textarea",
                "label": "Message",
                "required": true,
                "placeholder": "Please provide details about your inquiry",
                "rows": 5
            }
        ],
        "contact_info": {
            "support_email": "support@example.com",
            "support_phone": "+1-234-567-8900",
            "business_hours": "Mon-Fri 9AM-6PM"
        }
    },
    "message": null
}
 

Request      

GET api/v1/car-rentals/inquiries/custom-fields

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Car Rentals - Pricing

Calculate rental pricing

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/calculate-price" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/calculate-price"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/calculate-price

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Car Rentals - Profile

Get customer profile

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update customer profile

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"phone\": \"amniihfqcoynlazgh\",
    \"dob\": \"2025-07-08T05:30:27\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "phone": "amniihfqcoynlazgh",
    "dob": "2025-07-08T05:30:27"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string  optional  
phone   string  optional  

Must not be greater than 20 characters. Example: amniihfqcoynlazgh

dob   string  optional  

Must be a valid date. Example: 2025-07-08T05:30:27

current_password   string  optional  

This field is required when password is present.

password   string  optional  

Update customer avatar

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/profile/avatar" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "avatar=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpdOv6Uq" 
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile/avatar"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('avatar', document.querySelector('input[name="avatar"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/profile/avatar

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

avatar   file   

Must be an image. Must not be greater than 2048 kilobytes. Example: /private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpdOv6Uq

Delete customer account

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "consequatur"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

password   string   

Example: consequatur

Change customer password

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/profile/change-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"consequatur\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile/change-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "consequatur",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/profile/change-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

current_password   string   

Example: consequatur

password   string   

Example: consequatur

Get customer preferences

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/profile/preferences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile/preferences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/profile/preferences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update customer preferences

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/profile/preferences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notifications\": {
        \"email_booking_updates\": true,
        \"email_promotional\": false,
        \"email_newsletter\": true,
        \"sms_booking_updates\": false,
        \"push_notifications\": false
    },
    \"privacy\": {
        \"profile_visibility\": \"friends\",
        \"show_activity\": true,
        \"allow_contact\": true
    },
    \"rental_preferences\": {
        \"preferred_currency\": \"vmq\",
        \"preferred_language\": \"eo\",
        \"automatic_insurance\": false,
        \"favorite_pickup_location\": \"pfuudtdsufvyvddqamnii\",
        \"rental_reminders\": true
    },
    \"communication\": {
        \"preferred_contact_method\": \"sms\",
        \"booking_confirmation_method\": \"email\",
        \"time_zone\": \"hfqcoynlazghdtqtqxbaj\"
    }
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/profile/preferences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "notifications": {
        "email_booking_updates": true,
        "email_promotional": false,
        "email_newsletter": true,
        "sms_booking_updates": false,
        "push_notifications": false
    },
    "privacy": {
        "profile_visibility": "friends",
        "show_activity": true,
        "allow_contact": true
    },
    "rental_preferences": {
        "preferred_currency": "vmq",
        "preferred_language": "eo",
        "automatic_insurance": false,
        "favorite_pickup_location": "pfuudtdsufvyvddqamnii",
        "rental_reminders": true
    },
    "communication": {
        "preferred_contact_method": "sms",
        "booking_confirmation_method": "email",
        "time_zone": "hfqcoynlazghdtqtqxbaj"
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/profile/preferences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

notifications   object  optional  
email_booking_updates   boolean  optional  

Example: true

email_promotional   boolean  optional  

Example: false

email_newsletter   boolean  optional  

Example: true

sms_booking_updates   boolean  optional  

Example: false

push_notifications   boolean  optional  

Example: false

privacy   object  optional  
profile_visibility   string  optional  

Example: friends

Must be one of:
  • public
  • private
  • friends
show_activity   boolean  optional  

Example: true

allow_contact   boolean  optional  

Example: true

rental_preferences   object  optional  
preferred_currency   string  optional  

Must be 3 characters. Example: vmq

preferred_language   string  optional  

Must be 2 characters. Example: eo

automatic_insurance   boolean  optional  

Example: false

favorite_pickup_location   string  optional  

Must not be greater than 255 characters. Example: pfuudtdsufvyvddqamnii

rental_reminders   boolean  optional  

Example: true

communication   object  optional  
preferred_contact_method   string  optional  

Example: sms

Must be one of:
  • email
  • sms
  • phone
booking_confirmation_method   string  optional  

Example: email

Must be one of:
  • email
  • sms
  • both
time_zone   string  optional  

Must not be greater than 50 characters. Example: hfqcoynlazghdtqtqxbaj

Car Rentals - Vendor

Get vendor profile

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update vendor profile

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/vendor/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/vendor/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Submit vendor verification

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/vendor/profile/verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/profile/verification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/vendor/profile/verification

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get vendor verification status

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/profile/verification-status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/profile/verification-status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/profile/verification-status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List vendor cars

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/cars" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/cars

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create a new car

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/vendor/cars" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=vmqeopfuudtdsufvyvddq"\
    --form "description=Dolores dolorum amet iste laborum eius est dolor."\
    --form "content=consequatur"\
    --form "license_plate=mqeopfuudtdsufvyv"\
    --form "make_id=consequatur"\
    --form "vehicle_type_id=consequatur"\
    --form "transmission_id=consequatur"\
    --form "fuel_type_id=consequatur"\
    --form "number_of_seats=13"\
    --form "number_of_doors=7"\
    --form "mileage=16"\
    --form "horsepower=50"\
    --form "rental_rate=55"\
    --form "rental_type=per_day"\
    --form "location=consequatur"\
    --form "insurance_info=consequatur"\
    --form "vin=mqeopfuudtdsuf"\
    --form "images[]=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpQCmSqV" 
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'vmqeopfuudtdsufvyvddq');
body.append('description', 'Dolores dolorum amet iste laborum eius est dolor.');
body.append('content', 'consequatur');
body.append('license_plate', 'mqeopfuudtdsufvyv');
body.append('make_id', 'consequatur');
body.append('vehicle_type_id', 'consequatur');
body.append('transmission_id', 'consequatur');
body.append('fuel_type_id', 'consequatur');
body.append('number_of_seats', '13');
body.append('number_of_doors', '7');
body.append('mileage', '16');
body.append('horsepower', '50');
body.append('rental_rate', '55');
body.append('rental_type', 'per_day');
body.append('location', 'consequatur');
body.append('insurance_info', 'consequatur');
body.append('vin', 'mqeopfuudtdsuf');
body.append('images[]', document.querySelector('input[name="images[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/vendor/cars

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

content   string  optional  

Example: consequatur

license_plate   string   

Must not be greater than 20 characters. Example: mqeopfuudtdsufvyv

make_id   string   

The id of an existing record in the cr_car_makes table. Example: consequatur

vehicle_type_id   string   

The id of an existing record in the cr_car_types table. Example: consequatur

transmission_id   string   

The id of an existing record in the cr_car_transmissions table. Example: consequatur

fuel_type_id   string   

The id of an existing record in the cr_car_fuels table. Example: consequatur

number_of_seats   integer   

Must be at least 1. Must not be greater than 50. Example: 13

number_of_doors   integer   

Must be at least 2. Must not be greater than 10. Example: 7

year   string  optional  
mileage   number  optional  

Must be at least 0. Example: 16

horsepower   number  optional  

Must be at least 0. Example: 50

rental_rate   number   

Must be at least 0. Example: 55

rental_type   string   

Example: per_day

Must be one of:
  • per_day
  • per_hour
location   string  optional  

Example: consequatur

insurance_info   string  optional  

Example: consequatur

vin   string  optional  

Must not be greater than 17 characters. Example: mqeopfuudtdsuf

images   file[]  optional  

Must be an image. Must not be greater than 2048 kilobytes.

amenities   string[]  optional  

The id of an existing record in the cr_car_amenities table.

Get car details

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/cars/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/cars/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the car. Example: 1562

Update car

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"content\": \"consequatur\",
    \"make_id\": \"consequatur\",
    \"vehicle_type_id\": \"consequatur\",
    \"transmission_id\": \"consequatur\",
    \"fuel_type_id\": \"consequatur\",
    \"number_of_seats\": 13,
    \"number_of_doors\": 7,
    \"mileage\": 16,
    \"horsepower\": 50,
    \"rental_rate\": 55,
    \"rental_type\": \"per_day\",
    \"location\": \"consequatur\",
    \"insurance_info\": \"consequatur\",
    \"vin\": \"mqeopfuudtdsuf\",
    \"status\": \"unavailable\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "content": "consequatur",
    "make_id": "consequatur",
    "vehicle_type_id": "consequatur",
    "transmission_id": "consequatur",
    "fuel_type_id": "consequatur",
    "number_of_seats": 13,
    "number_of_doors": 7,
    "mileage": 16,
    "horsepower": 50,
    "rental_rate": 55,
    "rental_type": "per_day",
    "location": "consequatur",
    "insurance_info": "consequatur",
    "vin": "mqeopfuudtdsuf",
    "status": "unavailable"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/vendor/cars/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the car. Example: 1562

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

content   string  optional  

Example: consequatur

license_plate   string  optional  
make_id   string   

The id of an existing record in the cr_car_makes table. Example: consequatur

vehicle_type_id   string   

The id of an existing record in the cr_car_types table. Example: consequatur

transmission_id   string   

The id of an existing record in the cr_car_transmissions table. Example: consequatur

fuel_type_id   string   

The id of an existing record in the cr_car_fuels table. Example: consequatur

number_of_seats   integer   

Must be at least 1. Must not be greater than 50. Example: 13

number_of_doors   integer   

Must be at least 2. Must not be greater than 10. Example: 7

year   string  optional  
mileage   number  optional  

Must be at least 0. Example: 16

horsepower   number  optional  

Must be at least 0. Example: 50

rental_rate   number   

Must be at least 0. Example: 55

rental_type   string   

Example: per_day

Must be one of:
  • per_day
  • per_hour
location   string  optional  

Example: consequatur

insurance_info   string  optional  

Example: consequatur

vin   string  optional  

Must not be greater than 17 characters. Example: mqeopfuudtdsuf

status   string   

Example: unavailable

Must be one of:
  • available
  • unavailable
  • maintenance
amenities   string[]  optional  

The id of an existing record in the cr_car_amenities table.

Delete car

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/vendor/cars/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the car. Example: 1562

Upload car images

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562/images" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "images[]=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpCMKYS5" 
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562/images"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('images[]', document.querySelector('input[name="images[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/vendor/cars/{id}/images

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the car. Example: 1562

Body Parameters

images   file[]  optional  

Must be an image. Must not be greater than 2048 kilobytes.

Delete car image

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562/images/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/cars/1562/images/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/car-rentals/vendor/cars/{id}/images/{imageId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the car. Example: 1562

imageId   string   

Example: consequatur

List vendor bookings

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/bookings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/bookings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/bookings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get booking details

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/bookings/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/bookings/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/bookings/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Update booking status

Example request:
curl --request PUT \
    "http://carento.test/api/v1/car-rentals/vendor/bookings/1562/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"confirmed\",
    \"note\": \"vmqeopfuudtdsufvyvddq\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/bookings/1562/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "confirmed",
    "note": "vmqeopfuudtdsufvyvddq"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/car-rentals/vendor/bookings/{id}/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Body Parameters

status   string   

Example: confirmed

Must be one of:
  • pending
  • confirmed
  • in_progress
  • completed
  • cancelled
note   string  optional  

Must not be greater than 500 characters. Example: vmqeopfuudtdsufvyvddq

Complete booking

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/vendor/bookings/1562/complete" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "completion_miles=73"\
    --form "completion_gas_level=mqeopfuudtdsufvyvddqa"\
    --form "completion_notes=mniihfqcoynlazghdtqtq"\
    --form "completion_damage_images[]=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/php7FZPXX" 
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/bookings/1562/complete"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('completion_miles', '73');
body.append('completion_gas_level', 'mqeopfuudtdsufvyvddqa');
body.append('completion_notes', 'mniihfqcoynlazghdtqtq');
body.append('completion_damage_images[]', document.querySelector('input[name="completion_damage_images[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/car-rentals/vendor/bookings/{id}/complete

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the booking. Example: 1562

Body Parameters

completion_miles   number  optional  

Must be at least 0. Example: 73

completion_gas_level   string  optional  

Must not be greater than 50 characters. Example: mqeopfuudtdsufvyvddqa

completion_damage_images   file[]  optional  

Must be an image. Must not be greater than 2048 kilobytes.

completion_notes   string  optional  

Must not be greater than 1000 characters. Example: mniihfqcoynlazghdtqtq

Get vendor dashboard data

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/dashboard"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/dashboard

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List vendor reviews

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Reply to a review

Example request:
curl --request POST \
    "http://carento.test/api/v1/car-rentals/vendor/reviews/1562/reply" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reply\": \"vmqeopfuudtdsufvyvddq\"
}"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/reviews/1562/reply"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reply": "vmqeopfuudtdsufvyvddq"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/car-rentals/vendor/reviews/{id}/reply

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the review. Example: 1562

Body Parameters

reply   string   

Must not be greater than 1000 characters. Example: vmqeopfuudtdsufvyvddq

Get vendor earnings list

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/earnings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/earnings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/earnings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get earnings summary

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/car-rentals/vendor/earnings/summary" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/car-rentals/vendor/earnings/summary"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/car-rentals/vendor/earnings/summary

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Device Tokens

Register or update device token

Register a new device token or update an existing one for push notifications.

Example request:
curl --request POST \
    "http://carento.test/api/v1/device-tokens" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\",
    \"platform\": \"consequatur\",
    \"app_version\": \"consequatur\",
    \"device_id\": \"consequatur\",
    \"user_type\": \"consequatur\",
    \"user_id\": 17
}"
const url = new URL(
    "http://carento.test/api/v1/device-tokens"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "consequatur",
    "platform": "consequatur",
    "app_version": "consequatur",
    "device_id": "consequatur",
    "user_type": "consequatur",
    "user_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/device-tokens

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

The FCM device token. Example: consequatur

platform   string  optional  

The device platform (android, ios). Example: consequatur

app_version   string  optional  

The app version. Example: consequatur

device_id   string  optional  

The unique device identifier. Example: consequatur

user_type   string  optional  

The user type (customer, admin). Example: consequatur

user_id   integer  optional  

The user ID. Example: 17

Get user's device tokens

Retrieve all device tokens for the authenticated user.

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/device-tokens" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/device-tokens"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/device-tokens

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update device token

Update an existing device token.

Example request:
curl --request PUT \
    "http://carento.test/api/v1/device-tokens/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"platform\": \"consequatur\",
    \"app_version\": \"consequatur\",
    \"device_id\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/device-tokens/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "platform": "consequatur",
    "app_version": "consequatur",
    "device_id": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/device-tokens/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: 1562

Body Parameters

platform   string  optional  

The device platform (android, ios). Example: consequatur

app_version   string  optional  

The app version. Example: consequatur

device_id   string  optional  

The unique device identifier. Example: consequatur

Delete device token by token value

Delete a device token using the token value.

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/device-tokens/by-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/device-tokens/by-token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "consequatur"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/device-tokens/by-token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

The FCM device token to delete. Example: consequatur

Delete device token

Delete a device token to stop receiving push notifications.

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/device-tokens/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/device-tokens/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/device-tokens/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: 1562

Deactivate device token

Deactivate a device token without deleting it.

Example request:
curl --request POST \
    "http://carento.test/api/v1/device-tokens/1562/deactivate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/device-tokens/1562/deactivate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/device-tokens/{id}/deactivate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: 1562

Languages

Get list of available languages

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/languages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/languages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": [
        {
            "lang_id": 1,
            "lang_name": "English",
            "lang_locale": "en",
            "lang_code": "en_US",
            "lang_flag": "<svg ...>",
            "lang_is_default": true,
            "lang_is_rtl": false,
            "lang_order": 0
        },
        {
            "lang_id": 2,
            "lang_name": "Vietnamese",
            "lang_locale": "vi",
            "lang_code": "vi",
            "lang_flag": "<svg ...>",
            "lang_is_default": false,
            "lang_is_rtl": false,
            "lang_order": 1
        }
    ],
    "message": null
}
 

Request      

GET api/v1/languages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get current language

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/languages/current" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/languages/current"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "lang_id": 1,
        "lang_name": "English",
        "lang_locale": "en",
        "lang_code": "en_US",
        "lang_flag": "us",
        "lang_is_default": true,
        "lang_is_rtl": false,
        "lang_order": 0
    },
    "message": null
}
 

Request      

GET api/v1/languages/current

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Notifications

Get user notifications

Retrieve notifications for the authenticated user.

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/notifications?page=1&per_page=20&unread_only=&type=general" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications"
);

const params = {
    "page": "1",
    "per_page": "20",
    "unread_only": "0",
    "type": "general",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/notifications

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

Page number for pagination. Example: 1

per_page   integer  optional  

Number of notifications per page (max 50). Example: 20

unread_only   boolean  optional  

Filter to show only unread notifications. Example: false

type   string  optional  

Filter by notification type. Example: general

Get notification statistics

Get notification statistics for the authenticated user.

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/notifications/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications/stats"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/notifications/stats

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Mark all notifications as read

Mark all notifications as read for the authenticated user.

Example request:
curl --request POST \
    "http://carento.test/api/v1/notifications/mark-all-read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications/mark-all-read"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/notifications/mark-all-read

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Mark notification as read

Mark a specific notification as read for the authenticated user.

Example request:
curl --request POST \
    "http://carento.test/api/v1/notifications/1562/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications/1562/read"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/notifications/{id}/read

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: 1562

Mark notification as clicked

Mark a notification as clicked when user taps on it.

Example request:
curl --request POST \
    "http://carento.test/api/v1/notifications/1562/clicked" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications/1562/clicked"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/notifications/{id}/clicked

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: 1562

Delete notification

Delete a notification from user's list.

Example request:
curl --request DELETE \
    "http://carento.test/api/v1/notifications/1562" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/notifications/1562"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/notifications/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: 1562

Page

List pages

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/pages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/pages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "Homepage",
            "slug": "homepage",
            "description": null,
            "image": null,
            "template": "homepage",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 2,
            "name": "Blog",
            "slug": "blog",
            "description": null,
            "image": null,
            "template": "blog-with-sidebar",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 3,
            "name": "Contact",
            "slug": "contact",
            "description": null,
            "image": null,
            "template": null,
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 4,
            "name": "Services",
            "slug": "services",
            "description": null,
            "image": null,
            "template": "full-width",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 5,
            "name": "Pricing",
            "slug": "pricing",
            "description": null,
            "image": null,
            "template": "full-width",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 6,
            "name": "About Us",
            "slug": "about-us",
            "description": null,
            "image": null,
            "template": "full-width",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 7,
            "name": "Car List 1",
            "slug": "car-list-1",
            "description": null,
            "image": null,
            "template": "homepage",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 8,
            "name": "Car List 2",
            "slug": "car-list-2",
            "description": null,
            "image": null,
            "template": "homepage",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 9,
            "name": "Car List 3",
            "slug": "car-list-3",
            "description": null,
            "image": null,
            "template": "homepage",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        },
        {
            "id": 10,
            "name": "Car List 4",
            "slug": "car-list-4",
            "description": null,
            "image": null,
            "template": "homepage",
            "status": {
                "value": "published",
                "label": "Published"
            },
            "created_at": "2025-07-06T08:32:42.000000Z",
            "updated_at": "2025-07-06T08:32:42.000000Z"
        }
    ],
    "links": {
        "first": "http://carento.test/api/v1/pages?page=1",
        "last": "http://carento.test/api/v1/pages?page=4",
        "prev": null,
        "next": "http://carento.test/api/v1/pages?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 4,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/pages?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://carento.test/api/v1/pages?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/pages?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/pages?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "http://carento.test/api/v1/pages?page=2",
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://carento.test/api/v1/pages",
        "per_page": 10,
        "to": 10,
        "total": 38
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/pages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get page by ID

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/pages/1562?id=17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/pages/1562"
);

const params = {
    "id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Not found"
}
 

Request      

GET api/v1/pages/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the page. Example: 1562

Query Parameters

id   integer  optional  

Find by ID of page. Example: 17

Profile

Get the user profile information.

requires authentication

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/me

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update profile

requires authentication

Example request:
curl --request PUT \
    "http://carento.test/api/v1/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur\",
    \"last_name\": \"yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca\",
    \"name\": \"consequatur\",
    \"phone\": \"consequatur\",
    \"dob\": \"consequatur\",
    \"gender\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://carento.test/api/v1/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur",
    "last_name": "yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca",
    "name": "consequatur",
    "phone": "consequatur",
    "dob": "consequatur",
    "gender": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/me

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string  optional  

This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur

last_name   string  optional  

This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca

name   string   

Name. Example: consequatur

phone   string   

Phone. Example: consequatur

dob   date  optional  

nullable Date of birth (format: Y-m-d). Example: consequatur

gender   string  optional  

Gender (male, female, other). Example: consequatur

description   string  optional  

Description Example: Dolores dolorum amet iste laborum eius est dolor.

email   string  optional  

Email. Example: qkunze@example.com

Update Avatar

requires authentication

Example request:
curl --request POST \
    "http://carento.test/api/v1/update/avatar" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "avatar=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/php59hpsU" 
const url = new URL(
    "http://carento.test/api/v1/update/avatar"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('avatar', document.querySelector('input[name="avatar"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/update/avatar

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

avatar   file   

Avatar file. Example: /private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/php59hpsU

Update password

requires authentication

Example request:
curl --request PUT \
    "http://carento.test/api/v1/update/password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
    \"old_password\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/update/password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "O[2UZ5ij-e\/dl4m{o,",
    "old_password": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/update/password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

password   string   

The new password of user. Example: O[2UZ5ij-e/dl4m{o,

old_password   string   

The current password of user. Example: consequatur

Get user settings

requires authentication

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://carento.test/api/v1/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": true,
    "data": null,
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/settings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Update user settings

requires authentication

Example request:
curl --request PUT \
    "http://carento.test/api/v1/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"biometric_enabled\": false,
    \"notification_enabled\": false,
    \"language\": \"consequatur\",
    \"currency\": \"consequatur\",
    \"theme\": \"consequatur\",
    \"timezone\": \"Europe\\/Malta\"
}"
const url = new URL(
    "http://carento.test/api/v1/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "biometric_enabled": false,
    "notification_enabled": false,
    "language": "consequatur",
    "currency": "consequatur",
    "theme": "consequatur",
    "timezone": "Europe\/Malta"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/settings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

biometric_enabled   boolean  optional  

Enable/disable biometric authentication. Example: false

notification_enabled   boolean  optional  

Enable/disable notifications. Example: false

language   string  optional  

User's preferred language. Example: consequatur

currency   string  optional  

User's preferred currency. Example: consequatur

theme   string  optional  

User's preferred theme (light, dark, auto). Example: consequatur

timezone   string  optional  

User's timezone. Example: Europe/Malta

Simple Slider

Get sliders

Example request:
curl --request GET \
    --get "http://carento.test/api/v1/simple-sliders?keys[]=home-slider&keys[]=product-slider" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"keys\": [
        \"home-slider\",
        \"product-slider\"
    ]
}"
const url = new URL(
    "http://carento.test/api/v1/simple-sliders"
);

const params = {
    "keys[0]": "home-slider",
    "keys[1]": "product-slider",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "keys": [
        "home-slider",
        "product-slider"
    ]
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "error": false,
    "data": [
        {
            "id": 1,
            "name": "Home slider",
            "key": "home-slider",
            "description": "The main slider on homepage",
            "items": [
                {
                    "id": 1,
                    "title": "Find your next vehicle today",
                    "description": "Browse our diverse inventory and enjoy a seamless buying experience <br> with expert support every step of the way",
                    "image": "http://carento.test/storage/sliders/banner-1.jpg",
                    "link": "/",
                    "order": 0,
                    "label_top": "+3600 cars for you",
                    "keywords": [
                        {
                            "name": "Economy",
                            "link": "/"
                        },
                        {
                            "name": "Standard",
                            "link": "/"
                        },
                        {
                            "name": "Luxury",
                            "link": "/"
                        },
                        {
                            "name": "SUV",
                            "link": "/"
                        },
                        {
                            "name": "Convertible",
                            "link": "/"
                        }
                    ]
                },
                {
                    "id": 2,
                    "title": "Discover your next ride today",
                    "description": "Explore our wide selection and enjoy a smooth purchasing journey, <br> with expert assistance at every turn",
                    "image": "http://carento.test/storage/sliders/banner-2.jpg",
                    "link": "/",
                    "order": 1,
                    "label_top": "Best car rental system",
                    "keywords": [
                        {
                            "name": "Economy",
                            "link": "/"
                        },
                        {
                            "name": "Standard",
                            "link": "/"
                        },
                        {
                            "name": "Luxury",
                            "link": "/"
                        },
                        {
                            "name": "SUV",
                            "link": "/"
                        },
                        {
                            "name": "Convertible",
                            "link": "/"
                        }
                    ]
                }
            ]
        }
    ],
    "message": null
}
 

Request      

GET api/v1/simple-sliders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

keys   string[]  optional  

Array of slider keys to filter by.

Body Parameters

keys   string[]  optional  

Array of slider keys to filter by.

Social Login

Apple login

Example request:
curl --request POST \
    "http://carento.test/api/v1/auth/apple" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"identityToken\": \"consequatur\",
    \"guard\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/auth/apple"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "identityToken": "consequatur",
    "guard": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "token": "1|abc123def456...",
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john@example.com"
        }
    },
    "message": "Login successful"
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid Apple token"
}
 

Example response (400):


{
    "error": true,
    "message": "Cannot login, no email or Apple ID provided!"
}
 

Request      

POST api/v1/auth/apple

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

identityToken   string   

The Apple identity token received from Apple Sign-In. Example: consequatur

guard   string  optional  

optional The guard to use for authentication (default: web). Example: consequatur

Google login

Example request:
curl --request POST \
    "http://carento.test/api/v1/auth/google" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"identityToken\": \"consequatur\",
    \"guard\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/auth/google"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "identityToken": "consequatur",
    "guard": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "token": "1|abc123def456...",
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john@example.com"
        }
    },
    "message": "Login successful"
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid Google token"
}
 

Example response (400):


{
    "error": true,
    "message": "Google authentication is not properly configured"
}
 

Request      

POST api/v1/auth/google

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

identityToken   string   

The Google identity token received from Google Sign-In. Example: consequatur

guard   string  optional  

optional The guard to use for authentication (default: web). Example: consequatur

Facebook login

Example request:
curl --request POST \
    "http://carento.test/api/v1/auth/facebook" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"accessToken\": \"consequatur\",
    \"guard\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/auth/facebook"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "accessToken": "consequatur",
    "guard": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "token": "1|abc123def456...",
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john@example.com"
        }
    },
    "message": "Login successful"
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid Facebook token"
}
 

Example response (400):


{
    "error": true,
    "message": "Facebook authentication is not properly configured"
}
 

Request      

POST api/v1/auth/facebook

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

accessToken   string   

The Facebook access token received from Facebook Login. Example: consequatur

guard   string  optional  

optional The guard to use for authentication (default: web). Example: consequatur

X (Twitter) login

Example request:
curl --request POST \
    "http://carento.test/api/v1/auth/x" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"accessToken\": \"consequatur\",
    \"guard\": \"consequatur\"
}"
const url = new URL(
    "http://carento.test/api/v1/auth/x"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "accessToken": "consequatur",
    "guard": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "data": {
        "token": "1|abc123def456...",
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john@example.com"
        }
    },
    "message": "Login successful"
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid X (Twitter) token"
}
 

Example response (400):


{
    "error": true,
    "message": "X (Twitter) authentication is not properly configured"
}
 

Request      

POST api/v1/auth/x

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

accessToken   string   

The X (Twitter) access token received from X OAuth. Example: consequatur

guard   string  optional  

optional The guard to use for authentication (default: web). Example: consequatur