Delen via


APITemplate (Independent Publisher)

With the APITemplate.io service, you can create PDF documents and images, and manage your templates. Generate social media images, banners or PDFs from reusable templates with no coding!

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Troy Taylor
URL https://www.hitachisolutions.com
Email ttaylor@hitachisolutions.com
Connector Metadata
Publisher Troy Taylor
Website https://apitemplate.io/
Privacy policy https://apitemplate.io/privacy-policy/
Categories Content and Files

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
API Key securestring The API Key for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Create a PDF

This request creates a PDF file with JSON data and your template. Supports synchronous and asynchronous PDF generation.

Create an image

This request creates a JPEG file (along with PNG) from JSON data and your template.

Delete an object

Delete a PDF or an image from CDN and mark the transaction as deleted.

Get PDF template

Retrieves information about the PDF template.

List generated objects

Retrieves a list of all the generated PDFs and images.

List templates

Retrieves a list of the templates and their information.

Merge multiple PDFs

This action merges/joins multiple PDF into a single PDF file.

Update PDF template

This action updates a PDF template.

Create a PDF

This request creates a PDF file with JSON data and your template. Supports synchronous and asynchronous PDF generation.

Parameters

Name Key Required Type Description
Template ID
template_id True string

Your template id, it can be obtained in the web console(Manage Templates)

Export Type
export_type string

Either file or json(Default). The option json returns a JSON object, and the output PDF is stored on a CDN. Use this with the parameter expiration. The option file returns binary data of the generated PDF(Secure and completely private) and the response HTTP header Content-Disposition is set to attachment.

Expiration
expiration integer

Expiration of the generated PDF in minutes(default to 0, store permanently). Use 0 to store on cdn permanently. Or use the range between 1 minute and 10080 minutes(7 days) to specify the expiration of the generated PDF

Output HTML
output_html string

Either 1 or 0(Default).. To enable output of html content, set the value to 1 and it will return in the JSON response as html_url field (as a URL)

Output Format
output_format string

Either pdf(Default) or html.. It's generating PDF by default. However, you can specify output_format=html to generate only HTML(It will return in the JSON response as download_url field as a URL).

Filename
filename string

Default to UUID (e.g 0c93bd9e-9ebb-4634-a70f-de9131848416.pdf). Use this to specify custom file name, it should end with .pdf

Large Resample Res
image_resample_res string

We embed the original images by default, meaning large PDF file sizes. Specifying the option 'image_resample_res' helps reduce the PDF file size by downsampling the images of the current PDF to a resolution(in DPI). Common values are 72, 96, 150, 300 and 600.

Is CMYK
is_cmyk string

Use CMYK color profile, 1=true, 0=false. Default to '0'

Cloud Storage
cloud_storage integer

Upload the generated PDFs/images to our storage CDN, default to 1. If you have configured Post Action to upload the PDFs/Images to your own S3, please set it to 0.

Meta
meta string

Specify an external reference ID for your own reference. It appears in the list-objects API.

Async
async string

Either 1 or 0(Default). 0 is synchronous call(default), 1 is asynchronous call. To generate PDF asynchronously, set the value to 1 and the API call returns immediately. Once the PDF document is generated, we will make a HTTP/HTTPS GET to your URL(webhook_url) and will retry for 3 times before giving up.. If async is set to 1, then webhook_url is mandatory

Webhook URL
webhook_url string

It is the URL of your webhook URL, it starts with http:// or https:// and has to be urlencoded.. If async is set to 1, then you have to specify the webhook_url. Format of Webhook callbackOnce the PDF is generated, we will initiate a HTTP/HTTPS GET call to the following URL:https://[yourwebserver.com]?&primary_url=[primary_url]&transaction_ref=[transaction_ref]&status=[status]&message=[message]. [yourwebserver.com]: The web services to handle the callback, which is the webhook_url. [primary_url]: The URL to the PDF document. [transaction_ref]: The transaction reference number. [status] : Status of the transaction, either success or error. [message] : Status messageThe following is a sample webhook call back to your serverhttps://yourwebserver.com?&primary_url=https%3A%2F%2Fpub-cdn.apitemplate.io%2F2021%2F06%2Fb692183d-46d7-3213-891a-460a5814ad3f.pdf&transaction_ref=b692183d-46d7-3213-891a-460a5814ad3f&status=success

object

Returns

ResponseSuccessPDFFile
ResponseSuccessPDFFile

Create an image

This request creates a JPEG file (along with PNG) from JSON data and your template.

Parameters

Name Key Required Type Description
Template ID
template_id True string

Your template id, it can be obtained in the web console

Expiration
expiration integer

Expiration of the generated image in minutes(default to 0, store permanently). Use 0 to store on cdn permanently. Or use the range between 1 minute and 10080 minutes(7 days) to specify the expiration of the generated image

Cloud Storage
cloud_storage integer

Upload the generated PDFs/images to our storage CDN and generate a URL, default to 1. If you have configured the Post Actions in API Integration to upload the generated PDFs/Images to your own private S3, please set cloud_storage to 0. If the export_type=file, please ignore this.

