Docs - Inkit

Documentation. Whether you're a startup or a global enterprise, learn how to integrate with Inkit to connect to hundreds of vendors online. Instantly leverage global vendor infrastructure with our developer-friendly APIs.

Get Started    

Core Resources

Render

This is an object that represents an HTML to PDF conversion. You can create one to convert an HTML file to a PDF

Create a Render

Request

Endpoint: /render
Method: Post
Headers:

  • Content-Type: application/json
  • X-Inkit-API-Token: your-api-key

Request Attributes

Property Name

Description

Data Type

Required

html

JSON encoded html

string

html or html_encoded must be provided

width

Output width. Inches - in, Centimeters - cm, and Pixels - default are supported

string

Yes

height

Output height. Inches - in, Centimeters - cm, and Pixels - default are supported

string

Yes

html_encoded

Base64 encoded HTML

string

html or html_encoded must be provided

custom_data

Key value pair where keys specify where to merge values in the HTML.

Example:

"custom_data":{"first_name":"Andrew"}
,"html":"<html>hello %%first_name%% </html>"

Would resolve to:
<html>hello Andrew</html>

object

No

Example Request

{
   "html":"<html>hello %%first_name%% </html>",
   "height":"11in",
   "width":"8in",
   "custom_data":{
      "first_name":"Andrew"
   }
}

Response

Response Attributes

Property Name

Description

Data Type

rendered_id

render identifier

string

project_id

project identifier

string

html

html data that you sent back

string

width

output width (inches)

string

height

output height (inches)

string

html_encoded

base64 encoded html

string

status

status of the render

string

pdf_url

url to the pdf

string

html_url

url to html document that was converted

string

expires_at

time in minutes that the render will exist for before being deleted

integer

expires

If the render expires and automatically deletes after certain period of time

boolean

created_at

date time stamp the render was created

string

metadata

contains information about the render like number of pages, file size and title

object

Example Response

{
  "created_at": "Tue, 09 Feb 2021 19:33:59 GMT",
  "custom_data": {
    "first_name": "Andrew"
  },
  "expires": false,
  "expires_at": null,
  "html_url": "https://f001.backblazeb2.com/b2api/v1/b2_download_file_by_id?fileId=4_zfd464b38ced6b4c47b1f0c1f_f1193344d993cc3e6_d20210209_m193358_c001_v0001145_t0036",
  "id": "rend_1AZoVF8z1VBzhpxBeVc5NO",
  "metadata": {
    "encoding_software": "inkit",
    "kind": "pdf",
    "name": null,
    "owner": 17,
    "pages": null,
    "size": null,
    "title": null,
    "version": "1.0.0"
  },
  "object": "render",
  "pdf_url": "https://f001.backblazeb2.com/file/inkit-darkroast/rend_1AZoVF8z1VBzhpxBeVc5NO.pdf",
  "production_mode": true,
  "source": "webhook",
  "status": "processing"
}

Updated 14 days ago

Core Resources


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.