pdf_generator_api_client 8.0.25 → 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 (349) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -7
  3. data/docs/DocumentAction.md +22 -0
  4. data/docs/DocumentUser.md +26 -0
  5. data/docs/DocumentVersion.md +24 -0
  6. data/docs/DocumentsApi.md +222 -8
  7. data/docs/FormsApi.md +28 -28
  8. data/docs/GenerateViewerUrl200Response.md +20 -0
  9. data/docs/GenerateViewerUrl200ResponseMeta.md +22 -0
  10. data/docs/GenerateViewerUrlRequest.md +20 -0
  11. data/docs/InlineObject16.md +2 -4
  12. data/docs/InlineObject17.md +1 -1
  13. data/docs/InlineObject18.md +3 -3
  14. data/docs/InlineObject19.md +2 -2
  15. data/docs/InlineObject20.md +4 -2
  16. data/docs/{InlineObject18Meta.md → InlineObject20Meta.md} +2 -2
  17. data/docs/InlineObject21.md +2 -2
  18. data/docs/InlineObject22.md +2 -2
  19. data/docs/{InlineObject20Response.md → InlineObject22Response.md} +2 -2
  20. data/docs/InlineObject23.md +1 -1
  21. data/docs/InlineObject24.md +1 -1
  22. data/docs/InlineObject25.md +1 -3
  23. data/docs/InlineObject26.md +1 -1
  24. data/docs/InlineObject27.md +3 -1
  25. data/docs/InlineObject28.md +18 -0
  26. data/docs/InlineObject29.md +18 -0
  27. data/docs/PrefillParam.md +26 -0
  28. data/docs/StoreDocumentRequest.md +2 -0
  29. data/docs/TemplateLibraryApi.md +4 -4
  30. data/docs/TemplateVersionsApi.md +4 -4
  31. data/docs/TemplatesApi.md +20 -20
  32. data/lib/pdf_generator_api_client/api/assets_api.rb +1 -1
  33. data/lib/pdf_generator_api_client/api/conversion_api.rb +1 -1
  34. data/lib/pdf_generator_api_client/api/documents_api.rb +203 -7
  35. data/lib/pdf_generator_api_client/api/e_invoices_api.rb +1 -1
  36. data/lib/pdf_generator_api_client/api/forms_api.rb +22 -22
  37. data/lib/pdf_generator_api_client/api/misc_api.rb +1 -1
  38. data/lib/pdf_generator_api_client/api/services_api.rb +1 -1
  39. data/lib/pdf_generator_api_client/api/template_library_api.rb +4 -4
  40. data/lib/pdf_generator_api_client/api/template_versions_api.rb +4 -4
  41. data/lib/pdf_generator_api_client/api/templates_api.rb +16 -16
  42. data/lib/pdf_generator_api_client/api/workspaces_api.rb +1 -1
  43. data/lib/pdf_generator_api_client/api_client.rb +1 -1
  44. data/lib/pdf_generator_api_client/api_error.rb +1 -1
  45. data/lib/pdf_generator_api_client/configuration.rb +1 -1
  46. data/lib/pdf_generator_api_client/models/accessibility_option.rb +1 -1
  47. data/lib/pdf_generator_api_client/models/add_watermark_request.rb +1 -1
  48. data/lib/pdf_generator_api_client/models/async_output_param.rb +1 -1
  49. data/lib/pdf_generator_api_client/models/callback_param.rb +1 -1
  50. data/lib/pdf_generator_api_client/models/component.rb +1 -1
  51. data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +1 -1
  52. data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +1 -1
  53. data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +1 -1
  54. data/lib/pdf_generator_api_client/models/copy_template_request.rb +1 -1
  55. data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +1 -1
  56. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +1 -1
  57. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +1 -1
  58. data/lib/pdf_generator_api_client/models/create_workspace_request.rb +1 -1
  59. data/lib/pdf_generator_api_client/models/data_batch_inner.rb +1 -1
  60. data/lib/pdf_generator_api_client/models/document.rb +1 -1
  61. data/lib/pdf_generator_api_client/models/document_action.rb +274 -0
  62. data/lib/pdf_generator_api_client/models/document_user.rb +261 -0
  63. data/lib/pdf_generator_api_client/models/document_version.rb +250 -0
  64. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +1 -1
  65. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +1 -1
  66. data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +1 -1
  67. data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +1 -1
  68. data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +1 -1
  69. data/lib/pdf_generator_api_client/models/form_action_download.rb +1 -1
  70. data/lib/pdf_generator_api_client/models/form_action_send.rb +1 -1
  71. data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +1 -1
  72. data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +1 -1
  73. data/lib/pdf_generator_api_client/models/form_action_store.rb +1 -1
  74. data/lib/pdf_generator_api_client/models/form_configuration.rb +1 -1
  75. data/lib/pdf_generator_api_client/models/form_configuration_new.rb +1 -1
  76. data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +1 -1
  77. data/lib/pdf_generator_api_client/models/form_fields_base64.rb +1 -1
  78. data/lib/pdf_generator_api_client/models/form_fields_inner.rb +1 -1
  79. data/lib/pdf_generator_api_client/models/form_fields_url.rb +1 -1
  80. data/lib/pdf_generator_api_client/models/form_fill_base64.rb +1 -1
  81. data/lib/pdf_generator_api_client/models/form_fill_url.rb +1 -1
  82. data/lib/pdf_generator_api_client/models/format_param.rb +1 -1
  83. data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +1 -1
  84. data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +1 -1
  85. data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +1 -1
  86. data/lib/pdf_generator_api_client/models/generate_document_request.rb +1 -1
  87. data/lib/pdf_generator_api_client/models/generate_qr_code201_response.rb +1 -1
  88. data/lib/pdf_generator_api_client/models/generate_qr_code201_response_meta.rb +1 -1
  89. data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +1 -1
  90. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response.rb +230 -0
  91. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response_meta.rb +238 -0
  92. data/lib/pdf_generator_api_client/models/generate_viewer_url_request.rb +266 -0
  93. data/lib/pdf_generator_api_client/models/get_status200_response.rb +1 -1
  94. data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +1 -1
  95. data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +1 -1
  96. data/lib/pdf_generator_api_client/models/import_form_base64.rb +1 -1
  97. data/lib/pdf_generator_api_client/models/import_form_request.rb +1 -1
  98. data/lib/pdf_generator_api_client/models/import_form_url.rb +1 -1
  99. data/lib/pdf_generator_api_client/models/import_template_base64.rb +1 -1
  100. data/lib/pdf_generator_api_client/models/import_template_request.rb +1 -1
  101. data/lib/pdf_generator_api_client/models/import_template_url.rb +1 -1
  102. data/lib/pdf_generator_api_client/models/import_template_url_template.rb +1 -1
  103. data/lib/pdf_generator_api_client/models/inline_object.rb +1 -1
  104. data/lib/pdf_generator_api_client/models/inline_object1.rb +1 -1
  105. data/lib/pdf_generator_api_client/models/inline_object10.rb +1 -1
  106. data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +1 -1
  107. data/lib/pdf_generator_api_client/models/inline_object11.rb +1 -1
  108. data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +1 -1
  109. data/lib/pdf_generator_api_client/models/inline_object12.rb +1 -1
  110. data/lib/pdf_generator_api_client/models/inline_object12_meta.rb +1 -1
  111. data/lib/pdf_generator_api_client/models/inline_object12_meta_stats.rb +1 -1
  112. data/lib/pdf_generator_api_client/models/inline_object13.rb +1 -1
  113. data/lib/pdf_generator_api_client/models/inline_object14.rb +1 -1
  114. data/lib/pdf_generator_api_client/models/inline_object14_response_value.rb +1 -1
  115. data/lib/pdf_generator_api_client/models/inline_object14_response_value_default.rb +1 -1
  116. data/lib/pdf_generator_api_client/models/inline_object14_response_value_value.rb +1 -1
  117. data/lib/pdf_generator_api_client/models/inline_object15.rb +1 -1
  118. data/lib/pdf_generator_api_client/models/inline_object16.rb +8 -15
  119. data/lib/pdf_generator_api_client/models/inline_object17.rb +5 -3
  120. data/lib/pdf_generator_api_client/models/inline_object18.rb +3 -4
  121. data/lib/pdf_generator_api_client/models/inline_object19.rb +2 -3
  122. data/lib/pdf_generator_api_client/models/inline_object1_response.rb +1 -1
  123. data/lib/pdf_generator_api_client/models/inline_object2.rb +1 -1
  124. data/lib/pdf_generator_api_client/models/inline_object20.rb +15 -5
  125. data/lib/pdf_generator_api_client/models/{inline_object18_meta.rb → inline_object20_meta.rb} +4 -4
  126. data/lib/pdf_generator_api_client/models/inline_object21.rb +9 -43
  127. data/lib/pdf_generator_api_client/models/inline_object22.rb +8 -43
  128. data/lib/pdf_generator_api_client/models/{inline_object20_response.rb → inline_object22_response.rb} +4 -4
  129. data/lib/pdf_generator_api_client/models/inline_object23.rb +3 -3
  130. data/lib/pdf_generator_api_client/models/inline_object24.rb +3 -3
  131. data/lib/pdf_generator_api_client/models/inline_object25.rb +38 -14
  132. data/lib/pdf_generator_api_client/models/inline_object26.rb +35 -1
  133. data/lib/pdf_generator_api_client/models/inline_object27.rb +15 -5
  134. data/lib/pdf_generator_api_client/models/inline_object28.rb +221 -0
  135. data/lib/pdf_generator_api_client/models/inline_object29.rb +221 -0
  136. data/lib/pdf_generator_api_client/models/inline_object3.rb +1 -1
  137. data/lib/pdf_generator_api_client/models/inline_object4.rb +1 -1
  138. data/lib/pdf_generator_api_client/models/inline_object5.rb +1 -1
  139. data/lib/pdf_generator_api_client/models/inline_object6.rb +1 -1
  140. data/lib/pdf_generator_api_client/models/inline_object7.rb +1 -1
  141. data/lib/pdf_generator_api_client/models/inline_object7_response.rb +1 -1
  142. data/lib/pdf_generator_api_client/models/inline_object8.rb +1 -1
  143. data/lib/pdf_generator_api_client/models/inline_object9.rb +1 -1
  144. data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +1 -1
  145. data/lib/pdf_generator_api_client/models/inline_object_meta.rb +1 -1
  146. data/lib/pdf_generator_api_client/models/key_field_param.rb +1 -1
  147. data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +1 -1
  148. data/lib/pdf_generator_api_client/models/make_accessible_request.rb +1 -1
  149. data/lib/pdf_generator_api_client/models/make_accessible_url.rb +1 -1
  150. data/lib/pdf_generator_api_client/models/metadata_param.rb +1 -1
  151. data/lib/pdf_generator_api_client/models/open_editor_request.rb +1 -1
  152. data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +1 -1
  153. data/lib/pdf_generator_api_client/models/optimize_base64.rb +1 -1
  154. data/lib/pdf_generator_api_client/models/optimize_document_request.rb +1 -1
  155. data/lib/pdf_generator_api_client/models/optimize_url.rb +1 -1
  156. data/lib/pdf_generator_api_client/models/output_param.rb +1 -1
  157. data/lib/pdf_generator_api_client/models/pagination_meta.rb +1 -1
  158. data/lib/pdf_generator_api_client/models/prefill_param.rb +335 -0
  159. data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +1 -1
  160. data/lib/pdf_generator_api_client/models/public_template_library_item.rb +1 -1
  161. data/lib/pdf_generator_api_client/models/status_param.rb +1 -1
  162. data/lib/pdf_generator_api_client/models/store_document_request.rb +11 -2
  163. data/lib/pdf_generator_api_client/models/template.rb +1 -1
  164. data/lib/pdf_generator_api_client/models/template_definition.rb +1 -1
  165. data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +1 -1
  166. data/lib/pdf_generator_api_client/models/template_definition_editor.rb +1 -1
  167. data/lib/pdf_generator_api_client/models/template_definition_new.rb +1 -1
  168. data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +1 -1
  169. data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +1 -1
  170. data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +1 -1
  171. data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +1 -1
  172. data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +1 -1
  173. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +1 -1
  174. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +1 -1
  175. data/lib/pdf_generator_api_client/models/template_definition_pages_inner.rb +1 -1
  176. data/lib/pdf_generator_api_client/models/template_param.rb +1 -1
  177. data/lib/pdf_generator_api_client/models/template_param_data.rb +1 -1
  178. data/lib/pdf_generator_api_client/models/template_param_id.rb +1 -1
  179. data/lib/pdf_generator_api_client/models/template_version.rb +1 -1
  180. data/lib/pdf_generator_api_client/models/template_version_collection.rb +1 -1
  181. data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +1 -1
  182. data/lib/pdf_generator_api_client/models/watermark_base64.rb +1 -1
  183. data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +1 -1
  184. data/lib/pdf_generator_api_client/models/watermark_image.rb +1 -1
  185. data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +1 -1
  186. data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +1 -1
  187. data/lib/pdf_generator_api_client/models/watermark_position.rb +1 -1
  188. data/lib/pdf_generator_api_client/models/watermark_text.rb +1 -1
  189. data/lib/pdf_generator_api_client/models/workspace.rb +1 -1
  190. data/lib/pdf_generator_api_client/version.rb +2 -2
  191. data/lib/pdf_generator_api_client.rb +12 -3
  192. data/pdf_generator_api_client.gemspec +1 -1
  193. data/spec/api/assets_api_spec.rb +1 -1
  194. data/spec/api/conversion_api_spec.rb +1 -1
  195. data/spec/api/documents_api_spec.rb +40 -3
  196. data/spec/api/e_invoices_api_spec.rb +1 -1
  197. data/spec/api/forms_api_spec.rb +8 -8
  198. data/spec/api/misc_api_spec.rb +1 -1
  199. data/spec/api/services_api_spec.rb +1 -1
  200. data/spec/api/template_library_api_spec.rb +2 -2
  201. data/spec/api/template_versions_api_spec.rb +2 -2
  202. data/spec/api/templates_api_spec.rb +6 -6
  203. data/spec/api/workspaces_api_spec.rb +1 -1
  204. data/spec/models/accessibility_option_spec.rb +1 -1
  205. data/spec/models/add_watermark_request_spec.rb +1 -1
  206. data/spec/models/async_output_param_spec.rb +1 -1
  207. data/spec/models/callback_param_spec.rb +1 -1
  208. data/spec/models/component_spec.rb +1 -1
  209. data/spec/models/convert_html2_pdf_request_spec.rb +1 -1
  210. data/spec/models/convert_pdf2_image_request_spec.rb +1 -1
  211. data/spec/models/convert_url2_pdf_request_spec.rb +1 -1
  212. data/spec/models/copy_template_request_spec.rb +1 -1
  213. data/spec/models/create_e_invoice_request_spec.rb +1 -1
  214. data/spec/models/create_factur_xe_invoice_request_spec.rb +1 -1
  215. data/spec/models/create_factur_xe_invoice_request_template_spec.rb +1 -1
  216. data/spec/models/create_workspace_request_spec.rb +1 -1
  217. data/spec/models/data_batch_inner_spec.rb +1 -1
  218. data/spec/models/document_action_spec.rb +52 -0
  219. data/spec/models/document_spec.rb +1 -1
  220. data/spec/models/document_user_spec.rb +60 -0
  221. data/spec/models/document_version_spec.rb +54 -0
  222. data/spec/models/encrypt_and_decrypt_base64_spec.rb +1 -1
  223. data/spec/models/encrypt_and_decrypt_url_spec.rb +1 -1
  224. data/spec/models/encrypt_document_request_spec.rb +1 -1
  225. data/spec/models/extract_form_fields_request_spec.rb +1 -1
  226. data/spec/models/fill_form_fields_request_spec.rb +1 -1
  227. data/spec/models/form_action_download_spec.rb +1 -1
  228. data/spec/models/form_action_send_send_document_headers_inner_spec.rb +1 -1
  229. data/spec/models/form_action_send_send_document_spec.rb +1 -1
  230. data/spec/models/form_action_send_spec.rb +1 -1
  231. data/spec/models/form_action_store_spec.rb +1 -1
  232. data/spec/models/form_configuration_new_actions_inner_spec.rb +1 -1
  233. data/spec/models/form_configuration_new_spec.rb +1 -1
  234. data/spec/models/form_configuration_spec.rb +1 -1
  235. data/spec/models/form_fields_base64_spec.rb +1 -1
  236. data/spec/models/form_fields_inner_spec.rb +1 -1
  237. data/spec/models/form_fields_url_spec.rb +1 -1
  238. data/spec/models/form_fill_base64_spec.rb +1 -1
  239. data/spec/models/form_fill_url_spec.rb +1 -1
  240. data/spec/models/format_param_spec.rb +1 -1
  241. data/spec/models/generate_document_asynchronous_request_spec.rb +1 -1
  242. data/spec/models/generate_document_batch_asynchronous_request_spec.rb +1 -1
  243. data/spec/models/generate_document_batch_request_spec.rb +1 -1
  244. data/spec/models/generate_document_request_spec.rb +1 -1
  245. data/spec/models/generate_qr_code201_response_meta_spec.rb +1 -1
  246. data/spec/models/generate_qr_code201_response_spec.rb +1 -1
  247. data/spec/models/generate_qr_code_request_spec.rb +1 -1
  248. data/spec/models/generate_viewer_url200_response_meta_spec.rb +48 -0
  249. data/spec/models/generate_viewer_url200_response_spec.rb +42 -0
  250. data/spec/models/generate_viewer_url_request_spec.rb +46 -0
  251. data/spec/models/get_status200_response_spec.rb +1 -1
  252. data/spec/models/get_template_library200_response_spec.rb +1 -1
  253. data/spec/models/get_template_version422_response_spec.rb +1 -1
  254. data/spec/models/import_form_base64_spec.rb +1 -1
  255. data/spec/models/import_form_request_spec.rb +1 -1
  256. data/spec/models/import_form_url_spec.rb +1 -1
  257. data/spec/models/import_template_base64_spec.rb +1 -1
  258. data/spec/models/import_template_request_spec.rb +1 -1
  259. data/spec/models/import_template_url_spec.rb +1 -1
  260. data/spec/models/import_template_url_template_spec.rb +1 -1
  261. data/spec/models/inline_object10_meta_spec.rb +1 -1
  262. data/spec/models/inline_object10_spec.rb +1 -1
  263. data/spec/models/inline_object11_meta_spec.rb +1 -1
  264. data/spec/models/inline_object11_spec.rb +1 -1
  265. data/spec/models/inline_object12_meta_spec.rb +1 -1
  266. data/spec/models/inline_object12_meta_stats_spec.rb +1 -1
  267. data/spec/models/inline_object12_spec.rb +1 -1
  268. data/spec/models/inline_object13_spec.rb +1 -1
  269. data/spec/models/inline_object14_response_value_default_spec.rb +1 -1
  270. data/spec/models/inline_object14_response_value_spec.rb +1 -1
  271. data/spec/models/inline_object14_response_value_value_spec.rb +1 -1
  272. data/spec/models/inline_object14_spec.rb +1 -1
  273. data/spec/models/inline_object15_spec.rb +1 -1
  274. data/spec/models/inline_object16_spec.rb +1 -7
  275. data/spec/models/inline_object17_spec.rb +1 -1
  276. data/spec/models/inline_object18_spec.rb +1 -1
  277. data/spec/models/inline_object19_spec.rb +1 -1
  278. data/spec/models/inline_object1_response_spec.rb +1 -1
  279. data/spec/models/inline_object1_spec.rb +1 -1
  280. data/spec/models/{inline_object18_meta_spec.rb → inline_object20_meta_spec.rb} +7 -7
  281. data/spec/models/inline_object20_spec.rb +7 -1
  282. data/spec/models/inline_object21_spec.rb +2 -6
  283. data/spec/models/{inline_object20_response_spec.rb → inline_object22_response_spec.rb} +7 -7
  284. data/spec/models/inline_object22_spec.rb +2 -6
  285. data/spec/models/inline_object23_spec.rb +2 -2
  286. data/spec/models/inline_object24_spec.rb +2 -2
  287. data/spec/models/inline_object25_spec.rb +5 -7
  288. data/spec/models/inline_object26_spec.rb +5 -1
  289. data/spec/models/inline_object27_spec.rb +7 -1
  290. data/spec/models/inline_object28_spec.rb +36 -0
  291. data/spec/models/inline_object29_spec.rb +36 -0
  292. data/spec/models/inline_object2_spec.rb +1 -1
  293. data/spec/models/inline_object3_spec.rb +1 -1
  294. data/spec/models/inline_object4_spec.rb +1 -1
  295. data/spec/models/inline_object5_spec.rb +1 -1
  296. data/spec/models/inline_object6_spec.rb +1 -1
  297. data/spec/models/inline_object7_response_spec.rb +1 -1
  298. data/spec/models/inline_object7_spec.rb +1 -1
  299. data/spec/models/inline_object8_spec.rb +1 -1
  300. data/spec/models/inline_object9_meta_spec.rb +1 -1
  301. data/spec/models/inline_object9_spec.rb +1 -1
  302. data/spec/models/inline_object_meta_spec.rb +1 -1
  303. data/spec/models/inline_object_spec.rb +1 -1
  304. data/spec/models/key_field_param_spec.rb +1 -1
  305. data/spec/models/make_accessible_base64_spec.rb +1 -1
  306. data/spec/models/make_accessible_request_spec.rb +1 -1
  307. data/spec/models/make_accessible_url_spec.rb +1 -1
  308. data/spec/models/metadata_param_spec.rb +1 -1
  309. data/spec/models/open_editor_request_data_spec.rb +1 -1
  310. data/spec/models/open_editor_request_spec.rb +1 -1
  311. data/spec/models/optimize_base64_spec.rb +1 -1
  312. data/spec/models/optimize_document_request_spec.rb +1 -1
  313. data/spec/models/optimize_url_spec.rb +1 -1
  314. data/spec/models/output_param_spec.rb +1 -1
  315. data/spec/models/pagination_meta_spec.rb +1 -1
  316. data/spec/models/prefill_param_spec.rb +60 -0
  317. data/spec/models/promote_template_version200_response_spec.rb +1 -1
  318. data/spec/models/public_template_library_item_spec.rb +1 -1
  319. data/spec/models/status_param_spec.rb +1 -1
  320. data/spec/models/store_document_request_spec.rb +7 -1
  321. data/spec/models/template_definition_data_settings_spec.rb +1 -1
  322. data/spec/models/template_definition_editor_spec.rb +1 -1
  323. data/spec/models/template_definition_new_data_settings_spec.rb +1 -1
  324. data/spec/models/template_definition_new_editor_spec.rb +1 -1
  325. data/spec/models/template_definition_new_layout_margins_spec.rb +1 -1
  326. data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +1 -1
  327. data/spec/models/template_definition_new_layout_spec.rb +1 -1
  328. data/spec/models/template_definition_new_pages_inner_margins_spec.rb +1 -1
  329. data/spec/models/template_definition_new_pages_inner_spec.rb +1 -1
  330. data/spec/models/template_definition_new_spec.rb +1 -1
  331. data/spec/models/template_definition_pages_inner_spec.rb +1 -1
  332. data/spec/models/template_definition_spec.rb +1 -1
  333. data/spec/models/template_param_data_spec.rb +1 -1
  334. data/spec/models/template_param_id_spec.rb +1 -1
  335. data/spec/models/template_param_spec.rb +1 -1
  336. data/spec/models/template_spec.rb +1 -1
  337. data/spec/models/template_version_collection_meta_spec.rb +1 -1
  338. data/spec/models/template_version_collection_spec.rb +1 -1
  339. data/spec/models/template_version_spec.rb +1 -1
  340. data/spec/models/watermark_base64_spec.rb +1 -1
  341. data/spec/models/watermark_file_url_watermark_spec.rb +1 -1
  342. data/spec/models/watermark_image_content_base64_spec.rb +1 -1
  343. data/spec/models/watermark_image_content_url_spec.rb +1 -1
  344. data/spec/models/watermark_image_spec.rb +1 -1
  345. data/spec/models/watermark_position_spec.rb +1 -1
  346. data/spec/models/watermark_text_spec.rb +1 -1
  347. data/spec/models/workspace_spec.rb +1 -1
  348. data/spec/spec_helper.rb +1 -1
  349. metadata +46 -10
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #PDF Generator API
3
+
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
+
6
+ The version of the OpenAPI document: 4.0.27
7
+ Contact: support@pdfgeneratorapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PDFGeneratorAPI
17
+ class GenerateViewerUrl200ResponseMeta
18
+ attr_accessor :name
19
+
20
+ attr_accessor :display_name
21
+
22
+ attr_accessor :public_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'display_name' => :'display_name',
29
+ :'public_id' => :'public_id'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'name' => :'String',
47
+ :'display_name' => :'String',
48
+ :'public_id' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::GenerateViewerUrl200ResponseMeta` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::GenerateViewerUrl200ResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'display_name')
79
+ self.display_name = attributes[:'display_name']
80
+ end
81
+
82
+ if attributes.key?(:'public_id')
83
+ self.public_id = attributes[:'public_id']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ name == o.name &&
108
+ display_name == o.display_name &&
109
+ public_id == o.public_id
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [name, display_name, public_id].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def self._deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = PDFGeneratorAPI.const_get(type)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,266 @@
1
+ =begin
2
+ #PDF Generator API
3
+
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
+
6
+ The version of the OpenAPI document: 4.0.27
7
+ Contact: support@pdfgeneratorapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PDFGeneratorAPI
17
+ class GenerateViewerUrlRequest
18
+ # Response format. `url` returns a public URL to the stored document; `viewer` returns a public URL to the PDF viewer (with encrypted prefill when provided).
19
+ attr_accessor :output
20
+
21
+ attr_accessor :prefill
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'output' => :'output',
49
+ :'prefill' => :'prefill'
50
+ }
51
+ end
52
+
53
+ # Returns attribute mapping this model knows about
54
+ def self.acceptable_attribute_map
55
+ attribute_map
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ acceptable_attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'output' => :'String',
67
+ :'prefill' => :'PrefillParam'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::GenerateViewerUrlRequest` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::GenerateViewerUrlRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'output')
94
+ self.output = attributes[:'output']
95
+ else
96
+ self.output = 'url'
97
+ end
98
+
99
+ if attributes.key?(:'prefill')
100
+ self.prefill = attributes[:'prefill']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
+ invalid_properties = Array.new
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ output_validator = EnumAttributeValidator.new('String', ["url", "viewer"])
117
+ return false unless output_validator.valid?(@output)
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method checking allowed values (enum).
122
+ # @param [Object] output Object to be assigned
123
+ def output=(output)
124
+ validator = EnumAttributeValidator.new('String', ["url", "viewer"])
125
+ unless validator.valid?(output)
126
+ fail ArgumentError, "invalid value for \"output\", must be one of #{validator.allowable_values}."
127
+ end
128
+ @output = output
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ output == o.output &&
137
+ prefill == o.prefill
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [output, prefill].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def self._deserialize(type, value)
180
+ case type.to_sym
181
+ when :Time
182
+ Time.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ # models (e.g. Pet) or oneOf
213
+ klass = PDFGeneratorAPI.const_get(type)
214
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
+ end
216
+ end
217
+
218
+ # Returns the string representation of the object
219
+ # @return [String] String presentation of the object
220
+ def to_s
221
+ to_hash.to_s
222
+ end
223
+
224
+ # to_body is an alias to to_hash (backward compatibility)
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_body
227
+ to_hash
228
+ end
229
+
230
+ # Returns the object in the form of hash
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_hash
233
+ hash = {}
234
+ self.class.attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -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.25
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.25
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.25
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