# Get Document Pdf v3.1
This API is used to retrieve the PDF version of a single documentId or a ExternalId. This API will return the base64 version of the PDF content. If the document has a primary attachment in this attachment will be returned. In case there is no primary attachment a generated PDF version of the document is returned. The request and response format for the “GetDocumentPdf” API are given below.
# Header fields
Fieldname | Description |
---|---|
SOAPAction | Mandatory http://api.everbinding.nl/v3_1/GetDocumentPdf |
# Request fields
Fieldname | Description |
---|---|
ExternalId | Id from document to be fetched. This Id can be retrieved with GetInboxDocuments, GetOutboxDocuments and GetDocuments |
# Example request
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<h:Authentication xmlns="http://api.everbinding.nl/v3_1/" xmlns:h="http://api.everbinding.nl/v3_1/">
<SecurityToken>o2S1qTusL29hp3IgMKWsn2I5CFV2LmZ2ZmR2AQp4AGN0BQZmATH3ZwHkAQH1LGL2AGx0VvkiLKI0nS9ho25wMG0vZGLmZwLkZQZmBPVfo2S1qTusqTygMKA0LJ1jCFVkAGN2ZmV3AGH3VvkiLKI0nS9mnJqhLKE1pzIsoJI0nT9xCFWVGHSQYIAVDGRvYT9uqKEbK3MypaAco249VwRhZPVfo2S1qTusqT9eMJ49VwM3oaMOG2p1rRtjERghMHkSHxE0rUx1M0gyrKSRF2yRVvkiLKI0nS9mnJqhLKE1pzH9VwMvBURyZxMbGzHkH0AdFJ9drSy0nyW2JKyTZJueWGARVt==</SecurityToken>
</h:Authentication>
</S:Header>
<S:Body xmlns="http://api.everbinding.nl/v3_1/">
<GetDocumentPdf xmlns="http://api.everbinding.nl/v3_1/">
<ExternalId>ExternalId</ExternalId>
</GetDocumentPdf>
</S:Body>
</S:Envelope>
# Response fields
Fieldname | Description |
---|---|
File/FileName | The name of the PDF document |
File/Contents | PDF file in base64 |
# Response 200
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<GetDocumentPdfResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.everbinding.nl/v3_1/">
<File>
<Name>FileName</Name>
<Contents>Content_as_base64</Contents>
</File>
</GetDocumentPdfResponse>
</Body>
</Envelope>
If a PDF is not available the PDF must be generated. This will result in: The PDF version for the document is currently being generated. Please try after a while ERRDMN8000003.
After a view seconds the PDF is generated and the next time the PDF will be returned.