SOAP API: sending invoices with SendDocument

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.

How SendDocument works

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:

  1. eConnect platform: is the recipient also a platform user? Then the document is delivered directly to their inbox.
  2. Peppol: is the recipient findable on the Peppol network? Then the document is routed via Peppol.
  3. Email (fallback): if neither is possible and an email address has been provided, the document is sent by email.
Required parameters
ParameterDescriptionVia/ReferenceIdIdentification of the sender (your own EConnectPartyId, XCNL number)To/ReferenceIdIdentification of the recipient (EConnectPartyId or Peppol identifier such as 0106:KVK-number)To/EmailAddressEmail address of the recipient (used as fallback when platform and Peppol routing are not possible)SubjectSubject of the documentPayloadThe document itself, as UBL XML. Note: send the XML without XML prolog (<?xml ...?>)TemplateIdThe template ID indicating the document type
Example call
<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.

Response and ExternalId

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.

DeliveryMethod

The API also returns the DeliveryMethod in the response, so you know through which channel the document was delivered:

ValueMeaningToInboxDelivered to the recipient's inbox on the eConnect platformToPeppolSent via the Peppol networkToEmailSent by emailOutboxOnlyOnly saved in your own outbox (not delivered)NoneNo delivery possible
Status tracking

After sending, you can track the status of your document with two endpoints:

EndpointFunctionGetOutboxDocumentsRetrieve list of sent documents. Filter on ModifiedOn to see only recently changed documents.GetOutboxDocumentRetrieve a specific document based on the ExternalId.GetOutboxDocumentStatusRetrieve only the status, without the full document.
Tips

UBL 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