Quickstart
This guide will get you all set up and ready to use the wunderdocs API. We'll cover how to get started using an API key and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our powerful REST API.
Before you can make requests to the wunderdocs API, you will need to grab your API key from your dashboard. You find it under Settings » API Key.
Create an Account and Upload a PDF Template
Before starting to use the API, you will need to create an account. You can do so by visiting the wunderdocs website and clicking the "Sign up" button in the top right corner. Once you have created an account, you can upload your first PDF template by clicking the "Add new template" button on your dashboard.
Mark fields in your PDF
After you uploaded a PDF template, you can mark the input fields in your PDF. To do so enter the template editor by clicking "Edit" on the appropriate template row on your dashboard.
Grab your API key
To make requests to the wunderdocs API, you will need to grab your API key from your dashboard. You find it under Settings » API Key. For more info see Authentication.
Use this API key to authenticate your requests to the API by adding an X-API-KEY
header to your requests. See the example below.
Example request with API key
curl -G https://api.wunderdocs.io/v1/templates \
-H "X-API-KEY: {api-key}"
Get your template fields
To fill your PDF template, you will need to make a POST request to the /v1/templates/{uid}
endpoint. You can find the template UID on your dashboard, in the URL of the editor or by using the API to list all templates. The request body should contain the data you want to fill your PDF with. You can get the fields to fill by using the /v1/templates/{uid}/fields
endpoint. See the example below.
Request
curl https://api.wunderdocs.io/v1/templates/WAz8eIbvDR60rouK/fields \
-H "X-API-KEY: {api-key}"
Response
[
{
"label": "First Name",
"key": "firstName",
"type": "text"
}
]
Fill your PDF template
To fill your PDF template, you will need to make a POST request to the /v1/templates/{uid}
endpoint. You can find the template UID on your dashboard, in the URL of the editor or by using the API to list all templates. The request body should contain the data you want to fill your PDF with. You can get the fields to fill by using the /v1/templates/{uid}/fields
endpoint. See the example below.
Request
curl https://api.wunderdocs.io/v1/templates/WAz8eIbvDR60rouK \
-H "X-API-KEY: {api-key}" \
-d '{
"firstName": "John",
"lastName": "Doe"
}'
Response
{
"uid": "d531d102-ebeb-48b2-8caf-08e23bd2942f",
"templateName": "Untitled (1)",
"downloadUrl": "http://api.wunderdocs.io/documents/d531d102-ebeb-48b2-8caf-08e23bd2942f/download"
}
What's next?
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the wunderdocs API: