Organization
Organization routes manage branding, categories, and centralization.
The organization model
Properties
- Name
id- Type
- string
- Description
Organization UUID.
- Name
name- Type
- string
- Description
Clinic group name.
GET/api/organization
Organization
Current organization profile.
Request
GET
/api/organizationcurl -X GET http://localhost:3000/api/organization \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Cleos Demo Clinic",
"timezone": "Asia/Kuala_Lumpur",
"currency": "MYR"
}
PATCH/api/organization
Update organization
Update org settings.
Request
PATCH
/api/organizationcurl -X PATCH http://localhost:3000/api/organization \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Cleos Demo Clinic (updated)"
}
GET/api/branches
List branches
Branches in the organization.
Request
GET
/api/branchescurl -X GET http://localhost:3000/api/branches \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Main Branch",
"code": "MAIN",
"isActive": true
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Branch 2",
"code": "B2",
"isActive": true
}
]
}
POST/api/branches/switch
Switch branch
Change current branch in JWT scope.
Request
POST
/api/branches/switchcurl -X POST http://localhost:3000/api/branches/switch \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"currentBranchId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"branch": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Branch 2",
"code": "B2"
}
}
GET/api/organization/centralization
Centralization
Centralization mode settings.
Request
GET
/api/organization/centralizationcurl -X GET http://localhost:3000/api/organization/centralization \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"isCentralized": true,
"centralizePatients": true,
"shareQueueVisibility": false
}