Description: Registers a new admin. Used only once or for creating admin users.
Authentication: ❌ Not required
Request Body:
{
"email": "your_email@example.com"
}
Description: Creates a new branch within the pharmacy.
⚠️ A maximum of 10 branches is allowed per pharmacy.
Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Request Body:
{
"name": "your_branch_name"
}
Description: Get all branches within the pharmacy.
Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Description: Get details of a specific branch by its ID.
Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Description: Creates a new user. There are two types of users:
"role": "depo manager"."role": "branch pharmacist" and the "branch_id" to assign them to a branch.Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Request Body Examples:
{
"role": "depo manager"
}
{
"role": "branch pharmacist",
"branch_id": 21
}
Description: Retrieve a list of all users.
Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Description: Retrieve a specific user by ID.
Authentication: ✅ Required — Bearer admin token
Authorization: Bearer your_admin_token
Description: Add a new supplier. Only depo managers are authorized to perform this action.
⚠️ A maximum of 10 suppliers can be added in total. Attempts to exceed this limit will result in an error.
Authentication: ✅ Required — Bearer token of a depo manager
Authorization: Bearer your_depo_manager_token
Request Body: application/json
{
"name": "Global 3 Pharma Supplies",
"contact_email": "contact@globalpharma.com",
"phone": "+994551234567",
"address": "123 Baku Avenue, AZ1000, Azerbaijan"
}
Description: Retrieve the list of all suppliers created by the depo manager within the pharmacy.
Roles Authorized: admin, depo manager, and branch pharmacist
Authentication: ✅ Required — Bearer token of an authorized role
Authorization: Bearer your_valid_token
Description: Retrieve details of a specific supplier by its ID.
Roles Authorized: admin, depo manager, and branch pharmacist
Authentication: ✅ Required — Bearer token of an authorized role
Authorization: Bearer your_valid_token