# API & Integrations

### API principles

* All APIs are **versioned** (e.g. `/api/v1/...`).
* Communication is over **HTTPS** only.
* Request and response bodies use **JSON**.
* All endpoints require authentication unless explicitly marked as public.

### Authentication

* Access tokens are issued after login or registration.
* Token format: (JWT / opaque tokens – specify the actual choice).
* Tokens must be included in the `Authorization` header.

Example:

`Authorization: Bearer <token>`

### Main API groups

* **Auth API** – login, logout, refresh token, password reset.
* **Customer API** – create and manage orders, view history.
* **Driver API** – accept jobs, update status, view earnings.
* **Admin API** – manage users, orders, and configuration.

### Third-party integrations

* **Maps & routing** – address lookup, distance estimation, ETA.
* **Payments** – card payments and refunds.
* **SMS / communication** – OTP codes, status messages.

For full endpoint lists and schemas, see:

* `/docs/api/customer-api.md`
* `/docs/api/driver-api.md`
* `/docs/api/admin-api.md`\
  (or any structure you use)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beeplus.gitbook.io/beeplus-docs/api-and-integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
