Creating a delay for api purposes

For example: if you need to wait for a document to be generated before fetching it.

I have found a solution for now, it’s generating a pdf document before creating the api call.

1 Like

Hi @Albert.wemmers,

Thanks for raising this point. We have plans for a delay function, though early stages.

There are more situations in which a delay can be useful, such as rate limits on APIs.

We are trying to find the most versatile, simple solution that fits into the platform best.

To help us; is the wait time in your case a minimum wait time or is there maybe a polling function to check if your document is ready?

This info can help us in our design process, and would be greatly appreciated!

Hi Jesse,

Thank you for the quick response. To clarify, I’m creating a delay using the built-in PDF generator from Triggre before fetching the generated PDF I want to get via API. In my case, I know the documents take like 0.2s to generate (this info was given to me by PDFmonkey), so a minimum wait time would be handy. Before I had my solution, I got an empty response, which was quite confusing.

Hope this helps!

1 Like

Thanks @Albert.wemmers, it helps indeed!

Hi @Albert.wemmers,

After reading the documentation of PDF Monkey; perhaps you can set the status field to pending. This will immediately invoke generation of the document, and perhaps this means that the Web API call will block until the document is generated?

See this article about the document URL being empty: The Download URL is empty - PDFMonkey

I was looking for a webhook that you can specify that PDF Monkey will call upon completion of the document, with the document ID for example. That would allow you to set up an asynchronous process like it would usually work with APIs. However, I didn’t find anything, other than hopefully this solution with the document status.

Hope this helps!

2 Likes