pdf_generator_api_client 8.0.26 → 8.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/docs/DocumentsApi.md +75 -1
  4. data/docs/GenerateViewerUrl200Response.md +20 -0
  5. data/docs/GenerateViewerUrl200ResponseMeta.md +22 -0
  6. data/docs/GenerateViewerUrlRequest.md +20 -0
  7. data/docs/PrefillParam.md +26 -0
  8. data/docs/StoreDocumentRequest.md +2 -0
  9. data/lib/pdf_generator_api_client/api/assets_api.rb +1 -1
  10. data/lib/pdf_generator_api_client/api/conversion_api.rb +1 -1
  11. data/lib/pdf_generator_api_client/api/documents_api.rb +72 -2
  12. data/lib/pdf_generator_api_client/api/e_invoices_api.rb +1 -1
  13. data/lib/pdf_generator_api_client/api/forms_api.rb +1 -1
  14. data/lib/pdf_generator_api_client/api/misc_api.rb +1 -1
  15. data/lib/pdf_generator_api_client/api/services_api.rb +1 -1
  16. data/lib/pdf_generator_api_client/api/template_library_api.rb +1 -1
  17. data/lib/pdf_generator_api_client/api/template_versions_api.rb +1 -1
  18. data/lib/pdf_generator_api_client/api/templates_api.rb +1 -1
  19. data/lib/pdf_generator_api_client/api/workspaces_api.rb +1 -1
  20. data/lib/pdf_generator_api_client/api_client.rb +1 -1
  21. data/lib/pdf_generator_api_client/api_error.rb +1 -1
  22. data/lib/pdf_generator_api_client/configuration.rb +1 -1
  23. data/lib/pdf_generator_api_client/models/accessibility_option.rb +1 -1
  24. data/lib/pdf_generator_api_client/models/add_watermark_request.rb +1 -1
  25. data/lib/pdf_generator_api_client/models/async_output_param.rb +1 -1
  26. data/lib/pdf_generator_api_client/models/callback_param.rb +1 -1
  27. data/lib/pdf_generator_api_client/models/component.rb +1 -1
  28. data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +1 -1
  29. data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +1 -1
  30. data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +1 -1
  31. data/lib/pdf_generator_api_client/models/copy_template_request.rb +1 -1
  32. data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +1 -1
  33. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +1 -1
  34. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +1 -1
  35. data/lib/pdf_generator_api_client/models/create_workspace_request.rb +1 -1
  36. data/lib/pdf_generator_api_client/models/data_batch_inner.rb +1 -1
  37. data/lib/pdf_generator_api_client/models/document.rb +1 -1
  38. data/lib/pdf_generator_api_client/models/document_action.rb +1 -1
  39. data/lib/pdf_generator_api_client/models/document_user.rb +1 -1
  40. data/lib/pdf_generator_api_client/models/document_version.rb +1 -1
  41. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +1 -1
  42. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +1 -1
  43. data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +1 -1
  44. data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +1 -1
  45. data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +1 -1
  46. data/lib/pdf_generator_api_client/models/form_action_download.rb +1 -1
  47. data/lib/pdf_generator_api_client/models/form_action_send.rb +1 -1
  48. data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +1 -1
  49. data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +1 -1
  50. data/lib/pdf_generator_api_client/models/form_action_store.rb +1 -1
  51. data/lib/pdf_generator_api_client/models/form_configuration.rb +1 -1
  52. data/lib/pdf_generator_api_client/models/form_configuration_new.rb +1 -1
  53. data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +1 -1
  54. data/lib/pdf_generator_api_client/models/form_fields_base64.rb +1 -1
  55. data/lib/pdf_generator_api_client/models/form_fields_inner.rb +1 -1
  56. data/lib/pdf_generator_api_client/models/form_fields_url.rb +1 -1
  57. data/lib/pdf_generator_api_client/models/form_fill_base64.rb +1 -1
  58. data/lib/pdf_generator_api_client/models/form_fill_url.rb +1 -1
  59. data/lib/pdf_generator_api_client/models/format_param.rb +1 -1
  60. data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +1 -1
  61. data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +1 -1
  62. data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +1 -1
  63. data/lib/pdf_generator_api_client/models/generate_document_request.rb +1 -1
  64. data/lib/pdf_generator_api_client/models/generate_qr_code201_response.rb +1 -1
  65. data/lib/pdf_generator_api_client/models/generate_qr_code201_response_meta.rb +1 -1
  66. data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +1 -1
  67. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response.rb +230 -0
  68. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response_meta.rb +238 -0
  69. data/lib/pdf_generator_api_client/models/generate_viewer_url_request.rb +266 -0
  70. data/lib/pdf_generator_api_client/models/get_status200_response.rb +1 -1
  71. data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +1 -1
  72. data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +1 -1
  73. data/lib/pdf_generator_api_client/models/import_form_base64.rb +1 -1
  74. data/lib/pdf_generator_api_client/models/import_form_request.rb +1 -1
  75. data/lib/pdf_generator_api_client/models/import_form_url.rb +1 -1
  76. data/lib/pdf_generator_api_client/models/import_template_base64.rb +1 -1
  77. data/lib/pdf_generator_api_client/models/import_template_request.rb +1 -1
  78. data/lib/pdf_generator_api_client/models/import_template_url.rb +1 -1
  79. data/lib/pdf_generator_api_client/models/import_template_url_template.rb +1 -1
  80. data/lib/pdf_generator_api_client/models/inline_object.rb +1 -1
  81. data/lib/pdf_generator_api_client/models/inline_object1.rb +1 -1
  82. data/lib/pdf_generator_api_client/models/inline_object10.rb +1 -1
  83. data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +1 -1
  84. data/lib/pdf_generator_api_client/models/inline_object11.rb +1 -1
  85. data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +1 -1
  86. data/lib/pdf_generator_api_client/models/inline_object12.rb +1 -1
  87. data/lib/pdf_generator_api_client/models/inline_object12_meta.rb +1 -1
  88. data/lib/pdf_generator_api_client/models/inline_object12_meta_stats.rb +1 -1
  89. data/lib/pdf_generator_api_client/models/inline_object13.rb +1 -1
  90. data/lib/pdf_generator_api_client/models/inline_object14.rb +1 -1
  91. data/lib/pdf_generator_api_client/models/inline_object14_response_value.rb +1 -1
  92. data/lib/pdf_generator_api_client/models/inline_object14_response_value_default.rb +1 -1
  93. data/lib/pdf_generator_api_client/models/inline_object14_response_value_value.rb +1 -1
  94. data/lib/pdf_generator_api_client/models/inline_object15.rb +1 -1
  95. data/lib/pdf_generator_api_client/models/inline_object16.rb +1 -1
  96. data/lib/pdf_generator_api_client/models/inline_object17.rb +1 -1
  97. data/lib/pdf_generator_api_client/models/inline_object18.rb +1 -1
  98. data/lib/pdf_generator_api_client/models/inline_object19.rb +1 -1
  99. data/lib/pdf_generator_api_client/models/inline_object1_response.rb +1 -1
  100. data/lib/pdf_generator_api_client/models/inline_object2.rb +1 -1
  101. data/lib/pdf_generator_api_client/models/inline_object20.rb +1 -1
  102. data/lib/pdf_generator_api_client/models/inline_object20_meta.rb +1 -1
  103. data/lib/pdf_generator_api_client/models/inline_object21.rb +1 -1
  104. data/lib/pdf_generator_api_client/models/inline_object22.rb +1 -1
  105. data/lib/pdf_generator_api_client/models/inline_object22_response.rb +1 -1
  106. data/lib/pdf_generator_api_client/models/inline_object23.rb +1 -1
  107. data/lib/pdf_generator_api_client/models/inline_object24.rb +1 -1
  108. data/lib/pdf_generator_api_client/models/inline_object25.rb +1 -1
  109. data/lib/pdf_generator_api_client/models/inline_object26.rb +1 -1
  110. data/lib/pdf_generator_api_client/models/inline_object27.rb +1 -1
  111. data/lib/pdf_generator_api_client/models/inline_object28.rb +1 -1
  112. data/lib/pdf_generator_api_client/models/inline_object29.rb +1 -1
  113. data/lib/pdf_generator_api_client/models/inline_object3.rb +1 -1
  114. data/lib/pdf_generator_api_client/models/inline_object4.rb +1 -1
  115. data/lib/pdf_generator_api_client/models/inline_object5.rb +1 -1
  116. data/lib/pdf_generator_api_client/models/inline_object6.rb +1 -1
  117. data/lib/pdf_generator_api_client/models/inline_object7.rb +1 -1
  118. data/lib/pdf_generator_api_client/models/inline_object7_response.rb +1 -1
  119. data/lib/pdf_generator_api_client/models/inline_object8.rb +1 -1
  120. data/lib/pdf_generator_api_client/models/inline_object9.rb +1 -1
  121. data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +1 -1
  122. data/lib/pdf_generator_api_client/models/inline_object_meta.rb +1 -1
  123. data/lib/pdf_generator_api_client/models/key_field_param.rb +1 -1
  124. data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +1 -1
  125. data/lib/pdf_generator_api_client/models/make_accessible_request.rb +1 -1
  126. data/lib/pdf_generator_api_client/models/make_accessible_url.rb +1 -1
  127. data/lib/pdf_generator_api_client/models/metadata_param.rb +1 -1
  128. data/lib/pdf_generator_api_client/models/open_editor_request.rb +1 -1
  129. data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +1 -1
  130. data/lib/pdf_generator_api_client/models/optimize_base64.rb +1 -1
  131. data/lib/pdf_generator_api_client/models/optimize_document_request.rb +1 -1
  132. data/lib/pdf_generator_api_client/models/optimize_url.rb +1 -1
  133. data/lib/pdf_generator_api_client/models/output_param.rb +1 -1
  134. data/lib/pdf_generator_api_client/models/pagination_meta.rb +1 -1
  135. data/lib/pdf_generator_api_client/models/prefill_param.rb +335 -0
  136. data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +1 -1
  137. data/lib/pdf_generator_api_client/models/public_template_library_item.rb +1 -1
  138. data/lib/pdf_generator_api_client/models/status_param.rb +1 -1
  139. data/lib/pdf_generator_api_client/models/store_document_request.rb +11 -2
  140. data/lib/pdf_generator_api_client/models/template.rb +1 -1
  141. data/lib/pdf_generator_api_client/models/template_definition.rb +1 -1
  142. data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +1 -1
  143. data/lib/pdf_generator_api_client/models/template_definition_editor.rb +1 -1
  144. data/lib/pdf_generator_api_client/models/template_definition_new.rb +1 -1
  145. data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +1 -1
  146. data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +1 -1
  147. data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +1 -1
  148. data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +1 -1
  149. data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +1 -1
  150. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +1 -1
  151. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +1 -1
  152. data/lib/pdf_generator_api_client/models/template_definition_pages_inner.rb +1 -1
  153. data/lib/pdf_generator_api_client/models/template_param.rb +1 -1
  154. data/lib/pdf_generator_api_client/models/template_param_data.rb +1 -1
  155. data/lib/pdf_generator_api_client/models/template_param_id.rb +1 -1
  156. data/lib/pdf_generator_api_client/models/template_version.rb +1 -1
  157. data/lib/pdf_generator_api_client/models/template_version_collection.rb +1 -1
  158. data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +1 -1
  159. data/lib/pdf_generator_api_client/models/watermark_base64.rb +1 -1
  160. data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +1 -1
  161. data/lib/pdf_generator_api_client/models/watermark_image.rb +1 -1
  162. data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +1 -1
  163. data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +1 -1
  164. data/lib/pdf_generator_api_client/models/watermark_position.rb +1 -1
  165. data/lib/pdf_generator_api_client/models/watermark_text.rb +1 -1
  166. data/lib/pdf_generator_api_client/models/workspace.rb +1 -1
  167. data/lib/pdf_generator_api_client/version.rb +2 -2
  168. data/lib/pdf_generator_api_client.rb +5 -1
  169. data/pdf_generator_api_client.gemspec +1 -1
  170. data/spec/api/assets_api_spec.rb +1 -1
  171. data/spec/api/conversion_api_spec.rb +1 -1
  172. data/spec/api/documents_api_spec.rb +14 -1
  173. data/spec/api/e_invoices_api_spec.rb +1 -1
  174. data/spec/api/forms_api_spec.rb +1 -1
  175. data/spec/api/misc_api_spec.rb +1 -1
  176. data/spec/api/services_api_spec.rb +1 -1
  177. data/spec/api/template_library_api_spec.rb +1 -1
  178. data/spec/api/template_versions_api_spec.rb +1 -1
  179. data/spec/api/templates_api_spec.rb +1 -1
  180. data/spec/api/workspaces_api_spec.rb +1 -1
  181. data/spec/models/accessibility_option_spec.rb +1 -1
  182. data/spec/models/add_watermark_request_spec.rb +1 -1
  183. data/spec/models/async_output_param_spec.rb +1 -1
  184. data/spec/models/callback_param_spec.rb +1 -1
  185. data/spec/models/component_spec.rb +1 -1
  186. data/spec/models/convert_html2_pdf_request_spec.rb +1 -1
  187. data/spec/models/convert_pdf2_image_request_spec.rb +1 -1
  188. data/spec/models/convert_url2_pdf_request_spec.rb +1 -1
  189. data/spec/models/copy_template_request_spec.rb +1 -1
  190. data/spec/models/create_e_invoice_request_spec.rb +1 -1
  191. data/spec/models/create_factur_xe_invoice_request_spec.rb +1 -1
  192. data/spec/models/create_factur_xe_invoice_request_template_spec.rb +1 -1
  193. data/spec/models/create_workspace_request_spec.rb +1 -1
  194. data/spec/models/data_batch_inner_spec.rb +1 -1
  195. data/spec/models/document_action_spec.rb +1 -1
  196. data/spec/models/document_spec.rb +1 -1
  197. data/spec/models/document_user_spec.rb +1 -1
  198. data/spec/models/document_version_spec.rb +1 -1
  199. data/spec/models/encrypt_and_decrypt_base64_spec.rb +1 -1
  200. data/spec/models/encrypt_and_decrypt_url_spec.rb +1 -1
  201. data/spec/models/encrypt_document_request_spec.rb +1 -1
  202. data/spec/models/extract_form_fields_request_spec.rb +1 -1
  203. data/spec/models/fill_form_fields_request_spec.rb +1 -1
  204. data/spec/models/form_action_download_spec.rb +1 -1
  205. data/spec/models/form_action_send_send_document_headers_inner_spec.rb +1 -1
  206. data/spec/models/form_action_send_send_document_spec.rb +1 -1
  207. data/spec/models/form_action_send_spec.rb +1 -1
  208. data/spec/models/form_action_store_spec.rb +1 -1
  209. data/spec/models/form_configuration_new_actions_inner_spec.rb +1 -1
  210. data/spec/models/form_configuration_new_spec.rb +1 -1
  211. data/spec/models/form_configuration_spec.rb +1 -1
  212. data/spec/models/form_fields_base64_spec.rb +1 -1
  213. data/spec/models/form_fields_inner_spec.rb +1 -1
  214. data/spec/models/form_fields_url_spec.rb +1 -1
  215. data/spec/models/form_fill_base64_spec.rb +1 -1
  216. data/spec/models/form_fill_url_spec.rb +1 -1
  217. data/spec/models/format_param_spec.rb +1 -1
  218. data/spec/models/generate_document_asynchronous_request_spec.rb +1 -1
  219. data/spec/models/generate_document_batch_asynchronous_request_spec.rb +1 -1
  220. data/spec/models/generate_document_batch_request_spec.rb +1 -1
  221. data/spec/models/generate_document_request_spec.rb +1 -1
  222. data/spec/models/generate_qr_code201_response_meta_spec.rb +1 -1
  223. data/spec/models/generate_qr_code201_response_spec.rb +1 -1
  224. data/spec/models/generate_qr_code_request_spec.rb +1 -1
  225. data/spec/models/generate_viewer_url200_response_meta_spec.rb +48 -0
  226. data/spec/models/generate_viewer_url200_response_spec.rb +42 -0
  227. data/spec/models/generate_viewer_url_request_spec.rb +46 -0
  228. data/spec/models/get_status200_response_spec.rb +1 -1
  229. data/spec/models/get_template_library200_response_spec.rb +1 -1
  230. data/spec/models/get_template_version422_response_spec.rb +1 -1
  231. data/spec/models/import_form_base64_spec.rb +1 -1
  232. data/spec/models/import_form_request_spec.rb +1 -1
  233. data/spec/models/import_form_url_spec.rb +1 -1
  234. data/spec/models/import_template_base64_spec.rb +1 -1
  235. data/spec/models/import_template_request_spec.rb +1 -1
  236. data/spec/models/import_template_url_spec.rb +1 -1
  237. data/spec/models/import_template_url_template_spec.rb +1 -1
  238. data/spec/models/inline_object10_meta_spec.rb +1 -1
  239. data/spec/models/inline_object10_spec.rb +1 -1
  240. data/spec/models/inline_object11_meta_spec.rb +1 -1
  241. data/spec/models/inline_object11_spec.rb +1 -1
  242. data/spec/models/inline_object12_meta_spec.rb +1 -1
  243. data/spec/models/inline_object12_meta_stats_spec.rb +1 -1
  244. data/spec/models/inline_object12_spec.rb +1 -1
  245. data/spec/models/inline_object13_spec.rb +1 -1
  246. data/spec/models/inline_object14_response_value_default_spec.rb +1 -1
  247. data/spec/models/inline_object14_response_value_spec.rb +1 -1
  248. data/spec/models/inline_object14_response_value_value_spec.rb +1 -1
  249. data/spec/models/inline_object14_spec.rb +1 -1
  250. data/spec/models/inline_object15_spec.rb +1 -1
  251. data/spec/models/inline_object16_spec.rb +1 -1
  252. data/spec/models/inline_object17_spec.rb +1 -1
  253. data/spec/models/inline_object18_spec.rb +1 -1
  254. data/spec/models/inline_object19_spec.rb +1 -1
  255. data/spec/models/inline_object1_response_spec.rb +1 -1
  256. data/spec/models/inline_object1_spec.rb +1 -1
  257. data/spec/models/inline_object20_meta_spec.rb +1 -1
  258. data/spec/models/inline_object20_spec.rb +1 -1
  259. data/spec/models/inline_object21_spec.rb +1 -1
  260. data/spec/models/inline_object22_response_spec.rb +1 -1
  261. data/spec/models/inline_object22_spec.rb +1 -1
  262. data/spec/models/inline_object23_spec.rb +1 -1
  263. data/spec/models/inline_object24_spec.rb +1 -1
  264. data/spec/models/inline_object25_spec.rb +1 -1
  265. data/spec/models/inline_object26_spec.rb +1 -1
  266. data/spec/models/inline_object27_spec.rb +1 -1
  267. data/spec/models/inline_object28_spec.rb +1 -1
  268. data/spec/models/inline_object29_spec.rb +1 -1
  269. data/spec/models/inline_object2_spec.rb +1 -1
  270. data/spec/models/inline_object3_spec.rb +1 -1
  271. data/spec/models/inline_object4_spec.rb +1 -1
  272. data/spec/models/inline_object5_spec.rb +1 -1
  273. data/spec/models/inline_object6_spec.rb +1 -1
  274. data/spec/models/inline_object7_response_spec.rb +1 -1
  275. data/spec/models/inline_object7_spec.rb +1 -1
  276. data/spec/models/inline_object8_spec.rb +1 -1
  277. data/spec/models/inline_object9_meta_spec.rb +1 -1
  278. data/spec/models/inline_object9_spec.rb +1 -1
  279. data/spec/models/inline_object_meta_spec.rb +1 -1
  280. data/spec/models/inline_object_spec.rb +1 -1
  281. data/spec/models/key_field_param_spec.rb +1 -1
  282. data/spec/models/make_accessible_base64_spec.rb +1 -1
  283. data/spec/models/make_accessible_request_spec.rb +1 -1
  284. data/spec/models/make_accessible_url_spec.rb +1 -1
  285. data/spec/models/metadata_param_spec.rb +1 -1
  286. data/spec/models/open_editor_request_data_spec.rb +1 -1
  287. data/spec/models/open_editor_request_spec.rb +1 -1
  288. data/spec/models/optimize_base64_spec.rb +1 -1
  289. data/spec/models/optimize_document_request_spec.rb +1 -1
  290. data/spec/models/optimize_url_spec.rb +1 -1
  291. data/spec/models/output_param_spec.rb +1 -1
  292. data/spec/models/pagination_meta_spec.rb +1 -1
  293. data/spec/models/prefill_param_spec.rb +60 -0
  294. data/spec/models/promote_template_version200_response_spec.rb +1 -1
  295. data/spec/models/public_template_library_item_spec.rb +1 -1
  296. data/spec/models/status_param_spec.rb +1 -1
  297. data/spec/models/store_document_request_spec.rb +7 -1
  298. data/spec/models/template_definition_data_settings_spec.rb +1 -1
  299. data/spec/models/template_definition_editor_spec.rb +1 -1
  300. data/spec/models/template_definition_new_data_settings_spec.rb +1 -1
  301. data/spec/models/template_definition_new_editor_spec.rb +1 -1
  302. data/spec/models/template_definition_new_layout_margins_spec.rb +1 -1
  303. data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +1 -1
  304. data/spec/models/template_definition_new_layout_spec.rb +1 -1
  305. data/spec/models/template_definition_new_pages_inner_margins_spec.rb +1 -1
  306. data/spec/models/template_definition_new_pages_inner_spec.rb +1 -1
  307. data/spec/models/template_definition_new_spec.rb +1 -1
  308. data/spec/models/template_definition_pages_inner_spec.rb +1 -1
  309. data/spec/models/template_definition_spec.rb +1 -1
  310. data/spec/models/template_param_data_spec.rb +1 -1
  311. data/spec/models/template_param_id_spec.rb +1 -1
  312. data/spec/models/template_param_spec.rb +1 -1
  313. data/spec/models/template_spec.rb +1 -1
  314. data/spec/models/template_version_collection_meta_spec.rb +1 -1
  315. data/spec/models/template_version_collection_spec.rb +1 -1
  316. data/spec/models/template_version_spec.rb +1 -1
  317. data/spec/models/watermark_base64_spec.rb +1 -1
  318. data/spec/models/watermark_file_url_watermark_spec.rb +1 -1
  319. data/spec/models/watermark_image_content_base64_spec.rb +1 -1
  320. data/spec/models/watermark_image_content_url_spec.rb +1 -1
  321. data/spec/models/watermark_image_spec.rb +1 -1
  322. data/spec/models/watermark_position_spec.rb +1 -1
  323. data/spec/models/watermark_text_spec.rb +1 -1
  324. data/spec/models/workspace_spec.rb +1 -1
  325. data/spec/spec_helper.rb +1 -1
  326. metadata +18 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b03fdf96231129f3a3c1b7c318659d8eb142395c7a769b633aa1de601f3d399
