CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Project Overview
This is a Mintlify-based documentation site for e-invoice.be, an international Peppol Access Point and SMP operating under the Belgian Peppol Authority (BOSA). The documentation covers API integration, webhooks, and usage guides for electronic invoicing via Peppol. e-invoice.be serves:- Individual companies across multiple industries worldwide
- Public and private listed companies
- SaaS companies (via reseller programme)
- Public and government agencies
- Companies with or without ERP systems
Tech Stack
- Documentation framework: Mintlify (v4.2.177)
- Content format: MDX (Markdown + JSX components)
- Package manager: Bun (bun.lock present)
- Runtime: Node.js
Development Workflow
Local Development
To run the documentation site locally with live preview:Building
Mintlify handles the build process automatically when deployed. For local validation:Project Structure
Configuration (docs.json)
The docs.json file is the central configuration:
- Navigation structure: Defines tabs (Guides, API reference, Example invoices) and page organization
- Theme: Uses “willow” theme with blue color scheme (#0071b7 primary)
- API integration: References OpenAPI spec at
https://api.e-invoice.be/api/openapi.json - Branding: IBM Plex Sans font, custom logo at
/images/logo.svg
- Getting started: index, quickstart, authentication
- Core guides: creating-invoices, credit-notes, advanced-invoicing, invoice-totals, validation, lookup-participants
- Alternative formats: ubl-documents, pdf-documents
- Integration: webhooks
- Partners: reseller-programme
- API reference: Auto-generated from OpenAPI, plus overview page and custom schema documentation
- Example invoices: Sample invoice templates
Content Guidelines
File Organization
- Getting started guides: Root directory (quickstart.mdx, authentication.mdx, api-reference.mdx)
- Core guides:
/guides/directory (creating-invoices, credit-notes, advanced-invoicing, invoice-totals, validation, lookup-participants, ubl-documents, pdf-documents) - Integration guides:
/essentials/directory (webhooks) - API schemas:
/api-reference/schemas/directory (document.mdx, line-item.mdx) - Images:
/images/directory for static assets - ALWAYS update
docs.jsonnavigation after creating new pages - Use
.mdxextension for all content files
MDX Components
Mintlify provides built-in components used throughout the docs:Front Matter
Every MDX file requires YAML front matter:API Documentation
The API reference tab auto-generates from the OpenAPI specification at:Webhook System Architecture
The platform implements webhook notifications for document events:Event Types
document.received- Document successfully received via Peppoldocument.sent- Document successfully sentdocument.sent.failed- Send failuredocument.received.failed- Receive failure
Security Model
- Webhooks use HMAC-SHA256 signatures in
X-Signatureheader - Format:
sha256={hex_digest} - Payload is JSON-sorted and UTF-8 encoded before signing
- Verification required for production implementations
Payload Structure
Deployment
Mintlify handles deployment automatically via their platform. Changes pushed to the main branch trigger automatic deployments. The site is hosted at:https://docs.e-invoice.be
API Architecture
Base URLs:- Production:
https://api.e-invoice.be - Staging:
https://api-dev.e-invoice.be
Authorization header
Core Workflow
The e-invoice.be API follows this workflow:-
Validate JSON (
POST /api/validate/json) - Test invoice JSON before creating documents- CRITICAL: Validation must happen BEFORE document creation
- Only valid JSON that can convert to UBL BIS Billing 3.0 is accepted
- Does not create any documents - safe for testing
-
Create Document (
POST /api/documents/) - Create invoice/credit note- Requires valid JSON (pre-validated)
- Creates document in DRAFT state
- Returns document ID
-
Send via Peppol (
POST /api/documents/{id}/send) - Transmit to recipient- Changes state from DRAFT to TRANSIT
- Delivers via Peppol network
- Webhook notifications on success/failure
Key Endpoint Categories
Documents:POST /api/documents/- Create invoice/credit noteGET /api/documents/{id}- Get document detailsPOST /api/documents/{id}/send- Send via PeppolGET /api/inbox/- List received documentsGET /api/outbox/- List sent documents
POST /api/validate/json- Validate JSON structure (use extensively!)POST /api/validate/ubl- Validate UBL XMLGET /api/validate/peppol-id- Check if participant is registered
GET /api/lookup- Get participant detailsGET /api/lookup/participants- Search by name/identifier
POST /api/webhooks/- Create webhookGET /api/webhooks/- List webhooksPUT /api/webhooks/{id}- Update webhookDELETE /api/webhooks/{id}- Delete webhookPOST /api/webhooks/{id}/test- Test webhook
GET /api/me/- Get account information
Important Concepts
Peppol IDs vs Tax IDs
- Tax IDs in API: Use full VAT number format (e.g.,
BE1018265814for Belgian companies) - Peppol ID format:
scheme:identifier(e.g.,0208:0123456789) - Belgian companies use scheme
0208with CBE number (VAT number without ‘BE’ prefix) - Example: VAT number BE0123456789 → Peppol ID
0208:0123456789 - The API automatically converts tax IDs to Peppol ID format when transmitting
- Must be registered on Peppol network to receive e-invoices
- Always validate with
/api/validate/peppol-idbefore sending
Document States
DRAFT- Created but not sentTRANSIT- Being transmitted via PeppolSENT- Successfully deliveredFAILED- Transmission failedRECEIVED- Received from another party
UBL BIS Billing 3.0
- European standard for e-invoicing (EN 16931)
- The API converts JSON to UBL XML automatically
- All invoices must comply with this standard
- Use
/api/validate/jsonto ensure compliance
Documentation Style Guidelines
When creating or updating documentation:- Use professional, concise language - avoid casual phrases
- Include MDX front matter with
titleanddescriptionon all pages - Use Mintlify components (
<Warning>,<Note>,<Tip>,<CardGroup>) for emphasis - Add “Next Steps” section with
<CardGroup>navigation cards at the end of guides - Use real company examples: E-INVOICE BV (BE1018265814) as vendor, OpenPeppol VZW (BE0848934496) as customer
- Include
amountfield in line item examples (calculated as quantity × unit_price) - Keep examples consistent across all documentation
Important Notes
- This is a documentation-only repository - no backend code
- The actual e-invoice.be API and webhook service are separate systems
- OpenAPI spec is maintained externally and referenced by URL at
https://api.e-invoice.be/api/openapi.json - Always update
docs.jsonnavigation when adding pages - Mintlify won’t auto-discover new pages - Validation is REQUIRED before document creation - the API rejects invalid invoices