As the name suggests, pdf are a core part of Pdfless. On this page, we’ll dive into the different properties of pdf endpoint to generate pdf programmatically.
Response model
The response model contains all the information about the pdf file and the status of the generation.
Properties
- Name
- template_id
- Type
- guid
- Description
- Unique identifier of the template. 
 
- Name
- reference_id
- Type
- string
- Description
- Identifier corresponds to a reference from the caller's system. 
 
- Name
- download_url
- Type
- string
- Description
- Url of the generated pdf. Link expires after 10 minutes. 
 
- Name
- expires
- Type
- datetime
- Description
- Timestamp of when the link will expire. 
 
- Name
- created_at
- Type
- datetime
- Description
- Timestamp of when the pdf was created. 
 
Generate PDF
This endpoint allows you to create PDF.
Attributes
- Name
- template_id
- Type
- guid required
- Description
- Unique identifier of the template used to generate pdf. 
 
- Name
- reference_id
- Type
- string
- Description
- Identifier corresponds to a reference from the caller's system. 
 
- Name
- payload
- Type
- json
- Description
- Data in JSON format. 
 
- Name
- encryption_user_password
- Type
- string
- Description
- If defined, the document will be encrypted and password is required to open the document. 
 
- Name
- encryption_owner_password
- Type
- string
- Description
- Permission Password used to restrict access to certain functionalities 
 
- Name
- encryption_allow_printing
- Type
- bool
- Description
- Allows user to print the document. 
 
- Name
- encryption_allow_modifying
- Type
- bool
- Description
- Allows user to modify the document. 
 
- Name
- encryption_allow_modify_annotations
- Type
- bool
- Description
- Allows user to modify annotations of the document. 
 
- Name
- encryption_allow_content_copying
- Type
- bool
- Description
- Allows user to copy the content. 
 
- Name
- encryption_allow_screenreaders
- Type
- bool
- Description
- Allows user to copy the content. 
 
- Name
- encryption_allow_form_filling
- Type
- bool
- Description
- Allows user to fill the document forms. 
 
- Name
- encryption_allow_document_assembly
- Type
- bool
- Description
- Allows user to perform cross-document operations. 
 
Request
curl https://api.pdfless.com/v1/pdfs \
  -H "apikey: {apikey}" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"1814309a-c198-469e-a583-227a69a6ecb2","payload": { "Company": "Company & co" } }'
Response
{
  "data": {
      "template_id": "1814309a-c198-469e-a583-227a69a6ecb2",
      "download_url": "https://sapdfless001.blob.core.windows.net/temp/1814309a-c198-469e-a583-227a69a6ecb2/04169297-84e7-4460-8c19-a1b87b73e2f0.pdf",
      "expires": "2023-03-21T20:24:36.5524803+00:00",
      "created_at": "2023-03-21T20:14:36.5202642Z"
  },
  "status": "success"
}
