MENU navbar-image

Introduction

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

Authenticating requests

This API is not authenticated.

Auth

POST api/v1/auth/register

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vwniqzhmwf\",
    \"email\": \"waelchi.joaquin@example.net\",
    \"password\": \"modi\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/register"
);

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

let body = {
    "name": "vwniqzhmwf",
    "email": "waelchi.joaquin@example.net",
    "password": "modi"
};

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

Request      

POST api/v1/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vwniqzhmwf

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: waelchi.joaquin@example.net

password   string   

Example: modi

POST api/v1/auth/login

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

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

let body = {
    "email": "ikuhic@example.com",
    "password": "earum"
};

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

Request      

POST api/v1/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

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

password   string   

Example: earum

GET api/v1/profile

Example request:
curl --request GET \
    --get "http://localhost/api/v1/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/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
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

PUT api/v1/profile

Example request:
curl --request PUT \
    "http://localhost/api/v1/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"explicabo\",
    \"email\": \"inader@example.net\"
}"
const url = new URL(
    "http://localhost/api/v1/profile"
);

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

let body = {
    "name": "explicabo",
    "email": "inader@example.net"
};

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

Request      

PUT api/v1/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: explicabo

email   string   

Must be a valid email address. Example: inader@example.net

PUT api/v1/password

Example request:
curl --request PUT \
    "http://localhost/api/v1/password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"facere\",
    \"password\": \"non\"
}"
const url = new URL(
    "http://localhost/api/v1/password"
);

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

let body = {
    "current_password": "facere",
    "password": "non"
};

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

Request      

PUT api/v1/password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

current_password   string   

Example: facere

password   string   

Example: non

Endpoints

POST api/v1/auth/logout

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

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

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

Request      

POST api/v1/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Parking

POST api/v1/parkings/start

Example request:
curl --request POST \
    "http://localhost/api/v1/parkings/start" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vehicle_id\": 14,
    \"zone_id\": 8
}"
const url = new URL(
    "http://localhost/api/v1/parkings/start"
);

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

let body = {
    "vehicle_id": 14,
    "zone_id": 8
};

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

Request      

POST api/v1/parkings/start

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

vehicle_id   integer   

Example: 14

zone_id   integer   

Example: 8

GET api/v1/parkings/{parking_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/parkings/14" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/parkings/14"
);

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
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/parkings/{parking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

parking_id   integer   

The ID of the parking. Example: 14

PUT api/v1/parkings/{parking_id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/parkings/19" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/parkings/19"
);

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

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

Request      

PUT api/v1/parkings/{parking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

parking_id   integer   

The ID of the parking. Example: 19

Vehicles

GET api/v1/vehicles

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

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
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/v1/vehicles

Example request:
curl --request POST \
    "http://localhost/api/v1/vehicles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plate_number\": \"ut\"
}"
const url = new URL(
    "http://localhost/api/v1/vehicles"
);

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

let body = {
    "plate_number": "ut"
};

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

Request      

POST api/v1/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

plate_number   string   

Example: ut

GET api/v1/vehicles/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/vehicles/14" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/vehicles/14"
);

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
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/vehicles/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the vehicle. Example: 14

PUT api/v1/vehicles/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/vehicles/2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plate_number\": \"deleniti\"
}"
const url = new URL(
    "http://localhost/api/v1/vehicles/2"
);

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

let body = {
    "plate_number": "deleniti"
};

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

Request      

PUT api/v1/vehicles/{id}

PATCH api/v1/vehicles/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the vehicle. Example: 2

Body Parameters

plate_number   string   

Example: deleniti

DELETE api/v1/vehicles/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/vehicles/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/vehicles/5"
);

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

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

Request      

DELETE api/v1/vehicles/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the vehicle. Example: 5

Zones

GET api/v1/zones

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

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
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
vary: Origin
 

{
    "data": [
        {
            "id": 1,
            "name": "Green Zone",
            "price_per_hour": 100
        },
        {
            "id": 2,
            "name": "Yellow Zone",
            "price_per_hour": 200
        },
        {
            "id": 3,
            "name": "Red Zone",
            "price_per_hour": 300
        }
    ]
}
 

Request      

GET api/v1/zones

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json