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.
Endpoints
POST api/v1/devices/register
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/devices/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"partner_id\": 16,
\"branch_id\": 16,
\"device_type\": \"kiosk\",
\"device_name\": \"n\"
}"
const url = new URL(
"http://button_taxi.test/api/v1/devices/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"partner_id": 16,
"branch_id": 16,
"device_type": "kiosk",
"device_name": "n"
};
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.
Cancel an order POST /api/v1/orders/{id}/cancel
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/orders/architecto/cancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reason\": \"b\"
}"
const url = new URL(
"http://button_taxi.test/api/v1/orders/architecto/cancel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reason": "b"
};
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.
Complete an order POST /api/v1/orders/{id}/complete
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/orders/architecto/complete" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/api/v1/orders/architecto/complete"
);
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.
Display the specified order GET /api/v1/orders/{id}
Example request:
curl --request GET \
--get "http://button_taxi.test/api/v1/orders/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/api/v1/orders/architecto"
);
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
{
"error": "Unauthenticated",
"timestamp": "2025-07-04T06:56:25.593973Z"
}
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.
Store a newly created order POST /api/v1/orders
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pickup_latitude\": -89,
\"pickup_longitude\": -179,
\"dropoff_latitude\": -90,
\"dropoff_longitude\": -179,
\"note\": \"m\",
\"partner_order_id\": \"i\"
}"
const url = new URL(
"http://button_taxi.test/api/v1/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pickup_latitude": -89,
"pickup_longitude": -179,
"dropoff_latitude": -90,
"dropoff_longitude": -179,
"note": "m",
"partner_order_id": "i"
};
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/partner
Example request:
curl --request GET \
--get "http://button_taxi.test/api/v1/partner" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/api/v1/partner"
);
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
{
"error": "API key is required",
"message": "Please provide an API key in the X-API-Key header or api_key query parameter"
}
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.
Authenticate user and return token.
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"architecto\"
}"
const url = new URL(
"http://button_taxi.test/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "architecto"
};
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.
Login by employee number (for device authentication).
Example request:
curl --request GET \
--get "http://button_taxi.test/api/v1/auth/login/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/api/v1/auth/login/architecto"
);
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
{
"error": "API key is required",
"message": "Please provide an API key in the X-API-Key header or api_key query parameter"
}
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 the authenticated User.
Example request:
curl --request GET \
--get "http://button_taxi.test/api/v1/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/api/v1/user"
);
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
{
"error": "Unauthenticated",
"timestamp": "2025-07-04T06:56:29.618908Z"
}
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.
Log the user out (Invalidate the token).
Example request:
curl --request POST \
"http://button_taxi.test/api/v1/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://button_taxi.test/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.