Submit Report Directly to Bufdir via API
For organizations that have API access configured with Bufdir, the export flow can include a direct API submission step. After generating the report data, the Bufdir API integration service formats the payload according to Bufdir's schema configuration, authenticates the request, and submits it. The coordinator receives a confirmation screen with a Bufdir reference number, which is stored in the audit repository. This eliminates the need to download a file and separately log into Bufdir's portal, reducing the reporting cycle to a single in-app workflow. The feature is gated by the Bufdir API integration being configured for the organization.
User Story
Acceptance Criteria
- Given my organization has a Bufdir API integration configured, when I reach the export options, then a 'Submit to Bufdir' option is available in addition to file download
- Given I choose API submission, when I confirm, then the system formats the payload using the Bufdir schema config and submits via the API client
- Given the submission succeeds, when the response is received, then a confirmation screen shows the Bufdir reference number and submission timestamp
- Given the submission reference is received, when it is stored, then the audit repository records the reference number linked to the export run
- Given the API submission fails, when an error is returned, then a clear error message is shown and I am offered the option to download the file and submit manually instead
- Given my organization does not have Bufdir API configured, when I view export options, then the API submission option is not visible and only file download is available
Business Value
Direct API submission removes the last manual step from the Bufdir reporting workflow, completing the vision of 'press one button and get what Bufdir needs' described by all workshop participants. It also creates a verifiable audit trail with Bufdir reference numbers, which is essential for compliance and funding documentation. Organizations using this feature will complete their reporting in under 5 minutes instead of the multi-hour process today.
Components
- Bufdir API Client service
- Bufdir API Integration Service (Future) service
- Bufdir Column Schema Config Repository data
- Bufdir Export Orchestrator Service service
- Export Audit Log Service service
- Export Audit Log Repository data
- Bufdir Format Serializer data
- Bufdir Export Edge Function infrastructure