Documents

Documents are generated PDF's from templates by filling the templates with data.

The documents model

The documents model contains all the information about your documents

Properties

  • Name
    uid
    Type
    string
    Description

    The unique identifier for the document.

  • Name
    teamId
    Type
    number
    Description

    The ID of the team associated with the template.

  • Name
    creatorId
    Type
    number
    Description

    The ID of the user who created the template.

  • Name
    created
    Type
    timestamp
    Description

    Timestamp of when the template was created.

  • Name
    updated
    Type
    timestamp
    Description

    Timestamp of when the template was last updated.

  • Name
    templateName
    Type
    string
    Description

    The name of the template this document is based on.

  • Name
    name
    Type
    string
    Description

    The name of the document.


GET/v1/documents

List all documents

This endpoint allows you to retrieve a paginated list of all your documents. By default, a maximum of 10 documents are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of templates returned.

  • Name
    offset
    Type
    integer
    Description

    Offset of templates returned.

Request

GET
/v1/documents
curl -G https://api.wunderdocs.io/v1/documents \
  -H "X-API-KEY: {api-key}" \
  -d limit=10 \
  -d offset=0 

Response

{
"totalCount": 3,
"filteredCount": 3,
"data": [
	{
		"uid": "1d58055b-fc11-4246-bc16-87045d38381d",
		"title": "My Document",
		"teamId": 2,
		"created": "2023-06-30T10:57:12.000Z",
		"updated": "2023-06-30T10:57:12.000Z",
		"downloadUrl": "https://api.wunderdocs.io/documents/1d58055b-fc11-4246-bc16-87045d38381d/download",
		"templateName": "My Template"
	},
}

GET/v1/documents/:uid

Retrieve a documents

This endpoint allows you to retrieve a documents by providing their wunderdocs uid. Refer to the list at the top of this page to see which properties are included with documents objects.

Request

GET
/v1/documents/WAz8eIbvDR60rouK
curl https://api.wunderdocs.io/v1/documents/WAz8eIbvDR60rouK \
  -H "X-API-KEY: {api-key}" \

Response

	{
		"uid": "1d58055b-fc11-4246-bc16-87045d38381d",
		"title": "My Document",
		"teamId": 2,
		"created": "2023-06-30T10:57:12.000Z",
		"updated": "2023-06-30T10:57:12.000Z",
		"downloadUrl": "https://api.wunderdocs.io/documents/1d58055b-fc11-4246-bc16-87045d38381d/download",
		"templateName": "My Template"
	},