Skip to main content

Template processing

So now we have requred heades set from previous article now we can do template processings.

Here you can check a example template.

Direct Request

The endpoint for direct template processing https://api.pritset.com/api/template/process/direct/{templateId}

Webhook Request

The endpoint for webhook template processing https://api.pritset.com/api/template/process/webhook/{templateId}

After request you will receive json object with id of furthure result identification

{
id: '57056f7462084dde8902421e9287ea2d'
}

Webhook call

After template processing finish, your Url endpoint will be called with POST request

ParameterValue
BodyProcessed PDF template
Query IdUnique id which was responded by server with processing request (aka '57056f7462084dde8902421e9287ea2d')

Common parameters

ParameterValue
templateIdId of template got from templates table

Body

Content type of request must be multipart/form-data

ParameterValue
data (required for direct, webhook)This must be a json data you want to pass
url (required for webhook)Url to your endpoint which will be called after processing

Example

Lets assume that we have this object:

{
"title": "Hello Pritset",
"description": "Pritset Project Description\nIntroducing Pritset - a versatile SaaS solution designed to enhance the workflow for software developers and CEOs. Pritset offers a variety of tools and features tailored to meet the needs of tech professionals.\nKey Features:\nAdvanced Reporting: Generate detailed reports quickly and easily, allowing you to analyze project progress and track key metrics.\nImage Adjustment Services: Optimize and enhance images effortlessly with our robust image processing tools.\nEfficient Resource Management: Save time and reduce resource usage with our efficient management tools, ensuring maximum productivity and cost-effectiveness.\nCustomizable Templates: Personalize your project templates to fit your specific needs, ensuring alignment with your brand and goals.\nUser-Friendly Interface: Navigate Pritset with ease thanks to its intuitive design, allowing you to focus on your project.\nWhy Choose Pritset?\nCost-Effective: Reduce unnecessary expenditures with Pritset’s all-in-one solution.\nTime-Saving: Automate and optimize tasks to spend more time on innovation and development.\nScalable Solutions: Suitable for startups and large enterprises alike, with various plans to fit your project size and complexity.\nGet Started Today\nVisit pritset.com to learn more and sign up for a free trial. For questions or support, contact us at [email protected]. We value your feedback and look forward to helping you achieve your project goals.\nPritset - Empowering Your Development Journey",
"advantages": [
{"title": "Efficiency", "description": "Very fast API response"},
{"title": "Secure", "description": "We care about user privacy"},
{"title": "Reliablity", "description": "Easy to use for any user"}
]
}

Lets assume we have a document that looks like this:

Alt text

And the result will be:

Alt text