{ "openapi": "3.1.0", "info": { "title": "abacus", "description": "", "license": { "name": "EUPL-1.2", "identifier": "EUPL-1.2" }, "version": "1.3.0" }, "paths": { "/api/account": { "get": { "tags": [ "public" ], "summary": "Get current logged-in user endpoint", "operationId": "account", "responses": { "200": { "description": "The current user name and id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "401": { "description": "Invalid user session", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "summary": "Update the user's account with a new password and optionally new fullname (administrator, coordinator_gsb, coordinator_csb, typist_gsb, typist_csb)", "operationId": "account_update", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "The logged in user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid fullname", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "coordinator_csb", "typist_gsb", "typist_csb" ] } ] } }, "/api/backup": { "post": { "summary": "administrator, coordinator_csb, coordinator_gsb", "operationId": "create_backup", "responses": { "201": { "description": "Backup created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackupResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Backup already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}": { "delete": { "summary": "Reset the data entry to empty (coordinator_csb, coordinator_gsb)", "operationId": "data_entry_reset", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } } ], "responses": { "204": { "description": "Data entries deleted successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/get": { "get": { "summary": "Get data entry with validation results (coordinator_csb, coordinator_gsb)", "operationId": "data_entry_get", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } } ], "responses": { "200": { "description": "Data entry with validation results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntryGetResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Data entry not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/resolve_differences": { "get": { "summary": "Get data entry differences to be resolved (coordinator_csb, coordinator_gsb)", "operationId": "data_entry_get_differences", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } } ], "responses": { "200": { "description": "Data entry differences to be resolved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntryGetDifferencesResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "No data entry with differences found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] }, "post": { "summary": "Resolve data entry differences by providing a `ResolveDifferencesAction` (coordinator_csb, coordinator_gsb)", "operationId": "data_entry_resolve_differences", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveDifferencesAction" } } }, "required": true }, "responses": { "200": { "description": "Differences resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntryStatusResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "JSON error or invalid data (Unprocessable Content)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/resolve_errors": { "post": { "summary": "Resolve accepted data entry errors by providing a `ResolveErrorsAction` (coordinator_csb, coordinator_gsb)", "operationId": "data_entry_resolve_errors", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveErrorsAction" } } }, "required": true }, "responses": { "200": { "description": "Errors resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntryStatusResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "JSON error or invalid data (Unprocessable Content)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/{entry_number}": { "post": { "summary": "Save a data entry (typist_csb, typist_gsb)", "operationId": "data_entry_save", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } }, { "name": "entry_number", "in": "path", "description": "Data entry number (first or second data entry)", "required": true, "schema": { "type": "integer", "format": "int32", "minimum": 0 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntry" } } }, "required": true }, "responses": { "200": { "description": "Data entry saved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveDataEntryResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "JSON error or invalid data (Unprocessable Content)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "typist_csb", "typist_gsb" ] } ] }, "delete": { "summary": "Discard an in-progress data entry or a correction. Discarding a\ncorrection finalises the other entry as the first entry. (typist_csb, typist_gsb)", "operationId": "data_entry_discard", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } }, { "name": "entry_number", "in": "path", "description": "Data entry number (first or second data entry)", "required": true, "schema": { "type": "integer", "format": "int32", "minimum": 0 } } ], "responses": { "204": { "description": "Data entry discarded successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "typist_csb", "typist_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/{entry_number}/claim": { "post": { "summary": "Claim a data entry, returning any existing progress (typist_csb, typist_gsb)", "operationId": "data_entry_claim", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } }, { "name": "entry_number", "in": "path", "description": "Data entry number (first or second data entry)", "required": true, "schema": { "type": "integer", "format": "int32", "minimum": 0 } } ], "responses": { "200": { "description": "Data entry claimed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimDataEntryResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "typist_csb", "typist_gsb" ] } ] } }, "/api/data_entries/{data_entry_id}/{entry_number}/finalise": { "post": { "summary": "Finalise the data entry (typist_csb, typist_gsb)", "operationId": "data_entry_finalise", "parameters": [ { "name": "data_entry_id", "in": "path", "description": "Data entry database id", "required": true, "schema": { "$ref": "#/components/schemas/DataEntryId" } }, { "name": "entry_number", "in": "path", "description": "Data entry number (first or second data entry)", "required": true, "schema": { "type": "integer", "format": "int32", "minimum": 0 } } ], "responses": { "200": { "description": "Data entry finalised successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataEntryStatusResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "JSON error or invalid data (Unprocessable Content)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "typist_csb", "typist_gsb" ] } ] } }, "/api/elections": { "get": { "summary": "Get a list of all elections, without their candidate lists and\na list of the current committee session for each election (administrator, coordinator_gsb, coordinator_csb, typist_gsb, typist_csb)", "operationId": "election_list", "responses": { "200": { "description": "Election list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionListResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "coordinator_csb", "typist_gsb", "typist_csb" ] } ] } }, "/api/elections/import": { "post": { "summary": "Uploads election definition, validates it, saves it to the database, and returns the created election (administrator)", "operationId": "election_import", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionCreationRequest" } } }, "required": true }, "responses": { "201": { "description": "Election imported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionWithPoliticalGroups" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/import/validate": { "post": { "summary": "Uploads election definition, validates it and returns the associated election data and\na redacted hash, to be filled by the administrator. (administrator)", "operationId": "election_import_validate", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionCreationValidateRequest" } } }, "required": true }, "responses": { "200": { "description": "Election validated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionDefinitionValidateResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}": { "get": { "summary": "Get election details including the election's candidate list (political groups),\nits polling stations and the current committee session and its investigations (administrator, coordinator_gsb, coordinator_csb, typist_gsb, typist_csb)", "operationId": "election_details", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionDetailsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "coordinator_csb", "typist_gsb", "typist_csb" ] } ] } }, "/api/elections/{election_id}/apportionment": { "post": { "summary": "Get the apportionment for an election (coordinator_csb)", "operationId": "process_apportionment", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election Apportionment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProcessApportionmentResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "412": { "description": "Election apportionment is not yet available", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Election apportionment is not possible", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/add_candidate_drawn": { "post": { "summary": "Add candidate to drawing lots (coordinator_csb)", "operationId": "add_candidate_drawn", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CandidateDrawn" } } }, "required": true }, "responses": { "200": { "description": "Add candidate to drawing lots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/add_deceased_candidate": { "post": { "summary": "Add deceased candidate (coordinator_csb)", "operationId": "add_deceased_candidate", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeceasedCandidate" } } }, "required": true }, "responses": { "200": { "description": "Added deceased candidate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/add_list_drawn": { "post": { "summary": "Add list to drawing lots (coordinator_csb)", "operationId": "add_list_drawn", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDrawn" } } }, "required": true }, "responses": { "200": { "description": "Add list to drawing lots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/delete_deceased_candidate": { "post": { "summary": "Delete deceased candidate (coordinator_csb)", "operationId": "delete_deceased_candidate", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeceasedCandidate" } } }, "required": true }, "responses": { "200": { "description": "Deleted deceased candidate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/finalise_deceased_candidates": { "post": { "summary": "Finalise deceased candidates (coordinator_csb)", "operationId": "finalise_deceased_candidates", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Finalised deceased candidates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/register_deceased_candidates": { "post": { "summary": "Start registering deceased candidates (coordinator_csb)", "operationId": "register_deceased_candidates", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Started registering deceased candidates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/reset": { "post": { "summary": "Reset apportionment state (coordinator_csb)", "operationId": "reset_apportionment_state", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Reset apportionment state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/skip_deceased_candidates": { "post": { "summary": "Skip registering deceased candidates (coordinator_csb)", "operationId": "skip_deceased_candidates", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Skipped registering deceased candidates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/apportionment/state": { "get": { "summary": "Get the current apportionment state (coordinator_csb)", "operationId": "get_apportionment_state", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Returns apportionment state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApportionmentState" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Invalid state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/certificate": { "get": { "summary": "Download the election certificate (administrator)", "operationId": "certificate", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election certificate", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.crt\"" } }, "content": { "application/x-pem-file": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}/certificate_details": { "get": { "summary": "Get the election certificate details (administrator)", "operationId": "certificate_details", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election certificate details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CertificateDetailsResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}/committee_sessions": { "post": { "summary": "Create a new [CommitteeSession]. (coordinator_gsb)", "operationId": "committee_session_create", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "201": { "description": "Committee session created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommitteeSession" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}": { "put": { "summary": "Update a [CommitteeSession]. (coordinator_csb, coordinator_gsb)", "operationId": "committee_session_update", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommitteeSessionUpdateRequest" } } }, "required": true }, "responses": { "204": { "description": "Committee session updated successfully" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Committee session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] }, "delete": { "summary": "Delete a [CommitteeSession]. (coordinator_gsb)", "operationId": "committee_session_delete", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "204": { "description": "Committee session deleted successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Committee session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/download_zip_attachment_csb": { "get": { "summary": "Download a zip containing a PDF with model P 22-2 Bijlage 1 for CSB (coordinator_csb)", "operationId": "election_download_zip_attachment_csb", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/download_zip_results": { "get": { "summary": "Download a zip containing a PDF for the PV and the EML with GSB election results (coordinator_gsb)", "operationId": "election_download_zip_results_gsb", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/download_zip_results_csb": { "get": { "summary": "Download a zip containing a PDF for the PV and the EML with CSB election results (coordinator_csb)", "operationId": "election_download_zip_results_csb", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/download_zip_total_counts_csb": { "get": { "summary": "Download a zip containing a zip with the EML with CSB total counts (coordinator_csb)", "operationId": "election_download_zip_total_counts_csb", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/investigations": { "get": { "summary": "Get a list of all [crate::domain::investigation::PollingStationInvestigation]s for a committee session (coordinator_gsb)", "operationId": "committee_session_investigations", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "responses": { "200": { "description": "Investigation listing successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvestigationListResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Committee session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/committee_sessions/{committee_session_id}/status": { "put": { "summary": "Change the status of a [CommitteeSession]. (coordinator_csb, coordinator_gsb)", "operationId": "committee_session_status_change", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "committee_session_id", "in": "path", "description": "Committee session database id", "required": true, "schema": { "$ref": "#/components/schemas/CommitteeSessionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommitteeSessionStatusChangeRequest" } } }, "required": true }, "responses": { "204": { "description": "Committee session status changed successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Committee session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/data_entry/import": { "post": { "summary": "Imports uploaded data entry results (coordinator_csb)", "operationId": "election_data_entry_import", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/CSBDataEntryImportRequest" } } }, "required": true }, "responses": { "200": { "description": "Election count imported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CSBDataEntryImportResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "413": { "description": "Payload too large", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Import not possible", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/data_entry/import/validate": { "post": { "summary": "Validates uploaded data entry results (coordinator_csb)", "operationId": "election_data_entry_import_validate", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/CSBDataEntryImportValidateRequest" } } }, "required": true }, "responses": { "200": { "description": "Election count validated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CSBDataEntryImportValidateResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "413": { "description": "Payload too large", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Import not possible", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_csb" ] } ] } }, "/api/elections/{election_id}/dismiss_public_key_upload_reminder": { "put": { "summary": "administrator", "operationId": "dismiss_public_key_upload_reminder", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "204": { "description": "Public key upload reminder dismissed" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}/download_n_10_1": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_n_10_1", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_n_10_1_inlegvel": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_n_10_1_inlegvel", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_n_10_2": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_n_10_2", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_na_14_1_versie1": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_na_14_1_versie1", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_na_31_1_inlegvel": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_na_31_1_inlegvel", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "PDF", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.pdf\"" } }, "content": { "application/pdf": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_na_31_2_bijlage1": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_na_31_2_bijlage1", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "ZIP", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/download_na_31_2_inlegvel": { "get": { "summary": "administrator, coordinator_gsb", "operationId": "election_download_na_31_2_inlegvel", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "PDF", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.pdf\"" } }, "content": { "application/pdf": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/polling_stations": { "get": { "summary": "Get a list of all [PollingStation](crate::domain::polling_station::PollingStation)s for an election (administrator, coordinator_gsb, typist_gsb)", "operationId": "polling_station_list", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Polling station listing successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationListResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "typist_gsb" ] } ] }, "post": { "summary": "Create a new [PollingStation](crate::domain::polling_station::PollingStation) (administrator, coordinator_gsb)", "operationId": "polling_station_create", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationRequest" } } }, "required": true }, "responses": { "201": { "description": "Polling station created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Polling station already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/polling_stations/export": { "get": { "summary": "Export Polling Stations for the requested election (most recent committee session) (administrator, coordinator_gsb)", "operationId": "polling_station_export", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "List of polling stations (EML in ZIP)", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.zip\"" } }, "content": { "application/zip": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/polling_stations/import": { "post": { "summary": "Import file with Polling Stations (administrator, coordinator_gsb)", "operationId": "polling_station_import", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationsRequest" } } }, "required": true }, "responses": { "200": { "description": "Polling stations imported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationListResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/polling_stations/validate-import": { "post": { "summary": "Validate a file with Polling Stations (administrator, coordinator_gsb)", "operationId": "polling_station_validate_import", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationFileRequest" } } }, "required": true }, "responses": { "200": { "description": "Polling stations validated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationValidateImportResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/polling_stations/{polling_station_id}": { "get": { "summary": "Get a [PollingStation](crate::domain::polling_station::PollingStation) (administrator, coordinator_gsb, typist_gsb)", "operationId": "polling_station_get", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "responses": { "200": { "description": "Polling station found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Polling station not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "typist_gsb" ] } ] }, "put": { "summary": "Update a [PollingStation](crate::domain::polling_station::PollingStation) (administrator, coordinator_gsb)", "operationId": "polling_station_update", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationRequest" } } }, "required": true }, "responses": { "200": { "description": "Polling station updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Polling station not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] }, "delete": { "summary": "Delete a [PollingStation](crate::domain::polling_station::PollingStation) (administrator, coordinator_gsb)", "operationId": "polling_station_delete", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "responses": { "204": { "description": "Polling station deleted successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Polling station not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/elections/{election_id}/status": { "get": { "summary": "Get election polling stations data entry statuses (administrator, coordinator_gsb, coordinator_csb, typist_gsb, typist_csb)", "operationId": "election_status", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionStatusResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb", "coordinator_csb", "typist_gsb", "typist_csb" ] } ] } }, "/api/elections/{election_id}/sub_committee_certificates": { "get": { "summary": "Get all the subcommittee certificates for an election (administrator)", "operationId": "sub_committee_certificates", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "responses": { "200": { "description": "Election certificate details", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SubCommittee" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] }, "post": { "summary": "Validate a certificate and add it to the sub committee it belongs to (administrator)", "operationId": "sub_committee_certificate_add", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSubCommitteeCertificateRequest" } } }, "required": true }, "responses": { "201": { "description": "Certificate added", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSubCommitteeCertificateResponse" } } } }, "400": { "description": "Invalid certificate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Public key already added or committee session completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "413": { "description": "Payload too large", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Certificate is for another election or an unknown sub committee", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}/sub_committees/{sub_committee_id}/certificates/{public_key_fingerprint}": { "delete": { "summary": "Delete a sub committee certificate by its public key fingerprint (administrator)", "operationId": "sub_committee_certificate_delete", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } }, { "name": "sub_committee_id", "in": "path", "description": "Sub committee database id", "required": true, "schema": { "$ref": "#/components/schemas/SubCommitteeId" } }, { "name": "public_key_fingerprint", "in": "path", "description": "Lowercase hex SHA-256 of the certificate's SubjectPublicKeyInfo DER, as in the list response", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Certificate deleted" }, "400": { "description": "Invalid path parameter" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election, sub committee or certificate not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Committee session completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator" ] } ] } }, "/api/elections/{election_id}/voters": { "put": { "summary": "Change the number of voters of an [Election]. (administrator, coordinator_gsb)", "operationId": "election_number_of_voters_change", "parameters": [ { "name": "election_id", "in": "path", "description": "Election database id", "required": true, "schema": { "$ref": "#/components/schemas/ElectionId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ElectionNumberOfVotersChangeRequest" } } }, "required": true }, "responses": { "204": { "description": "Election number of voters changed successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Election not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_gsb" ] } ] } }, "/api/generate_test_election": { "post": { "tags": [ "public" ], "operationId": "generate_election_handler", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateElectionArgs" } } }, "required": true }, "responses": { "201": { "description": "Created test election" }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/initialise/admin-exists": { "get": { "tags": [ "public" ], "operationId": "admin_exists", "responses": { "204": { "description": "First admin user exists" }, "403": { "description": "Forbidden, the application is already initialised", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "No admin user exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/initialise/first-admin": { "post": { "tags": [ "public" ], "summary": "Create the first admin user, only allowed if no users exist yet", "operationId": "create_first_admin", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateFirstAdminRequest" } } }, "required": true }, "responses": { "201": { "description": "First admin user created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "403": { "description": "Forbidden, an active user already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Conflict (username already exists)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid username or fullname", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/initialised": { "get": { "tags": [ "public" ], "summary": "Check whether the application is initialised (an admin user exists + has logged in at least once)", "operationId": "initialised", "responses": { "204": { "description": "The application is initialised" }, "418": { "description": "The application is not initialised", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/log": { "get": { "summary": "List audit events (administrator, coordinator_csb, coordinator_gsb)", "operationId": "audit_log_list", "parameters": [ { "name": "page", "in": "query", "description": "Page number, default 1", "required": false, "schema": { "type": "integer", "format": "int32", "minimum": 0 } }, { "name": "per_page", "in": "query", "description": "Number of items per page", "required": false, "schema": { "type": "integer", "format": "int32", "minimum": 0 } }, { "name": "level", "in": "query", "description": "Filter by log level", "required": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "event", "in": "query", "description": "Filter by event type", "required": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "user", "in": "query", "description": "Filter by user ID", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } }, { "name": "since", "in": "query", "description": "Only show events since the specified timestamp", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Audit log event list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditLogListResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/log-users": { "get": { "summary": "Lists all users that appear in the audit log (administrator, coordinator_csb, coordinator_gsb)", "operationId": "audit_log_list_users", "responses": { "200": { "description": "Audit log list of all users", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogUser" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/login": { "post": { "tags": [ "public" ], "summary": "Login endpoint, authenticates a user and creates a new session + session cookie", "operationId": "login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Credentials" } } }, "required": true }, "responses": { "200": { "description": "The logged in user id and user name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Too many login attempts from this source IP, try again later", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/logout": { "post": { "tags": [ "public" ], "summary": "Logout endpoint, deletes the session cookie", "operationId": "logout", "responses": { "204": { "description": "Successful logout, or user was already logged out" }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/polling_stations/{polling_station_id}/investigation": { "put": { "summary": "Update an investigation for a polling station (coordinator_gsb)", "operationId": "polling_station_investigation_update", "parameters": [ { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigationUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Polling station investigation updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Investigation not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] }, "post": { "summary": "Create an investigation for a polling station (coordinator_gsb)", "operationId": "polling_station_investigation_create", "parameters": [ { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigationCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Polling station investigation created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Polling station not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] }, "delete": { "summary": "Delete an investigation for a polling station (coordinator_gsb)", "operationId": "polling_station_investigation_delete", "parameters": [ { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "responses": { "204": { "description": "Polling station investigation deleted successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Investigation not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/polling_stations/{polling_station_id}/investigation/conclude": { "post": { "summary": "Conclude an investigation for a polling station (coordinator_gsb)", "operationId": "polling_station_investigation_conclude", "parameters": [ { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigationConcludeRequest" } } }, "required": true }, "responses": { "200": { "description": "Polling station investigation concluded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollingStationInvestigation" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Investigation not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/polling_stations/{polling_station_id}/investigation/download_corrigendum_pdf": { "get": { "summary": "Download a corrigendum for a polling station (coordinator_gsb)", "operationId": "polling_station_investigation_download_corrigendum_pdf", "parameters": [ { "name": "polling_station_id", "in": "path", "description": "Polling station database id", "required": true, "schema": { "$ref": "#/components/schemas/PollingStationId" } } ], "responses": { "200": { "description": "PDF", "headers": { "Content-Disposition": { "schema": { "type": "string" }, "description": "attachment; filename=\"filename.pdf\"" } }, "content": { "application/pdf": {} } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Request cannot be completed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "coordinator_gsb" ] } ] } }, "/api/users": { "get": { "summary": "Lists all users (administrator, coordinator_csb, coordinator_gsb)", "operationId": "user_list", "responses": { "200": { "description": "User list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserListResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] }, "post": { "summary": "Create a new user (administrator, coordinator_csb, coordinator_gsb)", "operationId": "user_create", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" } } }, "required": true }, "responses": { "201": { "description": "User created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Conflict (username already exists)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid username or fullname", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] } }, "/api/users/{user_id}": { "get": { "summary": "Get a user (administrator, coordinator_csb, coordinator_gsb)", "operationId": "user_get", "parameters": [ { "name": "user_id", "in": "path", "description": "User id", "required": true, "schema": { "$ref": "#/components/schemas/UserId" } } ], "responses": { "200": { "description": "User found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] }, "put": { "summary": "Update a user (administrator, coordinator_csb, coordinator_gsb)", "operationId": "user_update", "parameters": [ { "name": "user_id", "in": "path", "description": "User id", "required": true, "schema": { "$ref": "#/components/schemas/UserId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "User updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid fullname", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] }, "delete": { "summary": "Delete a user (administrator, coordinator_csb, coordinator_gsb)", "operationId": "user_delete", "parameters": [ { "name": "user_id", "in": "path", "description": "User id", "required": true, "schema": { "$ref": "#/components/schemas/UserId" } } ], "responses": { "204": { "description": "User deleted successfully" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "cookie_auth": [ "administrator", "coordinator_csb", "coordinator_gsb" ] } ] } } }, "components": { "schemas": { "AboutReport": { "type": "object", "description": "Information about the report (\"Over het proces-verbaal\")", "required": [ "corrigendum_present", "checks_and_corrections_present" ], "properties": { "checks_and_corrections_present": { "oneOf": [ { "$ref": "#/components/schemas/ChecksAndCorrectionsPresent", "description": "Whether the extra page \"controles en correcties\" is inserted in the report\n(\"Is voorin het proces-verbaal de extra pagina controles en correcties ingevoegd?\")" }, { "type": "null" } ] }, "corrigendum_present": { "oneOf": [ { "$ref": "#/components/schemas/CorrigendumPresent", "description": "Whether a corrigendum accompanies the report\n(\"Is er een corrigendum bij het papieren proces-verbaal aanwezig?\")" }, { "type": "null" } ] } }, "additionalProperties": false }, "AbsoluteMajorityDrawingLots": { "type": "object", "required": [ "assign_to", "options" ], "properties": { "assign_to": { "$ref": "#/components/schemas/PGNumber", "description": "The list where the reassigned residual seat will go to" }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" }, "description": "The list options where the residual seat should come from" } } }, "AbsoluteMajorityReassignedSeat": { "type": "object", "required": [ "list_retracted_seat", "list_assigned_seat" ], "properties": { "drawing_lots": { "$ref": "#/components/schemas/ListDrawingLotsVariant" }, "list_assigned_seat": { "$ref": "#/components/schemas/PGNumber" }, "list_retracted_seat": { "$ref": "#/components/schemas/PGNumber" } } }, "AccountUpdateRequest": { "type": "object", "required": [ "username", "password" ], "properties": { "fullname": { "type": "string" }, "password": { "type": "string" }, "username": { "type": "string" } }, "additionalProperties": false }, "AddSubCommitteeCertificateRequest": { "type": "object", "description": "Request to add a sub committee certificate", "required": [ "data" ], "properties": { "data": { "type": "string" } }, "additionalProperties": false }, "AddSubCommitteeCertificateResponse": { "type": "object", "description": "The certificate that was added, with the sub committee it was added to", "required": [ "sub_committee_id", "authority_name", "certificate", "expired" ], "properties": { "authority_name": { "type": "string" }, "certificate": { "$ref": "#/components/schemas/Certificate" }, "expired": { "type": "boolean" }, "sub_committee_id": { "$ref": "#/components/schemas/SubCommitteeId" } } }, "ApportionmentState": { "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Uninitialised" ] } } }, { "type": "object", "required": [ "deceased_candidates", "type" ], "properties": { "deceased_candidates": { "type": "array", "items": { "$ref": "#/components/schemas/DeceasedCandidate" } }, "type": { "type": "string", "enum": [ "RegisteringDeceasedCandidates" ] } } }, { "type": "object", "required": [ "drawing_lots_required", "deceased_candidates", "lists_drawn", "candidates_drawn", "type" ], "properties": { "candidates_drawn": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateDrawn" } }, "deceased_candidates": { "type": "array", "items": { "$ref": "#/components/schemas/DeceasedCandidate" } }, "drawing_lots_required": { "$ref": "#/components/schemas/DrawingLotsRequired" }, "lists_drawn": { "type": "array", "items": { "$ref": "#/components/schemas/ListDrawn" } }, "type": { "type": "string", "enum": [ "DrawingLots" ] } } }, { "type": "object", "required": [ "deceased_candidates", "lists_drawn", "candidates_drawn", "type" ], "properties": { "candidates_drawn": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateDrawn" } }, "deceased_candidates": { "type": "array", "items": { "$ref": "#/components/schemas/DeceasedCandidate" } }, "lists_drawn": { "type": "array", "items": { "$ref": "#/components/schemas/ListDrawn" } }, "type": { "type": "string", "enum": [ "Finalised" ] } } } ] }, "ApportionmentWarning": { "type": "string", "enum": [ "AbsoluteMajorityAndListExhaustion", "NotAllSeatsAssigned" ] }, "AuditEventLevel": { "type": "string", "enum": [ "info", "success", "warning", "error" ] }, "AuditEventType": { "type": "string", "enum": [ "UserLoggedIn", "UserLoginFailed", "UserLoggedOut", "UserAccountUpdated", "UserSessionExtended", "UserSessionExpired", "UserSessionRemoved", "UserCreated", "UserUpdated", "UserDeleted", "ElectionCreated", "ElectionUpdated", "PublicKeyUploadReminderDismissed", "CommitteeSessionCreated", "CommitteeSessionDeleted", "CommitteeSessionUpdated", "FileCreated", "FileDeleted", "ApportionmentProcessed", "ApportionmentStateUpdated", "InvestigationCreated", "InvestigationConcluded", "InvestigationUpdated", "InvestigationDeleted", "PollingStationCreated", "PollingStationUpdated", "PollingStationDeleted", "PollingStationsImported", "PollingStationsExported", "DataEntryStarted", "DataEntrySaved", "DataEntryImported", "DataEntryResumed", "DataEntryDeleted", "DataEntryDiscarded", "DataEntryReset", "DataEntryFinalised", "DataEntryDiscardedFirst", "DataEntryReturnedFirst", "DataEntryKeptFirst", "DataEntryKeptSecond", "DataEntryKeptFirstReturnedSecond", "DataEntryKeptSecondReturnedFirst", "DataEntryDiscardedBoth", "AirGapViolationDetected", "AirGapViolationResolved", "ApplicationStarted", "DatabaseBackupCreated", "SigningKeypairCreated", "SubCommitteeCertificateAdded", "SubCommitteeCertificateDeleted", "ApiError", "ApiWarning", "UnknownEvent" ] }, "AuditLogEvent": { "type": "object", "required": [ "id", "time", "event", "event_name", "event_level", "ip" ], "properties": { "event": {}, "event_level": { "$ref": "#/components/schemas/AuditEventLevel" }, "event_name": { "$ref": "#/components/schemas/AuditEventType" }, "id": { "$ref": "#/components/schemas/AuditLogEventId" }, "ip": { "type": "string" }, "message": { "type": "string" }, "time": { "type": "string" }, "user_fullname": { "type": "string" }, "user_id": { "$ref": "#/components/schemas/UserId" }, "user_role": { "$ref": "#/components/schemas/Role" }, "username": { "type": "string" } }, "additionalProperties": false }, "AuditLogEventId": { "type": "integer", "format": "int32", "minimum": 0 }, "AuditLogListResponse": { "type": "object", "required": [ "events", "page", "pages", "per_page" ], "properties": { "events": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogEvent" } }, "page": { "type": "integer", "format": "int32", "minimum": 0 }, "pages": { "type": "integer", "format": "int32", "minimum": 0 }, "per_page": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "AuditLogUser": { "type": "object", "required": [ "id", "username", "fullname", "role" ], "properties": { "fullname": { "type": "string" }, "id": { "type": "integer", "format": "int32", "minimum": 0 }, "role": { "$ref": "#/components/schemas/Role" }, "username": { "type": "string" } }, "additionalProperties": false }, "BackupResponse": { "type": "object", "required": [ "filename", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "filename": { "type": "string" } } }, "BasePollingStation": { "type": "object", "description": "Polling station base entity, linked to an election but\nindependent of the committee session or data entry.", "required": [ "id", "name", "number", "address", "postal_code", "locality" ], "properties": { "address": { "type": "string" }, "id": { "$ref": "#/components/schemas/PollingStationId" }, "locality": { "type": "string" }, "name": { "type": "string" }, "number": { "$ref": "#/components/schemas/u32" }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_type": { "$ref": "#/components/schemas/PollingStationType" }, "postal_code": { "type": "string" } }, "additionalProperties": false }, "CSBDataEntryImportRequest": { "type": "object", "required": [ "hash", "data" ], "properties": { "data": { "type": "string", "format": "binary" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "CSBDataEntryImportResponse": { "type": "object", "required": [ "election_name", "election_date", "sub_committee" ], "properties": { "election_date": { "type": "string", "format": "date" }, "election_name": { "type": "string" }, "sub_committee": { "$ref": "#/components/schemas/SubCommitteeFirstSession" } }, "additionalProperties": false }, "CSBDataEntryImportValidateRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "string", "format": "binary" }, "hash": { "type": "array", "items": { "type": "string" } } } }, "CSBDataEntryImportValidateResponse": { "type": "object", "required": [ "hash", "election_name", "election_date", "sub_committee" ], "properties": { "election_date": { "type": "string", "format": "date" }, "election_name": { "type": "string" }, "hash": { "$ref": "#/components/schemas/RedactedEmlHash" }, "sub_committee": { "$ref": "#/components/schemas/SubCommitteeFirstSession" } }, "additionalProperties": false }, "CSBElectionCreationRequest": { "type": "object", "required": [ "election_hash", "election_data", "candidate_hash", "candidate_data" ], "properties": { "candidate_data": { "type": "string" }, "candidate_hash": { "type": "array", "items": { "type": "string" } }, "election_data": { "type": "string" }, "election_hash": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "CSBElectionCreationValidateRequest": { "type": "object", "required": [ "election_data" ], "properties": { "candidate_data": { "type": "string" }, "candidate_hash": { "type": "array", "items": { "type": "string" } }, "election_data": { "type": "string" }, "election_hash": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "CSBElectionDefinitionValidateResponse": { "type": "object", "required": [ "hash", "election" ], "properties": { "election": { "$ref": "#/components/schemas/NewElection" }, "hash": { "$ref": "#/components/schemas/RedactedEmlHash" } }, "additionalProperties": false }, "CSOFirstSessionResults": { "type": "object", "description": "CSOFirstSessionResults, following the fields in Model Na 31-2 Bijlage 1.\n\nSee \"Model Na 31-2. Proces-verbaal van een gemeentelijk stembureau/stembureau voor het openbaar\nlichaam in een gemeente/openbaar lichaam waar een centrale stemopneming wordt verricht,\nBijlage 1: Verslagen van tellingen van stembureaus\" from\n[Kiesraad](https://www.kiesraad.nl/documenten/2025/11/27/na-31-2-pv-gsb-cso).", "required": [ "extra_investigation", "counting_differences_polling_station", "voters_counts", "votes_counts", "differences_counts", "political_group_votes" ], "properties": { "counting_differences_polling_station": { "$ref": "#/components/schemas/CountingDifferencesPollingStation", "description": "Counting Differences Polling Station (\"B1-2 Verschillen met telresultaten van het stembureau\")" }, "differences_counts": { "$ref": "#/components/schemas/DifferencesCounts", "description": "Differences counts (\"3. Verschil tussen het aantal toegelaten kiezers en het aantal getelde stembiljetten\")" }, "extra_investigation": { "$ref": "#/components/schemas/ExtraInvestigation", "description": "Extra investigation (\"B1-1 Extra onderzoek\")" }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "Vote counts per list and candidate (5. \"Aantal stemmen per lijst en kandidaat\")" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "Voters counts (\"1. Aantal toegelaten kiezers\")" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "Votes counts (\"2. Aantal getelde stembiljetten\")" } }, "additionalProperties": false }, "CSOInvestigations": { "type": "object", "description": "Polling stations where results were investigated by the GSB,\nas vectors of polling station numbers", "required": [ "admitted_voters_recounted", "investigated_other_reason", "ballots_recounted" ], "properties": { "admitted_voters_recounted": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Admitted voters were recounted\n(\"Toegelaten kiezers opnieuw vastgesteld?\")" }, "ballots_recounted": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Ballots were (partially) recounted\n(\"Stembiljetten (deels) herteld?\")" }, "investigated_other_reason": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Investigated for other reasons than unexplained difference\n(\"Onderzocht vanwege andere reden dan onverklaard verschil?\")" } }, "additionalProperties": false }, "Candidate": { "type": "object", "description": "Candidate", "required": [ "number", "initials", "last_name", "locality" ], "properties": { "country_code": { "type": "string" }, "first_name": { "type": "string" }, "gender": { "$ref": "#/components/schemas/CandidateGender" }, "initials": { "type": "string" }, "last_name": { "type": "string" }, "last_name_prefix": { "type": "string" }, "locality": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "CandidateDrawingLotsVariant": { "type": "object", "required": [ "list", "total_seats", "number_of_votes", "seat_numbers", "options" ], "properties": { "list": { "$ref": "#/components/schemas/PGNumber", "description": "The list the candidate needs to be drawn from" }, "number_of_votes": { "type": "integer", "format": "int32", "description": "The number of votes, equal for these candidates", "minimum": 0 }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateNumber" }, "description": "The candidates that lots are drawn for" }, "seat_numbers": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "The seat numbers that the candidates can be drawn for" }, "total_seats": { "type": "integer", "format": "int32", "description": "The total number of seats for the list", "minimum": 0 } } }, "CandidateDrawn": { "type": "object", "description": "The candidate that has been drawn plus information to assert the correct drawing", "required": [ "variant", "drawn" ], "properties": { "drawn": { "$ref": "#/components/schemas/CandidateNumber", "description": "The candidate that the lot was drawn for" }, "variant": { "$ref": "#/components/schemas/CandidateDrawingLotsVariant", "description": "The type and information for drawing lots" } } }, "CandidateGender": { "type": "string", "description": "Candidate gender", "enum": [ "Male", "Female", "X" ] }, "CandidateNomination": { "type": "object", "required": [ "preference_threshold", "chosen_candidates", "list_candidate_nomination" ], "properties": { "chosen_candidates": { "type": "array", "items": { "$ref": "#/components/schemas/ChosenCandidate" } }, "list_candidate_nomination": { "type": "array", "items": { "$ref": "#/components/schemas/ListCandidateNomination" } }, "preference_threshold": { "$ref": "#/components/schemas/PreferenceThreshold" } } }, "CandidateNumber": { "type": "integer", "format": "int32", "minimum": 0 }, "CandidateVotes": { "type": "object", "required": [ "number", "votes" ], "properties": { "number": { "type": "integer", "format": "int32", "minimum": 0 }, "votes": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "Certificate": { "type": "object", "required": [ "election_identifier", "organizational_unit", "common_name", "not_before", "not_after", "signature_algorithm", "public_key", "public_key_fingerprint" ], "properties": { "common_name": { "type": "string" }, "election_identifier": { "type": "string" }, "not_after": { "type": "string", "format": "date-time" }, "not_before": { "type": "string", "format": "date-time" }, "organizational_unit": { "type": "string" }, "public_key": { "type": "string" }, "public_key_fingerprint": { "type": "string" }, "signature_algorithm": { "type": "string" } } }, "CertificateDetailsResponse": { "type": "object", "required": [ "election_identifier", "organizational_unit", "common_name", "not_before", "not_after", "signature_algorithm" ], "properties": { "common_name": { "type": "string" }, "election_identifier": { "type": "string" }, "not_after": { "type": "string", "format": "date-time" }, "not_before": { "type": "string", "format": "date-time" }, "organizational_unit": { "type": "string" }, "signature_algorithm": { "type": "string" } }, "additionalProperties": false }, "ChecksAndCorrections": { "type": "object", "description": "Checks and corrections (\"Controles en correcties\")", "required": [ "reason_investigation_own_initiative", "corrected_results_own_initiative", "corrected_results_csb_request" ], "properties": { "corrected_results_csb_request": { "$ref": "#/components/schemas/YesNo", "description": "Whether investigation at the request of the central electoral committee\nhas led to corrected results\n(\"Op verzoek van het centraal stembureau: Zijn er gecorrigeerde telresultaten?\")" }, "corrected_results_own_initiative": { "$ref": "#/components/schemas/YesNo", "description": "Whether the investigation on its own initiative has led to corrected results\n(\"Op eigen initiatief van het gemeentelijk stembureau: Zijn er gecorrigeerde telresultaten?\")" }, "reason_investigation_own_initiative": { "$ref": "#/components/schemas/ReasonInvestigationOwnInitiative", "description": "Why the GSB investigated the counting results on its own initiative\n(\"Op eigen initiatief van het gemeentelijk stembureau: Waarom heeft het gemeentelijk stembureau\n de telresultaten onderzocht?\")" } }, "additionalProperties": false }, "ChecksAndCorrectionsPresent": { "type": "string", "description": "Whether the extra page \"controles en correcties\" is inserted in the report", "enum": [ "PagePresent", "PageMissing" ] }, "ChosenCandidate": { "type": "object", "description": "Chosen candidate", "required": [ "number", "initials", "last_name", "locality", "list_number", "list_name" ], "properties": { "country_code": { "type": "string" }, "first_name": { "type": "string" }, "gender": { "$ref": "#/components/schemas/CandidateGender" }, "initials": { "type": "string" }, "last_name": { "type": "string" }, "last_name_prefix": { "type": "string" }, "list_name": { "type": "string" }, "list_number": { "$ref": "#/components/schemas/PGNumber" }, "locality": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "ClaimDataEntryResponse": { "type": "object", "description": "Response structure for getting data entry results", "required": [ "data", "client_state", "validation_results", "source", "status", "is_correction" ], "properties": { "client_state": { "type": "object" }, "correction_warnings": { "type": "array", "items": { "type": "string" }, "description": "Fields for which a warning should be shown that a difference should be corrected" }, "data": { "$ref": "#/components/schemas/Results" }, "is_correction": { "type": "boolean", "description": "Whether the typist is correcting an entry that was completed before" }, "previous_results": { "$ref": "#/components/schemas/CommonPollingStationResults" }, "source": { "$ref": "#/components/schemas/DataEntrySource" }, "status": { "$ref": "#/components/schemas/DataEntryStatusName" }, "validation_results": { "$ref": "#/components/schemas/ValidationResults" } }, "additionalProperties": false }, "CommitteeCategory": { "type": "string", "description": "Committee category", "enum": [ "GSB", "CSB" ] }, "CommitteeDistrict": { "oneOf": [ { "type": "object", "description": "The election has no districts", "required": [ "district" ], "properties": { "district": { "type": "string", "enum": [ "None" ] } } }, { "type": "object", "description": "This committee operates over all districts", "required": [ "district" ], "properties": { "district": { "type": "string", "enum": [ "All" ] } } }, { "allOf": [ { "$ref": "#/components/schemas/RegionDetails", "description": "This committee operates within a specific district" }, { "type": "object", "required": [ "district" ], "properties": { "district": { "type": "string", "enum": [ "Specific" ] } } } ], "description": "This committee operates within a specific district" } ], "description": "Which district this committee is contained within." }, "CommitteeSession": { "type": "object", "description": "Committee session", "required": [ "id", "number", "election_id", "location", "status" ], "properties": { "election_id": { "$ref": "#/components/schemas/ElectionId" }, "id": { "$ref": "#/components/schemas/CommitteeSessionId" }, "location": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 }, "start_date_time": { "type": "string", "format": "date-time" }, "status": { "$ref": "#/components/schemas/CommitteeSessionStatus" } }, "additionalProperties": false }, "CommitteeSessionId": { "type": "integer", "format": "int32", "minimum": 0 }, "CommitteeSessionStatus": { "type": "string", "description": "Committee session status", "enum": [ "created", "in_preparation", "data_entry", "paused", "completed" ] }, "CommitteeSessionStatusChangeRequest": { "type": "object", "description": "Committee session status change request", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/CommitteeSessionStatus" } }, "additionalProperties": false }, "CommitteeSessionUpdateRequest": { "type": "object", "description": "Committee session update request", "required": [ "location", "start_date", "start_time" ], "properties": { "location": { "type": "string" }, "start_date": { "type": "string" }, "start_time": { "type": "string" } }, "additionalProperties": false }, "CommitteeSpecificTotals": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/GSBTotals", "description": "Totals specific to a municipal electoral committee (gemeentelijk stembureau, GSB)" }, { "type": "object", "required": [ "committee" ], "properties": { "committee": { "type": "string", "enum": [ "GSB" ] } } } ], "description": "Totals specific to a municipal electoral committee (gemeentelijk stembureau, GSB)" }, { "type": "object", "description": "Totals specific to a central electoral committee (centraal stembureau, CSB)", "required": [ "number_of_voters", "committee" ], "properties": { "committee": { "type": "string", "enum": [ "CSB" ] }, "number_of_voters": { "type": "integer", "format": "int32", "description": "The number of voters (\"Kiesgerechtigden\")", "minimum": 0 } } } ], "description": "Committee specific totals, i.e. specific for GSB or CSB." }, "CommonPollingStationResults": { "type": "object", "description": "CommonPollingStationResults contains the common fields for polling station results,", "required": [ "voters_counts", "votes_counts", "differences_counts", "political_group_votes" ], "properties": { "differences_counts": { "$ref": "#/components/schemas/DifferencesCounts", "description": "Differences counts (\"Verschil tussen het aantal toegelaten kiezers en het aantal getelde stembiljetten\")" }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "Vote counts per list and candidate (\"Aantal stemmen per lijst en kandidaat\")" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "Voters counts (\"Aantal toegelaten kiezers\")" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "Votes counts (\"Aantal getelde stembiljetten\")" } }, "additionalProperties": false }, "CorrigendumPresent": { "type": "string", "description": "Whether a corrigendum accompanies the report", "enum": [ "TwoDocuments", "OneDocument" ] }, "CountingDifferencesPollingStation": { "type": "object", "description": "Counting Differences Polling Station,\npart of the results (\"B1-2 Verschillen met telresultaten van het stembureau\")", "required": [ "difference_ballots_voters_completely_accounted_for", "difference_ballots_per_list" ], "properties": { "difference_ballots_per_list": { "$ref": "#/components/schemas/YesNo", "description": "Whether there was a difference between the total votes per list as determined by the polling station and by the typist\n(\"Is er een verschil tussen het totaal aantal getelde stembiljetten per lijst zoals eerder vastgesteld door het stembureau en zoals door u geteld op het gemeentelijk stembureau?\")" }, "difference_ballots_voters_completely_accounted_for": { "$ref": "#/components/schemas/YesNo", "description": "Whether the total of admitted voters (D) and the total of votes counted (H) are equal, or the difference was completely accounted for\n(\"Is in de telresultaten van het stembureau het aantal toegelaten kiezers (D) en het totaal aantal getelde stemmen (H) gelijk OF is er een verschil en is dit verschil volledig verklaard?\")" } }, "additionalProperties": false }, "CreateFirstAdminRequest": { "type": "object", "required": [ "username", "fullname", "temp_password" ], "properties": { "fullname": { "type": "string" }, "temp_password": { "type": "string" }, "username": { "type": "string" } }, "additionalProperties": false }, "CreateUserRequest": { "type": "object", "required": [ "username", "temp_password", "role" ], "properties": { "fullname": { "type": "string" }, "role": { "$ref": "#/components/schemas/Role" }, "temp_password": { "type": "string" }, "username": { "type": "string" } }, "additionalProperties": false }, "Credentials": { "type": "object", "required": [ "username", "password" ], "properties": { "password": { "type": "string" }, "username": { "type": "string" } }, "additionalProperties": false }, "DSOFirstSessionResults": { "type": "object", "description": "DSOFirstSessionResults, following the fields in Model N 10-1\n\nSee: Model N 10-1 (Proces-verbaal van een stembureau) from\n[kiesraad](https://www.kiesraad.nl/documenten/2025/11/27/n-10-1-pv-sb-dso)", "required": [ "about_report", "checks_and_corrections", "voters_counts", "votes_counts", "differences_counts", "political_group_votes" ], "properties": { "about_report": { "$ref": "#/components/schemas/AboutReport", "description": "About report (\"Over het proces-verbaal\")" }, "checks_and_corrections": { "$ref": "#/components/schemas/ChecksAndCorrections", "description": "Checks and corrections (\"Controles en correcties\")" }, "differences_counts": { "$ref": "#/components/schemas/DifferencesCounts", "description": "Differences counts (\"3. Verschil tussen het aantal toegelaten kiezers en het aantal getelde stembiljetten\")" }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "Vote counts per list and candidate (5. \"Aantal stemmen per lijst en kandidaat\")" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "Voters counts (\"1. Aantal toegelaten kiezers\")" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "Votes counts (\"2. Aantal getelde stembiljetten\")" } } }, "DSOInvestigations": { "type": "object", "description": "Polling stations where results were investigated by the GSB,\nas vectors of polling station numbers", "required": [ "unaccounted_difference", "other_error", "corrected_results" ], "properties": { "corrected_results": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Results were corrected\n(\"Uitslag gecorrigeerd?\")" }, "other_error": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Investigated because of a (suspected) other error\n(\"Onderzocht vanwege (het vermoeden van) een andere fout?\")" }, "unaccounted_difference": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 }, "description": "Investigated because of an unaccounted-for difference\n(\"Onderzocht vanwege een onverklaard verschil?\")" } }, "additionalProperties": false }, "DataEntry": { "type": "object", "description": "Request structure for saving data entry", "required": [ "progress", "data", "client_state" ], "properties": { "client_state": { "type": "object", "description": "Client state for the data entry (arbitrary JSON)" }, "data": { "$ref": "#/components/schemas/Results", "description": "Data entry for a polling station" }, "progress": { "type": "integer", "format": "int32", "description": "Data entry progress between 0 and 100", "maximum": 100, "minimum": 0 } }, "additionalProperties": false }, "DataEntryGetDifferencesResponse": { "type": "object", "required": [ "first_entry_origin", "first_entry", "first_entry_has_errors", "second_entry_user_id", "second_entry", "second_entry_has_errors", "source" ], "properties": { "first_entry": { "$ref": "#/components/schemas/Results" }, "first_entry_has_errors": { "type": "boolean" }, "first_entry_origin": { "$ref": "#/components/schemas/DataEntryOrigin" }, "second_entry": { "$ref": "#/components/schemas/Results" }, "second_entry_has_errors": { "type": "boolean" }, "second_entry_user_id": { "$ref": "#/components/schemas/UserId" }, "source": { "$ref": "#/components/schemas/DataEntrySource" } }, "additionalProperties": false }, "DataEntryGetResponse": { "type": "object", "required": [ "data", "status", "validation_results", "source" ], "properties": { "data": { "$ref": "#/components/schemas/Results" }, "source": { "$ref": "#/components/schemas/DataEntrySource" }, "status": { "$ref": "#/components/schemas/DataEntryStatusName" }, "user_id": { "$ref": "#/components/schemas/UserId" }, "validation_results": { "$ref": "#/components/schemas/ValidationResults" } }, "additionalProperties": false }, "DataEntryId": { "type": "integer", "format": "int32", "minimum": 0 }, "DataEntryOrigin": { "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Import" ] } } }, { "type": "object", "required": [ "user_id", "type" ], "properties": { "type": { "type": "string", "enum": [ "Typist" ] }, "user_id": { "$ref": "#/components/schemas/UserId" } } } ] }, "DataEntrySource": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/PollingStationForSession" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "PollingStation" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/SubCommitteeFirstSession" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "SubCommittee" ] } } } ] } ] }, "DataEntrySourceNumber": { "oneOf": [ { "type": "object", "required": [ "number", "type" ], "properties": { "number": { "$ref": "#/components/schemas/u32" }, "type": { "type": "string", "enum": [ "PollingStation" ] } } }, { "type": "object", "required": [ "number", "type" ], "properties": { "number": { "$ref": "#/components/schemas/u32" }, "type": { "type": "string", "enum": [ "SubCommittee" ] } } } ] }, "DataEntryStatusName": { "type": "string", "enum": [ "empty", "first_entry_in_progress", "first_entry_has_errors", "first_entry_finalised", "second_entry_in_progress", "entries_different", "first_entry_correction", "second_entry_correction", "definitive" ] }, "DataEntryStatusResponse": { "type": "object", "required": [ "status" ], "properties": { "status": { "$ref": "#/components/schemas/DataEntryStatusName" } }, "additionalProperties": false }, "DeceasedCandidate": { "type": "object", "required": [ "pg_number", "candidate_number" ], "properties": { "candidate_number": { "$ref": "#/components/schemas/CandidateNumber" }, "pg_number": { "$ref": "#/components/schemas/PGNumber" } } }, "DifferenceCountsCompareVotesCastAdmittedVoters": { "type": "object", "description": "Compare votes cast admitted voters, part of the differences counts.", "required": [ "admitted_voters_equal_votes_cast", "votes_cast_greater_than_admitted_voters", "votes_cast_smaller_than_admitted_voters" ], "properties": { "admitted_voters_equal_votes_cast": { "type": "boolean", "description": "Whether total of admitted voters and total of votes cast match.\n(\"D en H zijn gelijk\")" }, "votes_cast_greater_than_admitted_voters": { "type": "boolean", "description": "Whether total of admitted voters is greater than total of votes cast match.\n(\"H is groter dan D (meer uitgebrachte stemmen dan toegelaten kiezers)\")" }, "votes_cast_smaller_than_admitted_voters": { "type": "boolean", "description": "Whether total of admitted voters is less than total of votes cast match.\n(\"H is kleiner dan D (minder uitgebrachte stemmen dan toegelaten kiezers)\")" } }, "additionalProperties": false }, "DifferencesCounts": { "type": "object", "description": "Differences counts, part of the results.\n(B1-3.3 \"Verschillen tussen aantal kiezers en uitgebrachte stemmen\")", "required": [ "compare_votes_cast_admitted_voters", "more_ballots_count", "fewer_ballots_count", "difference_completely_accounted_for" ], "properties": { "compare_votes_cast_admitted_voters": { "$ref": "#/components/schemas/DifferenceCountsCompareVotesCastAdmittedVoters", "description": "Whether total of admitted voters and total of votes cast match.\n(B1-3.3.1 \"Vergelijk D (totaal toegelaten kiezers) en H (totaal uitgebrachte stemmen)\")" }, "difference_completely_accounted_for": { "$ref": "#/components/schemas/YesNo", "description": "Whether the difference between the total of admitted voters and total of votes cast is explained.\n(B1-3.3.2 \"Zijn er tijdens de stemming dingen opgeschreven die het bovenstaande verschil tussen D en H volledig verklaren?\")" }, "fewer_ballots_count": { "type": "integer", "format": "int32", "description": "Number of fewer counted ballots (\"Aantal minder getelde stemmen (bereken: D min H)\")", "minimum": 0 }, "more_ballots_count": { "type": "integer", "format": "int32", "description": "Number of more counted ballots (\"Aantal méér getelde stemmen (bereken: H min D)\")", "minimum": 0 } }, "additionalProperties": false }, "DifferencesTotals": { "type": "object", "description": "Contains the totals of the differences, containing which polling stations had differences.", "required": [ "more_ballots_count", "fewer_ballots_count" ], "properties": { "fewer_ballots_count": { "$ref": "#/components/schemas/SumCount" }, "more_ballots_count": { "$ref": "#/components/schemas/SumCount" } }, "additionalProperties": false }, "DisplayFraction": { "type": "object", "description": "Fraction with the integer part split out for display purposes", "required": [ "integer", "numerator", "denominator" ], "properties": { "denominator": { "type": "integer", "format": "int64", "minimum": 0 }, "integer": { "type": "integer", "format": "int64", "minimum": 0 }, "numerator": { "type": "integer", "format": "int64", "minimum": 0 } } }, "DrawingLotsRequired": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/ListDrawingLotsVariant" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "ListDrawingLotsRequired" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/CandidateDrawingLotsVariant" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "CandidateDrawingLotsRequired" ] } } } ] } ] }, "Election": { "type": "object", "description": "Election without political groups.\n\nNote: an election within Abacus does not represent the entire election, but\nrather a single committee (i.e. stembureau at the CSB, HSB or GSB level)\nwithin the election.\n\nWhen access to the political groups and their candidates is required, use\n[`ElectionWithPoliticalGroups`] instead. When creating a new election, use\n[`NewElection`] instead.", "required": [ "id", "name", "official_name", "committee_category", "election_id", "location", "authority_id", "authority_name", "authority_region", "district", "category", "sub_category", "number_of_seats", "number_of_voters", "election_date", "nomination_date" ], "properties": { "authority_id": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_id`]" }, "authority_name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_name`]" }, "authority_region": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_region`]" }, "category": { "$ref": "#/components/schemas/ElectionCategory", "description": "See [`ElectionWithPoliticalGroups::category`]" }, "committee_category": { "$ref": "#/components/schemas/CommitteeCategory", "description": "See [`ElectionWithPoliticalGroups::committee_category`]" }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod", "description": "See [`ElectionWithPoliticalGroups::counting_method`]" }, "district": { "$ref": "#/components/schemas/CommitteeDistrict", "description": "See [`ElectionWithPoliticalGroups::district`]" }, "domain": { "$ref": "#/components/schemas/ElectionDomain", "description": "See [`ElectionWithPoliticalGroups::domain`]" }, "election_date": { "type": "string", "format": "date", "description": "See [`ElectionWithPoliticalGroups::election_date`]" }, "election_id": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::election_id`]" }, "id": { "$ref": "#/components/schemas/ElectionId", "description": "See [`ElectionWithPoliticalGroups::id`]" }, "location": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::location`]" }, "name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::name`]" }, "nomination_date": { "type": "string", "format": "date", "description": "See [`ElectionWithPoliticalGroups::nomination_date`]" }, "number_of_seats": { "type": "integer", "format": "int32", "description": "See [`ElectionWithPoliticalGroups::number_of_seats`]", "minimum": 0 }, "number_of_voters": { "type": "integer", "format": "int32", "description": "See [`ElectionWithPoliticalGroups::number_of_voters`]", "minimum": 0 }, "official_name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::official_name`]" }, "sub_category": { "$ref": "#/components/schemas/ElectionSubCategory", "description": "See [`ElectionWithPoliticalGroups::sub_category`]" } }, "additionalProperties": false }, "ElectionApportionmentResponse": { "type": "object", "required": [ "seat_assignment", "candidate_nomination", "election_totals", "warnings" ], "properties": { "candidate_nomination": { "$ref": "#/components/schemas/CandidateNomination" }, "election_totals": { "$ref": "#/components/schemas/ElectionTotals" }, "seat_assignment": { "$ref": "#/components/schemas/SeatAssignment" }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/ApportionmentWarning" } } } }, "ElectionCategory": { "type": "string", "description": "Election category (limited for now)", "enum": [ "Municipal", "Provincial", "WaterAuthority", "HouseOfRepresentatives" ] }, "ElectionCreationRequest": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/GSBElectionCreationRequest" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "GSB" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/CSBElectionCreationRequest" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "CSB" ] } } } ] } ] }, "ElectionCreationValidateRequest": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/GSBElectionCreationValidateRequest" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "GSB" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/CSBElectionCreationValidateRequest" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "CSB" ] } } } ] } ] }, "ElectionDefinitionValidateResponse": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/GSBElectionDefinitionValidateResponse" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "GSB" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/CSBElectionDefinitionValidateResponse" }, { "type": "object", "required": [ "committee_category" ], "properties": { "committee_category": { "type": "string", "enum": [ "CSB" ] } } } ] } ] }, "ElectionDetailsResponse": { "type": "object", "description": "Election details response, including the election's candidate list (political groups),\nits polling stations and its committee sessions and current committee session", "required": [ "current_committee_session", "committee_sessions", "election", "polling_stations", "investigations" ], "properties": { "committee_sessions": { "type": "array", "items": { "$ref": "#/components/schemas/CommitteeSession" } }, "current_committee_session": { "$ref": "#/components/schemas/CommitteeSession" }, "election": { "$ref": "#/components/schemas/ElectionWithPoliticalGroups" }, "investigations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStationInvestigation" } }, "polling_stations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStation" } }, "show_keypair_reminder": { "$ref": "#/components/schemas/KeypairReminder" } }, "additionalProperties": false }, "ElectionDomain": { "type": "object", "description": "Election domain (i.e. the entity at which the election takes place)", "required": [ "name" ], "properties": { "id": { "type": "string", "description": "Identifier of the domain" }, "name": { "type": "string", "description": "Name of the domain" } } }, "ElectionId": { "type": "integer", "format": "int32", "minimum": 0 }, "ElectionListResponse": { "type": "object", "description": "Election list response\n\nAlso includes a list of the current committee session for each election.\nDoes not include the candidate list (political groups) to keep the response size small.", "required": [ "committee_sessions", "elections" ], "properties": { "committee_sessions": { "type": "array", "items": { "$ref": "#/components/schemas/CommitteeSession" } }, "elections": { "type": "array", "items": { "$ref": "#/components/schemas/Election" } } }, "additionalProperties": false }, "ElectionNumberOfVotersChangeRequest": { "type": "object", "description": "Election number of voters change request", "required": [ "number_of_voters" ], "properties": { "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "ElectionStatusResponse": { "type": "object", "description": "Election data entry statuses response", "required": [ "statuses" ], "properties": { "statuses": { "type": "array", "items": { "$ref": "#/components/schemas/ElectionStatusResponseEntry" } } }, "additionalProperties": false }, "ElectionStatusResponseEntry": { "type": "object", "description": "Election data entry statuses response entry", "required": [ "data_entry_id", "source", "status", "updated_at" ], "properties": { "data_entry_id": { "$ref": "#/components/schemas/DataEntryId", "description": "Data entry id" }, "data_entry_progress": { "type": "integer", "format": "int32", "description": "Current data entry progress as a percentage (0 to 100)", "minimum": 0 }, "finalised_with_warnings": { "type": "boolean", "description": "Whether the finalised first or second data entry has warnings" }, "finished_at": { "type": "string", "description": "Time when the data entry was finalised" }, "first_entry_origin": { "$ref": "#/components/schemas/DataEntryOrigin", "description": "First entry origin (import or typist user id)" }, "second_entry_user_id": { "type": "integer", "format": "int32", "description": "Second entry user id", "minimum": 0 }, "source": { "$ref": "#/components/schemas/DataEntrySource", "description": "Data entry source (polling station or subcommittee)" }, "status": { "$ref": "#/components/schemas/DataEntryStatusName", "description": "Data entry status" }, "updated_at": { "type": "string", "format": "date-time", "description": "Time when the data entry was last updated" } }, "additionalProperties": false }, "ElectionSubCategory": { "type": "string", "description": "Election sub category (limited for now)", "enum": [ "AB1", "AB2", "GR1", "GR2", "PS1", "PS2", "TK" ] }, "ElectionTotals": { "type": "object", "description": "Contains the totals of the election results, added up from the votes of all polling stations.", "required": [ "voters_counts", "votes_counts", "differences_counts", "political_group_votes", "committee_specific" ], "properties": { "committee_specific": { "$ref": "#/components/schemas/CommitteeSpecificTotals", "description": "Totals specific to the committee (GSB or CSB) of the election" }, "differences_counts": { "$ref": "#/components/schemas/DifferencesTotals", "description": "The differences between voters and votes" }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "The total votes for each political group (and each candidate within)" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "The total number of voters" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "The total number of votes" } }, "additionalProperties": false }, "ElectionWithPoliticalGroups": { "type": "object", "description": "Election with political groups.\n\nNote: an election within Abacus does not represent the entire election, but\nrather a single committee (i.e. stembureau at the CSB, HSB or GSB level)\nwithin the election.\n\nWhen you do not need access to political groups and their candidates, you\ncan use [`Election`] instead. When creating a new election, use\n[`NewElection`] instead.", "required": [ "id", "name", "official_name", "committee_category", "election_id", "location", "authority_id", "authority_name", "authority_region", "district", "category", "sub_category", "number_of_seats", "number_of_voters", "election_date", "nomination_date", "political_groups" ], "properties": { "authority_id": { "type": "string", "description": "Identifier of the authority/region that this committee is responsible for." }, "authority_name": { "type": "string", "description": "Name of the authority. Note that most of the time this is the same as the\nregion name, but specifically for country wide elections the authority\nname may also be \"De Kiesraad\" instead of the region name of \"Nederland\"." }, "authority_region": { "type": "string", "description": "The name of the region that the committee is responsible for." }, "category": { "$ref": "#/components/schemas/ElectionCategory", "description": "The category of the election, as defined by EML_NL election definition.\nExamples include \"Municipal\" for municipal elections or \"WaterAuthority\"\nfor the water authority elections." }, "committee_category": { "$ref": "#/components/schemas/CommitteeCategory", "description": "The category (e.g. CSB) of the committee that this struct represents" }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod", "description": "If this is a GSB committee, this is the counting method used for\nvote tabulation. This field is not used for other committee types." }, "district": { "$ref": "#/components/schemas/CommitteeDistrict", "description": "The district that this committee is responsible for. This will be None\nfor committees within elections that do not have districts. When an\nelection does have districts this will be All for committees that are\nresponsible for all districts, or Specific for committees that sit\nwithin a specific district." }, "domain": { "$ref": "#/components/schemas/ElectionDomain", "description": "An election wide field: for elections that do not concern the entire\ncountry this field contains the specific domain of that election. For\nexample for municipal elections this contains the municipality that the\nelection is for. Note that the election domain id is not always available,\neven if a domain is present. For country wide elections this field is None." }, "election_date": { "type": "string", "format": "date", "description": "The date of the election, as defined by the EML_NL election definition.\nNote: this is the date that the election takes/took place, not necessarily\nthe date that the committee is in session." }, "election_id": { "type": "string", "description": "The election identifier as defined in the EML_NL election definition" }, "id": { "$ref": "#/components/schemas/ElectionId", "description": "Identifier of the election within Abacus" }, "location": { "type": "string", "description": "The location of the committee.\n\nFor GSB committees this will be the same as the authority region, but\nfor HSBs and CSBs this may also be a specific town or city within the\nauthority region." }, "name": { "type": "string", "description": "Name of the election, as formatted for display in Abacus." }, "nomination_date": { "type": "string", "format": "date", "description": "The date when candidate nominations for this election are/were closed." }, "number_of_seats": { "type": "integer", "format": "int32", "description": "The number of seats that are to be elected for. For example, this is 150\nfor elections for the House of Representatives (Tweede Kamer).", "minimum": 0 }, "number_of_voters": { "type": "integer", "format": "int32", "description": "How many voters are registered for this election.", "minimum": 0 }, "official_name": { "type": "string", "description": "Name of the election, as defined in the EML_NL election definition." }, "political_groups": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroup" }, "description": "The political groups and their candidates that are registered for this\nelection." }, "sub_category": { "$ref": "#/components/schemas/ElectionSubCategory", "description": "The sub-category of the election, as defined by the EML_NL election\ndefinition." } }, "additionalProperties": false }, "ErrorReference": { "type": "string", "description": "Error reference used to show the corresponding error message to the end-user", "enum": [ "AirgapViolation", "AlreadyInitialised", "BackupAlreadyExists", "ApportionmentNotCompleted", "ApportionmentCommitteeSessionNotCompleted", "ApportionmentInvalidLotDrawing", "CertificateAlreadyAdded", "CertificateUnknownSubCommittee", "CertificateWrongElection", "CommitteeSessionPaused", "DatabaseError", "DataEntryAlreadyClaimed", "DataEntryAlreadyImported", "DataEntryAlreadyFinalised", "DataEntryCannotBeReset", "DataEntryGetNotAllowed", "DataEntryNotAllowed", "DataEntryValidationErrors", "ElectionMismatch", "EmlImportError", "EmlError", "EntryNotFound", "EntryNotUnique", "Forbidden", "InternalServerError", "InvalidApportionmentState", "InvalidCertificate", "InvalidCommitteeSessionStatus", "InvalidCountType", "InvalidData", "InvalidDistrict", "InvalidFullname", "InvalidHash", "InvalidJson", "InvalidPassword", "InvalidPoliticalGroup", "InvalidDataEntrySource", "InvalidSession", "InvalidStateTransition", "InvalidUsername", "InvalidUsernameOrPassword", "InvalidVoteCandidate", "InvalidVoteGroup", "InvestigationHasDataEntryOrResult", "InvestigationRequiresCorrectedResults", "LoginRateLimited", "NotInitialised", "OwnAccountCannotBeDeleted", "PasswordRejectionSameAsOld", "PasswordRejectionSameAsUsername", "PasswordRejectionTooShort", "PdfGenerationError", "PollingStationRepeated", "RequestPayloadTooLarge", "SignatureMissing", "SignatureUnknown", "SubCommitteeHasNoCertificates", "Unauthorized", "UnknownCommittee", "UsernameNotUnique", "UserNotFound", "ZipError" ] }, "ErrorResponse": { "type": "object", "description": "Response structure for errors", "required": [ "error", "fatal", "reference" ], "properties": { "error": { "type": "string" }, "fatal": { "type": "boolean" }, "reference": { "$ref": "#/components/schemas/ErrorReference" } }, "additionalProperties": false }, "ExtraInvestigation": { "type": "object", "description": "Extra investigation, part of the results (\"B1-1 Extra onderzoek\")", "required": [ "extra_investigation_done", "ballots_recounted_extra_investigation" ], "properties": { "ballots_recounted_extra_investigation": { "$ref": "#/components/schemas/YesNo", "description": "Whether ballots were (partially) recounted following the extra investigation\n(\"Zijn de stembiljetten naar aanleiding van het extra onderzoek (gedeeltelijk) herteld?\")" }, "extra_investigation_done": { "$ref": "#/components/schemas/YesNo", "description": "Whether extra investigation was done\n(\"Heeft het gemeentelijk stembureau extra onderzoek gedaan?\")" } }, "additionalProperties": false }, "GSBDifferencesCounts": { "type": "object", "description": "Differences counts for GSB, part of the results.\n(1.4 \"Verschillen tussen aantal kiezers en uitgebrachte stemmen\")", "required": [ "more_ballots_count", "fewer_ballots_count" ], "properties": { "fewer_ballots_count": { "type": "integer", "format": "int32", "description": "Number of fewer counted ballots (\"Totaal aantal minder getelde stemmen\")", "minimum": 0 }, "more_ballots_count": { "type": "integer", "format": "int32", "description": "Number of more counted ballots (\"Totaal aantal méér getelde stemmen\")", "minimum": 0 } }, "additionalProperties": false }, "GSBElectionCreationRequest": { "type": "object", "required": [ "election_hash", "election_data", "candidate_hash", "candidate_data", "counting_method", "number_of_voters" ], "properties": { "candidate_data": { "type": "string" }, "candidate_hash": { "type": "array", "items": { "type": "string" } }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod" }, "election_data": { "type": "string" }, "election_hash": { "type": "array", "items": { "type": "string" } }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_data": { "type": "string" }, "polling_station_file_name": { "type": "string" }, "selected_region": { "$ref": "#/components/schemas/RegionKey" } }, "additionalProperties": false }, "GSBElectionCreationValidateRequest": { "type": "object", "required": [ "election_data" ], "properties": { "candidate_data": { "type": "string" }, "candidate_hash": { "type": "array", "items": { "type": "string" } }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod" }, "election_data": { "type": "string" }, "election_hash": { "type": "array", "items": { "type": "string" } }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_data": { "type": "string" }, "polling_station_file_name": { "type": "string" }, "selected_region": { "$ref": "#/components/schemas/RegionKey" } }, "additionalProperties": false }, "GSBElectionDefinitionValidateResponse": { "type": "object", "required": [ "hash", "election", "number_of_voters", "gsb_list" ], "properties": { "election": { "$ref": "#/components/schemas/NewElection" }, "gsb_list": { "type": "array", "items": { "$ref": "#/components/schemas/RegionDetails" } }, "hash": { "$ref": "#/components/schemas/RedactedEmlHash" }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_definition_matches_election": { "type": "boolean" }, "polling_stations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStationRequest" } } }, "additionalProperties": false }, "GSBResults": { "type": "object", "description": "GSBResults, following the fields in Model Na 31-2.\n\nSee \"Model Na 31-2. Proces-verbaal van een gemeentelijk stembureau/stembureau voor het openbaar\nlichaam in een gemeente/openbaar lichaam waar een centrale stemopneming wordt verricht\" from\n[Kiesraad](https://www.kiesraad.nl/documenten/2025/11/27/na-31-2-pv-gsb-cso).", "required": [ "number_of_voters", "voters_counts", "votes_counts", "differences_counts", "political_group_votes" ], "properties": { "differences_counts": { "$ref": "#/components/schemas/GSBDifferencesCounts", "description": "Differences counts (\"Verschil tussen het aantal toegelaten kiezers en het aantal getelde stembiljetten\")" }, "number_of_voters": { "type": "integer", "format": "int32", "description": "Number of voters (\"Kiesgerechtigden\")", "minimum": 0 }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "Vote counts per list and candidate (\"Aantal stemmen per lijst en kandidaat\")" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "Voters counts (\"Aantal toegelaten kiezers\")" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "Votes counts (\"Aantal getelde stembiljetten\")" } }, "additionalProperties": false }, "GSBTotals": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/CSOInvestigations", "description": "Totals specific to centrally counted (centrale stemopneming, CSO) results" }, { "type": "object", "required": [ "counting_method" ], "properties": { "counting_method": { "type": "string", "enum": [ "CSO" ] } } } ], "description": "Totals specific to centrally counted (centrale stemopneming, CSO) results" }, { "allOf": [ { "$ref": "#/components/schemas/DSOInvestigations", "description": "Totals specific to decentrally counted (decentrale stemopneming, DSO) results" }, { "type": "object", "required": [ "counting_method" ], "properties": { "counting_method": { "type": "string", "enum": [ "DSO" ] } } } ], "description": "Totals specific to decentrally counted (decentrale stemopneming, DSO) results" } ], "description": "GSB specific totals, depending on the vote counting method (CSO or DSO)." }, "GenerateElectionArgs": { "type": "object", "description": "Abacus API and asset server", "required": [ "committee_category", "election_category", "political_groups", "candidates_per_group", "polling_stations", "voters", "seats", "generate_p22_2_variants", "generate_drawing_lots", "with_data_entry", "first_data_entry", "second_data_entry", "turnout", "candidate_distribution_slope", "political_group_distribution_slope", "gsbs" ], "properties": { "candidate_distribution_slope": { "$ref": "#/components/schemas/RandomRange" }, "candidates_per_group": { "$ref": "#/components/schemas/RandomRange", "description": "Number of candidates to create" }, "committee_category": { "$ref": "#/components/schemas/CommitteeCategory", "description": "GSB or CSB" }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod", "description": "CSO or DSO" }, "custom_name": { "type": "string", "description": "Custom election name" }, "election_category": { "$ref": "#/components/schemas/ElectionCategory", "description": "Municipal, Provincial or WaterAuthority" }, "first_data_entry": { "$ref": "#/components/schemas/RandomRange", "description": "Percentage of the first data entry to complete if data entry is included" }, "generate_drawing_lots": { "type": "boolean", "description": "Generate multiple elections, each resulting in drawing lots" }, "generate_p22_2_variants": { "type": "boolean", "description": "Generate multiple elections, each resulting in a different P 22-2 variant" }, "gsbs": { "$ref": "#/components/schemas/RandomRange", "description": "Amount of GSBs" }, "political_group_distribution_slope": { "$ref": "#/components/schemas/RandomRange" }, "political_groups": { "$ref": "#/components/schemas/RandomRange", "description": "Number of political groups to create" }, "polling_stations": { "$ref": "#/components/schemas/RandomRange", "description": "Number of polling stations to create" }, "seats": { "$ref": "#/components/schemas/RandomRange", "description": "Number of seats in the election" }, "second_data_entry": { "$ref": "#/components/schemas/RandomRange", "description": "Percentage of the completed first data entries that also get a second data entry" }, "turnout": { "$ref": "#/components/schemas/RandomRange", "description": "Percentage of voters that voted (given we generate data entries)" }, "voters": { "$ref": "#/components/schemas/RandomRange", "description": "Number of voters to create" }, "with_data_entry": { "type": "boolean", "description": "Include (part of) data entry for this election" } } }, "HighestAverageAssignedSeat": { "type": "object", "required": [ "selected_list_number", "list_options", "list_assigned", "list_exhausted", "votes_per_seat" ], "properties": { "drawing_lots": { "$ref": "#/components/schemas/ListDrawingLotsVariant" }, "list_assigned": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "list_exhausted": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "list_options": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "selected_list_number": { "$ref": "#/components/schemas/PGNumber" }, "votes_per_seat": { "$ref": "#/components/schemas/DisplayFraction" } } }, "HighestAverageResidualSeatDrawingLots": { "type": "object", "required": [ "max_average", "residual_seat_numbers", "options", "list_averages" ], "properties": { "list_averages": { "type": "array", "items": { "$ref": "#/components/schemas/ListAverage" } }, "max_average": { "$ref": "#/components/schemas/DisplayFraction" }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "residual_seat_numbers": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } } }, "InvestigationConcludedWithNewResults": { "type": "object", "required": [ "reason", "findings" ], "properties": { "findings": { "type": "string" }, "reason": { "type": "string" } }, "additionalProperties": false }, "InvestigationConcludedWithoutNewResults": { "type": "object", "required": [ "reason", "findings" ], "properties": { "findings": { "type": "string" }, "reason": { "type": "string" } }, "additionalProperties": false }, "InvestigationInProgress": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string" } }, "additionalProperties": false }, "InvestigationListResponse": { "type": "object", "description": "Investigation list response", "required": [ "investigations" ], "properties": { "investigations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStationInvestigation" } } }, "additionalProperties": false }, "InvestigationStatus": { "oneOf": [ { "type": "object", "required": [ "state", "status" ], "properties": { "state": { "$ref": "#/components/schemas/InvestigationInProgress" }, "status": { "type": "string", "enum": [ "InProgress" ] } } }, { "type": "object", "required": [ "state", "status" ], "properties": { "state": { "$ref": "#/components/schemas/InvestigationConcludedWithoutNewResults" }, "status": { "type": "string", "enum": [ "ConcludedWithoutNewResults" ] } } }, { "type": "object", "required": [ "state", "status" ], "properties": { "state": { "$ref": "#/components/schemas/InvestigationConcludedWithNewResults" }, "status": { "type": "string", "enum": [ "ConcludedWithNewResults" ] } } } ] }, "KeypairReminder": { "type": "string", "enum": [ "Dismissable", "NonDismissable" ] }, "LargestRemainderAssignedSeat": { "type": "object", "required": [ "selected_list_number", "list_options", "list_assigned", "remainder_votes" ], "properties": { "drawing_lots": { "$ref": "#/components/schemas/ListDrawingLotsVariant" }, "list_assigned": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "list_options": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "remainder_votes": { "$ref": "#/components/schemas/DisplayFraction" }, "selected_list_number": { "$ref": "#/components/schemas/PGNumber" } } }, "LargestRemainderResidualSeatDrawingLots": { "type": "object", "required": [ "max_remainder", "residual_seat_numbers", "options", "list_remainders" ], "properties": { "list_remainders": { "type": "array", "items": { "$ref": "#/components/schemas/ListRemainder" } }, "max_remainder": { "$ref": "#/components/schemas/DisplayFraction" }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/PGNumber" } }, "residual_seat_numbers": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } } }, "ListAverage": { "type": "object", "required": [ "pg_number", "average" ], "properties": { "average": { "$ref": "#/components/schemas/DisplayFraction" }, "pg_number": { "$ref": "#/components/schemas/PGNumber" } } }, "ListCandidateNomination": { "type": "object", "required": [ "list_number", "list_name", "list_seats", "preferential_candidate_nomination", "other_candidate_nomination", "updated_candidate_ranking" ], "properties": { "list_name": { "type": "string" }, "list_number": { "$ref": "#/components/schemas/PGNumber" }, "list_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "other_candidate_nomination": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateVotes" } }, "preferential_candidate_nomination": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateVotes" } }, "updated_candidate_ranking": { "type": "array", "items": { "$ref": "#/components/schemas/Candidate" } } } }, "ListDrawingLotsVariant": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/HighestAverageResidualSeatDrawingLots", "description": "Draw lots for assigning a highest average residual seat" }, { "type": "object", "required": [ "variant" ], "properties": { "variant": { "type": "string", "enum": [ "HighestAverageResidualSeat" ] } } } ], "description": "Draw lots for assigning a highest average residual seat" }, { "allOf": [ { "$ref": "#/components/schemas/LargestRemainderResidualSeatDrawingLots", "description": "Draw lots for assigning a largest remainder residual seat" }, { "type": "object", "required": [ "variant" ], "properties": { "variant": { "type": "string", "enum": [ "LargestRemainderResidualSeat" ] } } } ], "description": "Draw lots for assigning a largest remainder residual seat" }, { "allOf": [ { "$ref": "#/components/schemas/AbsoluteMajorityDrawingLots", "description": "Draw lots for retracting a seat to be reassigned because of absolute majority (P9),\nretracted seat was from a highest average assignment" }, { "type": "object", "required": [ "variant" ], "properties": { "variant": { "type": "string", "enum": [ "AbsoluteMajorityHighestAverage" ] } } } ], "description": "Draw lots for retracting a seat to be reassigned because of absolute majority (P9),\nretracted seat was from a highest average assignment" }, { "allOf": [ { "$ref": "#/components/schemas/AbsoluteMajorityDrawingLots", "description": "Draw lots for retracting a seat to be reassigned because of absolute majority (P9),\nretracted seat was from a largest remainder assignment" }, { "type": "object", "required": [ "variant" ], "properties": { "variant": { "type": "string", "enum": [ "AbsoluteMajorityLargestRemainder" ] } } } ], "description": "Draw lots for retracting a seat to be reassigned because of absolute majority (P9),\nretracted seat was from a largest remainder assignment" } ] }, "ListDrawn": { "type": "object", "description": "The list that has been drawn plus information to assert the correct drawing", "required": [ "variant", "drawn" ], "properties": { "drawn": { "$ref": "#/components/schemas/PGNumber", "description": "The list that the lot was drawn for" }, "variant": { "$ref": "#/components/schemas/ListDrawingLotsVariant", "description": "The type of seat assignment or retraction that lots need to be drawn for" } } }, "ListExhaustionRemovedSeat": { "type": "object", "required": [ "list_retracted_seat", "full_seat" ], "properties": { "full_seat": { "type": "boolean" }, "list_retracted_seat": { "$ref": "#/components/schemas/PGNumber" } } }, "ListRemainder": { "type": "object", "required": [ "pg_number", "remainder" ], "properties": { "pg_number": { "$ref": "#/components/schemas/PGNumber" }, "remainder": { "$ref": "#/components/schemas/DisplayFraction" } } }, "ListSeatAssignment": { "type": "object", "required": [ "list_number", "votes_cast", "remainder_votes", "meets_remainder_threshold", "full_seats", "residual_seats", "total_seats" ], "properties": { "full_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "list_number": { "$ref": "#/components/schemas/PGNumber" }, "meets_remainder_threshold": { "type": "boolean" }, "remainder_votes": { "$ref": "#/components/schemas/DisplayFraction" }, "residual_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "total_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "votes_cast": { "type": "integer", "format": "int64", "minimum": 0 } } }, "ListStanding": { "type": "object", "required": [ "list_number", "votes_cast", "remainder_votes", "meets_remainder_threshold", "next_votes_per_seat", "full_seats", "residual_seats" ], "properties": { "full_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "list_number": { "$ref": "#/components/schemas/PGNumber" }, "meets_remainder_threshold": { "type": "boolean" }, "next_votes_per_seat": { "$ref": "#/components/schemas/DisplayFraction" }, "remainder_votes": { "$ref": "#/components/schemas/DisplayFraction" }, "residual_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "votes_cast": { "type": "integer", "format": "int64", "minimum": 0 } } }, "LoginResponse": { "type": "object", "required": [ "user_id", "username", "role", "needs_password_change" ], "properties": { "fullname": { "type": "string" }, "needs_password_change": { "type": "boolean" }, "role": { "$ref": "#/components/schemas/Role" }, "user_id": { "$ref": "#/components/schemas/UserId" }, "username": { "type": "string" } }, "additionalProperties": false }, "NewElection": { "type": "object", "description": "Struct for creating a new election in Abacus.\n\nThis struct does not contain the internal Abacus election id, as that is\ngenerated by Abacus when creating a new election.\n\nNote: an election within Abacus does not represent the entire election, but\nrather a single committee (i.e. stembureau at the CSB, HSB or GSB level)\nwithin the election.\n\nPlease take a look at [`ElectionWithPoliticalGroups`] for the full election\nrepresentation, or [`Election`] for the election representation without\npolitical groups and their candidates.", "required": [ "name", "official_name", "committee_category", "election_id", "location", "authority_id", "authority_name", "authority_region", "district", "category", "sub_category", "number_of_seats", "number_of_voters", "election_date", "nomination_date", "political_groups" ], "properties": { "authority_id": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_id`]" }, "authority_name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_name`]" }, "authority_region": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::authority_region`]" }, "category": { "$ref": "#/components/schemas/ElectionCategory", "description": "See [`ElectionWithPoliticalGroups::category`]" }, "committee_category": { "$ref": "#/components/schemas/CommitteeCategory", "description": "See [`ElectionWithPoliticalGroups::committee_category`]" }, "counting_method": { "$ref": "#/components/schemas/VoteCountingMethod", "description": "See [`ElectionWithPoliticalGroups::counting_method`]" }, "district": { "$ref": "#/components/schemas/CommitteeDistrict", "description": "See [`ElectionWithPoliticalGroups::district`]" }, "domain": { "$ref": "#/components/schemas/ElectionDomain", "description": "See [`ElectionWithPoliticalGroups::domain`]" }, "election_date": { "type": "string", "format": "date", "description": "See [`ElectionWithPoliticalGroups::election_date`]" }, "election_id": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::election_id`]" }, "location": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::location`]" }, "name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::name`]" }, "nomination_date": { "type": "string", "format": "date", "description": "See [`ElectionWithPoliticalGroups::nomination_date`]" }, "number_of_seats": { "type": "integer", "format": "int32", "description": "See [`ElectionWithPoliticalGroups::number_of_seats`]", "minimum": 0 }, "number_of_voters": { "type": "integer", "format": "int32", "description": "See [`ElectionWithPoliticalGroups::number_of_voters`]", "minimum": 0 }, "official_name": { "type": "string", "description": "See [`ElectionWithPoliticalGroups::official_name`]" }, "political_groups": { "type": "array", "items": { "$ref": "#/components/schemas/RegisteredPoliticalGroup" }, "description": "See [`ElectionWithPoliticalGroups::political_groups`]" }, "sub_category": { "$ref": "#/components/schemas/ElectionSubCategory", "description": "See [`ElectionWithPoliticalGroups::sub_category`]" } }, "additionalProperties": false }, "NextSessionResults": { "type": "object", "description": "NextSessionResults, following the fields in Model Na 14-2 Bijlage 1/Na 14-1 versie 2.\n\nSee \"Model Na 14-2. Corrigendum bij het proces-verbaal van een gemeentelijk stembureau/\nstembureau voor het openbaar lichaam, Bijlage 1: uitkomsten per stembureau\" from\n.\nSee also \"Model Na 14-1 (Corrigendum bij het proces-verbaal van een stembureau)\"\n.", "required": [ "voters_counts", "votes_counts", "differences_counts", "political_group_votes" ], "properties": { "differences_counts": { "$ref": "#/components/schemas/DifferencesCounts", "description": "Differences counts (\"Verschil tussen het aantal toegelaten kiezers en het aantal getelde stembiljetten\")" }, "political_group_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupCandidateVotes" }, "description": "Vote counts per list and candidate (\"Aantal stemmen per lijst en kandidaat\")" }, "voters_counts": { "$ref": "#/components/schemas/VotersCounts", "description": "Voters counts (\"Aantal toegelaten kiezers\")" }, "votes_counts": { "$ref": "#/components/schemas/VotesCounts", "description": "Votes counts (\"Aantal getelde stembiljetten\")" } }, "additionalProperties": false }, "PGNumber": { "type": "integer", "format": "int32", "minimum": 0 }, "PoliticalGroup": { "type": "object", "description": "Political group and its candidates (with name as used for display purposes)", "required": [ "number", "name", "candidates" ], "properties": { "candidates": { "type": "array", "items": { "$ref": "#/components/schemas/Candidate" }, "description": "List of candidates of the political group" }, "name": { "type": "string", "description": "Political group name as used for display purposes (with 'Blanco' in case of empty registered name)" }, "number": { "type": "integer", "format": "int32", "description": "Political group number", "minimum": 0 } }, "additionalProperties": false }, "PoliticalGroupCandidateVotes": { "type": "object", "required": [ "number", "total", "candidate_votes" ], "properties": { "candidate_votes": { "type": "array", "items": { "$ref": "#/components/schemas/CandidateVotes" } }, "number": { "type": "integer", "format": "int32", "minimum": 0 }, "total": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "PoliticalGroupTotalVotes": { "type": "object", "required": [ "number", "total" ], "properties": { "number": { "type": "integer", "format": "int32", "minimum": 0 }, "total": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "PollingStation": { "type": "object", "description": "Polling station linked to an election, committee session and (previous) data entry.", "required": [ "id", "election_id", "committee_session_id", "name", "number", "address", "postal_code", "locality" ], "properties": { "address": { "type": "string" }, "committee_session_id": { "$ref": "#/components/schemas/CommitteeSessionId" }, "data_entry_id": { "$ref": "#/components/schemas/DataEntryId" }, "election_id": { "$ref": "#/components/schemas/ElectionId" }, "id": { "$ref": "#/components/schemas/PollingStationId" }, "locality": { "type": "string" }, "name": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_type": { "$ref": "#/components/schemas/PollingStationType" }, "postal_code": { "type": "string" }, "prev_data_entry_id": { "$ref": "#/components/schemas/DataEntryId" } }, "additionalProperties": false }, "PollingStationFileRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "string" } } }, "PollingStationFirstSession": { "allOf": [ { "$ref": "#/components/schemas/BasePollingStation" }, { "type": "object", "required": [ "committee_session_id", "data_entry_id" ], "properties": { "committee_session_id": { "$ref": "#/components/schemas/CommitteeSessionId" }, "data_entry_id": { "$ref": "#/components/schemas/DataEntryId" } } } ], "description": "Polling station in a first committee session.\nNo investigations, no previous data entries." }, "PollingStationForSession": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/PollingStationFirstSession" }, { "type": "object", "required": [ "session_type" ], "properties": { "session_type": { "type": "string", "enum": [ "First" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/PollingStationNextSession" }, { "type": "object", "required": [ "session_type" ], "properties": { "session_type": { "type": "string", "enum": [ "Next" ] } } } ] } ], "description": "A single polling station for either a first or next committee session" }, "PollingStationId": { "type": "integer", "format": "int32", "minimum": 0 }, "PollingStationInvestigation": { "type": "object", "required": [ "polling_station_id", "reason" ], "properties": { "corrected_results": { "type": "boolean" }, "data_entry_id": { "$ref": "#/components/schemas/DataEntryId" }, "findings": { "type": "string" }, "polling_station_id": { "$ref": "#/components/schemas/PollingStationId" }, "reason": { "type": "string" } }, "additionalProperties": false }, "PollingStationInvestigationConcludeRequest": { "type": "object", "required": [ "findings", "corrected_results" ], "properties": { "corrected_results": { "type": "boolean" }, "findings": { "type": "string" } }, "additionalProperties": false }, "PollingStationInvestigationCreateRequest": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string" } }, "additionalProperties": false }, "PollingStationInvestigationUpdateRequest": { "type": "object", "required": [ "reason" ], "properties": { "accept_data_entry_deletion": { "type": "boolean" }, "corrected_results": { "type": "boolean" }, "findings": { "type": "string" }, "reason": { "type": "string" } }, "additionalProperties": false }, "PollingStationListResponse": { "type": "object", "description": "Polling station list response", "required": [ "polling_stations" ], "properties": { "polling_stations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStation" } } }, "additionalProperties": false }, "PollingStationNextSession": { "allOf": [ { "$ref": "#/components/schemas/BasePollingStation" }, { "type": "object", "required": [ "committee_session_id" ], "properties": { "committee_session_id": { "$ref": "#/components/schemas/CommitteeSessionId" }, "investigation_status": { "$ref": "#/components/schemas/InvestigationStatus" }, "prev_data_entry_id": { "$ref": "#/components/schemas/DataEntryId" } } } ], "description": "Polling station in a next committee session.\nMay have previous data entries and investigation state." }, "PollingStationRequest": { "type": "object", "description": "Polling station of a certain [crate::domain::election::Election]", "required": [ "name", "address", "postal_code", "locality" ], "properties": { "address": { "type": "string" }, "locality": { "type": "string" }, "name": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 }, "number_of_voters": { "type": "integer", "format": "int32", "minimum": 0 }, "polling_station_type": { "$ref": "#/components/schemas/PollingStationType" }, "postal_code": { "type": "string" } }, "additionalProperties": false }, "PollingStationType": { "type": "string", "description": "Type of Polling station", "enum": [ "FixedLocation", "Special", "Mobile" ] }, "PollingStationValidateImportResponse": { "type": "object", "required": [ "polling_stations", "polling_station_definition_matches_election" ], "properties": { "polling_station_definition_matches_election": { "type": "boolean" }, "polling_stations": { "type": "array", "items": { "$ref": "#/components/schemas/PollingStationRequest" } } } }, "PollingStationsRequest": { "type": "object", "required": [ "file_name", "polling_stations" ], "properties": { "file_name": { "type": "string" }, "polling_stations": { "type": "string" } } }, "PreferenceThreshold": { "type": "object", "required": [ "percentage", "number_of_votes" ], "properties": { "number_of_votes": { "$ref": "#/components/schemas/DisplayFraction" }, "percentage": { "type": "integer", "format": "int64", "minimum": 0 } } }, "ProcessApportionmentResponse": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/ElectionApportionmentResponse" }, { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "Finalised" ] } } } ] }, { "type": "object", "required": [ "election_totals", "seat_assignment", "status" ], "properties": { "election_totals": { "$ref": "#/components/schemas/ElectionTotals" }, "seat_assignment": { "$ref": "#/components/schemas/SeatAssignment" }, "status": { "type": "string", "enum": [ "DrawingLotsRequired" ] } } } ] }, "RandomRange": { "type": "string" }, "ReasonInvestigationOwnInitiative": { "type": "object", "description": "Reason for investigation on own initiative", "required": [ "unaccounted_difference", "other_error" ], "properties": { "other_error": { "type": "boolean", "description": "Because of a (suspected) other error\n(\"Vanwege (het vermoeden van) een andere fout\")" }, "unaccounted_difference": { "type": "boolean", "description": "Because of an unaccounted-for difference\n(\"Vanwege een onverklaard verschil\")" } }, "additionalProperties": false }, "RedactedEmlHash": { "type": "object", "required": [ "chunks", "redacted_indexes" ], "properties": { "chunks": { "type": "array", "items": { "type": "string" }, "description": "Array holding the hash chunks as text" }, "redacted_indexes": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "description": "Indexes of chunks that will be empty, sorted" } } }, "RegionCategory": { "type": "string", "description": "Category of a region, as defined by EML-NL", "enum": [ "State", "WaterAuthority", "Province", "ElectoralDistrict", "Municipality", "PollingStation" ] }, "RegionDetails": { "type": "object", "description": "Identifies a specific region from the election tree for usage within Abacus.", "required": [ "name", "key", "roman_numerals", "frisian_export_allowed" ], "properties": { "frisian_export_allowed": { "type": "boolean", "description": "Whether this region allows Frisian export." }, "key": { "$ref": "#/components/schemas/RegionKey", "description": "Key of the region (combination of category and id)" }, "name": { "type": "string", "description": "Name of the region" }, "roman_numerals": { "type": "boolean", "description": "Whether this region uses roman numerals for its contest id." } } }, "RegionKey": { "type": "object", "description": "Identifies a specific region from the election tree for usage within Abacus.", "required": [ "category" ], "properties": { "category": { "$ref": "#/components/schemas/RegionCategory", "description": "Category of the region, as defined by EML_NL" }, "number": { "type": "integer", "format": "int32", "description": "Identifier of the region, if it has one.", "minimum": 0 } } }, "RegisteredPoliticalGroup": { "type": "object", "description": "Political group and its candidates (with registered name as imported from the EML)", "required": [ "number", "registered_name", "candidates" ], "properties": { "candidates": { "type": "array", "items": { "$ref": "#/components/schemas/Candidate" }, "description": "List of candidates of the political group" }, "number": { "type": "integer", "format": "int32", "description": "Political group number", "minimum": 0 }, "registered_name": { "type": "string", "description": "Registered political group name as imported from the candidates list EML (230)" } }, "additionalProperties": false }, "ResolveDifferencesAction": { "type": "string", "enum": [ "keep_first_and_discard_second", "keep_first_and_correct_second", "keep_second_and_discard_first", "keep_second_and_correct_first", "discard_both" ] }, "ResolveErrorsAction": { "type": "string", "enum": [ "discard_first_entry", "resume_first_entry" ] }, "Results": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/DSOFirstSessionResults", "description": "Results for decentrally counted (DSO) elections, first election committee session.\nThis contains the data entry values from Model Model N 10-1 and possibly in combination with the values from Model Na 14-1 versie 1." }, { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "enum": [ "DSOFirstSession" ] } } } ], "description": "Results for decentrally counted (DSO) elections, first election committee session.\nThis contains the data entry values from Model Model N 10-1 and possibly in combination with the values from Model Na 14-1 versie 1." }, { "allOf": [ { "$ref": "#/components/schemas/NextSessionResults", "description": "Results for decentrally counted (DSO) elections, any subsequent election committee session.\nThis contains the data entry values from Model Na 14-1 versie 2." }, { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "enum": [ "DSONextSession" ] } } } ], "description": "Results for decentrally counted (DSO) elections, any subsequent election committee session.\nThis contains the data entry values from Model Na 14-1 versie 2." }, { "allOf": [ { "$ref": "#/components/schemas/CSOFirstSessionResults", "description": "Results for centrally counted (CSO) elections, first election committee session.\nThis contains the data entry values from Model Na 31-2 Bijlage 1." }, { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "enum": [ "CSOFirstSession" ] } } } ], "description": "Results for centrally counted (CSO) elections, first election committee session.\nThis contains the data entry values from Model Na 31-2 Bijlage 1." }, { "allOf": [ { "$ref": "#/components/schemas/NextSessionResults", "description": "Results for centrally counted (CSO) elections, any subsequent election committee session.\nThis contains the data entry values from Model Na 14-2 Bijlage 1." }, { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "enum": [ "CSONextSession" ] } } } ], "description": "Results for centrally counted (CSO) elections, any subsequent election committee session.\nThis contains the data entry values from Model Na 14-2 Bijlage 1." }, { "allOf": [ { "$ref": "#/components/schemas/GSBResults", "description": "HSB/CSB enters GSB results\nThis contains the data entry values from Model Na 31-2." }, { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "enum": [ "GSB" ] } } } ], "description": "HSB/CSB enters GSB results\nThis contains the data entry values from Model Na 31-2." } ], "description": "Results contains the results for a data entry\n\nThe exact type of results depends on the election counting method,\nelection committee category and whether this is the first or any subsequent data entry session." }, "Role": { "type": "string", "enum": [ "administrator", "coordinator_gsb", "coordinator_csb", "typist_gsb", "typist_csb" ] }, "SaveDataEntryResponse": { "type": "object", "description": "Response structure for saving data entry", "required": [ "validation_results" ], "properties": { "validation_results": { "$ref": "#/components/schemas/ValidationResults" } }, "additionalProperties": false }, "SeatAssignment": { "type": "object", "required": [ "seats", "full_seats", "residual_seats", "quota", "steps", "standings" ], "properties": { "full_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "quota": { "$ref": "#/components/schemas/DisplayFraction" }, "residual_seats": { "type": "integer", "format": "int32", "minimum": 0 }, "seats": { "type": "integer", "format": "int32", "minimum": 0 }, "standings": { "type": "array", "items": { "$ref": "#/components/schemas/ListSeatAssignment" } }, "steps": { "type": "array", "items": { "$ref": "#/components/schemas/SeatChangeStep" } } } }, "SeatChange": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/HighestAverageAssignedSeat" }, { "type": "object", "required": [ "changed_by" ], "properties": { "changed_by": { "type": "string", "enum": [ "HighestAverageAssignment" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/HighestAverageAssignedSeat" }, { "type": "object", "required": [ "changed_by" ], "properties": { "changed_by": { "type": "string", "enum": [ "UniqueHighestAverageAssignment" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/LargestRemainderAssignedSeat" }, { "type": "object", "required": [ "changed_by" ], "properties": { "changed_by": { "type": "string", "enum": [ "LargestRemainderAssignment" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/AbsoluteMajorityReassignedSeat" }, { "type": "object", "required": [ "changed_by" ], "properties": { "changed_by": { "type": "string", "enum": [ "AbsoluteMajorityReassignment" ] } } } ] }, { "allOf": [ { "$ref": "#/components/schemas/ListExhaustionRemovedSeat" }, { "type": "object", "required": [ "changed_by" ], "properties": { "changed_by": { "type": "string", "enum": [ "ListExhaustionRemoval" ] } } } ] } ] }, "SeatChangeStep": { "type": "object", "required": [ "change", "standings" ], "properties": { "change": { "$ref": "#/components/schemas/SeatChange" }, "residual_seat_number": { "type": "integer", "format": "int32", "minimum": 0 }, "standings": { "type": "array", "items": { "$ref": "#/components/schemas/ListStanding" } } } }, "SubCommittee": { "type": "object", "description": "Sub electoral committee base entity, independent\nof the election, committee session and data entry.", "required": [ "id", "number", "name", "category", "authority_id", "authority_name", "certificates" ], "properties": { "authority_id": { "type": "string" }, "authority_name": { "type": "string" }, "category": { "$ref": "#/components/schemas/CommitteeCategory" }, "certificates": { "type": "array", "items": { "$ref": "#/components/schemas/Certificate" } }, "id": { "$ref": "#/components/schemas/SubCommitteeId" }, "name": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "SubCommitteeFirstSession": { "type": "object", "description": "Sub electoral committee in a first committee session.", "required": [ "committee_session_id", "id", "number", "name", "category", "authority_id", "authority_name", "data_entry_id" ], "properties": { "authority_id": { "type": "string" }, "authority_name": { "type": "string" }, "category": { "$ref": "#/components/schemas/CommitteeCategory" }, "committee_session_id": { "$ref": "#/components/schemas/CommitteeSessionId" }, "data_entry_id": { "$ref": "#/components/schemas/DataEntryId" }, "id": { "$ref": "#/components/schemas/SubCommitteeId" }, "name": { "type": "string" }, "number": { "type": "integer", "format": "int32", "minimum": 0 } } }, "SubCommitteeId": { "type": "integer", "format": "int32", "minimum": 0 }, "SumCount": { "type": "object", "description": "Contains a sum count, containing both the count and a list of polling\nstations that contributed to it.", "required": [ "count", "data_entry_sources" ], "properties": { "count": { "type": "integer", "format": "int32", "minimum": 0 }, "data_entry_sources": { "type": "array", "items": { "$ref": "#/components/schemas/DataEntrySourceNumber" } } }, "additionalProperties": false }, "UpdateUserRequest": { "type": "object", "properties": { "fullname": { "type": "string" }, "temp_password": { "type": "string" } }, "additionalProperties": false }, "User": { "type": "object", "description": "User object, corresponds to a row in the users table", "required": [ "id", "username", "role", "is_logged_in", "updated_at", "created_at" ], "properties": { "created_at": { "type": "string" }, "fullname": { "type": "string" }, "id": { "$ref": "#/components/schemas/UserId" }, "is_logged_in": { "type": "boolean" }, "last_activity_at": { "type": "string" }, "role": { "$ref": "#/components/schemas/Role" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "UserId": { "type": "integer", "format": "int32", "minimum": 0 }, "UserListResponse": { "type": "object", "required": [ "users" ], "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } }, "additionalProperties": false }, "ValidationResult": { "type": "object", "required": [ "fields", "code" ], "properties": { "code": { "$ref": "#/components/schemas/ValidationResultCode" }, "context": { "$ref": "#/components/schemas/ValidationResultContext" }, "fields": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "ValidationResultCode": { "type": "string", "enum": [ "F101", "F102", "F103", "F104", "F111", "F112", "F121", "F122", "F131", "F132", "F133", "F134", "F135", "F201", "F202", "F203", "F204", "F301", "F302", "F303", "F304", "F305", "F306", "F307", "F308", "F309", "F310", "F311", "F312", "F313", "F401", "F402", "F403", "W001", "W002", "W201", "W202", "W203", "W204", "W205", "W206" ] }, "ValidationResultContext": { "type": "object", "properties": { "political_group_number": { "type": "integer", "format": "int32", "minimum": 0 } }, "additionalProperties": false }, "ValidationResults": { "type": "object", "required": [ "errors", "warnings" ], "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationResult" } }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationResult" } } }, "additionalProperties": false }, "VoteCountingMethod": { "type": "string", "enum": [ "CSO", "DSO" ] }, "VotersCounts": { "type": "object", "description": "Voters counts, part of the results.", "required": [ "poll_card_count", "proxy_certificate_count", "total_admitted_voters_count" ], "properties": { "poll_card_count": { "type": "integer", "format": "int32", "description": "Number of valid poll cards (\"Aantal geldige stempassen\")", "minimum": 0 }, "proxy_certificate_count": { "type": "integer", "format": "int32", "description": "Number of valid proxy certificates (\"Aantal geldige volmachtbewijzen\")", "minimum": 0 }, "total_admitted_voters_count": { "type": "integer", "format": "int32", "description": "Total number of admitted voters (\"Totaal aantal toegelaten kiezers\")", "minimum": 0 }, "voter_card_count": { "type": "integer", "format": "int32", "description": "Number of valid voter cards (\"Aantal geldige kiezerspassen\")", "minimum": 0 } }, "additionalProperties": false }, "VotesCounts": { "type": "object", "description": "Votes counts, part of the results.\nFollowing the fields in Model CSO Na 31-2 Bijlage 1.", "required": [ "political_group_total_votes", "total_votes_candidates_count", "blank_votes_count", "invalid_votes_count", "total_votes_cast_count" ], "properties": { "blank_votes_count": { "type": "integer", "format": "int32", "description": "Number of blank votes (\"Blanco stembiljetten\")", "minimum": 0 }, "invalid_votes_count": { "type": "integer", "format": "int32", "description": "Number of invalid votes (\"Ongeldige stembiljetten\")", "minimum": 0 }, "political_group_total_votes": { "type": "array", "items": { "$ref": "#/components/schemas/PoliticalGroupTotalVotes" }, "description": "Total votes per list" }, "total_votes_candidates_count": { "type": "integer", "format": "int32", "description": "Total number of valid votes on candidates\n(\"Totaal stemmen op kandidaten\")", "minimum": 0 }, "total_votes_cast_count": { "type": "integer", "format": "int32", "description": "Total number of votes cast (\"Totaal uitgebrachte stemmen\")", "minimum": 0 } }, "additionalProperties": false }, "YesNo": { "type": "object", "description": "Yes/No response structure for boolean questions with separate yes and no fields.", "required": [ "yes", "no" ], "properties": { "no": { "type": "boolean" }, "yes": { "type": "boolean" } }, "additionalProperties": false }, "u32": { "type": "integer", "format": "int32", "minimum": 0 } }, "securitySchemes": { "cookie_auth": { "type": "apiKey", "in": "cookie", "name": "ABACUS_SESSION" } } } }