REST /api/v1/bufdir-category-mappings 8 endpoints
GET /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings

List all activity type mappings

Public

Request Example

{}

Response Example

{
  "data": [
    {
      "mapping_id": "map_01",
      "internal_type_id": "act_type_01",
      "internal_type_name": "Individuell mentoring",
      "bufdir_category": "individual_mentoring",
      "bufdir_label": "Individuell oppfølging",
      "created_at": "2025-01-10T08:00:00Z"
    },
    {
      "mapping_id": "map_02",
      "internal_type_id": "act_type_02",
      "internal_type_name": "Gruppeaktivitet",
      "bufdir_category": "group_activity",
      "bufdir_label": "Gruppeaktivitet",
      "created_at": "2025-01-10T08:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 14
  }
}
GET /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/:mapping_id

Get a single category mapping

Public

Request Example

{}

Response Example

{
  "mapping_id": "map_01",
  "internal_type_id": "act_type_01",
  "internal_type_name": "Individuell mentoring",
  "bufdir_category": "individual_mentoring",
  "bufdir_label": "Individuell oppfølging",
  "created_at": "2025-01-10T08:00:00Z",
  "updated_at": "2025-03-01T12:00:00Z"
}
POST /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings

Create a new category mapping

Public

Request Example

{
  "internal_type_id": "act_type_15",
  "bufdir_category": "skills_course",
  "bufdir_label": "Mestringskurs"
}

Response Example

{
  "mapping_id": "map_15",
  "internal_type_id": "act_type_15",
  "internal_type_name": "Mestringskurs",
  "bufdir_category": "skills_course",
  "bufdir_label": "Mestringskurs",
  "created_at": "2026-03-26T10:20:00Z"
}
PUT /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/:mapping_id

Update an existing category mapping

Public

Request Example

{
  "bufdir_category": "group_skills_course",
  "bufdir_label": "Gruppebasert mestringskurs"
}

Response Example

{
  "mapping_id": "map_15",
  "internal_type_id": "act_type_15",
  "bufdir_category": "group_skills_course",
  "bufdir_label": "Gruppebasert mestringskurs",
  "updated_at": "2026-03-26T10:25:00Z"
}
DELETE /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/:mapping_id

Delete a category mapping

Public

Request Example

{}

Response Example

{
  "mapping_id": "map_15",
  "deleted": true,
  "deleted_at": "2026-03-26T10:26:00Z"
}
POST /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/map-activity-type

Map a single internal activity type to a Bufdir category

Public

Request Example

{
  "internal_type_id": "act_type_09"
}

Response Example

{
  "internal_type_id": "act_type_09",
  "bufdir_category": "outdoor_recreation",
  "bufdir_label": "Friluftsliv",
  "mapping_id": "map_09"
}
POST /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/validate

Validate mapping completeness for a set of activity types

Public

Request Example

{
  "activity_type_ids": [
    "act_type_01",
    "act_type_02",
    "act_type_99"
  ]
}

Response Example

{
  "is_complete": false,
  "mapped_count": 2,
  "unmapped_count": 1,
  "unmapped_types": [
    {
      "internal_type_id": "act_type_99",
      "internal_type_name": "Ukjent aktivitet"
    }
  ]
}
POST /api/v1/bufdir-category-mappings/api/v1/bufdir-category-mappings/unmapped

Get unmapped activity types from a list of activities

Public

Request Example

{
  "activity_ids": [
    "act_8801",
    "act_8802",
    "act_8803"
  ]
}

Response Example

{
  "unmapped_types": [
    {
      "internal_type_id": "act_type_12",
      "internal_type_name": "Digital møte",
      "activity_count": 47
    }
  ],
  "total_unmapped": 1
}

Additional Metadata

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