REST /api/v1/org-hierarchy 4 endpoints
GET /api/v1/org-hierarchy/api/v1/org-hierarchy/scope/:scope_id

Resolve all entities under a scope

Public

Request Example

{}

Response Example

{
  "scope_id": "scope_region_07",
  "scope_level": "region",
  "entities": [
    {
      "entity_id": "ch_071",
      "entity_type": "chapter",
      "name": "Stavanger Røde Kors",
      "parent_id": "scope_region_07"
    },
    {
      "entity_id": "ch_072",
      "entity_type": "chapter",
      "name": "Sandnes Røde Kors",
      "parent_id": "scope_region_07"
    }
  ],
  "total_entities": 12
}
GET /api/v1/org-hierarchy/api/v1/org-hierarchy/regions/:region_id/chapters

Get all chapters under a region

Public

Request Example

{}

Response Example

{
  "region_id": "scope_region_07",
  "region_name": "Rogaland",
  "chapters": [
    {
      "chapter_id": "ch_071",
      "chapter_name": "Stavanger Røde Kors",
      "member_count": 94
    },
    {
      "chapter_id": "ch_072",
      "chapter_name": "Sandnes Røde Kors",
      "member_count": 62
    }
  ],
  "total_chapters": 12
}
GET /api/v1/org-hierarchy/api/v1/org-hierarchy/national/:national_id/regions

Get all regions and their chapters under national level

Public

Request Example

{}

Response Example

{
  "national_id": "org_national_01",
  "regions": [
    {
      "region_id": "scope_region_07",
      "region_name": "Rogaland",
      "chapter_count": 12
    },
    {
      "region_id": "scope_region_03",
      "region_name": "Oslo og Akershus",
      "chapter_count": 21
    }
  ],
  "total_regions": 15,
  "total_chapters": 183
}
POST /api/v1/org-hierarchy/api/v1/org-hierarchy/validate-access

Validate user's access to a given scope

Public

Request Example

{
  "user_id": "usr_1021",
  "scope_id": "scope_region_07"
}

Response Example

{
  "user_id": "usr_1021",
  "scope_id": "scope_region_07",
  "has_access": true,
  "access_level": "region_coordinator",
  "granted_scopes": [
    "scope_region_07",
    "ch_071",
    "ch_072"
  ]
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}