{"info": {"termsOfService": "", "version": "0.0", "description": "Dokumentasjon til APIet for Akt\u00f8rer til Trondheim Kommune. \nAkt\u00f8r-APIet kan n\u00e5s via https://organisasjoner.trondheim.kommune.no/api/organisations/v1/", "title": "Akt\u00f8r API"}, "paths": {"/api/v1/brreg_activity_codes/": {"get": {"description": "Get brreg aktivitetskoder.", "tags": ["Annet"], "responses": {"200": {"description": "Fetched brreg activity codes", "schema": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}}}, "summary": "Get Brreg activity codes."}}, "/api/v1/districts/": {"get": {"description": "Get distrikter.", "tags": ["Annet"], "responses": {"200": {"description": "Fetched districts", "schema": {"items": {"type": "object", "properties": {"id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}}}, "summary": "Get districts."}}, "/api/v1/flod_activity_types/": {"get": {"description": "Get flod aktivitetstyper.", "tags": ["Annet"], "responses": {"200": {"description": "Fetched flod activity types", "schema": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}}}, "summary": "Get Flod activity types."}}, "/api/v1/organisations/": {"put": {"description": "Oppdaterer en organisasjon.", "tags": ["Organisasjon"], "responses": {"200": {"description": "Updated organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}, "relevant_tkn": {"type": "boolean"}, "area": {"type": "integer"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "phone_number": {"type": "string"}, "description": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "recruitment_area": {"type": "integer"}, "registered_tkn": {"type": "boolean"}, "org_form": {"type": "string"}, "telefax_number": {"type": "string"}, "is_public": {"type": "boolean"}, "num_members_b20": {"type": "integer"}, "num_members": {"type": "integer"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "local_email_address": {"type": "string", "format": "email"}, "url": {"type": "string"}, "multicultural": {"type": "boolean"}, "uri": {"type": "string"}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "account_number": {"type": "string"}, "org_number": {"type": "string"}}}}, "401": {"description": "Unauthorized"}, "409": {"description": "Duplicate organisation number"}, "400": {"description": "Missing organisation ID. \nOrganisation not found in Brreg. \nField validation error."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean", "description": "Tilgjengelig"}, "tilholdssted_address": {"type": "string", "description": "Addresse for organisasjonens tilholdssted"}, "brreg_activity_code": {"type": "string", "description": "Brreg aktivitetskode"}, "email_address": {"type": "string", "description": "Organisasjonens epost-addresse"}, "relevant_tkn": {"type": "boolean", "description": "Relevant for Trondheim kulturnettverk"}, "flod_activity_type": {"type": "string", "description": "Flod aktivitetstype"}, "area": {"type": "string", "description": "Omr\u00e5dekode"}, "business_address": {"type": "string", "description": "Organisasjonens business addresse"}, "url2": {"type": "string", "description": "Url 2"}, "telefax_number": {"type": "string", "description": "Organisasjonens telefaks-nummer"}, "phone_number": {"type": "string", "description": "Organisasjonens telefonnummer"}, "description": {"type": "string", "description": "Beskrivelse av organisasjonen"}, "postal_address": {"type": "string", "description": "Organisasjonens postaddresse"}, "recruitment_area": {"type": "integer", "description": "Rekruteringsomr\u00e5de"}, "registered_tkn": {"type": "string", "description": "Registrert i Trondheim kulturnettverk"}, "ord_number": {"type": "string", "description": "Organisasjonsnummer"}, "is_public": {"type": "boolean", "description": "Kan info om organisasjonen vises public?"}, "num_members_b20": {"type": "integer", "description": "Antall medlemmer under 20 \u00e5r"}, "ord_id": {"type": "integer"}, "num_members": {"type": "integer", "description": "Totalt antall medlemmer"}, "is_deleted": {"type": "boolean", "description": "Er organisasjonen slettet?"}, "name": {"type": "string", "description": "Organisasjonsnavn"}, "local_email_address": {"type": "string", "description": "Lokal epost-addresse"}, "url": {"type": "string", "description": "Url til akt\u00f8rsiden for organisasjonen"}, "multicultural": {"type": "boolean", "description": "Multikulturell"}, "update_brreg": {"type": "boolean", "description": "Skal brreg oppdateres?"}}}}], "summary": "Update an organisation."}, "post": {"description": "Oppretter en organisasjon.", "tags": ["Organisasjon"], "responses": {"201": {"description": "Created organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}, "relevant_tkn": {"type": "boolean"}, "area": {"type": "integer"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "phone_number": {"type": "string"}, "description": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "recruitment_area": {"type": "integer"}, "registered_tkn": {"type": "boolean"}, "org_form": {"type": "string"}, "telefax_number": {"type": "string"}, "is_public": {"type": "boolean"}, "num_members_b20": {"type": "integer"}, "num_members": {"type": "integer"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "local_email_address": {"type": "string", "format": "email"}, "url": {"type": "string"}, "multicultural": {"type": "boolean"}, "uri": {"type": "string"}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "account_number": {"type": "string"}, "org_number": {"type": "string"}}}}, "401": {"description": "Unauthorized."}, "400": {"description": "Constraint violation."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "telefax_number": {"type": "string"}, "org_form": {"type": "string"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "area": {"type": "integer"}, "url": {"type": "string"}, "recruitment_area": {"type": "integer"}, "uri": {"type": "string"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "num_members": {"type": "integer"}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "num_members_b20": {"type": "integer"}, "org_number": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}}], "summary": "Create an organisation."}, "delete": {"description": "Sletter en organisasjon. Denne funksjonaliteten er diabled fordi den ikke sjekker om organisasjonen brukes i tilskuddsbasen.", "tags": ["Organisasjon"], "responses": {"404": {"description": "Oranisation does not exist."}, "204": {"description": "Organisation deleted"}, "401": {"description": "Unauthorized."}, "400": {"description": "Missing organisation ID."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}], "summary": "Delete an organisation.
Delete an organisation."}, "get": {"description": "Returnerer en eller flere organisasjoner.", "tags": ["Organisasjon"], "responses": {"200": {"description": "Hentet organisasjon(er)", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "telefax_number": {"type": "string"}, "org_form": {"type": "string"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "area": {"type": "integer"}, "url": {"type": "string"}, "recruitment_area": {"type": "integer"}, "uri": {"type": "string"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "num_members": {"type": "integer"}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "num_members_b20": {"type": "integer"}, "org_number": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}}, "400": {"description": "Unauthorized or organisation not found."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Filter organisations by id", "type": "integer", "name": "org_id", "in": "query"}, {"description": "Filter organisations by name", "type": "string", "name": "name", "in": "query"}, {"description": "If True, include deleted organisations in response", "type": "boolean", "name": "show_deleted", "in": "query"}, {"description": "If True, included persons (members) in response", "type": "boolean", "name": "include_persons", "in": "query"}, {"description": "Filter organisations by org number", "type": "string", "name": "org_number", "in": "query"}, {"description": "Filter organisations by Brreg activity code", "type": "string", "name": "brreg_activity_code", "in": "query"}, {"description": "Filter organisation by Flod activity type", "type": "string", "name": "flod_activity_code", "in": "query"}, {"description": "Filter organisations by whether they are active or not", "type": "boolean", "name": "active", "in": "query"}, {"description": "Filter organisations by recruitment area", "type": "integer", "name": "recruitment_area", "in": "query"}, {"description": "Filter based on free text search term", "type": "string", "name": "search_term", "in": "query"}, {"items": {"type": "integer"}, "description": "Hent en liste med organisasjoner ut fra en liste med org IDer", "type": "array", "name": "organisation_ids", "in": "query"}], "summary": "Get organisation(s)."}}, "/api/v1/organisations/{org_id}": {"put": {"description": "Oppdaterer en organisasjon.", "tags": ["Organisasjon"], "responses": {"200": {"description": "Updated organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}, "relevant_tkn": {"type": "boolean"}, "area": {"type": "integer"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "phone_number": {"type": "string"}, "description": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "recruitment_area": {"type": "integer"}, "registered_tkn": {"type": "boolean"}, "org_form": {"type": "string"}, "telefax_number": {"type": "string"}, "is_public": {"type": "boolean"}, "num_members_b20": {"type": "integer"}, "num_members": {"type": "integer"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "local_email_address": {"type": "string", "format": "email"}, "url": {"type": "string"}, "multicultural": {"type": "boolean"}, "uri": {"type": "string"}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "account_number": {"type": "string"}, "org_number": {"type": "string"}}}}, "401": {"description": "Unauthorized"}, "409": {"description": "Duplicate organisation number"}, "400": {"description": "Missing organisation ID. \nOrganisation not found in Brreg. \nField validation error."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean", "description": "Tilgjengelig"}, "tilholdssted_address": {"type": "string", "description": "Addresse for organisasjonens tilholdssted"}, "brreg_activity_code": {"type": "string", "description": "Brreg aktivitetskode"}, "email_address": {"type": "string", "description": "Organisasjonens epost-addresse"}, "relevant_tkn": {"type": "boolean", "description": "Relevant for Trondheim kulturnettverk"}, "flod_activity_type": {"type": "string", "description": "Flod aktivitetstype"}, "area": {"type": "string", "description": "Omr\u00e5dekode"}, "business_address": {"type": "string", "description": "Organisasjonens business addresse"}, "url2": {"type": "string", "description": "Url 2"}, "telefax_number": {"type": "string", "description": "Organisasjonens telefaks-nummer"}, "phone_number": {"type": "string", "description": "Organisasjonens telefonnummer"}, "description": {"type": "string", "description": "Beskrivelse av organisasjonen"}, "postal_address": {"type": "string", "description": "Organisasjonens postaddresse"}, "recruitment_area": {"type": "integer", "description": "Rekruteringsomr\u00e5de"}, "registered_tkn": {"type": "string", "description": "Registrert i Trondheim kulturnettverk"}, "ord_number": {"type": "string", "description": "Organisasjonsnummer"}, "is_public": {"type": "boolean", "description": "Kan info om organisasjonen vises public?"}, "num_members_b20": {"type": "integer", "description": "Antall medlemmer under 20 \u00e5r"}, "ord_id": {"type": "integer"}, "num_members": {"type": "integer", "description": "Totalt antall medlemmer"}, "is_deleted": {"type": "boolean", "description": "Er organisasjonen slettet?"}, "name": {"type": "string", "description": "Organisasjonsnavn"}, "local_email_address": {"type": "string", "description": "Lokal epost-addresse"}, "url": {"type": "string", "description": "Url til akt\u00f8rsiden for organisasjonen"}, "multicultural": {"type": "boolean", "description": "Multikulturell"}, "update_brreg": {"type": "boolean", "description": "Skal brreg oppdateres?"}}}}], "summary": "Update an organisation."}, "post": {"description": "Oppretter en organisasjon.", "tags": ["Organisasjon"], "responses": {"201": {"description": "Created organisation", "schema": {"type": "object", "properties": {"accessible": {"type": "boolean"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}, "relevant_tkn": {"type": "boolean"}, "area": {"type": "integer"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "phone_number": {"type": "string"}, "description": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "recruitment_area": {"type": "integer"}, "registered_tkn": {"type": "boolean"}, "org_form": {"type": "string"}, "telefax_number": {"type": "string"}, "is_public": {"type": "boolean"}, "num_members_b20": {"type": "integer"}, "num_members": {"type": "integer"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "local_email_address": {"type": "string", "format": "email"}, "url": {"type": "string"}, "multicultural": {"type": "boolean"}, "uri": {"type": "string"}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "account_number": {"type": "string"}, "org_number": {"type": "string"}}}}, "401": {"description": "Unauthorized."}, "400": {"description": "Constraint violation."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "telefax_number": {"type": "string"}, "org_form": {"type": "string"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "area": {"type": "integer"}, "url": {"type": "string"}, "recruitment_area": {"type": "integer"}, "uri": {"type": "string"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "num_members": {"type": "integer"}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "num_members_b20": {"type": "integer"}, "org_number": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}}], "summary": "Create an organisation."}, "delete": {"description": "Sletter en organisasjon. Denne funksjonaliteten er diabled fordi den ikke sjekker om organisasjonen brukes i tilskuddsbasen.", "tags": ["Organisasjon"], "responses": {"404": {"description": "Oranisation does not exist."}, "204": {"description": "Organisation deleted"}, "401": {"description": "Unauthorized."}, "400": {"description": "Missing organisation ID."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}], "summary": "Delete an organisation.
Delete an organisation."}, "get": {"description": "Returnerer en eller flere organisasjoner.", "tags": ["Organisasjon"], "responses": {"200": {"description": "Hentet organisasjon(er)", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "telefax_number": {"type": "string"}, "org_form": {"type": "string"}, "is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "postal_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "area": {"type": "integer"}, "url": {"type": "string"}, "recruitment_area": {"type": "integer"}, "uri": {"type": "string"}, "business_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "tilholdssted_address": {"type": "object", "properties": {"postal_code": {"type": "string"}, "id": {"type": "integer"}, "postal_city": {"type": "string"}, "addresss_line": {"type": "string"}}}, "num_members": {"type": "integer"}, "is_registered": {"type": "boolean"}, "url2": {"type": "string"}, "brreg_activity_codes": {"items": {"type": "object", "properties": {"flod_activity_types": {"items": {"type": "object", "properties": {"brreg_activity_code_id": {"type": "integer"}, "id": {"type": "integer"}, "name": {"type": "string"}}}, "type": "array"}, "code": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}, "type": "array"}, "num_members_b20": {"type": "integer"}, "org_number": {"type": "string"}, "id": {"type": "integer"}, "description": {"type": "string"}}}}, "400": {"description": "Unauthorized or organisation not found."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Filter organisations by id", "type": "integer", "name": "org_id", "in": "query"}, {"description": "Filter organisations by name", "type": "string", "name": "name", "in": "query"}, {"description": "If True, include deleted organisations in response", "type": "boolean", "name": "show_deleted", "in": "query"}, {"description": "If True, included persons (members) in response", "type": "boolean", "name": "include_persons", "in": "query"}, {"description": "Filter organisations by org number", "type": "string", "name": "org_number", "in": "query"}, {"description": "Filter organisations by Brreg activity code", "type": "string", "name": "brreg_activity_code", "in": "query"}, {"description": "Filter organisation by Flod activity type", "type": "string", "name": "flod_activity_code", "in": "query"}, {"description": "Filter organisations by whether they are active or not", "type": "boolean", "name": "active", "in": "query"}, {"description": "Filter organisations by recruitment area", "type": "integer", "name": "recruitment_area", "in": "query"}, {"description": "Filter based on free text search term", "type": "string", "name": "search_term", "in": "query"}, {"items": {"type": "integer"}, "description": "Hent en liste med organisasjoner ut fra en liste med org IDer", "type": "array", "name": "organisation_ids", "in": "query"}], "summary": "Get organisation(s)."}}, "/api/v1/organisations/{org_id}/persons/": {"post": {"description": "Oppretter en ny person knyttet til en paraply-organisasjon.", "tags": ["Organisasjon"], "responses": {"201": {"description": "Person created", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "403": {"description": "User does not have permission to edit organisation."}, "401": {"description": "Unauthorized. Bare admin kan opprette nye brukere knyttet til paraply-organisasjoner."}, "409": {"description": "Person is already a member."}, "400": {"description": "Invalid national identity number."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "National identity number", "in": "body", "name": "nin", "schema": {"type": "object", "properties": {"national_identity_number": {"type": "string"}}}}], "summary": "Create a new member (person) of an umbrella organisation."}, "delete": {"description": "Sletter en person knyttet til en paraply-organisasjon.", "tags": ["Organisasjon"], "responses": {"401": {"description": "Unauthorized. Bare admin kan opprette nye brukere knyttet til paraply-organisasjoner."}, "404": {"description": "Missing person ID."}, "403": {"description": "Attempt to delete person imported from Brreg."}, "204": {"description": "Person deleted"}, "409": {"description": "Person is not associated with umbrella organisation."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Person id", "in": "body", "name": "person_id", "schema": {"type": "object", "properties": {"id": {"type": "integer", "description": "Person id"}}}}], "summary": "Delete a member (person) of an organisation."}, "get": {"description": "Returnerer alle personer som er knyttet til en organisasjon.", "tags": ["Organisasjon"], "responses": {"404": {"description": "Person does not exist."}, "200.1": {"description": "Fetched persons", "schema": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}}, "401": {"description": "Unauthorized. Bare admin kan hente andre brukeres organisasjoner."}, "200.2": {"description": "Fetched persons. User is admin or owner.", "schema": {"items": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}, "type": "array"}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get members (persons) of an organisation."}}, "/api/v1/organisations/{org_id}/persons/{person_id}": {"post": {"description": "Oppretter en ny person knyttet til en paraply-organisasjon.", "tags": ["Organisasjon"], "responses": {"201": {"description": "Person created", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "403": {"description": "User does not have permission to edit organisation."}, "401": {"description": "Unauthorized. Bare admin kan opprette nye brukere knyttet til paraply-organisasjoner."}, "409": {"description": "Person is already a member."}, "400": {"description": "Invalid national identity number."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "National identity number", "in": "body", "name": "nin", "schema": {"type": "object", "properties": {"national_identity_number": {"type": "string"}}}}], "summary": "Create a new member (person) of an umbrella organisation."}, "delete": {"description": "Sletter en person knyttet til en paraply-organisasjon.", "tags": ["Organisasjon"], "responses": {"401": {"description": "Unauthorized. Bare admin kan opprette nye brukere knyttet til paraply-organisasjoner."}, "404": {"description": "Missing person ID."}, "403": {"description": "Attempt to delete person imported from Brreg."}, "204": {"description": "Person deleted"}, "409": {"description": "Person is not associated with umbrella organisation."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Person id", "in": "body", "name": "person_id", "schema": {"type": "object", "properties": {"id": {"type": "integer", "description": "Person id"}}}}], "summary": "Delete a member (person) of an organisation."}, "get": {"description": "Returnerer alle personer som er knyttet til en organisasjon.", "tags": ["Organisasjon"], "responses": {"404": {"description": "Person does not exist."}, "200.1": {"description": "Fetched persons", "schema": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}}, "401": {"description": "Unauthorized. Bare admin kan hente andre brukeres organisasjoner."}, "200.2": {"description": "Fetched persons. User is admin or owner.", "schema": {"items": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}, "type": "array"}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get members (persons) of an organisation."}}, "/api/v1/organisations/{organisation_id}/notes/": {"post": {"description": "Oppretter internnotat.", "tags": ["Organisasjon internnotater"], "responses": {"201": {"description": "Created note.", "schema": {"type": "object", "properties": {"auth_id": {"type": "string"}, "organisation_id": {"type": "integer"}, "create_time": {"type": "string", "format": "date-time"}, "id": {"type": "integer"}, "text": {"type": "string"}}}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}, {"description": "Note", "in": "body", "name": "note", "schema": {"type": "object", "properties": {"text": {"type": "string"}}}}], "summary": "Create a new note."}, "delete": {"description": "Sletter internnotat.", "tags": ["Organisasjon internnotater"], "responses": {"204": {"description": "Deleted note."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}], "summary": "Delete note."}, "get": {"description": "Henter organisasjons internnotater.", "tags": ["Organisasjon internnotater"], "responses": {"200": {"description": "Fetched notes.", "schema": {"type": "object", "properties": {"auth_id": {"type": "string"}, "organisation_id": {"type": "integer"}, "create_time": {"type": "string", "format": "date-time"}, "id": {"type": "integer"}, "text": {"type": "string"}}}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}], "summary": "Get notes belonging to organisation."}}, "/api/v1/organisations/{organisation_id}/notes/{note_id}": {"post": {"description": "Oppretter internnotat.", "tags": ["Organisasjon internnotater"], "responses": {"201": {"description": "Created note.", "schema": {"type": "object", "properties": {"auth_id": {"type": "string"}, "organisation_id": {"type": "integer"}, "create_time": {"type": "string", "format": "date-time"}, "id": {"type": "integer"}, "text": {"type": "string"}}}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}, {"description": "Note", "in": "body", "name": "note", "schema": {"type": "object", "properties": {"text": {"type": "string"}}}}], "summary": "Create a new note."}, "delete": {"description": "Sletter internnotat.", "tags": ["Organisasjon internnotater"], "responses": {"204": {"description": "Deleted note."}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}], "summary": "Delete note."}, "get": {"description": "Henter organisasjons internnotater.", "tags": ["Organisasjon internnotater"], "responses": {"200": {"description": "Fetched notes.", "schema": {"type": "object", "properties": {"auth_id": {"type": "string"}, "organisation_id": {"type": "integer"}, "create_time": {"type": "string", "format": "date-time"}, "id": {"type": "integer"}, "text": {"type": "string"}}}}}, "parameters": [{"description": "Organisasjon id", "required": true, "type": "integer", "name": "organisation_id", "in": "path"}, {"description": "Note id", "required": true, "type": "integer", "name": "note_id", "in": "path"}], "summary": "Get notes belonging to organisation."}}, "/api/v1/persons/": {"put": {"description": "Oppdaterer en person.", "tags": ["Person"], "responses": {"200": {"description": "Person updated", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "404": {"description": "Person not found"}, "401": {"description": "Unauthorized"}, "400": {"description": "Invalid phone number. \nInvalid or duplicate email address."}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "email_address": {"type": "string"}}}}], "summary": "Update an existing person."}, "post": {"description": "Oppretter en ny person.", "tags": ["Person"], "responses": {"201": {"description": "Person created", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized"}, "400": {"description": "Missing national identity number in request. \nPerson with national security number already exists."}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "National identity number", "in": "body", "name": "nin", "schema": {"type": "object", "properties": {"national_identity_number": {"type": "string"}}}}], "summary": "Create a new person."}, "get": {"description": "Returnerer en person.", "tags": ["Person"], "responses": {"404": {"description": "Person does not exist."}, "200.1": {"description": "Fetched person", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. Bare admin kan hente andre brukere enn seg selv."}, "200.2": {"description": "Fetched person. User is admin.", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_city": {"type": "string"}, "national_identity_number": {"type": "string"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get person given a person ID."}}, "/api/v1/persons/{person_id}": {"put": {"description": "Oppdaterer en person.", "tags": ["Person"], "responses": {"200": {"description": "Person updated", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "404": {"description": "Person not found"}, "401": {"description": "Unauthorized"}, "400": {"description": "Invalid phone number. \nInvalid or duplicate email address."}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Organisasjon", "in": "body", "name": "organisation", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "email_address": {"type": "string"}}}}], "summary": "Update an existing person."}, "post": {"description": "Oppretter en ny person.", "tags": ["Person"], "responses": {"201": {"description": "Person created", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized"}, "400": {"description": "Missing national identity number in request. \nPerson with national security number already exists."}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "National identity number", "in": "body", "name": "nin", "schema": {"type": "object", "properties": {"national_identity_number": {"type": "string"}}}}], "summary": "Create a new person."}, "get": {"description": "Returnerer en person.", "tags": ["Person"], "responses": {"404": {"description": "Person does not exist."}, "200.1": {"description": "Fetched person", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. Bare admin kan hente andre brukere enn seg selv."}, "200.2": {"description": "Fetched person. User is admin.", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_city": {"type": "string"}, "national_identity_number": {"type": "string"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get person given a person ID."}}, "/api/v1/persons/{person_id}/organisations/": {"get": {"description": "Returnerer alle organisasjoner som er knyttet til en person.", "tags": ["Person"], "responses": {"200": {"description": "Fetched organisations", "schema": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}}, "404": {"description": "Person does not exist."}, "401": {"description": "Unauthorized. Bare admin kan hente andre brukeres organisasjoner."}}, "parameters": [{"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get all organisations attached to a person."}}, "/api/v1/umbrella_organisations/": {"put": {"description": "Oppdaterer paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing ID. \nUmbrella organisation does not exist. \nDuplicate umbrella organisation name. \nInvalid umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "New name of umbrella organisation", "in": "body", "name": "new_name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "New name of umbrella organisation"}}}}], "summary": "Update an umbrella organisation."}, "post": {"description": "Oppretter en ny paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"201": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Duplicate umbrella organisation name. \nMissing umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "Name of new umbrella organisation", "in": "body", "name": "name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "Name of new umbrella organisation"}}}}], "summary": "Create an umbrella organisation."}, "delete": {"description": "Sletter paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"204": {"description": "Deleted umbrella organisation"}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing umbrella organisation ID. \nUmbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}], "summary": "Delete an umbrella organisation."}, "get": {"description": "Returnerer alle paraplyorganisasjoner, eller p\u00e5 ID/navn.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "Fetched umbrella organisations", "schema": {"items": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}, "type": "array"}}, "404": {"description": "Umbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "If true, include deleted organisations in response", "type": "boolean", "name": "show_deleted", "in": "query"}, {"description": "Only return organisations where person is member", "type": "integer", "name": "person_id", "in": "query"}], "summary": "Get all umbrella organisations or by ID/name."}}, "/api/v1/umbrella_organisations/{umb_org_id}": {"put": {"description": "Oppdaterer paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing ID. \nUmbrella organisation does not exist. \nDuplicate umbrella organisation name. \nInvalid umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "New name of umbrella organisation", "in": "body", "name": "new_name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "New name of umbrella organisation"}}}}], "summary": "Update an umbrella organisation."}, "post": {"description": "Oppretter en ny paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"201": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Duplicate umbrella organisation name. \nMissing umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "Name of new umbrella organisation", "in": "body", "name": "name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "Name of new umbrella organisation"}}}}], "summary": "Create an umbrella organisation."}, "delete": {"description": "Sletter paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"204": {"description": "Deleted umbrella organisation"}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing umbrella organisation ID. \nUmbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}], "summary": "Delete an umbrella organisation."}, "get": {"description": "Returnerer alle paraplyorganisasjoner, eller p\u00e5 ID/navn.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "Fetched umbrella organisations", "schema": {"items": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}, "type": "array"}}, "404": {"description": "Umbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "If true, include deleted organisations in response", "type": "boolean", "name": "show_deleted", "in": "query"}, {"description": "Only return organisations where person is member", "type": "integer", "name": "person_id", "in": "query"}], "summary": "Get all umbrella organisations or by ID/name."}}, "/api/v1/umbrella_organisations/{umb_org_id}/persons/": {"post": {"description": "Oppretter nytt medlem (person) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"201": {"description": "Created new member of umbrella organisation", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "409": {"description": "Person is already a member."}, "401": {"description": "Unauthorized."}, "400": {"description": "Invalid national identity number."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "New umbrella organisation member", "in": "body", "name": "umbrella_organisation_member", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "nin": {"type": "string", "description": "National security number of new member"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "email_address": {"type": "string"}}}}], "summary": "Create a new member (person) of an umbrella organisation."}, "delete": {"description": "Sletter et medlem (person) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"404": {"description": "Missing person ID. \nPerson is not associated with umbrella organisation."}, "204": {"description": "Deleted member of umbrella organisation"}, "401": {"description": "Unauthorized."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Person id", "in": "body", "name": "id", "schema": {"type": "object", "properties": {"id": {"type": "integer", "description": "Person id"}}}}], "summary": "Delete a member (person) of an umbrella organisation."}, "get": {"description": "Returnerer alle medlemmer (personer) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"200": {"description": "Fetched members of umbrella organisation", "schema": {"items": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}, "type": "array"}}, "401": {"description": "Unauthorized."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get members (persons) of an umbrella organisation."}}, "/api/v1/umbrella_organisations/{umb_org_id}/persons/{person_id}": {"post": {"description": "Oppretter nytt medlem (person) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"201": {"description": "Created new member of umbrella organisation", "schema": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}}, "409": {"description": "Person is already a member."}, "401": {"description": "Unauthorized."}, "400": {"description": "Invalid national identity number."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "New umbrella organisation member", "in": "body", "name": "umbrella_organisation_member", "schema": {"type": "object", "properties": {"phone_number": {"type": "string"}, "nin": {"type": "string", "description": "National security number of new member"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "email_address": {"type": "string"}}}}], "summary": "Create a new member (person) of an umbrella organisation."}, "delete": {"description": "Sletter et medlem (person) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"404": {"description": "Missing person ID. \nPerson is not associated with umbrella organisation."}, "204": {"description": "Deleted member of umbrella organisation"}, "401": {"description": "Unauthorized."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}, {"description": "Person id", "in": "body", "name": "id", "schema": {"type": "object", "properties": {"id": {"type": "integer", "description": "Person id"}}}}], "summary": "Delete a member (person) of an umbrella organisation."}, "get": {"description": "Returnerer alle medlemmer (personer) av paraplyorganisasjon.", "tags": ["Paraply-organisasjon-personer"], "responses": {"200": {"description": "Fetched members of umbrella organisation", "schema": {"items": {"type": "object", "properties": {"status": {"type": "string", "format": "person_status_enums"}, "phone_number": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "postal_city": {"type": "string"}, "roles": {"items": {"type": "object", "properties": {"role": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "postal_code": {"type": "string"}, "address_line": {"type": "string"}, "email_address": {"type": "string", "format": "email"}, "id": {"type": "integer"}}}, "type": "array"}}, "401": {"description": "Unauthorized."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Person id", "required": true, "type": "integer", "name": "person_id", "in": "path"}], "summary": "Get members (persons) of an umbrella organisation."}}, "/api/v1/umbrella_organisations/{umb_org_name}": {"put": {"description": "Oppdaterer paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing ID. \nUmbrella organisation does not exist. \nDuplicate umbrella organisation name. \nInvalid umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "New name of umbrella organisation", "in": "body", "name": "new_name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "New name of umbrella organisation"}}}}], "summary": "Update an umbrella organisation."}, "post": {"description": "Oppretter en ny paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"201": {"description": "New umbrella organisation created", "schema": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Duplicate umbrella organisation name. \nMissing umbrella organisation name."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "Name of new umbrella organisation", "in": "body", "name": "name", "schema": {"type": "object", "properties": {"name": {"type": "string", "description": "Name of new umbrella organisation"}}}}], "summary": "Create an umbrella organisation."}, "delete": {"description": "Sletter paraplyorganisasjon.", "tags": ["Paraply-organisasjon"], "responses": {"204": {"description": "Deleted umbrella organisation"}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing umbrella organisation ID. \nUmbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}], "summary": "Delete an umbrella organisation."}, "get": {"description": "Returnerer alle paraplyorganisasjoner, eller p\u00e5 ID/navn.", "tags": ["Paraply-organisasjon"], "responses": {"200": {"description": "Fetched umbrella organisations", "schema": {"items": {"type": "object", "properties": {"is_deleted": {"type": "boolean"}, "name": {"type": "string"}, "organisations": {"items": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}, "uri": {"type": "string"}, "persons": {"items": {"type": "object", "properties": {"first_name": {"type": "string"}, "last_name": {"type": "string"}, "id": {"type": "integer"}, "uri": {"type": "string"}}}, "type": "array"}, "id": {"type": "integer"}}}, "type": "array"}}, "404": {"description": "Umbrella organisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umb_org_id", "in": "path"}, {"description": "Umbrealla organisation name", "required": true, "type": "integer", "name": "umb_org_name", "in": "path"}, {"description": "If true, include deleted organisations in response", "type": "boolean", "name": "show_deleted", "in": "query"}, {"description": "Only return organisations where person is member", "type": "integer", "name": "person_id", "in": "query"}], "summary": "Get all umbrella organisations or by ID/name."}}, "/api/v1/umbrella_organisations/{umbrella_organisation_id}/organisations/": {"post": {"description": "Oppretter ny medlemsorganisasjon av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"200": {"description": "Created member organisation of umbrella organisation", "schema": {"type": "object", "properties": {"organisation_id": {"type": "integer"}, "organisation": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "umbrella_organisation_id": {"type": "string"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing umbrella organisation ID. \nUmbrella organisation does not exist. \nMissing organisation ID. \nOrganisation does not exist. \nConstraint violation."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}, {"description": "New member organisation id", "in": "body", "name": "organisation_id", "schema": {"type": "object", "properties": {"organisation_id": {"type": "integer"}}}}], "summary": "Create a new member organisation of an umbrella organisation."}, "delete": {"description": "Sletter medlemsorganisasjon av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"204": {"description": "Deleted member organisation of umbrella organisation"}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing organisation ID. \nOrganisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}], "summary": "Delete a member organisation of an umbrella organisation."}, "get": {"description": "Returnerer alle medlemsorganisasjoner av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"200": {"description": "Fetched member organisations of umbrella organisations", "schema": {"items": {"type": "object", "properties": {"organisation_id": {"type": "integer"}, "organisation": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "umbrella_organisation_id": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}}, "400": {"description": "Missing umbrella organisation ID. \nNo member organisations found."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}], "summary": "Get member organisations of an umbrella organisation."}}, "/api/v1/umbrella_organisations/{umbrella_organisation_id}/organisations/{association_id}": {"post": {"description": "Oppretter ny medlemsorganisasjon av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"200": {"description": "Created member organisation of umbrella organisation", "schema": {"type": "object", "properties": {"organisation_id": {"type": "integer"}, "organisation": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "umbrella_organisation_id": {"type": "string"}, "id": {"type": "integer"}}}}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing umbrella organisation ID. \nUmbrella organisation does not exist. \nMissing organisation ID. \nOrganisation does not exist. \nConstraint violation."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}, {"description": "New member organisation id", "in": "body", "name": "organisation_id", "schema": {"type": "object", "properties": {"organisation_id": {"type": "integer"}}}}], "summary": "Create a new member organisation of an umbrella organisation."}, "delete": {"description": "Sletter medlemsorganisasjon av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"204": {"description": "Deleted member organisation of umbrella organisation"}, "401": {"description": "Unauthorized. User must be admin."}, "400": {"description": "Missing organisation ID. \nOrganisation does not exist."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}], "summary": "Delete a member organisation of an umbrella organisation."}, "get": {"description": "Returnerer alle medlemsorganisasjoner av paraplyorganisasjon.", "tags": ["Paraply-medlem-organisasjon"], "responses": {"200": {"description": "Fetched member organisations of umbrella organisations", "schema": {"items": {"type": "object", "properties": {"organisation_id": {"type": "integer"}, "organisation": {"type": "object", "properties": {"org_number": {"type": "string"}, "uri": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "integer"}}}, "umbrella_organisation_id": {"type": "string"}, "id": {"type": "integer"}}}, "type": "array"}}, "400": {"description": "Missing umbrella organisation ID. \nNo member organisations found."}}, "parameters": [{"description": "Umbrella organisation id", "required": true, "type": "integer", "name": "umbrella_organisation_id", "in": "path"}, {"description": "Association id", "required": true, "type": "integer", "name": "association_id", "in": "path"}], "summary": "Get member organisations of an umbrella organisation."}}}, "swagger": "2.0"}