4
- data.tar.gz: c825d2a6b2137b2c0d327d262afda57c63c19608738585404c4c2d431377e5d0
3
+ metadata.gz: aed8868b04692c214f895129498b688f247781bc3064ee65c02caf62c250222e
4
+ data.tar.gz: 0e65a7103c185cfb86b6006c198cc853a51c75110e6725cce0be6bfa8c018141
5
5
  SHA512:
6
- metadata.gz: 46d54cc421e033c111f8351ceb7aeece9b8b53681fab86982d6f68d2ff670152c72f78820e8d778c6dce2c7fb665fa331d49627ae1ae81d5617b3545468104fa
7
- data.tar.gz: 1e61f20a543af4b4a8962732ff5030ed118f3d6675c9ad58c3b7e5a66b86c12dd3bc6341ed6a5bf2ab7ea1d2c07a8ed3e487691e289791c2a13e1fcc6f960fc5
6
+ metadata.gz: 3aa52cb806180a06c1cd7d39f41d95ceec2bfb1f7045bed6ebd16ce206ff80bab1efc0cc8144b4c9d5fc379ce62f88ae1f6947dbca8b7dc34c53468fa58c4ddd
7
+ data.tar.gz: 98ea5cad0c7e9b0b74f3f9745d2843a350b23edd272c4945cb06a4ac0ac90d811a11abb62a9ef26808f25bd9a813e506b93cb997e7e8f47643195ce0b504d9fd
data/README.md CHANGED
@@ -234,8 +234,8 @@ You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API
234
234
 
