pdf_generator_api_client 8.0.25 → 8.0.26
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.
- checksums.yaml +4 -4
- data/README.md +15 -8
- data/docs/DocumentAction.md +22 -0
- data/docs/DocumentUser.md +26 -0
- data/docs/DocumentVersion.md +24 -0
- data/docs/DocumentsApi.md +149 -9
- data/docs/FormsApi.md +28 -28
- data/docs/InlineObject16.md +2 -4
- data/docs/InlineObject17.md +1 -1
- data/docs/InlineObject18.md +3 -3
- data/docs/InlineObject19.md +2 -2
- data/docs/InlineObject20.md +4 -2
- data/docs/{InlineObject18Meta.md → InlineObject20Meta.md} +2 -2
- data/docs/InlineObject21.md +2 -2
- data/docs/InlineObject22.md +2 -2
- data/docs/{InlineObject20Response.md → InlineObject22Response.md} +2 -2
- data/docs/InlineObject23.md +1 -1
- data/docs/InlineObject24.md +1 -1
- data/docs/InlineObject25.md +1 -3
- data/docs/InlineObject26.md +1 -1
- data/docs/InlineObject27.md +3 -1
- data/docs/InlineObject28.md +18 -0
- data/docs/InlineObject29.md +18 -0
- data/docs/TemplateLibraryApi.md +4 -4
- data/docs/TemplateVersionsApi.md +4 -4
- data/docs/TemplatesApi.md +20 -20
- data/lib/pdf_generator_api_client/api/assets_api.rb +1 -1
- data/lib/pdf_generator_api_client/api/conversion_api.rb +1 -1
- data/lib/pdf_generator_api_client/api/documents_api.rb +134 -8
- data/lib/pdf_generator_api_client/api/e_invoices_api.rb +1 -1
- data/lib/pdf_generator_api_client/api/forms_api.rb +22 -22
- data/lib/pdf_generator_api_client/api/misc_api.rb +1 -1
- data/lib/pdf_generator_api_client/api/services_api.rb +1 -1
- data/lib/pdf_generator_api_client/api/template_library_api.rb +4 -4
- data/lib/pdf_generator_api_client/api/template_versions_api.rb +4 -4
- data/lib/pdf_generator_api_client/api/templates_api.rb +16 -16
- data/lib/pdf_generator_api_client/api/workspaces_api.rb +1 -1
- data/lib/pdf_generator_api_client/api_client.rb +1 -1
- data/lib/pdf_generator_api_client/api_error.rb +1 -1
- data/lib/pdf_generator_api_client/configuration.rb +1 -1
- data/lib/pdf_generator_api_client/models/accessibility_option.rb +1 -1
- data/lib/pdf_generator_api_client/models/add_watermark_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/async_output_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/callback_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/component.rb +1 -1
- data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/copy_template_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +1 -1
- data/lib/pdf_generator_api_client/models/create_workspace_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/data_batch_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/document.rb +1 -1
- data/lib/pdf_generator_api_client/models/document_action.rb +274 -0
- data/lib/pdf_generator_api_client/models/document_user.rb +261 -0
- data/lib/pdf_generator_api_client/models/document_version.rb +250 -0
- data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_action_download.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_action_send.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_action_store.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_configuration.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_configuration_new.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_fields_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_fields_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_fields_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_fill_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/form_fill_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/format_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_document_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_qr_code201_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_qr_code201_response_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/get_status200_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_form_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_form_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_form_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_template_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_template_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_template_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/import_template_url_template.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object1.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object10.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object11.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object12.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object12_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object12_meta_stats.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object13.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object14.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object14_response_value.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object14_response_value_default.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object14_response_value_value.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object15.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object16.rb +8 -15
- data/lib/pdf_generator_api_client/models/inline_object17.rb +5 -3
- data/lib/pdf_generator_api_client/models/inline_object18.rb +3 -4
- data/lib/pdf_generator_api_client/models/inline_object19.rb +2 -3
- data/lib/pdf_generator_api_client/models/inline_object1_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object2.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object20.rb +15 -5
- data/lib/pdf_generator_api_client/models/{inline_object18_meta.rb → inline_object20_meta.rb} +4 -4
- data/lib/pdf_generator_api_client/models/inline_object21.rb +9 -43
- data/lib/pdf_generator_api_client/models/inline_object22.rb +8 -43
- data/lib/pdf_generator_api_client/models/{inline_object20_response.rb → inline_object22_response.rb} +4 -4
- data/lib/pdf_generator_api_client/models/inline_object23.rb +3 -3
- data/lib/pdf_generator_api_client/models/inline_object24.rb +3 -3
- data/lib/pdf_generator_api_client/models/inline_object25.rb +38 -14
- data/lib/pdf_generator_api_client/models/inline_object26.rb +35 -1
- data/lib/pdf_generator_api_client/models/inline_object27.rb +15 -5
- data/lib/pdf_generator_api_client/models/inline_object28.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object29.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object3.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object4.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object5.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object6.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object7.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object7_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object8.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object9.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/inline_object_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/key_field_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/make_accessible_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/make_accessible_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/metadata_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/open_editor_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +1 -1
- data/lib/pdf_generator_api_client/models/optimize_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/optimize_document_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/optimize_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/output_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/pagination_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +1 -1
- data/lib/pdf_generator_api_client/models/public_template_library_item.rb +1 -1
- data/lib/pdf_generator_api_client/models/status_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/store_document_request.rb +1 -1
- data/lib/pdf_generator_api_client/models/template.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_editor.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_definition_pages_inner.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_param.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_param_data.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_param_id.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_version.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_version_collection.rb +1 -1
- data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_image.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_position.rb +1 -1
- data/lib/pdf_generator_api_client/models/watermark_text.rb +1 -1
- data/lib/pdf_generator_api_client/models/workspace.rb +1 -1
- data/lib/pdf_generator_api_client/version.rb +2 -2
- data/lib/pdf_generator_api_client.rb +8 -3
- data/pdf_generator_api_client.gemspec +1 -1
- data/spec/api/assets_api_spec.rb +1 -1
- data/spec/api/conversion_api_spec.rb +1 -1
- data/spec/api/documents_api_spec.rb +27 -3
- data/spec/api/e_invoices_api_spec.rb +1 -1
- data/spec/api/forms_api_spec.rb +8 -8
- data/spec/api/misc_api_spec.rb +1 -1
- data/spec/api/services_api_spec.rb +1 -1
- data/spec/api/template_library_api_spec.rb +2 -2
- data/spec/api/template_versions_api_spec.rb +2 -2
- data/spec/api/templates_api_spec.rb +6 -6
- data/spec/api/workspaces_api_spec.rb +1 -1
- data/spec/models/accessibility_option_spec.rb +1 -1
- data/spec/models/add_watermark_request_spec.rb +1 -1
- data/spec/models/async_output_param_spec.rb +1 -1
- data/spec/models/callback_param_spec.rb +1 -1
- data/spec/models/component_spec.rb +1 -1
- data/spec/models/convert_html2_pdf_request_spec.rb +1 -1
- data/spec/models/convert_pdf2_image_request_spec.rb +1 -1
- data/spec/models/convert_url2_pdf_request_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_e_invoice_request_spec.rb +1 -1
- data/spec/models/create_factur_xe_invoice_request_spec.rb +1 -1
- data/spec/models/create_factur_xe_invoice_request_template_spec.rb +1 -1
- data/spec/models/create_workspace_request_spec.rb +1 -1
- data/spec/models/data_batch_inner_spec.rb +1 -1
- data/spec/models/document_action_spec.rb +52 -0
- data/spec/models/document_spec.rb +1 -1
- data/spec/models/document_user_spec.rb +60 -0
- data/spec/models/document_version_spec.rb +54 -0
- data/spec/models/encrypt_and_decrypt_base64_spec.rb +1 -1
- data/spec/models/encrypt_and_decrypt_url_spec.rb +1 -1
- data/spec/models/encrypt_document_request_spec.rb +1 -1
- data/spec/models/extract_form_fields_request_spec.rb +1 -1
- data/spec/models/fill_form_fields_request_spec.rb +1 -1
- data/spec/models/form_action_download_spec.rb +1 -1
- data/spec/models/form_action_send_send_document_headers_inner_spec.rb +1 -1
- data/spec/models/form_action_send_send_document_spec.rb +1 -1
- data/spec/models/form_action_send_spec.rb +1 -1
- data/spec/models/form_action_store_spec.rb +1 -1
- data/spec/models/form_configuration_new_actions_inner_spec.rb +1 -1
- data/spec/models/form_configuration_new_spec.rb +1 -1
- data/spec/models/form_configuration_spec.rb +1 -1
- data/spec/models/form_fields_base64_spec.rb +1 -1
- data/spec/models/form_fields_inner_spec.rb +1 -1
- data/spec/models/form_fields_url_spec.rb +1 -1
- data/spec/models/form_fill_base64_spec.rb +1 -1
- data/spec/models/form_fill_url_spec.rb +1 -1
- data/spec/models/format_param_spec.rb +1 -1
- data/spec/models/generate_document_asynchronous_request_spec.rb +1 -1
- data/spec/models/generate_document_batch_asynchronous_request_spec.rb +1 -1
- data/spec/models/generate_document_batch_request_spec.rb +1 -1
- data/spec/models/generate_document_request_spec.rb +1 -1
- data/spec/models/generate_qr_code201_response_meta_spec.rb +1 -1
- data/spec/models/generate_qr_code201_response_spec.rb +1 -1
- data/spec/models/generate_qr_code_request_spec.rb +1 -1
- data/spec/models/get_status200_response_spec.rb +1 -1
- data/spec/models/get_template_library200_response_spec.rb +1 -1
- data/spec/models/get_template_version422_response_spec.rb +1 -1
- data/spec/models/import_form_base64_spec.rb +1 -1
- data/spec/models/import_form_request_spec.rb +1 -1
- data/spec/models/import_form_url_spec.rb +1 -1
- data/spec/models/import_template_base64_spec.rb +1 -1
- data/spec/models/import_template_request_spec.rb +1 -1
- data/spec/models/import_template_url_spec.rb +1 -1
- data/spec/models/import_template_url_template_spec.rb +1 -1
- data/spec/models/inline_object10_meta_spec.rb +1 -1
- data/spec/models/inline_object10_spec.rb +1 -1
- data/spec/models/inline_object11_meta_spec.rb +1 -1
- data/spec/models/inline_object11_spec.rb +1 -1
- data/spec/models/inline_object12_meta_spec.rb +1 -1
- data/spec/models/inline_object12_meta_stats_spec.rb +1 -1
- data/spec/models/inline_object12_spec.rb +1 -1
- data/spec/models/inline_object13_spec.rb +1 -1
- data/spec/models/inline_object14_response_value_default_spec.rb +1 -1
- data/spec/models/inline_object14_response_value_spec.rb +1 -1
- data/spec/models/inline_object14_response_value_value_spec.rb +1 -1
- data/spec/models/inline_object14_spec.rb +1 -1
- data/spec/models/inline_object15_spec.rb +1 -1
- data/spec/models/inline_object16_spec.rb +1 -7
- data/spec/models/inline_object17_spec.rb +1 -1
- data/spec/models/inline_object18_spec.rb +1 -1
- data/spec/models/inline_object19_spec.rb +1 -1
- data/spec/models/inline_object1_response_spec.rb +1 -1
- data/spec/models/inline_object1_spec.rb +1 -1
- data/spec/models/{inline_object18_meta_spec.rb → inline_object20_meta_spec.rb} +7 -7
- data/spec/models/inline_object20_spec.rb +7 -1
- data/spec/models/inline_object21_spec.rb +2 -6
- data/spec/models/{inline_object20_response_spec.rb → inline_object22_response_spec.rb} +7 -7
- data/spec/models/inline_object22_spec.rb +2 -6
- data/spec/models/inline_object23_spec.rb +2 -2
- data/spec/models/inline_object24_spec.rb +2 -2
- data/spec/models/inline_object25_spec.rb +5 -7
- data/spec/models/inline_object26_spec.rb +5 -1
- data/spec/models/inline_object27_spec.rb +7 -1
- data/spec/models/inline_object28_spec.rb +36 -0
- data/spec/models/inline_object29_spec.rb +36 -0
- data/spec/models/inline_object2_spec.rb +1 -1
- data/spec/models/inline_object3_spec.rb +1 -1
- data/spec/models/inline_object4_spec.rb +1 -1
- data/spec/models/inline_object5_spec.rb +1 -1
- data/spec/models/inline_object6_spec.rb +1 -1
- data/spec/models/inline_object7_response_spec.rb +1 -1
- data/spec/models/inline_object7_spec.rb +1 -1
- data/spec/models/inline_object8_spec.rb +1 -1
- data/spec/models/inline_object9_meta_spec.rb +1 -1
- data/spec/models/inline_object9_spec.rb +1 -1
- data/spec/models/inline_object_meta_spec.rb +1 -1
- data/spec/models/inline_object_spec.rb +1 -1
- data/spec/models/key_field_param_spec.rb +1 -1
- data/spec/models/make_accessible_base64_spec.rb +1 -1
- data/spec/models/make_accessible_request_spec.rb +1 -1
- data/spec/models/make_accessible_url_spec.rb +1 -1
- data/spec/models/metadata_param_spec.rb +1 -1
- data/spec/models/open_editor_request_data_spec.rb +1 -1
- data/spec/models/open_editor_request_spec.rb +1 -1
- data/spec/models/optimize_base64_spec.rb +1 -1
- data/spec/models/optimize_document_request_spec.rb +1 -1
- data/spec/models/optimize_url_spec.rb +1 -1
- data/spec/models/output_param_spec.rb +1 -1
- data/spec/models/pagination_meta_spec.rb +1 -1
- data/spec/models/promote_template_version200_response_spec.rb +1 -1
- data/spec/models/public_template_library_item_spec.rb +1 -1
- data/spec/models/status_param_spec.rb +1 -1
- data/spec/models/store_document_request_spec.rb +1 -1
- data/spec/models/template_definition_data_settings_spec.rb +1 -1
- data/spec/models/template_definition_editor_spec.rb +1 -1
- data/spec/models/template_definition_new_data_settings_spec.rb +1 -1
- data/spec/models/template_definition_new_editor_spec.rb +1 -1
- data/spec/models/template_definition_new_layout_margins_spec.rb +1 -1
- data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +1 -1
- data/spec/models/template_definition_new_layout_spec.rb +1 -1
- data/spec/models/template_definition_new_pages_inner_margins_spec.rb +1 -1
- data/spec/models/template_definition_new_pages_inner_spec.rb +1 -1
- data/spec/models/template_definition_new_spec.rb +1 -1
- data/spec/models/template_definition_pages_inner_spec.rb +1 -1
- data/spec/models/template_definition_spec.rb +1 -1
- data/spec/models/template_param_data_spec.rb +1 -1
- data/spec/models/template_param_id_spec.rb +1 -1
- data/spec/models/template_param_spec.rb +1 -1
- data/spec/models/template_spec.rb +1 -1
- data/spec/models/template_version_collection_meta_spec.rb +1 -1
- data/spec/models/template_version_collection_spec.rb +1 -1
- data/spec/models/template_version_spec.rb +1 -1
- data/spec/models/watermark_base64_spec.rb +1 -1
- data/spec/models/watermark_file_url_watermark_spec.rb +1 -1
- data/spec/models/watermark_image_content_base64_spec.rb +1 -1
- data/spec/models/watermark_image_content_url_spec.rb +1 -1
- data/spec/models/watermark_image_spec.rb +1 -1
- data/spec/models/watermark_position_spec.rb +1 -1
- data/spec/models/watermark_text_spec.rb +1 -1
- data/spec/models/workspace_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +30 -10
|
@@ -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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
7
7
|
Contact: support@pdfgeneratorapi.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -43,7 +43,7 @@ module PDFGeneratorAPI
|
|
|
43
43
|
fail ArgumentError, "Missing the required parameter 'public_id' when calling DocumentsApi.delete_document"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
|
-
local_var_path = '/documents/{publicId}'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
|
|
46
|
+
local_var_path = '/documents/{publicId}/actions'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
|
|
47
47
|
|
|
48
48
|
# query parameters
|
|
49
49
|
query_params = opts[:query_params] || {}
|
|
@@ -154,7 +154,7 @@ module PDFGeneratorAPI
|
|
|
154
154
|
# Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request uses the same format as response of synchronous generation endpoint. The job id is also added to the callback request as header PDF-API-Job-Id *Example response from callback URL:* ``` { \"response\": \"https://us1.pdfgeneratorapi.com/share/12821/VBERi0xLjcKJeLjz9MKNyAwIG9i\", \"meta\": { \"name\": \"a2bd25b8921f3dc7a440fd7f427f90a4.pdf\", \"display_name\": \"a2bd25b8921f3dc7a440fd7f427f90a4\", \"encoding\": \"binary\", \"content-type\": \"application/pdf\" } } ```
|
|
155
155
|
# @param generate_document_asynchronous_request [GenerateDocumentAsynchronousRequest] Request parameters, including template id, data and formats.
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
|
-
# @return [
|
|
157
|
+
# @return [InlineObject22]
|
|
158
158
|
def generate_document_asynchronous(generate_document_asynchronous_request, opts = {})
|
|
159
159
|
data, _status_code, _headers = generate_document_asynchronous_with_http_info(generate_document_asynchronous_request, opts)
|
|
160
160
|
data
|
|
@@ -164,7 +164,7 @@ module PDFGeneratorAPI
|
|
|
164
164
|
# Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request uses the same format as response of synchronous generation endpoint. The job id is also added to the callback request as header PDF-API-Job-Id *Example response from callback URL:* ``` { \"response\": \"https://us1.pdfgeneratorapi.com/share/12821/VBERi0xLjcKJeLjz9MKNyAwIG9i\", \"meta\": { \"name\": \"a2bd25b8921f3dc7a440fd7f427f90a4.pdf\", \"display_name\": \"a2bd25b8921f3dc7a440fd7f427f90a4\", \"encoding\": \"binary\", \"content-type\": \"application/pdf\" } } ```
|
|
165
165
|
# @param generate_document_asynchronous_request [GenerateDocumentAsynchronousRequest] Request parameters, including template id, data and formats.
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
|
-
# @return [Array<(
|
|
167
|
+
# @return [Array<(InlineObject22, Integer, Hash)>] InlineObject22 data, response status code and response headers
|
|
168
168
|
def generate_document_asynchronous_with_http_info(generate_document_asynchronous_request, opts = {})
|
|
169
169
|
if @api_client.config.debugging
|
|
170
170
|
@api_client.config.logger.debug 'Calling API: DocumentsApi.generate_document_asynchronous ...'
|
|
@@ -196,7 +196,7 @@ module PDFGeneratorAPI
|
|
|
196
196
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_document_asynchronous_request)
|
|
197
197
|
|
|
198
198
|
# return_type
|
|
199
|
-
return_type = opts[:debug_return_type] || '
|
|
199
|
+
return_type = opts[:debug_return_type] || 'InlineObject22'
|
|
200
200
|
|
|
201
201
|
# auth_names
|
|
202
202
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -290,7 +290,7 @@ module PDFGeneratorAPI
|
|
|
290
290
|
# Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request uses the same format as response of synchronous generation endpoint. The job id is also added to the callback request as header PDF-API-Job-Id *Example response from callback URL:* ``` { \"response\": \"https://us1.pdfgeneratorapi.com/share/12821/VBERi0xLjcKJeLjz9MKNyAwIG9i\", \"meta\": { \"name\": \"a2bd25b8921f3dc7a440fd7f427f90a4.pdf\", \"display_name\": \"a2bd25b8921f3dc7a440fd7f427f90a4\", \"encoding\": \"binary\", \"content-type\": \"application/pdf\" } } ```
|
|
291
291
|
# @param generate_document_batch_asynchronous_request [GenerateDocumentBatchAsynchronousRequest] Request parameters, including template id, data and formats.
|
|
292
292
|
# @param [Hash] opts the optional parameters
|
|
293
|
-
# @return [
|
|
293
|
+
# @return [InlineObject22]
|
|
294
294
|
def generate_document_batch_asynchronous(generate_document_batch_asynchronous_request, opts = {})
|
|
295
295
|
data, _status_code, _headers = generate_document_batch_asynchronous_with_http_info(generate_document_batch_asynchronous_request, opts)
|
|
296
296
|
data
|
|
@@ -300,7 +300,7 @@ module PDFGeneratorAPI
|
|
|
300
300
|
# Merges template with data as asynchronous job and makes POST request to callback URL defined in the request. Request uses the same format as response of synchronous generation endpoint. The job id is also added to the callback request as header PDF-API-Job-Id *Example response from callback URL:* ``` { \"response\": \"https://us1.pdfgeneratorapi.com/share/12821/VBERi0xLjcKJeLjz9MKNyAwIG9i\", \"meta\": { \"name\": \"a2bd25b8921f3dc7a440fd7f427f90a4.pdf\", \"display_name\": \"a2bd25b8921f3dc7a440fd7f427f90a4\", \"encoding\": \"binary\", \"content-type\": \"application/pdf\" } } ```
|
|
301
301
|
# @param generate_document_batch_asynchronous_request [GenerateDocumentBatchAsynchronousRequest] Request parameters, including template id, data and formats.
|
|
302
302
|
# @param [Hash] opts the optional parameters
|
|
303
|
-
# @return [Array<(
|
|
303
|
+
# @return [Array<(InlineObject22, Integer, Hash)>] InlineObject22 data, response status code and response headers
|
|
304
304
|
def generate_document_batch_asynchronous_with_http_info(generate_document_batch_asynchronous_request, opts = {})
|
|
305
305
|
if @api_client.config.debugging
|
|
306
306
|
@api_client.config.logger.debug 'Calling API: DocumentsApi.generate_document_batch_asynchronous ...'
|
|
@@ -332,7 +332,7 @@ module PDFGeneratorAPI
|
|
|
332
332
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_document_batch_asynchronous_request)
|
|
333
333
|
|
|
334
334
|
# return_type
|
|
335
|
-
return_type = opts[:debug_return_type] || '
|
|
335
|
+
return_type = opts[:debug_return_type] || 'InlineObject22'
|
|
336
336
|
|
|
337
337
|
# auth_names
|
|
338
338
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -480,6 +480,132 @@ module PDFGeneratorAPI
|
|
|
480
480
|
return data, status_code, headers
|
|
481
481
|
end
|
|
482
482
|
|
|
483
|
+
# Get document actions
|
|
484
|
+
# Returns a list of actions performed on a stored document
|
|
485
|
+
# @param public_id [String] Resource public id
|
|
486
|
+
# @param [Hash] opts the optional parameters
|
|
487
|
+
# @return [InlineObject17]
|
|
488
|
+
def get_document_actions(public_id, opts = {})
|
|
489
|
+
data, _status_code, _headers = get_document_actions_with_http_info(public_id, opts)
|
|
490
|
+
data
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Get document actions
|
|
494
|
+
# Returns a list of actions performed on a stored document
|
|
495
|
+
# @param public_id [String] Resource public id
|
|
496
|
+
# @param [Hash] opts the optional parameters
|
|
497
|
+
# @return [Array<(InlineObject17, Integer, Hash)>] InlineObject17 data, response status code and response headers
|
|
498
|
+
def get_document_actions_with_http_info(public_id, opts = {})
|
|
499
|
+
if @api_client.config.debugging
|
|
500
|
+
@api_client.config.logger.debug 'Calling API: DocumentsApi.get_document_actions ...'
|
|
501
|
+
end
|
|
502
|
+
# verify the required parameter 'public_id' is set
|
|
503
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
504
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DocumentsApi.get_document_actions"
|
|
505
|
+
end
|
|
506
|
+
# resource path
|
|
507
|
+
local_var_path = '/documents/{publicId}/actions'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
|
|
508
|
+
|
|
509
|
+
# query parameters
|
|
510
|
+
query_params = opts[:query_params] || {}
|
|
511
|
+
|
|
512
|
+
# header parameters
|
|
513
|
+
header_params = opts[:header_params] || {}
|
|
514
|
+
# HTTP header 'Accept' (if needed)
|
|
515
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
516
|
+
|
|
517
|
+
# form parameters
|
|
518
|
+
form_params = opts[:form_params] || {}
|
|
519
|
+
|
|
520
|
+
# http body (model)
|
|
521
|
+
post_body = opts[:debug_body]
|
|
522
|
+
|
|
523
|
+
# return_type
|
|
524
|
+
return_type = opts[:debug_return_type] || 'InlineObject17'
|
|
525
|
+
|
|
526
|
+
# auth_names
|
|
527
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
528
|
+
|
|
529
|
+
new_options = opts.merge(
|
|
530
|
+
:operation => :"DocumentsApi.get_document_actions",
|
|
531
|
+
:header_params => header_params,
|
|
532
|
+
:query_params => query_params,
|
|
533
|
+
:form_params => form_params,
|
|
534
|
+
:body => post_body,
|
|
535
|
+
:auth_names => auth_names,
|
|
536
|
+
:return_type => return_type
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
540
|
+
if @api_client.config.debugging
|
|
541
|
+
@api_client.config.logger.debug "API called: DocumentsApi#get_document_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
542
|
+
end
|
|
543
|
+
return data, status_code, headers
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Get document versions
|
|
547
|
+
# Returns a list of versions for a stored document
|
|
548
|
+
# @param public_id [String] Resource public id
|
|
549
|
+
# @param [Hash] opts the optional parameters
|
|
550
|
+
# @return [InlineObject16]
|
|
551
|
+
def get_document_versions(public_id, opts = {})
|
|
552
|
+
data, _status_code, _headers = get_document_versions_with_http_info(public_id, opts)
|
|
553
|
+
data
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
# Get document versions
|
|
557
|
+
# Returns a list of versions for a stored document
|
|
558
|
+
# @param public_id [String] Resource public id
|
|
559
|
+
# @param [Hash] opts the optional parameters
|
|
560
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
561
|
+
def get_document_versions_with_http_info(public_id, opts = {})
|
|
562
|
+
if @api_client.config.debugging
|
|
563
|
+
@api_client.config.logger.debug 'Calling API: DocumentsApi.get_document_versions ...'
|
|
564
|
+
end
|
|
565
|
+
# verify the required parameter 'public_id' is set
|
|
566
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
567
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DocumentsApi.get_document_versions"
|
|
568
|
+
end
|
|
569
|
+
# resource path
|
|
570
|
+
local_var_path = '/documents/{publicId}/versions'.sub('{' + 'publicId' + '}', CGI.escape(public_id.to_s))
|
|
571
|
+
|
|
572
|
+
# query parameters
|
|
573
|
+
query_params = opts[:query_params] || {}
|
|
574
|
+
|
|
575
|
+
# header parameters
|
|
576
|
+
header_params = opts[:header_params] || {}
|
|
577
|
+
# HTTP header 'Accept' (if needed)
|
|
578
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
579
|
+
|
|
580
|
+
# form parameters
|
|
581
|
+
form_params = opts[:form_params] || {}
|
|
582
|
+
|
|
583
|
+
# http body (model)
|
|
584
|
+
post_body = opts[:debug_body]
|
|
585
|
+
|
|
586
|
+
# return_type
|
|
587
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
588
|
+
|
|
589
|
+
# auth_names
|
|
590
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
591
|
+
|
|
592
|
+
new_options = opts.merge(
|
|
593
|
+
:operation => :"DocumentsApi.get_document_versions",
|
|
594
|
+
:header_params => header_params,
|
|
595
|
+
:query_params => query_params,
|
|
596
|
+
:form_params => form_params,
|
|
597
|
+
:body => post_body,
|
|
598
|
+
:auth_names => auth_names,
|
|
599
|
+
:return_type => return_type
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
603
|
+
if @api_client.config.debugging
|
|
604
|
+
@api_client.config.logger.debug "API called: DocumentsApi#get_document_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
605
|
+
end
|
|
606
|
+
return data, status_code, headers
|
|
607
|
+
end
|
|
608
|
+
|
|
483
609
|
# Get documents
|
|
484
610
|
# Returns a list of generated documents created by authorized workspace and stored in PDF Generator API. If master user is specified as workspace in JWT then all documents created in the organization are returned. NB! This endpoint returns only documents generated using the output=url option.
|
|
485
611
|
# @param [Hash] opts the optional parameters
|
|
@@ -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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
7
7
|
Contact: support@pdfgeneratorapi.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -23,7 +23,7 @@ module PDFGeneratorAPI
|
|
|
23
23
|
# Creates a new form based on the configuration sent in the request body.
|
|
24
24
|
# @param form_configuration_new [FormConfigurationNew] Form configuration
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [
|
|
26
|
+
# @return [InlineObject19]
|
|
27
27
|
def create_form(form_configuration_new, opts = {})
|
|
28
28
|
data, _status_code, _headers = create_form_with_http_info(form_configuration_new, opts)
|
|
29
29
|
data
|
|
@@ -33,7 +33,7 @@ module PDFGeneratorAPI
|
|
|
33
33
|
# Creates a new form based on the configuration sent in the request body.
|
|
34
34
|
# @param form_configuration_new [FormConfigurationNew] Form configuration
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(
|
|
36
|
+
# @return [Array<(InlineObject19, Integer, Hash)>] InlineObject19 data, response status code and response headers
|
|
37
37
|
def create_form_with_http_info(form_configuration_new, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: FormsApi.create_form ...'
|
|
@@ -65,7 +65,7 @@ module PDFGeneratorAPI
|
|
|
65
65
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(form_configuration_new)
|
|
66
66
|
|
|
67
67
|
# return_type
|
|
68
|
-
return_type = opts[:debug_return_type] || '
|
|
68
|
+
return_type = opts[:debug_return_type] || 'InlineObject19'
|
|
69
69
|
|
|
70
70
|
# auth_names
|
|
71
71
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -154,7 +154,7 @@ module PDFGeneratorAPI
|
|
|
154
154
|
# Returns form configuration
|
|
155
155
|
# @param form_id [Integer] Form unique identifier
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
|
-
# @return [
|
|
157
|
+
# @return [InlineObject19]
|
|
158
158
|
def get_form(form_id, opts = {})
|
|
159
159
|
data, _status_code, _headers = get_form_with_http_info(form_id, opts)
|
|
160
160
|
data
|
|
@@ -164,7 +164,7 @@ module PDFGeneratorAPI
|
|
|
164
164
|
# Returns form configuration
|
|
165
165
|
# @param form_id [Integer] Form unique identifier
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
|
-
# @return [Array<(
|
|
167
|
+
# @return [Array<(InlineObject19, Integer, Hash)>] InlineObject19 data, response status code and response headers
|
|
168
168
|
def get_form_with_http_info(form_id, opts = {})
|
|
169
169
|
if @api_client.config.debugging
|
|
170
170
|
@api_client.config.logger.debug 'Calling API: FormsApi.get_form ...'
|
|
@@ -191,7 +191,7 @@ module PDFGeneratorAPI
|
|
|
191
191
|
post_body = opts[:debug_body]
|
|
192
192
|
|
|
193
193
|
# return_type
|
|
194
|
-
return_type = opts[:debug_return_type] || '
|
|
194
|
+
return_type = opts[:debug_return_type] || 'InlineObject19'
|
|
195
195
|
|
|
196
196
|
# auth_names
|
|
197
197
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -280,7 +280,7 @@ module PDFGeneratorAPI
|
|
|
280
280
|
# Creates a new form based on editable PDF
|
|
281
281
|
# @param import_form_request [ImportFormRequest] Import editable PDF via URL or base64 string as form
|
|
282
282
|
# @param [Hash] opts the optional parameters
|
|
283
|
-
# @return [
|
|
283
|
+
# @return [InlineObject19]
|
|
284
284
|
def import_form(import_form_request, opts = {})
|
|
285
285
|
data, _status_code, _headers = import_form_with_http_info(import_form_request, opts)
|
|
286
286
|
data
|
|
@@ -290,7 +290,7 @@ module PDFGeneratorAPI
|
|
|
290
290
|
# Creates a new form based on editable PDF
|
|
291
291
|
# @param import_form_request [ImportFormRequest] Import editable PDF via URL or base64 string as form
|
|
292
292
|
# @param [Hash] opts the optional parameters
|
|
293
|
-
# @return [Array<(
|
|
293
|
+
# @return [Array<(InlineObject19, Integer, Hash)>] InlineObject19 data, response status code and response headers
|
|
294
294
|
def import_form_with_http_info(import_form_request, opts = {})
|
|
295
295
|
if @api_client.config.debugging
|
|
296
296
|
@api_client.config.logger.debug 'Calling API: FormsApi.import_form ...'
|
|
@@ -322,7 +322,7 @@ module PDFGeneratorAPI
|
|
|
322
322
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(import_form_request)
|
|
323
323
|
|
|
324
324
|
# return_type
|
|
325
|
-
return_type = opts[:debug_return_type] || '
|
|
325
|
+
return_type = opts[:debug_return_type] || 'InlineObject19'
|
|
326
326
|
|
|
327
327
|
# auth_names
|
|
328
328
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -347,7 +347,7 @@ module PDFGeneratorAPI
|
|
|
347
347
|
# Open new form builder
|
|
348
348
|
# Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
|
|
349
349
|
# @param [Hash] opts the optional parameters
|
|
350
|
-
# @return [
|
|
350
|
+
# @return [InlineObject21]
|
|
351
351
|
def open_form_builder(opts = {})
|
|
352
352
|
data, _status_code, _headers = open_form_builder_with_http_info(opts)
|
|
353
353
|
data
|
|
@@ -356,7 +356,7 @@ module PDFGeneratorAPI
|
|
|
356
356
|
# Open new form builder
|
|
357
357
|
# Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
|
|
358
358
|
# @param [Hash] opts the optional parameters
|
|
359
|
-
# @return [Array<(
|
|
359
|
+
# @return [Array<(InlineObject21, Integer, Hash)>] InlineObject21 data, response status code and response headers
|
|
360
360
|
def open_form_builder_with_http_info(opts = {})
|
|
361
361
|
if @api_client.config.debugging
|
|
362
362
|
@api_client.config.logger.debug 'Calling API: FormsApi.open_form_builder ...'
|
|
@@ -379,7 +379,7 @@ module PDFGeneratorAPI
|
|
|
379
379
|
post_body = opts[:debug_body]
|
|
380
380
|
|
|
381
381
|
# return_type
|
|
382
|
-
return_type = opts[:debug_return_type] || '
|
|
382
|
+
return_type = opts[:debug_return_type] || 'InlineObject21'
|
|
383
383
|
|
|
384
384
|
# auth_names
|
|
385
385
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -405,7 +405,7 @@ module PDFGeneratorAPI
|
|
|
405
405
|
# Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
|
|
406
406
|
# @param form_id [Integer] Form unique identifier
|
|
407
407
|
# @param [Hash] opts the optional parameters
|
|
408
|
-
# @return [
|
|
408
|
+
# @return [InlineObject21]
|
|
409
409
|
def open_form_builder_for_existing_form(form_id, opts = {})
|
|
410
410
|
data, _status_code, _headers = open_form_builder_for_existing_form_with_http_info(form_id, opts)
|
|
411
411
|
data
|
|
@@ -415,7 +415,7 @@ module PDFGeneratorAPI
|
|
|
415
415
|
# Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
|
|
416
416
|
# @param form_id [Integer] Form unique identifier
|
|
417
417
|
# @param [Hash] opts the optional parameters
|
|
418
|
-
# @return [Array<(
|
|
418
|
+
# @return [Array<(InlineObject21, Integer, Hash)>] InlineObject21 data, response status code and response headers
|
|
419
419
|
def open_form_builder_for_existing_form_with_http_info(form_id, opts = {})
|
|
420
420
|
if @api_client.config.debugging
|
|
421
421
|
@api_client.config.logger.debug 'Calling API: FormsApi.open_form_builder_for_existing_form ...'
|
|
@@ -442,7 +442,7 @@ module PDFGeneratorAPI
|
|
|
442
442
|
post_body = opts[:debug_body]
|
|
443
443
|
|
|
444
444
|
# return_type
|
|
445
|
-
return_type = opts[:debug_return_type] || '
|
|
445
|
+
return_type = opts[:debug_return_type] || 'InlineObject21'
|
|
446
446
|
|
|
447
447
|
# auth_names
|
|
448
448
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -468,7 +468,7 @@ module PDFGeneratorAPI
|
|
|
468
468
|
# Creates an unique sharing URL to collect form data
|
|
469
469
|
# @param form_id [Integer] Form unique identifier
|
|
470
470
|
# @param [Hash] opts the optional parameters
|
|
471
|
-
# @return [
|
|
471
|
+
# @return [InlineObject20]
|
|
472
472
|
def share_form(form_id, opts = {})
|
|
473
473
|
data, _status_code, _headers = share_form_with_http_info(form_id, opts)
|
|
474
474
|
data
|
|
@@ -478,7 +478,7 @@ module PDFGeneratorAPI
|
|
|
478
478
|
# Creates an unique sharing URL to collect form data
|
|
479
479
|
# @param form_id [Integer] Form unique identifier
|
|
480
480
|
# @param [Hash] opts the optional parameters
|
|
481
|
-
# @return [Array<(
|
|
481
|
+
# @return [Array<(InlineObject20, Integer, Hash)>] InlineObject20 data, response status code and response headers
|
|
482
482
|
def share_form_with_http_info(form_id, opts = {})
|
|
483
483
|
if @api_client.config.debugging
|
|
484
484
|
@api_client.config.logger.debug 'Calling API: FormsApi.share_form ...'
|
|
@@ -505,7 +505,7 @@ module PDFGeneratorAPI
|
|
|
505
505
|
post_body = opts[:debug_body]
|
|
506
506
|
|
|
507
507
|
# return_type
|
|
508
|
-
return_type = opts[:debug_return_type] || '
|
|
508
|
+
return_type = opts[:debug_return_type] || 'InlineObject20'
|
|
509
509
|
|
|
510
510
|
# auth_names
|
|
511
511
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -532,7 +532,7 @@ module PDFGeneratorAPI
|
|
|
532
532
|
# @param form_id [Integer] Form unique identifier
|
|
533
533
|
# @param form_configuration_new [FormConfigurationNew] Form configuration
|
|
534
534
|
# @param [Hash] opts the optional parameters
|
|
535
|
-
# @return [
|
|
535
|
+
# @return [InlineObject19]
|
|
536
536
|
def update_form(form_id, form_configuration_new, opts = {})
|
|
537
537
|
data, _status_code, _headers = update_form_with_http_info(form_id, form_configuration_new, opts)
|
|
538
538
|
data
|
|
@@ -543,7 +543,7 @@ module PDFGeneratorAPI
|
|
|
543
543
|
# @param form_id [Integer] Form unique identifier
|
|
544
544
|
# @param form_configuration_new [FormConfigurationNew] Form configuration
|
|
545
545
|
# @param [Hash] opts the optional parameters
|
|
546
|
-
# @return [Array<(
|
|
546
|
+
# @return [Array<(InlineObject19, Integer, Hash)>] InlineObject19 data, response status code and response headers
|
|
547
547
|
def update_form_with_http_info(form_id, form_configuration_new, opts = {})
|
|
548
548
|
if @api_client.config.debugging
|
|
549
549
|
@api_client.config.logger.debug 'Calling API: FormsApi.update_form ...'
|
|
@@ -579,7 +579,7 @@ module PDFGeneratorAPI
|
|
|
579
579
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(form_configuration_new)
|
|
580
580
|
|
|
581
581
|
# return_type
|
|
582
|
-
return_type = opts[:debug_return_type] || '
|
|
582
|
+
return_type = opts[:debug_return_type] || 'InlineObject19'
|
|
583
583
|
|
|
584
584
|
# auth_names
|
|
585
585
|
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
@@ -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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 4.0.26
|
|
7
7
|
Contact: support@pdfgeneratorapi.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -83,7 +83,7 @@ module PDFGeneratorAPI
|
|
|
83
83
|
# Returns the template definition for a public template identified by its `public_id`.
|
|
84
84
|
# @param public_id [String] Resource public id
|
|
85
85
|
# @param [Hash] opts the optional parameters
|
|
86
|
-
# @return [
|
|
86
|
+
# @return [InlineObject18]
|
|
87
87
|
def get_template_library_item(public_id, opts = {})
|
|
88
88
|
data, _status_code, _headers = get_template_library_item_with_http_info(public_id, opts)
|
|
89
89
|
data
|
|
@@ -93,7 +93,7 @@ module PDFGeneratorAPI
|
|
|
93
93
|
# Returns the template definition for a public template identified by its `public_id`.
|
|
94
94
|
# @param public_id [String] Resource public id
|
|
95
95
|
# @param [Hash] opts the optional parameters
|
|
96
|
-
# @return [Array<(
|
|
96
|
+
# @return [Array<(InlineObject18, Integer, Hash)>] InlineObject18 data, response status code and response headers
|
|
97
97
|
def get_template_library_item_with_http_info(public_id, opts = {})
|
|
98
98
|
if @api_client.config.debugging
|
|
99
99
|
@api_client.config.logger.debug 'Calling API: TemplateLibraryApi.get_template_library_item ...'
|
|
@@ -120,7 +120,7 @@ module PDFGeneratorAPI
|
|
|
120
120
|
post_body = opts[:debug_body]
|
|
121
121
|
|
|
122
122
|
# return_type
|
|
123
|
-
return_type = opts[:debug_return_type] || '
|
|
123
|
+
return_type = opts[:debug_return_type] || 'InlineObject18'
|
|
124
124
|
|
|
125
125
|
# auth_names
|
|
126
126
|
auth_names = opts[:debug_auth_names] || []
|