TemplateTo.Api (1.0.7)

Download OpenAPI specification:Download

Authentication

JWT

Authenticate via Bearer token.

Security Scheme Type HTTP
HTTP Authorization Scheme Bearer

ApiKey

Authenticate via API Key, available from the admin panel.

Security Scheme Type API Key
Header parameter name: X-API-KEY

PdfRenderer

Render template as Pdf document

Generate a pdf file based on your passed JSON and a template.

Authorizations:
path Parameters
templateId
required
string or null

The template ID

query Parameters
footerid
string or null

template id to use for the footer

headerid
string or null

header id to use for the header

Request Body schema: application/json

Pass json data for your template

any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
"string"

Generate a pdf file based on the provided HTML/CSS.

Authorizations:
Request Body schema: application/json

The base64 encoded input

base64HtmlString
string or null

Responses

Request samples

Content type
application/json
{
  • "base64HtmlString": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Template

Manage templates

Get a template using an id

Authorizations:
path Parameters
templateId
required
string or null

Responses

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Get a pages list of templates

Authorizations:
path Parameters
pageNumber
required
integer <int32>
pageSize
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Get all templates (can be slow for large numbers of templates)

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "resultItem": [
    ],
  • "success": true,
  • "errors": [
    ]
}

Get all the names and Ids for your templates

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Template_Create

Authorizations:
Request Body schema: application/json
id
string or null
name
string or null
templateHtml
string or null
templateCss
string or null
isDragDrop
boolean

Is this template managed by drag and drop editor

renderAsText
boolean

When rendering the template generate a text file rather than pdf.

components
string or null

Used to hold more contextual information for the drag and drop editor

styles
string or null

Used to hold information about the styles used be the drag and drop editor

inputTemplate
string or null

Example JSON that can be used to test the template.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "templateHtml": "string",
  • "templateCss": "string",
  • "isDragDrop": true,
  • "renderAsText": true,
  • "components": "string",
  • "styles": "string",
  • "inputTemplate": "string"
}

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Duplicate a template by passing an ID

Authorizations:
path Parameters
templateId
required
string or null

id of template to duplicate

Responses

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Template_Update

Authorizations:
Request Body schema: application/json
id
string or null
name
string or null
templateHtml
string or null
templateCss
string or null
isDragDrop
boolean

Is this template managed by drag and drop editor

renderAsText
boolean

When rendering the template generate a text file rather than pdf.

components
string or null

Used to hold more contextual information for the drag and drop editor

styles
string or null

Used to hold information about the styles used be the drag and drop editor

inputTemplate
string or null

Example JSON that can be used to test the template.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "templateHtml": "string",
  • "templateCss": "string",
  • "isDragDrop": true,
  • "renderAsText": true,
  • "components": "string",
  • "styles": "string",
  • "inputTemplate": "string"
}

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Delete a template based on Id

Authorizations:
path Parameters
templateId
required
string or null

Responses

Response samples

Content type
application/json
{
  • "resultItem": {
    },
  • "success": true,
  • "errors": [
    ]
}

Auth

Auth_Login

Authorizations:
Request Body schema: application/json
email
string or null
password
string or null

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refreshToken": "string"
}

Auth_Refresh

Authorizations:
Request Body schema: application/json
token
string or null
refreshToken
string or null

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "refreshToken": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refreshToken": "string"
}

Invoice

Invoice_Upcoming

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "quantity": 0,
  • "unitAmount": 0,
  • "tax": 0,
  • "subtotal": 0,
  • "total": 0,
  • "currency": "string",
  • "dueDate": "2019-08-24T14:15:22Z"
}

TxtRenderer

Generate a txt file based on your passed JSON and a template.

Authorizations:
path Parameters
templateId
required
string or null

The templates ID

Request Body schema: application/json

Pass json data for your template

any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
"string"

Generate a txt file based on the provided HTML/CSS.

Authorizations:
Request Body schema: application/json

The base64 encoded input

base64HtmlString
string or null

Responses

Request samples

Content type
application/json
{
  • "base64HtmlString": "string"
}