235
235
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
236
236
 
237
- - API version: 4.0.26
238
- - Package version: 8.0.26
237
+ - API version: 4.0.27
238
+ - Package version: 8.0.27
239
239
  - Generator version: 7.14.0
240
240
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
241
241
  For more information, please visit [https://support.pdfgeneratorapi.com](https://support.pdfgeneratorapi.com)
@@ -253,16 +253,16 @@ gem build pdf_generator_api_client.gemspec
253
253
  Then either install the gem locally:
254
254
 
255
255
  ```shell
256
- gem install ./pdf_generator_api_client-8.0.26.gem
256
+ gem install ./pdf_generator_api_client-8.0.27.gem
257
257
  ```
258
258
 
259
- (for development, run `gem install --dev ./pdf_generator_api_client-8.0.26.gem` to install the development dependencies)
259
+ (for development, run `gem install --dev ./pdf_generator_api_client-8.0.27.gem` to install the development dependencies)
260
260
 
261
261
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
262
262
 
263
263
  Finally add this to the Gemfile:
264
264
 
265
- gem 'pdf_generator_api_client', '~> 8.0.26'
265
+ gem 'pdf_generator_api_client', '~> 8.0.27'
266
266
 
267
267
  ### Install from Git
268
268
 
@@ -317,11 +317,12 @@ Class | Method | HTTP request | Description
317
317
  *PDFGeneratorAPI::ConversionApi* | [**convert_html2_pdf**](docs/ConversionApi.md#convert_html2_pdf) | **POST** /conversion/html2pdf | HTML to PDF
318
318
  *PDFGeneratorAPI::ConversionApi* | [**convert_pdf2_image**](docs/ConversionApi.md#convert_pdf2_image) | **POST** /conversion/pdf2image | PDF to Image
319
319
  *PDFGeneratorAPI::ConversionApi* | [**convert_url2_pdf**](docs/ConversionApi.md#convert_url2_pdf) | **POST** /conversion/url2pdf | URL to PDF
320
- *PDFGeneratorAPI::DocumentsApi* | [**delete_document**](docs/DocumentsApi.md#delete_document) | **DELETE** /documents/{publicId}/actions | Delete document
320
+ *PDFGeneratorAPI::DocumentsApi* | [**delete_document**](docs/DocumentsApi.md#delete_document) | **DELETE** /documents/{publicId} | Delete document
321
321
  *PDFGeneratorAPI::DocumentsApi* | [**generate_document**](docs/DocumentsApi.md#generate_document) | **POST** /documents/generate | Generate document
322
322
  *PDFGeneratorAPI::DocumentsApi* | [**generate_document_asynchronous**](docs/DocumentsApi.md#generate_document_asynchronous) | **POST** /documents/generate/async | Generate document (async)
323
323
  *PDFGeneratorAPI::DocumentsApi* | [**generate_document_batch**](docs/DocumentsApi.md#generate_document_batch) | **POST** /documents/generate/batch | Generate document (batch)
324
324
  *PDFGeneratorAPI::DocumentsApi* | [**generate_document_batch_asynchronous**](docs/DocumentsApi.md#generate_document_batch_asynchronous) | **POST** /documents/generate/batch/async | Generate document (batch + async)
325
+ *PDFGeneratorAPI::DocumentsApi* | [**generate_viewer_url**](docs/DocumentsApi.md#generate_viewer_url) | **POST** /documents/{publicId} | Get document with prefill
325
326
  *PDFGeneratorAPI::DocumentsApi* | [**get_async_job_status**](docs/DocumentsApi.md#get_async_job_status) | **GET** /documents/async/{jobId} | Get job status
326
327
  *PDFGeneratorAPI::DocumentsApi* | [**get_document**](docs/DocumentsApi.md#get_document) | **GET** /documents/{publicId} | Get document
327
328
  *PDFGeneratorAPI::DocumentsApi* | [**get_document_actions**](docs/DocumentsApi.md#get_document_actions) | **GET** /documents/{publicId}/actions | Get document actions
@@ -418,6 +419,9 @@ Class | Method | HTTP request | Description
418
419
  - [PDFGeneratorAPI::GenerateQRCode201Response](docs/GenerateQRCode201Response.md)
419
420
  - [PDFGeneratorAPI::GenerateQRCode201ResponseMeta](docs/GenerateQRCode201ResponseMeta.md)
420
421
  - [PDFGeneratorAPI::GenerateQRCodeRequest](docs/GenerateQRCodeRequest.md)
422
+ - [PDFGeneratorAPI::GenerateViewerUrl200Response](docs/GenerateViewerUrl200Response.md)
423
+ - [PDFGeneratorAPI::GenerateViewerUrl200ResponseMeta](docs/GenerateViewerUrl200ResponseMeta.md)
424
+ - [PDFGeneratorAPI::GenerateViewerUrlRequest](docs/GenerateViewerUrlRequest.md)
421
425
  - [PDFGeneratorAPI::GetStatus200Response](docs/GetStatus200Response.md)
422
426
  - [PDFGeneratorAPI::GetTemplateLibrary200Response](docs/GetTemplateLibrary200Response.md)
423
427
  - [PDFGeneratorAPI::GetTemplateVersion422Response](docs/GetTemplateVersion422Response.md)
@@ -483,6 +487,7 @@ Class | Method | HTTP request | Description
483
487
  - [PDFGeneratorAPI::OptimizeUrl](docs/OptimizeUrl.md)
484
488
  - [PDFGeneratorAPI::OutputParam](docs/OutputParam.md)
485
489
  - [PDFGeneratorAPI::PaginationMeta](docs/PaginationMeta.md)
490
+ - [PDFGeneratorAPI::PrefillParam](docs/PrefillParam.md)
486
491
  - [PDFGeneratorAPI::PromoteTemplateVersion200Response](docs/PromoteTemplateVersion200Response.md)
487
492
  - [PDFGeneratorAPI::PublicTemplateLibraryItem](docs/PublicTemplateLibraryItem.md)
488
493
  - [PDFGeneratorAPI::StatusParam](docs/StatusParam.md)
data/docs/DocumentsApi.md CHANGED
@@ -4,11 +4,12 @@ All URIs are relative to *https://us1.pdfgeneratorapi.com/api/v4*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**delete_document**](DocumentsApi.md#delete_document) | **DELETE** /documents/{publicId}/actions | Delete document |
7
+ | [**delete_document**](DocumentsApi.md#delete_document) | **DELETE** /documents/{publicId} | Delete document |
8
8
  | [**generate_document**](DocumentsApi.md#generate_document) | **POST** /documents/generate | Generate document |
9
9
  | [**generate_document_asynchronous**](DocumentsApi.md#generate_document_asynchronous) | **POST** /documents/generate/async | Generate document (async) |
10
10
  | [**generate_document_batch**](DocumentsApi.md#generate_document_batch) | **POST** /documents/generate/batch | Generate document (batch) |
11
11
  | [**generate_document_batch_asynchronous**](DocumentsApi.md#generate_document_batch_asynchronous) | **POST** /documents/generate/batch/async | Generate document (batch + async) |
12
+ | [**generate_viewer_url**](DocumentsApi.md#generate_viewer_url) | **POST** /documents/{publicId} | Get document with prefill |
12
13
  | [**get_async_job_status**](DocumentsApi.md#get_async_job_status) | **GET** /documents/async/{jobId} | Get job status |
13
14
  | [**get_document**](DocumentsApi.md#get_document) | **GET** /documents/{publicId} | Get document |
14
15
  | [**get_document_actions**](DocumentsApi.md#get_document_actions) | **GET** /documents/{publicId}/actions | Get document actions |
@@ -361,6 +362,79 @@ end
361
362
  - **Accept**: application/json
362
363
 
363
364
 
365
+ ## generate_viewer_url
366
+
367
+ > <GenerateViewerUrl200Response> generate_viewer_url(public_id, opts)
368
+
369
+ Get document with prefill
370
+
371
+ Returns a URL for a stored document, optionally with viewer prefill data. The prefill is encrypted server-side and embedded in the viewer URL, so the caller does not have to handle encryption. Prefill is only applied when `output` is `viewer`.
372
+
373
+ ### Examples
374
+
375
+ ```ruby
376
+ require 'time'
377
+ require 'pdf_generator_api_client'
378
+ # setup authorization
379
+ PDFGeneratorAPI.configure do |config|
380
+ # Configure Bearer authorization (JWT): JSONWebTokenAuth
381
+ config.access_token = 'YOUR_BEARER_TOKEN'
382
+ end
383
+
384
+ api_instance = PDFGeneratorAPI::DocumentsApi.new
385
+ public_id = 'bac8381bce1982e5f6957a0f52371336' # String | Resource public id
386
+ opts = {
387
+ generate_viewer_url_request: PDFGeneratorAPI::GenerateViewerUrlRequest.new # GenerateViewerUrlRequest | Optional response format and viewer prefill data.
388
+ }
389
+
390
+ begin
391
+ # Get document with prefill
392
+ result = api_instance.generate_viewer_url(public_id, opts)
393
+ p result
394
+ rescue PDFGeneratorAPI::ApiError => e
395
+ puts "Error when calling DocumentsApi->generate_viewer_url: #{e}"
396
+ end
397
+ ```
398
+
399
+ #### Using the generate_viewer_url_with_http_info variant
400
+
401
+ This returns an Array which contains the response data, status code and headers.
402
+
403
+ > <Array(<GenerateViewerUrl200Response>, Integer, Hash)> generate_viewer_url_with_http_info(public_id, opts)
404
+
405
+ ```ruby
406
+ begin
407
+ # Get document with prefill
408
+ data, status_code, headers = api_instance.generate_viewer_url_with_http_info(public_id, opts)
409
+ p status_code # => 2xx
410
+ p headers # => { ... }
411
+ p data # => <GenerateViewerUrl200Response>
412
+ rescue PDFGeneratorAPI::ApiError => e
413
+ puts "Error when calling DocumentsApi->generate_viewer_url_with_http_info: #{e}"
414
+ end
415
+ ```
416
+
417
+ ### Parameters
418
+
419
+ | Name | Type | Description | Notes |
420
+ | ---- | ---- | ----------- | ----- |
421
+ | **public_id** | **String** | Resource public id | |
422
+ | **generate_viewer_url_request** | [**GenerateViewerUrlRequest**](GenerateViewerUrlRequest.md) | Optional response format and viewer prefill data. | [optional] |
423
+
424
+ ### Return type
425
+
426
+ [**GenerateViewerUrl200Response**](GenerateViewerUrl200Response.md)
427
+
428
+ ### Authorization
429
+
430
+ [JSONWebTokenAuth](../README.md#JSONWebTokenAuth)
431
+
432
+ ### HTTP request headers
433
+
434
+ - **Content-Type**: application/json
435
+ - **Accept**: application/json
436
+
437
+
364
438
  ## get_async_job_status
365
439
 
366
440
  > <InlineObject13> get_async_job_status(job_id)
@@ -0,0 +1,20 @@
1
+ # PDFGeneratorAPI::GenerateViewerUrl200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **response** | **String** | Public URL to the PDF viewer. | [optional] |
8
+ | **meta** | [**GenerateViewerUrl200ResponseMeta**](GenerateViewerUrl200ResponseMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pdf_generator_api_client'
14
+
15
+ instance = PDFGeneratorAPI::GenerateViewerUrl200Response.new(
16
+ response: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # PDFGeneratorAPI::GenerateViewerUrl200ResponseMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+ | **display_name** | **String** | | [optional] |
9
+ | **public_id** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pdf_generator_api_client'
15
+
16
+ instance = PDFGeneratorAPI::GenerateViewerUrl200ResponseMeta.new(
17
+ name: null,
18
+ display_name: null,
19
+ public_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # PDFGeneratorAPI::GenerateViewerUrlRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **output** | **String** | Response format. &#x60;url&#x60; returns a public URL to the stored document; &#x60;viewer&#x60; returns a public URL to the PDF viewer (with encrypted prefill when provided). | [optional][default to &#39;url&#39;] |
8
+ | **prefill** | [**PrefillParam**](PrefillParam.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pdf_generator_api_client'
14
+
15
+ instance = PDFGeneratorAPI::GenerateViewerUrlRequest.new(
16
+ output: viewer,
17
+ prefill: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ # PDFGeneratorAPI::PrefillParam
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id_code** | **String** | | [optional] |
8
+ | **first_name** | **String** | | [optional] |
9
+ | **last_name** | **String** | | [optional] |
10
+ | **email** | **String** | | [optional] |
11
+ | **editable** | **Boolean** | | [optional][default to true] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'pdf_generator_api_client'
17
+
18
+ instance = PDFGeneratorAPI::PrefillParam.new(
19
+ id_code: null,
20
+ first_name: null,
21
+ last_name: null,
22
+ email: null,
23
+ editable: null
24
+ )
25
+ ```
26
+
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **file_base64** | **String** | Base64 encoded PDF file. Required if file_url is not provided. | [optional] |
8
8
  | **file_url** | **String** | Public HTTPS URL to a PDF file. Required if file_base64 is not provided. | [optional] |
9
+ | **prefill** | [**PrefillParam**](PrefillParam.md) | | [optional] |
9
10
  | **name** | **String** | Generated document name (optional) | [optional][default to &#39;&#39;] |
10
11
  | **output** | **String** | Response format. &#x60;url&#x60; returns a public URL to the stored document; &#x60;viewer&#x60; returns a public URL to the PDF viewer. | [optional][default to &#39;url&#39;] |
11
12
 
@@ -17,6 +18,7 @@ require 'pdf_generator_api_client'
17
18
  instance = PDFGeneratorAPI::StoreDocumentRequest.new(
18
19
  file_base64: JVBERi0xLjcKJeLjz9MKNyAwIG9iago8...,
19
20
  file_url: https://example.org/document.pdf,
21
+ prefill: null,
20
22
  name: Invoice 123,
21
23
  output: url
22
24
  )
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -43,7 +43,7 @@ module PDFGeneratorAPI
43
43
  fail ArgumentError, "Missing the required parameter 'public_id' when calling DocumentsApi.delete_document"
44
44
  end
45
45
  # resource path
46
- local_var_path = '/documents/{publicId}/actions'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
46
+ local_var_path = '/documents/{publicId}'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
47
47
 
48
48
  # query parameters
49
49
  query_params = opts[:query_params] || {}
@@ -354,6 +354,76 @@ module PDFGeneratorAPI
354
354
  return data, status_code, headers
355
355
  end
356
356
 
357
+ # Get document with prefill
358
+ # Returns a URL for a stored document, optionally with viewer prefill data. The prefill is encrypted server-side and embedded in the viewer URL, so the caller does not have to handle encryption. Prefill is only applied when `output` is `viewer`.
359
+ # @param public_id [String] Resource public id
360
+ # @param [Hash] opts the optional parameters
361
+ # @option opts [GenerateViewerUrlRequest] :generate_viewer_url_request Optional response format and viewer prefill data.
362
+ # @return [GenerateViewerUrl200Response]
363
+ def generate_viewer_url(public_id, opts = {})
364
+ data, _status_code, _headers = generate_viewer_url_with_http_info(public_id, opts)
365
+ data
366
+ end
367
+
368
+ # Get document with prefill
369
+ # Returns a URL for a stored document, optionally with viewer prefill data. The prefill is encrypted server-side and embedded in the viewer URL, so the caller does not have to handle encryption. Prefill is only applied when &#x60;output&#x60; is &#x60;viewer&#x60;.
370
+ # @param public_id [String] Resource public id
371
+ # @param [Hash] opts the optional parameters
372
+ # @option opts [GenerateViewerUrlRequest] :generate_viewer_url_request Optional response format and viewer prefill data.
373
+ # @return [Array<(GenerateViewerUrl200Response, Integer, Hash)>] GenerateViewerUrl200Response data, response status code and response headers
374
+ def generate_viewer_url_with_http_info(public_id, opts = {})
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug 'Calling API: DocumentsApi.generate_viewer_url ...'
377
+ end
378
+ # verify the required parameter 'public_id' is set
379
+ if @api_client.config.client_side_validation && public_id.nil?
380
+ fail ArgumentError, "Missing the required parameter 'public_id' when calling DocumentsApi.generate_viewer_url"
381
+ end
382
+ # resource path
383
+ local_var_path = '/documents/{publicId}'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
384
+
385
+ # query parameters
386
+ query_params = opts[:query_params] || {}
387
+
388
+ # header parameters
389
+ header_params = opts[:header_params] || {}
390
+ # HTTP header 'Accept' (if needed)
391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
392
+ # HTTP header 'Content-Type'
393
+ content_type = @api_client.select_header_content_type(['application/json'])
394
+ if !content_type.nil?
395
+ header_params['Content-Type'] = content_type
396
+ end
397
+
398
+ # form parameters
399
+ form_params = opts[:form_params] || {}
400
+
401
+ # http body (model)
402
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'generate_viewer_url_request'])
403
+
404
+ # return_type
405
+ return_type = opts[:debug_return_type] || 'GenerateViewerUrl200Response'
406
+
407
+ # auth_names
408
+ auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
409
+
410
+ new_options = opts.merge(
411
+ :operation => :"DocumentsApi.generate_viewer_url",
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => return_type
418
+ )
419
+
420
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug "API called: DocumentsApi#generate_viewer_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
+ end
424
+ return data, status_code, headers
425
+ end
426
+
357
427
  # Get job status
358
428
  # Returns status of an async job
359
429
  # @param job_id [String] Job id
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.26
6
+ The version of the OpenAPI document: 4.0.27
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0