Endpoints
List built-in endpoints of DocKing
Restful APIs are ready to use to interact with DocKing 😎
Get a list of templates
Request params:
- limit: default
20
- page: default
1
Response:
{
data: DocumentTemplate[],
...paginationInfo
}
Get a single template detail.
Response:
{
data: DocumentTemplate,
}
Create a new template.
Body:
{
"title": "title here",
"category": "category here",
"key": "unique identifier key here"
}
Response: 201 on OK, 422 on Validation Error
{
"uuid": "...",
"created": true
}
Update an existing template.
Body:
{
"title": "title here",
"category": "category here",
"key": "unique identifier key here",
"template": "html template here",
"default_variables": { object of default variable },
"metadata": { obj of metadata }
}
Response: 200 on OK, 422 on Validation Error
{
"uuid": "...",
"updated": true
}
Delete a single template.
Response: 200 on OK
{
"uuid": "...",
"deleted": true
}
Render a template with the given data and returns the PDF file URL.
- Body
variables
(JSON object or array)metadata
(JSON object)
- Response
- OK: 200 with URL.
- ERROR:
- 400 with message or outcome.
- 422 for validation errors.
Asynchronously render a new template.
- Body
variables
(JSON object or array)metadata
(JSON object)webhook_url
(REQUIRED), for render result notification
- Response
- OK: 200 with the outcome.
- ERROR:
- 422: for validation errors.
Get a list of document files
Request params:
- limit: default
20
- page: default
1
Response:
{
data: File[],
...paginationInfo
}
Returns the single rendered pdf file
Last modified 7d ago