Receiving e-invoices
This guide covers the automated receiving and management of purchase invoices via the Maventa REST API. The article explains how to activate and deactivate invoice receiving across different networks and guides you through downloading incoming invoices, invoice images, and attachments using Webhook notifications and GET requests. Additionally, this guide covers the handling of common HTTP error scenarios.
- Activating and deactivating invoice receiving
- Downloading invoices from Maventa
- Automated fraud protection (Detect)
- Error scenarios and their handling
Activating and deactivating invoice receiving
This guide deals with the use of the REST API. For SOAP API users, there is a separate "SOAP invoice receiving API" guide.
The Maventa REST API enables the automated reception and processing of purchase invoices directly into your invoicing software. The interface handles the secure routing of invoices, updates to electronic address directories, and automatic format conversions between different e-invoicing networks.
API integration makes invoice receiving fully automated and ensures company reachability across different invoicing channels. Invoice receiving is enabled or disabled on a per-company basis using network address profiles via API calls.
Activating invoice receiving
Activating receiving generates an electronic invoicing address for the company and automatically registers it in public directories. The API connects the company to country-specific bank and operator networks (Visma Network), the international Peppol network (Peppol Network), and scan service (Scan Network).
The company will also appear as an invoice recipient in Maventa's Finder tool and via the lookup method.
Deactivating invoice receiving
Deactivating a specific network removes the company from that electronic address directory, preventing suppliers from sending invoices via that network.
Visma Network registration cannot be removed as long as any Peppol or scanning registrations remain active. These must be deactivated before the main receiving function is closed.
ℹ️ Detailed, step-by-step instructions on enabling or disabling invoice receiving in the Maventa user interface can be found in a separate support article: Invoice receiving.
If invoice suppliers attempt to send e-invoices to a Maventa account where receiving is not active, suppliers will receive an error message from their own e-invoicing operator.
Downloading invoices from Maventa
Maventa provides real-time notifications and query interfaces for retrieving incoming invoices:
Real-time notifications (Webhooks)
The recommended way to monitor incoming invoices is to register the DOCUMENTS.INVOICE.RECEIVED webhook. When an invoice arrives, Maventa sends a notification (HTTP POST) to the target system.
Further information can be viewed in the documentation: Webhooks.
Fetching invoices (GET /v1/invoices/{id})
Received invoices can be downloaded into the system in a Maventa-supported XML format defined by your software. An up-to-date list of XML formats supported by Maventa can be found in the documentation: Supported XML formats.
Based on the identifier (id) of a received invoice, you can download the following from the system:
- Invoice XML content
- Visual invoice image (PDF)
- Any attachments included with the invoice
💡 Recommendation: In addition to Webhook notifications, it is advised to run a regular background polling process to account for potential network bypasses or error situations.
ℹ️ Detailed, step-by-step instructions on enabling or disabling invoice receiving in the Maventa user interface can be found in a separate support article: Exporting invoices from a Maventa account.
Automated fraud protection (Detect)
By integrating the Detect service, validation and fraud detection can be performed on incoming invoices. You can learn more about how the service works in the documentation: Detect.
Error scenarios and their handling
The Maventa API reports error situations using standard HTTP status codes (400–599). It is recommended that software handles both API errors and network connection outages.
A more detailed description of error handling can be viewed in the documentation: Error handling.
-
Error responses: In addition to the HTTP error code, the API returns a JSON-formatted error description (code, message, and details), which specifies the cause of the error.
-
Common status codes:
- 400 Bad Request: The request structure or parameters are invalid.
- 401 Unauthorized: Authentication failed or permissions are missing.
- 404 Not Found: The requested resource could not be found.
- 5XX Server Error: A temporary server-side error.