Fill a template

POST/pdf-filling/templates/{id}/fill

After you created and defined a template, you can use this endpoint to fill your predefined template with data.

For authentication provide the x-api-key header. If you choose to use your development API key your resulting PDF will contain a little watermark. On the other hand, PDFs generated with live API keys will not contain a watermark.


Request

Header attributes

content-typerequired

Only acceptable content type is application/json.

Acceptrequired

Your application should accept application/pdf.

Body attributes

datarequired
The data should contain a key value mapping reflecting the specified schema of your template.
import requests

resp = requests.post("https://api.doqs.dev/v1/templates/{id}/fill",
    headers={"x-api-key":"your-api-key","content-type":"application/json"},
    json={"data":{}},
)

Response

In case of a successful request, the endpoint will return a byte stream of the filled pdf document.

Headers

content-type
The content type header will be set to application/pdf.