Send invoices and documents via the SendDocument SOAP endpoint: parameters, routing and status tracking.
With the SendDocument endpoint of the legacy SOAP API you send invoices and other documents through the eConnect platform. The platform automatically determines the best route: via the eConnect platform itself, via Peppol, or as a fallback by email.
Important: This is the legacy SOAP API. For new integrations we recommend the REST API.
When calling SendDocument you provide the source document along with the sender and recipient details. The platform then looks up the recipient in three steps:
Via/ReferenceIdTo/ReferenceId0106:KVK-number)To/EmailAddressSubjectPayload<?xml ...?>)TemplateId<SendDocument>
<Document>
<Via>
<ReferenceId>XCNL-123456</ReferenceId>
</Via>
<To>
<ReferenceId>0106:12345678</ReferenceId>
<EmailAddress>[email protected]</EmailAddress>
</To>
<Subject>Factuur 2026-001</Subject>
<Payload><!-- UBL-XML zonder prolog --></Payload>
<TemplateId>GLDT9223370666504283001RA000000006DTP2000001</TemplateId>
</Document>
</SendDocument>
The TemplateId GLDT9223370666504283001RA000000006DTP2000001 is the MasterTemplateId for a standard invoice. Always use the MasterTemplateId (not a version code), because it remains stable across template versions.
After a successful call, the API returns an ExternalId. This is the unique ID of the sent document in the eConnect platform. If the response does not contain an ExternalId, the document was not sent. In that case, check the error message in the response.
Always save the ExternalId: you need it to retrieve the document status later.
The API also returns the DeliveryMethod in the response, so you know through which channel the document was delivered:
ToInboxToPeppolToEmailOutboxOnlyNoneAfter sending, you can track the status of your document with two endpoints:
GetOutboxDocumentsModifiedOn to see only recently changed documents.GetOutboxDocumentGetOutboxDocumentStatusUBL XML without prolog: the Payload must contain UBL XML without the <?xml version="1.0" encoding="UTF-8"?> declaration. If you include the prolog, the document may not be processed correctly.
Use MasterTemplateId: always filter on Template/MasterId instead of a specific template ID. The MasterTemplateId does not change with version updates of the template.
Error handling: check the response for error codes. The error code series 400 (validation) and 200 (functional) are most common for sending errors. See the authentication page for the complete overview of error code series.
The REST API offers additional capabilities when sending, such as webhooks for status notifications and automatic retry on errors. Check psb.econnect.eu for the modern approach.
Migrate to the REST API