Output Image Type
output_image_type string

Output image type(JPEG or PNG format), default to all. Options are all, jpegOnly,pngOnly.

Meta
meta string

Specify an external reference ID for your own reference. It appears in the list-objects API.

object

Returns

ResponseSuccessImageFile
ResponseSuccessImageFile

Delete an object

Delete a PDF or an image from CDN and mark the transaction as deleted.

Parameters

Name Key Required Type Description
Transaction Ref
transaction_ref True string

Object transaction reference

Returns

ResponseSuccessDeleteObject
ResponseSuccessDeleteObject

Get PDF template

Retrieves information about the PDF template.

Parameters

Name Key Required Type Description
Template ID
template_id string

Your template id, it can be obtained in the web console(Manage Templates)

Returns

ResponseSuccessTemplate
ResponseSuccessTemplate

List generated objects

Retrieves a list of all the generated PDFs and images.

Parameters

Name Key Required Type Description
Limit
limit string

Retrieve only the number of records specified. Default to 300

Offset
offset string

Offset is used to skip the number of records from the results. Default to 0

Template ID
template_id string

Filtered by template id

Transaction Type
transaction_type string

Filtered by transaction type, options are PDF, JPEG or MERGE

Returns

ResponseSuccessListObjects
ResponseSuccessListObjects

List templates

Retrieves a list of the templates and their information.

Parameters

Name Key Required Type Description
Limit
limit string

Retrieve only the number of records specified. Default to 300

Offset
offset string

Offset is used to skip the number of records from the results. Default to 0

Format
format string

To filter the templates by either 'PDF' or 'JPEG'

Template ID
template_id string

To filter the templates by template id

Group Name
group_name string

To filter the templates by the group name

With Layer Info
with_layer_info string

Return along with layer information for image templates, 0=false , 1=true. Default to '0'

Returns

ResponseSuccessListTemplates
ResponseSuccessListTemplates

Merge multiple PDFs

This action merges/joins multiple PDF into a single PDF file.

Parameters

Name Key Required Type Description
Meta
meta string

Specify an external reference ID for your own reference. It appears in the list-objects API.

URLs
urls True array of string

URL array. We support normal http/https URLs and data URLs. Normal URLs: URLs start with http/https, e.g: "https://fileserver.com/a1.pdf"). Data URLs: URLs prefixed with the "data:" scheme, e.g "data:application/pdf;base64,JVBERi0xLjIg..[truncated]"

Export Type
export_type string

Either file or json(Default). The option json returns a JSON object, and the output PDF is stored on a CDN. The option file returns binary data of the generated PDF(Secure and completely private) and the response HTTP header Content-Disposition is set to attachment. It has a file size limit of 6MB.

Expiration
expiration integer

Expiration of the generated PDF in minutes(default to 0, store permanently). Use 0 to store on cdn permanently. Or use the range between 1 minute and 43200 minutes(30 days) to specify the expiration of the generated PDF

Cloud Storage
cloud_storage integer

Upload the generated PDFs/images to our storage CDN, default to 1. If you have configured Post Action to upload the PDFs/Images to your own S3, please set it to 0.

Returns

ResponseSuccessSingleFile
ResponseSuccessSingleFile

Update PDF template

This action updates a PDF template.

Parameters

Name Key Required Type Description
Template ID
template_id True string

Your template id, it can be obtained in the web console (Manage Templates)

Body
body string

The HTML body

CSS
css string

The css

Returns

ResponseSuccess
ResponseSuccess

Definitions

ResponseSuccess

Name Path Type Description
Status
status string

Status

ResponseSuccessTemplate

Name Path Type Description
Status
status string

Status

Template ID
template_id string

Template ID

Body
body string

HTML body of the template

CSS
css string

CSS of the template

Settings
settings string

Print settings of the template

ResponseSuccessPDFFile

Name Path Type Description
Status
status string

Status

Download URL
download_url string

Download URL

Template ID
template_id string

Template ID

Transaction Ref
transaction_ref string

Transaction reference

Post Actions
post_actions array of object

The post actions.

items
post_actions object

ResponseSuccessImageFile

Name Path Type Description
Status
status string

Status

Download URL
download_url string

Download URL

Download URL PNG
download_url_png string

Download URL PNG

Template ID
template_id string

Template ID

Transaction Ref
transaction_ref string

Transaction reference

Post Actions
post_actions array of object

The post actions.

items
post_actions object

ResponseSuccessListTemplates

Name Path Type Description
Status
status string

The status.

Templates
templates array of object

The templates

items
templates object

ResponseSuccessListObjects

Name Path Type Description
Status
status string

The status.

Objects
objects array of object

The objects.

items
objects object

ResponseSuccessDeleteObject

Name Path Type Description
Status
status string

The status.

ResponseSuccessSingleFile

Name Path Type Description
Status
status string

Status

Primary URL
primary_url string

Generated PDF document

Transaction Ref
transaction_ref string

Transaction reference