Bufdir API Client
API Contract
REST
/api/v1/bufdir-api
4 endpoints
POST
/api/v1/bufdir-api/api/v1/bufdir-api/authenticate
Authenticate against the Bufdir external API
Public
Request Example
{
"client_id": "eircodex_org_482",
"client_secret": "s3cr3t_token_here"
}
Response Example
{
"access_token": "eyJhbGciOiJSUzI1NiJ9.eyJvcmciOiJvcmdfNDgyIn0.sig",
"token_type": "Bearer",
"expires_in": 3600,
"issued_at": "2026-03-26T10:00:00Z"
}
POST
/api/v1/bufdir-api/api/v1/bufdir-api/submit
Submit a validated export payload to Bufdir
Public
Request Example
{
"report_id": "rpt_20250101_region07_pdf",
"org_id": "org_482",
"payload_version": "bufdir_2025_v2",
"payload": {
"organisasjonsnummer": "912345678",
"rapporteringsperiode": "2025",
"aktiviteter": [
{
"kategori": "individual_mentoring",
"antall": 842,
"timer": 6740
}
]
}
}
Response Example
{
"submission_reference_id": "bufdir_ref_20260326_00482",
"status": "received",
"submitted_at": "2026-03-26T10:30:00Z",
"bufdir_confirmation": "Rapport mottatt og registrert."
}
GET
/api/v1/bufdir-api/api/v1/bufdir-api/submission-status/:reference_id
Check status of a previously submitted Bufdir report
Public
Request Example
{}
Response Example
{
"reference_id": "bufdir_ref_20260326_00482",
"status": "accepted",
"submitted_at": "2026-03-26T10:30:00Z",
"processed_at": "2026-03-26T11:00:00Z",
"notes": "Rapporten er behandlet og godkjent."
}
POST
/api/v1/bufdir-api/api/v1/bufdir-api/validate-payload
Validate an export payload against Bufdir schema before submission
Public
Request Example
{
"payload_version": "bufdir_2025_v2",
"payload": {
"organisasjonsnummer": "912345678",
"rapporteringsperiode": "2025",
"aktiviteter": [
{
"kategori": "individual_mentoring",
"antall": 842,
"timer": 6740
}
]
}
}
Response Example
{
"is_valid": true,
"payload_version": "bufdir_2025_v2",
"errors": [],
"warnings": [
"Field 'kontaktperson' is recommended but not present."
]
}