PDF Generation Service
API Contract
REST
/api/v1/pdf-generation
1 endpoint
POST
/api/v1/pdf-generation/api/v1/pdf-generation/generate
Generate a PDF report from aggregated export data
Public
Request Example
{
"payload": {
"org_id": "org_482",
"scope_id": "scope_region_07",
"scope_level": "region",
"date_range": {
"from": "2025-01-01",
"to": "2025-12-31"
},
"activity_rows": [
{
"bufdir_category": "individual_mentoring",
"count": 842,
"hours": 6740
},
{
"bufdir_category": "group_activity",
"count": 405,
"hours": 3092.5
}
],
"mentor_count": 83,
"youth_count": 412
},
"metadata": {
"org_name": "Rogaland Røde Kors",
"period_label": "Årsrapport 2025",
"generated_by": "usr_1021"
}
}
Response Example
{
"report_id": "rpt_pdf_20260326_001",
"filename": "bufdir_export_rogaland_2025.pdf",
"size_bytes": 204800,
"mime_type": "application/pdf",
"download_url": "https://storage.example.no/exports/org_482/rpt_pdf_20260326_001.pdf?token=xyz789",
"generated_at": "2026-03-26T10:22:00Z"
}