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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.