Automatically place your completed PDFs in a folder

Utilize folders and place your completed documents in them when they are done

You’ll learn how to leverage automatic document placement while sending your render create requests in this topic. What you will read is complementary to the turn a HTML file into a PDF topic.

After reading, you should know how to put generated documents in any of your folders.

Prerequisites:

  • You know how to send a render create request
  • You have the necessary data at hand to send a create request (you have values for all the necessary JSON body parameters)
  • You have a mock request tool like Postman or Insomnia available

Read more about:

Getting ready

Before placing generated documents in a specified folder, you must first have created at least one of them. When you create a private folder, you must make sure that the API key that will send the create request has access to this folder.
You can do this by sharing the folder to one or multiple roles that API key has been granted.

Read more about:

Additionally, your API key must have the following permissions: Renders.create

Automatic document placement

Now that your API key is correctly set up and you have a folder to place your documents in, it’s time to get started.

Follow these steps, and Inkit Render will place your generated document in a folder of your choice.

  1. Sign in to a user who has access to your private folder. Navigate to your specific private folder and get its folder ID
  2. Open Insomnia, Postman, or any other mock request tool
  3. Stage a render create request as is shown in turn an HTML file into a PDF topic

Note: Don’t have an encoded HTML file at hand? Use the one in this example request

{
	"html":"PGh0bWw+Q29vbCBkZW1vPC9odG1sPg=="
	, "width": 8.5
	, "height": 11
	, "unit": "in"
}
  1. Include the folder_id as a body parameter in your request. Use the unique folder ID as its value.

Do this by adding “folder_id” : “yourIdHere” to the body parameters.

  1. Send your request to the API. If you have received a 201 response code, then your request was a success!

Inkit Render will now generate your document. Once it has been completed, you'll find it in your designated folder. Be sure to check out webhooks if you’d like to be alerted whenever your documents are completed.