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/organization
curl -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/organization
curl -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/branches
curl -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/switch
curl -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/centralization
curl -X GET http://localhost:3000/api/organization/centralization \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "isCentralized": true,
  "centralizePatients": true,
  "shareQueueVisibility": false
}

Was this page helpful?