Generate a multi page PDF
How to generate asynchronously a multi page PDF - Abyssale REST API
Last updated
How to generate asynchronously a multi page PDF - Abyssale REST API
Last updated
This feature is available from the Prime plan.
Obtain a PDF multi page from the Rest API:
Using one of the available Print format & then choosing the "Print Multi-page" Type will enable the PDF type by default when generating that format.
A multi page PDF is created by sending data and customisation parameters to the POST
/banner-builder/{templateId}/generate
endpoint, which will respond asynchronously with a payload containing the URL of the generated PDF.
Supported template type: Static
Generation response type: Synchronous
Properties available for each type of component are available here.
To ease the creation of your payload, just go to one of your Template
and choose Abyssale Rest API
in the Generation Methods list. You will find the default associated payload in the console (Feel free to remove unnecessary properties/elements):
Do not forget to replace {YOUR-API-KEY}
and {templateId}
The Abyssale Pdf Generation API can return the following error codes :
Code | Description |
---|---|
400
Bad Request Your request is invalid. Either one of the parameter sent in the request is wrong or the generation failed due to one of the given property.
A payload will be returned in the HTTP response explaining the error.
For instance, here are payloads returned:
If a given parameter is invalid (here the given color is invalid):
{"message": "body_validation_errors: {'media': {'text_role': ["The following property is invalid: ({'color': ['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}", "errors": {"media": {"text_role": ["The following property is invalid: ({'color': ['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}}
If a text cannot be inserted:
{"id": "cannot_build_banner", "message": "Element text_name error: The text 'Welcome to the Abyssale Developer Hub' cannot fit within the defined space."}
401
403
Unauthorized Ensure your API key is the right one.
404
Not Found The route (or the given template) cannot be found.
405
Method Not Allowed You tried to access Abyssale with an invalid method.
429
API Limits reached All of your image generation API calls are consumed: You should upgrade to a higher plan.
500
Internal Server Error
Try again later: Contact us on help@abyssale.com
if the error occurs.
Unique identifier (UUID) of the template
A dictionary
containing all elements with properties you would like to override form the default template (keys correspond to layer names)
Corresponds to the format ID you would like to generate (only mandatory when your template contains several formats).
"facebook-post"
Percentage of compression applied.
80
Ok
"64238d01-d402-474b-8c2d-fbc957e9d290"