145 lines
5.4 KiB
Markdown
145 lines
5.4 KiB
Markdown
## 📌 API Endpoint Overview
|
|
|
|
This document provides a categorized and role-specific overview of all API endpoints implemented (or to be implemented) in the system. It is structured for easy readability, regular updates, and fast navigation.
|
|
|
|
---
|
|
|
|
### ⚖️ Roles
|
|
|
|
* `admin` — Endpoints accessible only to admins.
|
|
* `user` — Endpoints accessible to regular authenticated users.
|
|
|
|
> Status Legend:
|
|
>
|
|
> * `done` - Fully implemented and Tested
|
|
> * `ok` — Implemented but not tested
|
|
> * `partial` — Implemented but incomplete or unstable
|
|
> * `TODO` — Needs implementation
|
|
> * `not ok` — Implemented but incorrect or buggy
|
|
|
|
Testers will write `done`, `not ok` and developers will define status that is not tested or something like that, so developers can write code with no communication and fully peace.
|
|
|
|
---
|
|
|
|
## 🔑 Auth & Users
|
|
|
|
#### users:
|
|
|
|
* `POST /auth/register` — user — remake
|
|
* `POST /auth/verify` — user — ok
|
|
* `GET /auth/me` — user — ok
|
|
|
|
#### me/companies:
|
|
|
|
* `GET /me/companies` — user — ok
|
|
* `POST /me/companies` — user — ok
|
|
|
|
#### users/<uuid>:
|
|
|
|
* `GET /users/<uuid:pk>/companies` — user — ok
|
|
* `POST /users/<uuid:pk>/companies` — user — ok
|
|
|
|
---
|
|
|
|
## 🏢 Companies
|
|
|
|
#### companies:
|
|
|
|
* `GET /companies` — admin — ok
|
|
* `POST /companies` — admin — ok
|
|
* `GET /companies/<uuid:pk>` — admin — ok
|
|
* `DELETE /companies/<uuid:pk>` — admin — ok
|
|
* `PATCH /companies/<uuid:pk>` — admin — ok
|
|
* `GET /companies/<uuid:pk>/contracts` — user — partial
|
|
|
|
* filters: `folder`, `status: list[str]`
|
|
* `GET /companies/<uuid:pk>/folders` — user — ok
|
|
* `POST /companies/<uuid:pk>/folders` — user — ok
|
|
* `GET /companies/<uuid:pk>/accounts` — user — ok
|
|
* `POST /companies/<uuid:pk>/accounts` — user — TODO
|
|
|
|
---
|
|
|
|
## 💳 Company Accounts
|
|
|
|
* `GET /company-accounts` — admin — ok
|
|
* `POST /company-accounts` — admin — ok
|
|
* `GET /company-accounts/<uuid:pk>` — admin — ok
|
|
* `PATCH /company-accounts/<uuid:pk>` — admin — ok
|
|
* `DELETE /company-accounts/<uuid:pk>` — admin — ok
|
|
* `POST /accounts/verify` — user — TODO
|
|
|
|
* required: `phone`, `code`
|
|
|
|
---
|
|
|
|
## 🌐 Banks
|
|
|
|
* `GET /banks` — user — ok
|
|
* `POST /banks` — admin — ok
|
|
* `GET /banks/<uuid:pk>` — user — ok
|
|
* `DELETE /banks/<uuid:pk>` — admin — ok
|
|
* `PATCH /banks/<uuid:pk>` — admin — ok
|
|
|
|
---
|
|
|
|
## 📍 Contracts
|
|
|
|
* `GET /contracts` — admin — ok
|
|
* `POST /contracts` — user — ok
|
|
* `GET /contracts/<uuid:pk>` — admin — ok
|
|
* `DELETE /contracts/<uuid:pk>` — admin — ok
|
|
* `PATCH /contracts/<uuid:pk>` — admin — ok
|
|
* `GET /contracts/<uuid:pk>/files` — user — ok
|
|
* `GET /contracts/<uuid:pk>/owners` — user — ok
|
|
|
|
---
|
|
|
|
## 📄 Contract Owners
|
|
|
|
* `GET /contract-owners` — admin — ok
|
|
* `POST /contract-owners` — admin — ok
|
|
* `GET /contract-owners/<uuid:pk>` — admin — ok
|
|
* `DELETE /contract-owners/<uuid:pk>` — admin — ok
|
|
* `PATCH /contract-owners/<uuid:pk>` — admin — ok
|
|
* `GET /contract-owners/<uuid:pk>/contract` — user — ok
|
|
* `POST /contract-owners/<uuid:pk>/files` — user — not ok
|
|
* `GET /contract-owners/<uuid:pk>/files` — user — not ok
|
|
* `DELETE /contract-owners/<uuid:pk>/files/<uuid:pk>` — user — ok
|
|
* `POST /contract-owners/<uuid:pk>/files/<uuid:pk>/upload` — user — ok
|
|
|
|
---
|
|
|
|
## 📂 Files
|
|
|
|
* `GET /files` — admin — ok
|
|
* `POST /files` — admin — ok
|
|
* `GET /files/<uuid:pk>` — admin — ok
|
|
* `DELETE /files/<uuid:pk>` — admin — ok
|
|
* `PATCH /files/<uuid:pk>` — admin — ok
|
|
|
|
---
|
|
|
|
## 📁 Folders
|
|
|
|
* `GET /folders` — admin — ok
|
|
* `POST /folders` — admin — ok
|
|
* `GET /folders/<uuid:pk>` — admin — ok
|
|
* `DELETE /folders/<uuid:pk>` — admin — ok
|
|
* `PATCH /folders/<uuid:pk>` — admin — ok
|
|
* `GET /folders/<uuid:pk>/contracts` — admin — ok
|
|
|
|
---
|
|
|
|
## 📋 File Contents
|
|
|
|
* `GET /file-contents` — admin — ok
|
|
* `POST /file-contents` — admin — ok
|
|
* `GET /file-contents/<uuid:pk>` — admin — ok
|
|
* `DELETE /file-contents/<uuid:pk>` — admin — ok
|
|
* `PATCH /file-contents/<uuid:pk>` — admin — ok
|
|
|
|
---
|
|
|
|
This structure ensures developers can **navigate quickly**, **see responsibilities by domain**, and easily **track implementation status**. Update it regularly as your API evolves.
|