docspring 3.5.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (588) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +445 -150
  3. data/.openapi-generator/VERSION +1 -1
  4. data/.rubocop.yml +1 -1
  5. data/.travis.yml +1 -1
  6. data/AGENTS.md +79 -19
  7. data/CHANGELOG.md +147 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +69 -53
  10. data/docs/AddTemplateFieldsRequest.md +18 -0
  11. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  12. data/docs/AuthenticationCheck.md +18 -0
  13. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  14. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  15. data/docs/Client.md +1570 -786
  16. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  17. data/docs/CombinedPdf.md +44 -0
  18. data/docs/CombinedPdfFiles.md +18 -0
  19. data/docs/CombinedPdfList.md +20 -0
  20. data/docs/CombinedPdfSource.md +26 -0
  21. data/docs/CombinedPdfSourceInput.md +88 -0
  22. data/docs/CombinedPdfSourcePdf.md +20 -0
  23. data/docs/CombinedPdfSourceType.md +15 -0
  24. data/docs/CombinedPdfState.md +15 -0
  25. data/docs/CopyTemplateRequest.md +22 -0
  26. data/docs/CreateCombinedPdfRequest.md +26 -0
  27. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  28. data/docs/CreateFolderRequest.md +20 -0
  29. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  30. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  31. data/docs/CreateSubmissionBatchRequest.md +28 -0
  32. data/docs/CreateSubmissionRequest.md +38 -0
  33. data/docs/CreateTemplateRequest.md +102 -0
  34. data/docs/CreateWebhookRequest.md +38 -0
  35. data/docs/CustomFile.md +11 -3
  36. data/docs/CustomFileList.md +20 -0
  37. data/docs/CustomFileSourcePdf.md +20 -0
  38. data/docs/ErrorCode.md +15 -0
  39. data/docs/ErrorDetail.md +26 -0
  40. data/docs/ErrorInfo.md +32 -0
  41. data/docs/ErrorResponse.md +1 -3
  42. data/docs/ExpirationInterval.md +15 -0
  43. data/docs/Field.md +198 -0
  44. data/docs/FieldComparisonCondition.md +22 -0
  45. data/docs/FieldComparisonOperator.md +15 -0
  46. data/docs/FieldDependency.md +22 -0
  47. data/docs/FieldDependencyInput.md +22 -0
  48. data/docs/FieldDisplayType.md +15 -0
  49. data/docs/FieldEqualsCondition.md +22 -0
  50. data/docs/FieldEqualsOperator.md +15 -0
  51. data/docs/FieldGroup.md +32 -0
  52. data/docs/FieldGroupInput.md +30 -0
  53. data/docs/FieldGroupType.md +15 -0
  54. data/docs/FieldInCondition.md +22 -0
  55. data/docs/FieldInput.md +196 -0
  56. data/docs/FieldOverride.md +142 -0
  57. data/docs/FieldPresenceCondition.md +20 -0
  58. data/docs/FieldPresenceOperator.md +15 -0
  59. data/docs/FieldRangeCondition.md +24 -0
  60. data/docs/FieldReimportState.md +15 -0
  61. data/docs/FieldSetupLogic.md +15 -0
  62. data/docs/FieldSetupNaming.md +15 -0
  63. data/docs/FieldSetupSource.md +15 -0
  64. data/docs/FieldType.md +15 -0
  65. data/docs/Folder.md +9 -5
  66. data/docs/FolderList.md +20 -0
  67. data/docs/GenerateFilesFormat.md +15 -0
  68. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  69. data/docs/GeneratedFile.md +32 -0
  70. data/docs/GeneratedFileState.md +15 -0
  71. data/docs/HtmlEngineOptions.md +36 -0
  72. data/docs/HtmlEngineOptionsInput.md +36 -0
  73. data/docs/ImageGravity.md +15 -0
  74. data/docs/ImageScaleType.md +15 -0
  75. data/docs/ModelCodeLanguage.md +15 -0
  76. data/docs/MoveFolderRequest.md +18 -0
  77. data/docs/MoveTemplateRequest.md +18 -0
  78. data/docs/NumberConditionType.md +15 -0
  79. data/docs/OutputFormat.md +15 -0
  80. data/docs/PageFormat.md +15 -0
  81. data/docs/PageImage.md +34 -0
  82. data/docs/PageImages.md +24 -0
  83. data/docs/PredefinedField.md +30 -0
  84. data/docs/PredefinedFieldInput.md +30 -0
  85. data/docs/PublishTemplateVersionRequest.md +20 -0
  86. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  87. data/docs/RenameFolderRequest.md +18 -0
  88. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  89. data/docs/RestoreTemplateVersionRequest.md +18 -0
  90. data/docs/ShapeType.md +15 -0
  91. data/docs/SignatureRequest.md +66 -0
  92. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  93. data/docs/SignatureRequestAuthType.md +15 -0
  94. data/docs/SignatureRequestEvent.md +32 -0
  95. data/docs/SignatureRequestEventType.md +15 -0
  96. data/docs/SignatureRequestInput.md +46 -0
  97. data/docs/SignatureRequestMessageType.md +15 -0
  98. data/docs/SignatureRequestState.md +15 -0
  99. data/docs/SignatureRequestToken.md +30 -0
  100. data/docs/SignatureRequestTokenType.md +15 -0
  101. data/docs/StringConditionType.md +15 -0
  102. data/docs/Submission.md +43 -47
  103. data/docs/SubmissionAction.md +6 -8
  104. data/docs/SubmissionActionState.md +15 -0
  105. data/docs/SubmissionActionType.md +15 -0
  106. data/docs/SubmissionBatch.md +16 -10
  107. data/docs/SubmissionBatchState.md +15 -0
  108. data/docs/SubmissionFiles.md +24 -0
  109. data/docs/SubmissionInput.md +40 -0
  110. data/docs/SubmissionList.md +20 -0
  111. data/docs/SubmissionSource.md +15 -0
  112. data/docs/SubmissionSourcePdf.md +20 -0
  113. data/docs/SubmissionState.md +15 -0
  114. data/docs/SubmissionValidation.md +24 -0
  115. data/docs/Template.md +79 -107
  116. data/docs/TemplateActor.md +26 -0
  117. data/docs/TemplateActorType.md +15 -0
  118. data/docs/TemplateDefaults.md +56 -0
  119. data/docs/TemplateDefaultsInput.md +56 -0
  120. data/docs/TemplateDiff.md +30 -0
  121. data/docs/TemplateDiffSummary.md +28 -0
  122. data/docs/TemplateDocument.md +40 -0
  123. data/docs/TemplateDocumentState.md +15 -0
  124. data/docs/TemplateFieldChange.md +24 -0
  125. data/docs/TemplateFieldChanges.md +24 -0
  126. data/docs/TemplateFieldDependency.md +26 -0
  127. data/docs/TemplateFieldDependencyAction.md +15 -0
  128. data/docs/TemplateFieldDependencyCondition.md +24 -0
  129. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  130. data/docs/TemplateFieldDependencyInput.md +26 -0
  131. data/docs/TemplateFieldDependencyMatch.md +15 -0
  132. data/docs/TemplateFieldDependencyOperator.md +15 -0
  133. data/docs/TemplateFieldLogicStatus.md +15 -0
  134. data/docs/TemplateFieldMove.md +22 -0
  135. data/docs/TemplateFields.md +22 -0
  136. data/docs/TemplateFormMode.md +15 -0
  137. data/docs/TemplateModelCode.md +22 -0
  138. data/docs/TemplatePageAiError.md +15 -0
  139. data/docs/TemplatePageAiNamingStatus.md +15 -0
  140. data/docs/TemplatePageFieldsStatus.md +15 -0
  141. data/docs/TemplatePageImageStatus.md +15 -0
  142. data/docs/TemplatePageImages.md +24 -0
  143. data/docs/TemplatePageProcessingStatus.md +26 -0
  144. data/docs/TemplateSourcePdf.md +24 -0
  145. data/docs/TemplateSummary.md +90 -0
  146. data/docs/TemplateSummaryList.md +20 -0
  147. data/docs/TemplateType.md +15 -0
  148. data/docs/TemplateVersion.md +24 -0
  149. data/docs/TemplateVersionType.md +15 -0
  150. data/docs/TextAlignment.md +15 -0
  151. data/docs/TextOverflow.md +15 -0
  152. data/docs/TextVerticalAlignment.md +15 -0
  153. data/docs/Typeface.md +15 -0
  154. data/docs/UpdateSignatureRequestRequest.md +34 -0
  155. data/docs/UpdateTemplateDocumentRequest.md +26 -0
  156. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  157. data/docs/UpdateTemplateRequest.md +86 -0
  158. data/docs/UpdateWebhookRequest.md +38 -0
  159. data/docs/UploadMethod.md +15 -0
  160. data/docs/UploadPresign.md +24 -0
  161. data/docs/UrlSourcePdf.md +20 -0
  162. data/docs/ValidateSubmissionRequest.md +38 -0
  163. data/docs/Webhook.md +20 -20
  164. data/docs/WebhookEventType.md +15 -0
  165. data/docs/WebhookList.md +20 -0
  166. data/docs/WebhookMode.md +15 -0
  167. data/docspring.gemspec +3 -3
  168. data/lib/docspring/api/client.rb +1606 -905
  169. data/lib/docspring/api_client.rb +14 -6
  170. data/lib/docspring/api_error.rb +3 -3
  171. data/lib/docspring/api_model_base.rb +88 -0
  172. data/lib/docspring/configuration.rb +12 -7
  173. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  174. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  175. data/lib/docspring/models/authentication_check.rb +185 -0
  176. data/lib/docspring/models/barcode_symbology.rb +47 -0
  177. data/lib/docspring/models/check_character.rb +44 -0
  178. data/lib/docspring/models/combined_field_type.rb +41 -0
  179. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  180. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  181. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  182. data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
  183. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  184. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  185. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  186. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  187. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  188. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  189. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  190. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  191. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  192. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  193. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
  194. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
  195. data/lib/docspring/models/create_template_request.rb +646 -0
  196. data/lib/docspring/models/create_webhook_request.rb +368 -0
  197. data/lib/docspring/models/custom_file.rb +132 -95
  198. data/lib/docspring/models/custom_file_list.rb +200 -0
  199. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  200. data/lib/docspring/models/error_code.rb +60 -0
  201. data/lib/docspring/models/error_detail.rb +242 -0
  202. data/lib/docspring/models/error_info.rb +316 -0
  203. data/lib/docspring/models/error_response.rb +28 -138
  204. data/lib/docspring/models/expiration_interval.rb +42 -0
  205. data/lib/docspring/models/field.rb +2217 -0
  206. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  207. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  208. data/lib/docspring/models/field_dependency.rb +246 -0
  209. data/lib/docspring/models/field_dependency_input.rb +246 -0
  210. data/lib/docspring/models/field_display_type.rb +45 -0
  211. data/lib/docspring/models/field_equals_condition.rb +247 -0
  212. data/lib/docspring/models/field_equals_operator.rb +41 -0
  213. data/lib/docspring/models/field_group.rb +368 -0
  214. data/lib/docspring/models/field_group_input.rb +247 -0
  215. data/lib/docspring/models/field_group_type.rb +41 -0
  216. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  217. data/lib/docspring/models/field_input.rb +1109 -0
  218. data/lib/docspring/models/field_override.rb +829 -0
  219. data/lib/docspring/models/field_presence_condition.rb +234 -0
  220. data/lib/docspring/models/field_presence_operator.rb +41 -0
  221. data/lib/docspring/models/field_range_condition.rb +234 -0
  222. data/lib/docspring/models/field_reimport_state.rb +43 -0
  223. data/lib/docspring/models/field_setup_logic.rb +41 -0
  224. data/lib/docspring/models/field_setup_naming.rb +41 -0
  225. data/lib/docspring/models/field_setup_source.rb +42 -0
  226. data/lib/docspring/models/field_type.rb +54 -0
  227. data/lib/docspring/models/folder.rb +134 -93
  228. data/lib/docspring/models/folder_list.rb +200 -0
  229. data/lib/docspring/models/generate_files_format.rb +40 -0
  230. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  231. data/lib/docspring/models/generated_file.rb +326 -0
  232. data/lib/docspring/models/generated_file_state.rb +42 -0
  233. data/lib/docspring/models/html_engine_options.rb +416 -0
  234. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  235. data/lib/docspring/models/image_gravity.rb +48 -0
  236. data/lib/docspring/models/image_scale_type.rb +42 -0
  237. data/lib/docspring/models/model_code_language.rb +48 -0
  238. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  239. data/lib/docspring/models/move_template_request.rb +171 -0
  240. data/lib/docspring/models/number_condition_type.rb +45 -0
  241. data/lib/docspring/models/output_format.rb +41 -0
  242. data/lib/docspring/models/page_format.rb +52 -0
  243. data/lib/docspring/models/page_image.rb +359 -0
  244. data/lib/docspring/models/page_images.rb +248 -0
  245. data/lib/docspring/models/predefined_field.rb +287 -0
  246. data/lib/docspring/models/predefined_field_input.rb +287 -0
  247. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  248. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  249. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  250. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  251. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  252. data/lib/docspring/models/shape_type.rb +45 -0
  253. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  254. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  255. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  256. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  257. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  258. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  259. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  260. data/lib/docspring/models/signature_request_state.rb +42 -0
  261. data/lib/docspring/models/signature_request_token.rb +369 -0
  262. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  263. data/lib/docspring/models/string_condition_type.rb +44 -0
  264. data/lib/docspring/models/submission.rb +399 -335
  265. data/lib/docspring/models/submission_action.rb +64 -136
  266. data/lib/docspring/models/submission_action_state.rb +43 -0
  267. data/lib/docspring/models/submission_action_type.rb +46 -0
  268. data/lib/docspring/models/submission_batch.rb +157 -112
  269. data/lib/docspring/models/submission_batch_state.rb +42 -0
  270. data/lib/docspring/models/submission_files.rb +197 -0
  271. data/lib/docspring/models/submission_input.rb +296 -0
  272. data/lib/docspring/models/submission_list.rb +200 -0
  273. data/lib/docspring/models/submission_source.rb +43 -0
  274. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  275. data/lib/docspring/models/submission_state.rb +52 -0
  276. data/lib/docspring/models/submission_validation.rb +234 -0
  277. data/lib/docspring/models/template.rb +528 -736
  278. data/lib/docspring/models/template_actor.rb +259 -0
  279. data/lib/docspring/models/template_actor_type.rb +42 -0
  280. data/lib/docspring/models/template_defaults.rb +395 -0
  281. data/lib/docspring/models/template_defaults_input.rb +395 -0
  282. data/lib/docspring/models/template_diff.rb +321 -0
  283. data/lib/docspring/models/template_diff_summary.rb +320 -0
  284. data/lib/docspring/models/template_document.rb +396 -0
  285. data/lib/docspring/models/template_document_state.rb +46 -0
  286. data/lib/docspring/models/template_field_change.rb +266 -0
  287. data/lib/docspring/models/template_field_changes.rb +274 -0
  288. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  289. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  290. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  291. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  292. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  293. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  294. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  295. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  296. data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
  297. data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
  298. data/lib/docspring/models/template_form_mode.rb +42 -0
  299. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  300. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  301. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  302. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  303. data/lib/docspring/models/template_page_image_status.rb +41 -0
  304. data/lib/docspring/models/template_page_images.rb +254 -0
  305. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  306. data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
  307. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  308. data/lib/docspring/models/template_summary_list.rb +200 -0
  309. data/lib/docspring/models/template_type.rb +41 -0
  310. data/lib/docspring/models/template_version.rb +238 -0
  311. data/lib/docspring/models/template_version_type.rb +42 -0
  312. data/lib/docspring/models/text_alignment.rb +43 -0
  313. data/lib/docspring/models/text_overflow.rb +41 -0
  314. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  315. data/lib/docspring/models/typeface.rb +56 -0
  316. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  317. data/lib/docspring/models/update_template_document_request.rb +208 -0
  318. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  319. data/lib/docspring/models/update_template_request.rb +551 -0
  320. data/lib/docspring/models/update_webhook_request.rb +344 -0
  321. data/lib/docspring/models/upload_method.rb +40 -0
  322. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  323. data/lib/docspring/models/url_source_pdf.rb +212 -0
  324. data/lib/docspring/models/validate_submission_request.rb +288 -0
  325. data/lib/docspring/models/webhook.rb +97 -107
  326. data/lib/docspring/models/webhook_event_type.rb +64 -0
  327. data/lib/docspring/models/webhook_list.rb +200 -0
  328. data/lib/docspring/models/webhook_mode.rb +41 -0
  329. data/lib/docspring/request_schemas.json +4967 -0
  330. data/lib/docspring/request_validator.rb +396 -0
  331. data/lib/docspring/version.rb +4 -4
  332. data/lib/docspring.rb +153 -53
  333. data/spec/api/client_spec.rb +411 -265
  334. data/spec/models/add_template_fields_request_spec.rb +36 -0
  335. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  336. data/spec/models/authentication_check_spec.rb +36 -0
  337. data/spec/models/barcode_symbology_spec.rb +30 -0
  338. data/spec/models/check_character_spec.rb +30 -0
  339. data/spec/models/combined_field_type_spec.rb +30 -0
  340. data/spec/models/combined_pdf_files_spec.rb +36 -0
  341. data/spec/models/combined_pdf_list_spec.rb +42 -0
  342. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  343. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  344. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  345. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  346. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  347. data/spec/models/combined_pdf_state_spec.rb +30 -0
  348. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  349. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  350. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  351. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  352. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  353. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  354. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
  355. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
  356. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
  357. data/spec/models/create_webhook_request_spec.rb +96 -0
  358. data/spec/models/custom_file_list_spec.rb +42 -0
  359. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  360. data/spec/models/custom_file_spec.rb +29 -5
  361. data/spec/models/error_code_spec.rb +30 -0
  362. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  363. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  364. data/spec/models/error_response_spec.rb +4 -14
  365. data/spec/models/expiration_interval_spec.rb +30 -0
  366. data/spec/models/field_comparison_condition_spec.rb +48 -0
  367. data/spec/models/field_comparison_operator_spec.rb +30 -0
  368. data/spec/models/field_dependency_input_spec.rb +48 -0
  369. data/spec/models/field_dependency_spec.rb +48 -0
  370. data/spec/models/field_display_type_spec.rb +30 -0
  371. data/spec/models/field_equals_condition_spec.rb +48 -0
  372. data/spec/models/field_equals_operator_spec.rb +30 -0
  373. data/spec/models/field_group_input_spec.rb +72 -0
  374. data/spec/models/field_group_spec.rb +78 -0
  375. data/spec/models/field_group_type_spec.rb +30 -0
  376. data/spec/models/field_in_condition_spec.rb +48 -0
  377. data/spec/models/field_input_spec.rb +570 -0
  378. data/spec/models/field_override_spec.rb +408 -0
  379. data/spec/models/field_presence_condition_spec.rb +42 -0
  380. data/spec/models/field_presence_operator_spec.rb +30 -0
  381. data/spec/models/field_range_condition_spec.rb +54 -0
  382. data/spec/models/field_reimport_state_spec.rb +30 -0
  383. data/spec/models/field_setup_logic_spec.rb +30 -0
  384. data/spec/models/field_setup_naming_spec.rb +30 -0
  385. data/spec/models/field_setup_source_spec.rb +30 -0
  386. data/spec/models/field_spec.rb +576 -0
  387. data/spec/models/field_type_spec.rb +30 -0
  388. data/spec/models/folder_list_spec.rb +42 -0
  389. data/spec/models/folder_spec.rb +16 -4
  390. data/spec/models/generate_files_format_spec.rb +30 -0
  391. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  392. data/spec/models/generated_file_spec.rb +78 -0
  393. data/spec/models/generated_file_state_spec.rb +30 -0
  394. data/spec/models/html_engine_options_input_spec.rb +90 -0
  395. data/spec/models/html_engine_options_spec.rb +90 -0
  396. data/spec/models/image_gravity_spec.rb +30 -0
  397. data/spec/models/image_scale_type_spec.rb +30 -0
  398. data/spec/models/model_code_language_spec.rb +30 -0
  399. data/spec/models/move_folder_request_spec.rb +36 -0
  400. data/spec/models/move_template_request_spec.rb +36 -0
  401. data/spec/models/number_condition_type_spec.rb +30 -0
  402. data/spec/models/output_format_spec.rb +30 -0
  403. data/spec/models/page_format_spec.rb +30 -0
  404. data/spec/models/page_image_spec.rb +84 -0
  405. data/spec/models/page_images_spec.rb +54 -0
  406. data/spec/models/predefined_field_input_spec.rb +72 -0
  407. data/spec/models/predefined_field_spec.rb +72 -0
  408. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  409. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  410. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  411. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  412. data/spec/models/restore_template_version_request_spec.rb +36 -0
  413. data/spec/models/shape_type_spec.rb +30 -0
  414. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  415. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  416. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  417. data/spec/models/signature_request_event_type_spec.rb +30 -0
  418. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  419. data/spec/models/signature_request_message_type_spec.rb +30 -0
  420. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  421. data/spec/models/signature_request_state_spec.rb +30 -0
  422. data/spec/models/signature_request_token_spec.rb +72 -0
  423. data/spec/models/signature_request_token_type_spec.rb +30 -0
  424. data/spec/models/string_condition_type_spec.rb +30 -0
  425. data/spec/models/submission_action_spec.rb +4 -22
  426. data/spec/models/submission_action_state_spec.rb +30 -0
  427. data/spec/models/submission_action_type_spec.rb +30 -0
  428. data/spec/models/submission_batch_spec.rb +27 -13
  429. data/spec/models/submission_batch_state_spec.rb +30 -0
  430. data/spec/models/submission_files_spec.rb +54 -0
  431. data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
  432. data/spec/models/submission_list_spec.rb +42 -0
  433. data/spec/models/submission_source_pdf_spec.rb +42 -0
  434. data/spec/models/submission_source_spec.rb +30 -0
  435. data/spec/models/submission_spec.rb +27 -51
  436. data/spec/models/submission_state_spec.rb +30 -0
  437. data/spec/models/submission_validation_spec.rb +54 -0
  438. data/spec/models/template_actor_spec.rb +60 -0
  439. data/spec/models/template_actor_type_spec.rb +30 -0
  440. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  441. data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
  442. data/spec/models/template_diff_spec.rb +72 -0
  443. data/spec/models/template_diff_summary_spec.rb +66 -0
  444. data/spec/models/template_document_spec.rb +102 -0
  445. data/spec/models/template_document_state_spec.rb +30 -0
  446. data/spec/models/template_field_change_spec.rb +54 -0
  447. data/spec/models/template_field_changes_spec.rb +54 -0
  448. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  449. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  450. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  451. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  452. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  453. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  454. data/spec/models/template_field_dependency_spec.rb +60 -0
  455. data/spec/models/template_field_logic_status_spec.rb +30 -0
  456. data/spec/models/template_field_move_spec.rb +48 -0
  457. data/spec/models/template_fields_spec.rb +48 -0
  458. data/spec/models/template_form_mode_spec.rb +30 -0
  459. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  460. data/spec/models/template_page_ai_error_spec.rb +30 -0
  461. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  462. data/spec/models/template_page_fields_status_spec.rb +30 -0
  463. data/spec/models/template_page_image_status_spec.rb +30 -0
  464. data/spec/models/template_page_images_spec.rb +54 -0
  465. data/spec/models/template_page_processing_status_spec.rb +60 -0
  466. data/spec/models/template_source_pdf_spec.rb +54 -0
  467. data/spec/models/template_spec.rb +44 -140
  468. data/spec/models/template_summary_list_spec.rb +42 -0
  469. data/spec/models/template_summary_spec.rb +252 -0
  470. data/spec/models/template_type_spec.rb +30 -0
  471. data/spec/models/template_version_spec.rb +54 -0
  472. data/spec/models/template_version_type_spec.rb +30 -0
  473. data/spec/models/text_alignment_spec.rb +30 -0
  474. data/spec/models/text_overflow_spec.rb +30 -0
  475. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  476. data/spec/models/typeface_spec.rb +30 -0
  477. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  478. data/spec/models/update_template_document_request_spec.rb +60 -0
  479. data/spec/models/update_template_fields_request_spec.rb +36 -0
  480. data/spec/models/update_template_request_spec.rb +240 -0
  481. data/spec/models/update_webhook_request_spec.rb +96 -0
  482. data/spec/models/upload_method_spec.rb +30 -0
  483. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  484. data/spec/models/url_source_pdf_spec.rb +42 -0
  485. data/spec/models/validate_submission_request_spec.rb +96 -0
  486. data/spec/models/webhook_event_type_spec.rb +30 -0
  487. data/spec/models/webhook_list_spec.rb +42 -0
  488. data/spec/models/webhook_mode_spec.rb +30 -0
  489. data/spec/models/webhook_spec.rb +4 -8
  490. data/spec/spec_helper.rb +3 -3
  491. metadata +597 -202
  492. data/docs/AddFieldsData.md +0 -18
  493. data/docs/BatchGeneratePdfs201Response.md +0 -28
  494. data/docs/CombinePdfsData.md +0 -28
  495. data/docs/CombinedSubmission.md +0 -44
  496. data/docs/CombinedSubmissionAction.md +0 -30
  497. data/docs/CopyTemplateOptions.md +0 -22
  498. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  499. data/docs/CreateCustomFileData.md +0 -18
  500. data/docs/CreateCustomFileResponse.md +0 -24
  501. data/docs/CreateHtmlTemplate.md +0 -18
  502. data/docs/CreatePdfSubmissionData.md +0 -34
  503. data/docs/CreatePdfTemplate.md +0 -18
  504. data/docs/CreateSubmissionDataRequestData.md +0 -44
  505. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  506. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  507. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  508. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  509. data/docs/CreateSubmissionResponse.md +0 -26
  510. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  511. data/docs/ForbiddenErrorResponse.md +0 -22
  512. data/docs/JsonSchema.md +0 -40
  513. data/docs/ListSubmissionsResponse.md +0 -22
  514. data/docs/MoveFolderData.md +0 -18
  515. data/docs/MoveTemplateData.md +0 -20
  516. data/docs/MultipleErrorsResponse.md +0 -20
  517. data/docs/PublishVersionData.md +0 -20
  518. data/docs/RestoreVersionData.md +0 -18
  519. data/docs/Submission422Response.md +0 -24
  520. data/docs/SubmissionBatchData.md +0 -26
  521. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  522. data/docs/SubmissionDataRequest.md +0 -60
  523. data/docs/SubmissionDataRequestEvent.md +0 -30
  524. data/docs/SubmissionDataRequestShow.md +0 -62
  525. data/docs/SubmissionDataRequestToken.md +0 -24
  526. data/docs/SubmissionPreview.md +0 -64
  527. data/docs/SuccessErrorResponse.md +0 -20
  528. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  529. data/docs/TemplateAddFieldsResponse.md +0 -22
  530. data/docs/TemplateDeleteResponse.md +0 -24
  531. data/docs/TemplateModelCodeResponse.md +0 -22
  532. data/docs/TemplatePreview.md +0 -116
  533. data/docs/TemplatePublishVersionResponse.md +0 -22
  534. data/docs/UpdateHtmlTemplate.md +0 -18
  535. data/docs/UpdatePdfTemplate.md +0 -18
  536. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  537. data/docs/UploadPresignResponse.md +0 -24
  538. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  539. data/lib/docspring/models/combined_submission_action.rb +0 -384
  540. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  541. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  542. data/lib/docspring/models/create_html_template.rb +0 -243
  543. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  544. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  545. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  546. data/lib/docspring/models/create_submission_response.rb +0 -324
  547. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  548. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  549. data/lib/docspring/models/json_schema.rb +0 -329
  550. data/lib/docspring/models/list_submissions_response.rb +0 -283
  551. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  552. data/lib/docspring/models/submission422_response.rb +0 -299
  553. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  554. data/lib/docspring/models/submission_data_request.rb +0 -570
  555. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  556. data/lib/docspring/models/submission_preview.rb +0 -637
  557. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  558. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  559. data/lib/docspring/models/template_delete_response.rb +0 -300
  560. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  561. data/lib/docspring/models/update_html_template.rb +0 -243
  562. data/spec/models/add_fields_data_spec.rb +0 -36
  563. data/spec/models/combined_submission_action_spec.rb +0 -84
  564. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  565. data/spec/models/create_custom_file_response_spec.rb +0 -58
  566. data/spec/models/create_folder_data_spec.rb +0 -36
  567. data/spec/models/create_html_template_spec.rb +0 -36
  568. data/spec/models/create_pdf_template_spec.rb +0 -36
  569. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  570. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  571. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  572. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  573. data/spec/models/create_webhook_data_spec.rb +0 -36
  574. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  575. data/spec/models/forbidden_error_response_spec.rb +0 -56
  576. data/spec/models/move_folder_data_spec.rb +0 -36
  577. data/spec/models/multiple_errors_response_spec.rb +0 -46
  578. data/spec/models/restore_version_data_spec.rb +0 -36
  579. data/spec/models/submission422_response_spec.rb +0 -58
  580. data/spec/models/success_error_response_spec.rb +0 -46
  581. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  582. data/spec/models/template_add_fields_response_spec.rb +0 -52
  583. data/spec/models/template_delete_response_spec.rb +0 -58
  584. data/spec/models/template_publish_version_response_spec.rb +0 -52
  585. data/spec/models/update_html_template_spec.rb +0 -36
  586. data/spec/models/update_pdf_template_spec.rb +0 -36
  587. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  588. data/spec/models/update_webhook_data_spec.rb +0 -36
data/docs/Client.md CHANGED
@@ -1,64 +1,74 @@
1
1
  # DocSpring::Client
2
2
 
3
- All URIs are relative to *https://sync.api.docspring.com/api/v1*
3
+ All URIs are relative to *https://sync.api.docspring.com/api/v2*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**add_fields_to_template**](Client.md#add_fields_to_template) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template |
8
- | [**batch_generate_pdfs**](Client.md#batch_generate_pdfs) | **POST** /submissions/batches | Generate multiple PDFs |
9
- | [**combine_pdfs**](Client.md#combine_pdfs) | **POST** /combined_submissions | Merge submission PDFs, template PDFs, or custom files |
7
+ | [**add_template_fields**](Client.md#add_template_fields) | **POST** /templates/{template_id}/fields | Add fields to a template |
10
8
  | [**copy_template**](Client.md#copy_template) | **POST** /templates/{template_id}/copy | Copy a template |
11
- | [**create_custom_file_from_upload**](Client.md#create_custom_file_from_upload) | **POST** /custom_files | Create a new custom file from a cached S3 upload |
12
- | [**create_data_request_event**](Client.md#create_data_request_event) | **POST** /data_requests/{data_request_id}/events | Create a new event for emailing a signee a request for signature |
13
- | [**create_data_request_token**](Client.md#create_data_request_token) | **POST** /data_requests/{data_request_id}/tokens | Create a new data request token for form authentication |
14
- | [**create_folder**](Client.md#create_folder) | **POST** /folders/ | Create a folder |
15
- | [**create_html_template**](Client.md#create_html_template) | **POST** /templates?endpoint_variant=create_html_template | Create a new HTML template |
16
- | [**create_pdf_template**](Client.md#create_pdf_template) | **POST** /templates | Create a new PDF template with a form POST file upload |
17
- | [**create_pdf_template_from_upload**](Client.md#create_pdf_template_from_upload) | **POST** /templates?endpoint_variant=create_template_from_cached_upload | Create a new PDF template from a cached S3 file upload |
9
+ | [**create_combined_pdf**](Client.md#create_combined_pdf) | **POST** /combined_pdfs | Combine PDFs |
10
+ | [**create_custom_file_from_upload**](Client.md#create_custom_file_from_upload) | **POST** /custom_files | Create a custom file from an upload |
11
+ | [**create_folder**](Client.md#create_folder) | **POST** /folders | Create a folder |
12
+ | [**create_signature_request_event**](Client.md#create_signature_request_event) | **POST** /signature_requests/{signature_request_id}/events | Record a signature request event |
13
+ | [**create_signature_request_token**](Client.md#create_signature_request_token) | **POST** /signature_requests/{signature_request_id}/tokens | Create a signature request token |
14
+ | [**create_submission**](Client.md#create_submission) | **POST** /templates/{template_id}/submissions | Generate a PDF |
15
+ | [**create_submission_batch**](Client.md#create_submission_batch) | **POST** /submissions/batches | Generate PDFs in a batch |
16
+ | [**create_template**](Client.md#create_template) | **POST** /templates | Create a template |
18
17
  | [**create_webhook**](Client.md#create_webhook) | **POST** /webhooks | Create a webhook |
18
+ | [**delete_custom_file**](Client.md#delete_custom_file) | **DELETE** /custom_files/{custom_file_id} | Delete a custom file |
19
19
  | [**delete_folder**](Client.md#delete_folder) | **DELETE** /folders/{folder_id} | Delete a folder |
20
20
  | [**delete_template**](Client.md#delete_template) | **DELETE** /templates/{template_id} | Delete a template |
21
21
  | [**delete_webhook**](Client.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | Delete a webhook |
22
- | [**expire_combined_submission**](Client.md#expire_combined_submission) | **DELETE** /combined_submissions/{combined_submission_id} | Expire a combined submission |
23
- | [**expire_submission**](Client.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a PDF submission |
24
- | [**generate_pdf**](Client.md#generate_pdf) | **POST** /templates/{template_id}/submissions | Generate a PDF |
25
- | [**generate_preview**](Client.md#generate_preview) | **POST** /submissions/{submission_id}/generate_preview | Generate a preview PDF for partially completed data requests |
26
- | [**get_combined_submission**](Client.md#get_combined_submission) | **GET** /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs) |
27
- | [**get_data_request**](Client.md#get_data_request) | **GET** /data_requests/{data_request_id} | Look up a submission data request |
28
- | [**get_full_template**](Client.md#get_full_template) | **GET** /templates/{template_id}?full=true | Fetch the full attributes for a PDF template |
29
- | [**get_presign_url**](Client.md#get_presign_url) | **GET** /uploads/presign | Get a presigned S3 URL for direct file upload |
30
- | [**get_submission**](Client.md#get_submission) | **GET** /submissions/{submission_id} | Check the status of a PDF |
31
- | [**get_submission_batch**](Client.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} | Check the status of a submission batch job |
32
- | [**get_template**](Client.md#get_template) | **GET** /templates/{template_id} | Check the status of an uploaded template |
33
- | [**get_template_model_code**](Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed model code for a template |
34
- | [**get_template_schema**](Client.md#get_template_schema) | **GET** /templates/{template_id}/schema | Fetch the JSON schema for a template |
22
+ | [**expire_combined_pdf**](Client.md#expire_combined_pdf) | **DELETE** /combined_pdfs/{combined_pdf_id} | Expire a combined PDF |
23
+ | [**expire_submission**](Client.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a submission |
24
+ | [**generate_submission_files**](Client.md#generate_submission_files) | **POST** /submissions/{submission_id}/generate_files | Generate more files |
25
+ | [**generate_submission_preview**](Client.md#generate_submission_preview) | **POST** /submissions/{submission_id}/generate_preview | Generate a preview PDF |
26
+ | [**get_combined_pdf**](Client.md#get_combined_pdf) | **GET** /combined_pdfs/{combined_pdf_id} | Get a combined PDF |
27
+ | [**get_custom_file**](Client.md#get_custom_file) | **GET** /custom_files/{custom_file_id} | Get a custom file |
28
+ | [**get_folder**](Client.md#get_folder) | **GET** /folders/{folder_id} | Get a folder |
29
+ | [**get_presign_url**](Client.md#get_presign_url) | **GET** /uploads/presign | Get a presigned URL to upload a file |
30
+ | [**get_signature_request**](Client.md#get_signature_request) | **GET** /signature_requests/{signature_request_id} | Get a signature request |
31
+ | [**get_submission**](Client.md#get_submission) | **GET** /submissions/{submission_id} | Get a submission |
32
+ | [**get_submission_batch**](Client.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} | Get a batch |
33
+ | [**get_template**](Client.md#get_template) | **GET** /templates/{template_id} | Get a template |
34
+ | [**get_template_diff**](Client.md#get_template_diff) | **GET** /templates/{template_id}/diff | Compare a version of a template with the one before it |
35
+ | [**get_template_model_code**](Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed code for a template's submission data |
36
+ | [**get_template_page_images**](Client.md#get_template_page_images) | **GET** /templates/{template_id}/page_images | Get images of a template's pages |
37
+ | [**get_template_schema**](Client.md#get_template_schema) | **GET** /templates/{template_id}/schema | Get the JSON Schema of a template's submission data |
35
38
  | [**get_webhook**](Client.md#get_webhook) | **GET** /webhooks/{webhook_id} | Get a webhook |
36
- | [**list_combined_submissions**](Client.md#list_combined_submissions) | **GET** /combined_submissions | Get a list of all combined submissions |
37
- | [**list_folders**](Client.md#list_folders) | **GET** /folders/ | Get a list of all folders |
38
- | [**list_submissions**](Client.md#list_submissions) | **GET** /submissions | List all submissions |
39
- | [**list_template_submissions**](Client.md#list_template_submissions) | **GET** /templates/{template_id}/submissions | List all submissions for a given template |
40
- | [**list_templates**](Client.md#list_templates) | **GET** /templates | Get a list of all templates |
41
- | [**list_webhooks**](Client.md#list_webhooks) | **GET** /webhooks | Get a list of all webhooks |
42
- | [**move_folder_to_folder**](Client.md#move_folder_to_folder) | **POST** /folders/{folder_id}/move | Move a folder |
43
- | [**move_template_to_folder**](Client.md#move_template_to_folder) | **POST** /templates/{template_id}/move | Move Template to folder |
39
+ | [**list_combined_pdfs**](Client.md#list_combined_pdfs) | **GET** /combined_pdfs | List combined PDFs |
40
+ | [**list_custom_files**](Client.md#list_custom_files) | **GET** /custom_files | List custom files |
41
+ | [**list_folders**](Client.md#list_folders) | **GET** /folders | List folders |
42
+ | [**list_submissions**](Client.md#list_submissions) | **GET** /submissions | List submissions |
43
+ | [**list_template_fields**](Client.md#list_template_fields) | **GET** /templates/{template_id}/fields | List a template's fields |
44
+ | [**list_template_submissions**](Client.md#list_template_submissions) | **GET** /templates/{template_id}/submissions | List a template's submissions |
45
+ | [**list_templates**](Client.md#list_templates) | **GET** /templates | List templates |
46
+ | [**list_webhooks**](Client.md#list_webhooks) | **GET** /webhooks | List webhooks |
47
+ | [**move_folder**](Client.md#move_folder) | **POST** /folders/{folder_id}/move | Move a folder |
48
+ | [**move_template**](Client.md#move_template) | **POST** /templates/{template_id}/move | Move a template to a folder |
44
49
  | [**publish_template_version**](Client.md#publish_template_version) | **POST** /templates/{template_id}/publish_version | Publish a template version |
50
+ | [**remove_template_fields**](Client.md#remove_template_fields) | **POST** /templates/{template_id}/fields/remove | Remove fields from a template |
45
51
  | [**rename_folder**](Client.md#rename_folder) | **POST** /folders/{folder_id}/rename | Rename a folder |
52
+ | [**reorder_template_fields**](Client.md#reorder_template_fields) | **POST** /templates/{template_id}/fields/reorder | Reorder a template's fields |
46
53
  | [**restore_template_version**](Client.md#restore_template_version) | **POST** /templates/{template_id}/restore_version | Restore a template version |
47
54
  | [**test_authentication**](Client.md#test_authentication) | **GET** /authentication | Test authentication |
48
- | [**update_data_request**](Client.md#update_data_request) | **PUT** /data_requests/{data_request_id} | Update a submission data request |
49
- | [**update_template**](Client.md#update_template) | **PUT** /templates/{template_id} | Update a Template |
50
- | [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post | Update a template's document with a form POST file upload |
51
- | [**update_template_document_from_upload**](Client.md#update_template_document_from_upload) | **PUT** /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload | Update a template's document with a cached S3 file upload |
55
+ | [**update_signature_request**](Client.md#update_signature_request) | **PUT** /signature_requests/{signature_request_id} | Update a signature request |
56
+ | [**update_template**](Client.md#update_template) | **PUT** /templates/{template_id} | Update a template |
57
+ | [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}/document | Replace a template's PDF |
58
+ | [**update_template_fields**](Client.md#update_template_fields) | **PUT** /templates/{template_id}/fields | Update a template's fields |
52
59
  | [**update_webhook**](Client.md#update_webhook) | **PUT** /webhooks/{webhook_id} | Update a webhook |
60
+ | [**upload_template**](Client.md#upload_template) | **POST** /templates/upload | Create a PDF template from an uploaded PDF |
61
+ | [**upload_template_document**](Client.md#upload_template_document) | **PUT** /templates/{template_id}/document/upload | Replace a template's PDF with an uploaded PDF |
62
+ | [**validate_submission**](Client.md#validate_submission) | **POST** /templates/{template_id}/submissions/validate | Check a submission without creating it |
53
63
 
54
64
 
55
- ## add_fields_to_template
65
+ ## add_template_fields
56
66
 
57
- > <TemplateAddFieldsResponse> add_fields_to_template(template_id, data)
67
+ > <TemplateFields> add_template_fields(template_id, body)
58
68
 
59
- Add new fields to a Template
69
+ Add fields to a template
60
70
 
61
- Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
71
+ Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
62
72
 
63
73
  ### Examples
64
74
 
@@ -73,33 +83,33 @@ DocSpring.configure do |config|
73
83
  end
74
84
 
75
85
  api_instance = DocSpring::Client.new
76
- template_id = 'tpl_1234567890abcdef02' # String |
77
- data = DocSpring::AddFieldsData.new({fields: [3.56]}) # AddFieldsData |
86
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
87
+ body = DocSpring::AddTemplateFieldsRequest.new({fields: [DocSpring::FieldInput.new]}) # AddTemplateFieldsRequest | The fields to add to the template's draft.
78
88
 
79
89
  begin
80
- # Add new fields to a Template
81
- result = api_instance.add_fields_to_template(template_id, data)
90
+ # Add fields to a template
91
+ result = api_instance.add_template_fields(template_id, body)
82
92
  p result
83
93
  rescue DocSpring::ApiError => e
84
- puts "Error when calling Client->add_fields_to_template: #{e}"
94
+ puts "Error when calling Client->add_template_fields: #{e}"
85
95
  end
86
96
  ```
87
97
 
88
- #### Using the add_fields_to_template_with_http_info variant
98
+ #### Using the add_template_fields_with_http_info variant
89
99
 
90
100
  This returns an Array which contains the response data, status code and headers.
91
101
 
92
- > <Array(<TemplateAddFieldsResponse>, Integer, Hash)> add_fields_to_template_with_http_info(template_id, data)
102
+ > <Array(<TemplateFields>, Integer, Hash)> add_template_fields_with_http_info(template_id, body)
93
103
 
94
104
  ```ruby
95
105
  begin
96
- # Add new fields to a Template
97
- data, status_code, headers = api_instance.add_fields_to_template_with_http_info(template_id, data)
106
+ # Add fields to a template
107
+ data, status_code, headers = api_instance.add_template_fields_with_http_info(template_id, body)
98
108
  p status_code # => 2xx
99
109
  p headers # => { ... }
100
- p data # => <TemplateAddFieldsResponse>
110
+ p data # => <TemplateFields>
101
111
  rescue DocSpring::ApiError => e
102
- puts "Error when calling Client->add_fields_to_template_with_http_info: #{e}"
112
+ puts "Error when calling Client->add_template_fields_with_http_info: #{e}"
103
113
  end
104
114
  ```
105
115
 
@@ -107,12 +117,12 @@ end
107
117
 
108
118
  | Name | Type | Description | Notes |
109
119
  | ---- | ---- | ----------- | ----- |
110
- | **template_id** | **String** | | |
111
- | **data** | [**AddFieldsData**](AddFieldsData.md) | | |
120
+ | **template_id** | **String** | The template's ID. | |
121
+ | **body** | [**AddTemplateFieldsRequest**](AddTemplateFieldsRequest.md) | The fields to add to the template's draft. | |
112
122
 
113
123
  ### Return type
114
124
 
115
- [**TemplateAddFieldsResponse**](TemplateAddFieldsResponse.md)
125
+ [**TemplateFields**](TemplateFields.md)
116
126
 
117
127
  ### Authorization
118
128
 
@@ -124,13 +134,13 @@ end
124
134
  - **Accept**: application/json
125
135
 
126
136
 
127
- ## batch_generate_pdfs
137
+ ## copy_template
128
138
 
129
- > <BatchGeneratePdfs201Response> batch_generate_pdfs(data, opts)
139
+ > <Template> copy_template(template_id, opts)
130
140
 
131
- Generate multiple PDFs
141
+ Copy a template
132
142
 
133
- Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the others are still processed: check each submission's `state`. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
143
+ Copies a template (its draft, or a published version) into a new template.
134
144
 
135
145
  ### Examples
136
146
 
@@ -145,35 +155,35 @@ DocSpring.configure do |config|
145
155
  end
146
156
 
147
157
  api_instance = DocSpring::Client.new
148
- data = DocSpring::SubmissionBatchData.new({submissions: [3.56]}) # SubmissionBatchData |
158
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
149
159
  opts = {
150
- wait: true # Boolean | Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
160
+ body: DocSpring::CopyTemplateRequest.new # CopyTemplateRequest | Settings for the copy.
151
161
  }
152
162
 
153
163
  begin
154
- # Generate multiple PDFs
155
- result = api_instance.batch_generate_pdfs(data, opts)
164
+ # Copy a template
165
+ result = api_instance.copy_template(template_id, opts)
156
166
  p result
157
167
  rescue DocSpring::ApiError => e
158
- puts "Error when calling Client->batch_generate_pdfs: #{e}"
168
+ puts "Error when calling Client->copy_template: #{e}"
159
169
  end
160
170
  ```
161
171
 
162
- #### Using the batch_generate_pdfs_with_http_info variant
172
+ #### Using the copy_template_with_http_info variant
163
173
 
164
174
  This returns an Array which contains the response data, status code and headers.
165
175
 
166
- > <Array(<BatchGeneratePdfs201Response>, Integer, Hash)> batch_generate_pdfs_with_http_info(data, opts)
176
+ > <Array(<Template>, Integer, Hash)> copy_template_with_http_info(template_id, opts)
167
177
 
168
178
  ```ruby
169
179
  begin
170
- # Generate multiple PDFs
171
- data, status_code, headers = api_instance.batch_generate_pdfs_with_http_info(data, opts)
180
+ # Copy a template
181
+ data, status_code, headers = api_instance.copy_template_with_http_info(template_id, opts)
172
182
  p status_code # => 2xx
173
183
  p headers # => { ... }
174
- p data # => <BatchGeneratePdfs201Response>
184
+ p data # => <Template>
175
185
  rescue DocSpring::ApiError => e
176
- puts "Error when calling Client->batch_generate_pdfs_with_http_info: #{e}"
186
+ puts "Error when calling Client->copy_template_with_http_info: #{e}"
177
187
  end
178
188
  ```
179
189
 
@@ -181,12 +191,12 @@ end
181
191
 
182
192
  | Name | Type | Description | Notes |
183
193
  | ---- | ---- | ----------- | ----- |
184
- | **data** | [**SubmissionBatchData**](SubmissionBatchData.md) | | |
185
- | **wait** | **Boolean** | Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) | [optional][default to true] |
194
+ | **template_id** | **String** | The template's ID. | |
195
+ | **body** | [**CopyTemplateRequest**](CopyTemplateRequest.md) | Settings for the copy. | [optional] |
186
196
 
187
197
  ### Return type
188
198
 
189
- [**BatchGeneratePdfs201Response**](BatchGeneratePdfs201Response.md)
199
+ [**Template**](Template.md)
190
200
 
191
201
  ### Authorization
192
202
 
@@ -198,13 +208,13 @@ end
198
208
  - **Accept**: application/json
199
209
 
200
210
 
201
- ## combine_pdfs
211
+ ## create_combined_pdf
202
212
 
203
- > <CreateCombinedSubmissionResponse> combine_pdfs(data)
213
+ > <CombinedPdf> create_combined_pdf(body, opts)
204
214
 
205
- Merge submission PDFs, template PDFs, or custom files
215
+ Combine PDFs
206
216
 
207
- Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
217
+ Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
208
218
 
209
219
  ### Examples
210
220
 
@@ -219,32 +229,35 @@ DocSpring.configure do |config|
219
229
  end
220
230
 
221
231
  api_instance = DocSpring::Client.new
222
- data = DocSpring::CombinePdfsData.new({source_pdfs: [3.56]}) # CombinePdfsData |
232
+ body = DocSpring::CreateCombinedPdfRequest.new({source_pdfs: [DocSpring::CombinedPdfSourcePdf.new({type: 'type_example', id: 'id_example'})]}) # CreateCombinedPdfRequest | The PDFs to merge, and the combined PDF's settings.
233
+ opts = {
234
+ wait: true # Boolean | Wait until the PDF has been generated before responding. Default true on sync.api hosts.
235
+ }
223
236
 
224
237
  begin
225
- # Merge submission PDFs, template PDFs, or custom files
226
- result = api_instance.combine_pdfs(data)
238
+ # Combine PDFs
239
+ result = api_instance.create_combined_pdf(body, opts)
227
240
  p result
228
241
  rescue DocSpring::ApiError => e
229
- puts "Error when calling Client->combine_pdfs: #{e}"
242
+ puts "Error when calling Client->create_combined_pdf: #{e}"
230
243
  end
231
244
  ```
232
245
 
233
- #### Using the combine_pdfs_with_http_info variant
246
+ #### Using the create_combined_pdf_with_http_info variant
234
247
 
235
248
  This returns an Array which contains the response data, status code and headers.
236
249
 
237
- > <Array(<CreateCombinedSubmissionResponse>, Integer, Hash)> combine_pdfs_with_http_info(data)
250
+ > <Array(<CombinedPdf>, Integer, Hash)> create_combined_pdf_with_http_info(body, opts)
238
251
 
239
252
  ```ruby
240
253
  begin
241
- # Merge submission PDFs, template PDFs, or custom files
242
- data, status_code, headers = api_instance.combine_pdfs_with_http_info(data)
254
+ # Combine PDFs
255
+ data, status_code, headers = api_instance.create_combined_pdf_with_http_info(body, opts)
243
256
  p status_code # => 2xx
244
257
  p headers # => { ... }
245
- p data # => <CreateCombinedSubmissionResponse>
258
+ p data # => <CombinedPdf>
246
259
  rescue DocSpring::ApiError => e
247
- puts "Error when calling Client->combine_pdfs_with_http_info: #{e}"
260
+ puts "Error when calling Client->create_combined_pdf_with_http_info: #{e}"
248
261
  end
249
262
  ```
250
263
 
@@ -252,11 +265,12 @@ end
252
265
 
253
266
  | Name | Type | Description | Notes |
254
267
  | ---- | ---- | ----------- | ----- |
255
- | **data** | [**CombinePdfsData**](CombinePdfsData.md) | | |
268
+ | **body** | [**CreateCombinedPdfRequest**](CreateCombinedPdfRequest.md) | The PDFs to merge, and the combined PDF's settings. | |
269
+ | **wait** | **Boolean** | Wait until the PDF has been generated before responding. Default true on sync.api hosts. | [optional] |
256
270
 
257
271
  ### Return type
258
272
 
259
- [**CreateCombinedSubmissionResponse**](CreateCombinedSubmissionResponse.md)
273
+ [**CombinedPdf**](CombinedPdf.md)
260
274
 
261
275
  ### Authorization
262
276
 
@@ -268,13 +282,13 @@ end
268
282
  - **Accept**: application/json
269
283
 
270
284
 
271
- ## copy_template
285
+ ## create_custom_file_from_upload
272
286
 
273
- > <TemplatePreview> copy_template(template_id, opts)
287
+ > <CustomFile> create_custom_file_from_upload(body)
274
288
 
275
- Copy a template
289
+ Create a custom file from an upload
276
290
 
277
- Creates a copy of an existing template with all its fields and configuration. Optionally specify a new name and target folder. The copied template starts as a new draft that can be modified independently of the original.
291
+ Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
278
292
 
279
293
  ### Examples
280
294
 
@@ -289,35 +303,32 @@ DocSpring.configure do |config|
289
303
  end
290
304
 
291
305
  api_instance = DocSpring::Client.new
292
- template_id = 'tpl_1234567890abcdef01' # String |
293
- opts = {
294
- options: DocSpring::CopyTemplateOptions.new # CopyTemplateOptions |
295
- }
306
+ body = DocSpring::CreateCustomFileFromUploadRequest.new({cache_id: 'cache_id_example'}) # CreateCustomFileFromUploadRequest | The uploaded file to create the custom file from.
296
307
 
297
308
  begin
298
- # Copy a template
299
- result = api_instance.copy_template(template_id, opts)
309
+ # Create a custom file from an upload
310
+ result = api_instance.create_custom_file_from_upload(body)
300
311
  p result
301
312
  rescue DocSpring::ApiError => e
302
- puts "Error when calling Client->copy_template: #{e}"
313
+ puts "Error when calling Client->create_custom_file_from_upload: #{e}"
303
314
  end
304
315
  ```
305
316
 
306
- #### Using the copy_template_with_http_info variant
317
+ #### Using the create_custom_file_from_upload_with_http_info variant
307
318
 
308
319
  This returns an Array which contains the response data, status code and headers.
309
320
 
310
- > <Array(<TemplatePreview>, Integer, Hash)> copy_template_with_http_info(template_id, opts)
321
+ > <Array(<CustomFile>, Integer, Hash)> create_custom_file_from_upload_with_http_info(body)
311
322
 
312
323
  ```ruby
313
324
  begin
314
- # Copy a template
315
- data, status_code, headers = api_instance.copy_template_with_http_info(template_id, opts)
325
+ # Create a custom file from an upload
326
+ data, status_code, headers = api_instance.create_custom_file_from_upload_with_http_info(body)
316
327
  p status_code # => 2xx
317
328
  p headers # => { ... }
318
- p data # => <TemplatePreview>
329
+ p data # => <CustomFile>
319
330
  rescue DocSpring::ApiError => e
320
- puts "Error when calling Client->copy_template_with_http_info: #{e}"
331
+ puts "Error when calling Client->create_custom_file_from_upload_with_http_info: #{e}"
321
332
  end
322
333
  ```
323
334
 
@@ -325,12 +336,11 @@ end
325
336
 
326
337
  | Name | Type | Description | Notes |
327
338
  | ---- | ---- | ----------- | ----- |
328
- | **template_id** | **String** | | |
329
- | **options** | [**CopyTemplateOptions**](CopyTemplateOptions.md) | | [optional] |
339
+ | **body** | [**CreateCustomFileFromUploadRequest**](CreateCustomFileFromUploadRequest.md) | The uploaded file to create the custom file from. | |
330
340
 
331
341
  ### Return type
332
342
 
333
- [**TemplatePreview**](TemplatePreview.md)
343
+ [**CustomFile**](CustomFile.md)
334
344
 
335
345
  ### Authorization
336
346
 
@@ -342,13 +352,13 @@ end
342
352
  - **Accept**: application/json
343
353
 
344
354
 
345
- ## create_custom_file_from_upload
355
+ ## create_folder
346
356
 
347
- > <CreateCustomFileResponse> create_custom_file_from_upload(data)
357
+ > <Folder> create_folder(body)
348
358
 
349
- Create a new custom file from a cached S3 upload
359
+ Create a folder
350
360
 
351
- The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs. First upload your file using the presigned URL endpoint, then use the returned cache_id to create the custom file.
361
+ Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
352
362
 
353
363
  ### Examples
354
364
 
@@ -363,32 +373,32 @@ DocSpring.configure do |config|
363
373
  end
364
374
 
365
375
  api_instance = DocSpring::Client.new
366
- data = DocSpring::CreateCustomFileData.new({cache_id: 'cache_id_example'}) # CreateCustomFileData |
376
+ body = DocSpring::CreateFolderRequest.new({name: 'name_example'}) # CreateFolderRequest | The folder to create.
367
377
 
368
378
  begin
369
- # Create a new custom file from a cached S3 upload
370
- result = api_instance.create_custom_file_from_upload(data)
379
+ # Create a folder
380
+ result = api_instance.create_folder(body)
371
381
  p result
372
382
  rescue DocSpring::ApiError => e
373
- puts "Error when calling Client->create_custom_file_from_upload: #{e}"
383
+ puts "Error when calling Client->create_folder: #{e}"
374
384
  end
375
385
  ```
376
386
 
377
- #### Using the create_custom_file_from_upload_with_http_info variant
387
+ #### Using the create_folder_with_http_info variant
378
388
 
379
389
  This returns an Array which contains the response data, status code and headers.
380
390
 
381
- > <Array(<CreateCustomFileResponse>, Integer, Hash)> create_custom_file_from_upload_with_http_info(data)
391
+ > <Array(<Folder>, Integer, Hash)> create_folder_with_http_info(body)
382
392
 
383
393
  ```ruby
384
394
  begin
385
- # Create a new custom file from a cached S3 upload
386
- data, status_code, headers = api_instance.create_custom_file_from_upload_with_http_info(data)
395
+ # Create a folder
396
+ data, status_code, headers = api_instance.create_folder_with_http_info(body)
387
397
  p status_code # => 2xx
388
398
  p headers # => { ... }
389
- p data # => <CreateCustomFileResponse>
399
+ p data # => <Folder>
390
400
  rescue DocSpring::ApiError => e
391
- puts "Error when calling Client->create_custom_file_from_upload_with_http_info: #{e}"
401
+ puts "Error when calling Client->create_folder_with_http_info: #{e}"
392
402
  end
393
403
  ```
394
404
 
@@ -396,11 +406,11 @@ end
396
406
 
397
407
  | Name | Type | Description | Notes |
398
408
  | ---- | ---- | ----------- | ----- |
399
- | **data** | [**CreateCustomFileData**](CreateCustomFileData.md) | | |
409
+ | **body** | [**CreateFolderRequest**](CreateFolderRequest.md) | The folder to create. | |
400
410
 
401
411
  ### Return type
402
412
 
403
- [**CreateCustomFileResponse**](CreateCustomFileResponse.md)
413
+ [**Folder**](Folder.md)
404
414
 
405
415
  ### Authorization
406
416
 
@@ -412,13 +422,13 @@ end
412
422
  - **Accept**: application/json
413
423
 
414
424
 
415
- ## create_data_request_event
425
+ ## create_signature_request_event
416
426
 
417
- > <CreateSubmissionDataRequestEventResponse> create_data_request_event(data_request_id, event)
427
+ > <SignatureRequestEvent> create_signature_request_event(signature_request_id, body)
418
428
 
419
- Create a new event for emailing a signee a request for signature
429
+ Record a signature request event
420
430
 
421
- Records user notification events for data requests. Use this to create an audit trail showing when and how users were notified about data request forms. Supports email, SMS, and other notification types. Records the notification time for compliance tracking. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow
431
+ Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account.
422
432
 
423
433
  ### Examples
424
434
 
@@ -433,33 +443,33 @@ DocSpring.configure do |config|
433
443
  end
434
444
 
435
445
  api_instance = DocSpring::Client.new
436
- data_request_id = 'drq_1234567890abcdef01' # String |
437
- event = DocSpring::CreateSubmissionDataRequestEventRequest.new({event_type: 'send_request'}) # CreateSubmissionDataRequestEventRequest |
446
+ signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
447
+ body = DocSpring::CreateSignatureRequestEventRequest.new({event_type: DocSpring::SignatureRequestEventType::SEND_REQUEST}) # CreateSignatureRequestEventRequest | The event to record.
438
448
 
439
449
  begin
440
- # Create a new event for emailing a signee a request for signature
441
- result = api_instance.create_data_request_event(data_request_id, event)
450
+ # Record a signature request event
451
+ result = api_instance.create_signature_request_event(signature_request_id, body)
442
452
  p result
443
453
  rescue DocSpring::ApiError => e
444
- puts "Error when calling Client->create_data_request_event: #{e}"
454
+ puts "Error when calling Client->create_signature_request_event: #{e}"
445
455
  end
446
456
  ```
447
457
 
448
- #### Using the create_data_request_event_with_http_info variant
458
+ #### Using the create_signature_request_event_with_http_info variant
449
459
 
450
460
  This returns an Array which contains the response data, status code and headers.
451
461
 
452
- > <Array(<CreateSubmissionDataRequestEventResponse>, Integer, Hash)> create_data_request_event_with_http_info(data_request_id, event)
462
+ > <Array(<SignatureRequestEvent>, Integer, Hash)> create_signature_request_event_with_http_info(signature_request_id, body)
453
463
 
454
464
  ```ruby
455
465
  begin
456
- # Create a new event for emailing a signee a request for signature
457
- data, status_code, headers = api_instance.create_data_request_event_with_http_info(data_request_id, event)
466
+ # Record a signature request event
467
+ data, status_code, headers = api_instance.create_signature_request_event_with_http_info(signature_request_id, body)
458
468
  p status_code # => 2xx
459
469
  p headers # => { ... }
460
- p data # => <CreateSubmissionDataRequestEventResponse>
470
+ p data # => <SignatureRequestEvent>
461
471
  rescue DocSpring::ApiError => e
462
- puts "Error when calling Client->create_data_request_event_with_http_info: #{e}"
472
+ puts "Error when calling Client->create_signature_request_event_with_http_info: #{e}"
463
473
  end
464
474
  ```
465
475
 
@@ -467,12 +477,12 @@ end
467
477
 
468
478
  | Name | Type | Description | Notes |
469
479
  | ---- | ---- | ----------- | ----- |
470
- | **data_request_id** | **String** | | |
471
- | **event** | [**CreateSubmissionDataRequestEventRequest**](CreateSubmissionDataRequestEventRequest.md) | | |
480
+ | **signature_request_id** | **String** | The signature request's ID. | |
481
+ | **body** | [**CreateSignatureRequestEventRequest**](CreateSignatureRequestEventRequest.md) | The event to record. | |
472
482
 
473
483
  ### Return type
474
484
 
475
- [**CreateSubmissionDataRequestEventResponse**](CreateSubmissionDataRequestEventResponse.md)
485
+ [**SignatureRequestEvent**](SignatureRequestEvent.md)
476
486
 
477
487
  ### Authorization
478
488
 
@@ -484,13 +494,13 @@ end
484
494
  - **Accept**: application/json
485
495
 
486
496
 
487
- ## create_data_request_token
497
+ ## create_signature_request_token
488
498
 
489
- > <CreateSubmissionDataRequestTokenResponse> create_data_request_token(data_request_id, opts)
499
+ > <SignatureRequestToken> create_signature_request_token(signature_request_id, opts)
490
500
 
491
- Create a new data request token for form authentication
501
+ Create a signature request token
492
502
 
493
- Creates an authentication token for accessing a data request form. Returns a token and a pre-authenticated URL for the data request form. The token remains valid until the data request is completed. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)
503
+ Creates a token that opens the signature request without signing in, in a form embedded in your app or from a link you send. The response is the only time the token's secret is returned. The link works for 24 hours, or 7 days for an `email` token, and a signing page that opened in time keeps working for 7 more days. A test API token can't create a token for a live signature request.
494
504
 
495
505
  ### Examples
496
506
 
@@ -505,35 +515,35 @@ DocSpring.configure do |config|
505
515
  end
506
516
 
507
517
  api_instance = DocSpring::Client.new
508
- data_request_id = 'drq_1234567890abcdef01' # String |
518
+ signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
509
519
  opts = {
510
- type: 'api' # String |
520
+ body: DocSpring::CreateSignatureRequestTokenRequest.new # CreateSignatureRequestTokenRequest | The kind of link to make. Send no body for an `api` token.
511
521
  }
512
522
 
513
523
  begin
514
- # Create a new data request token for form authentication
515
- result = api_instance.create_data_request_token(data_request_id, opts)
524
+ # Create a signature request token
525
+ result = api_instance.create_signature_request_token(signature_request_id, opts)
516
526
  p result
517
527
  rescue DocSpring::ApiError => e
518
- puts "Error when calling Client->create_data_request_token: #{e}"
528
+ puts "Error when calling Client->create_signature_request_token: #{e}"
519
529
  end
520
530
  ```
521
531
 
522
- #### Using the create_data_request_token_with_http_info variant
532
+ #### Using the create_signature_request_token_with_http_info variant
523
533
 
524
534
  This returns an Array which contains the response data, status code and headers.
525
535
 
526
- > <Array(<CreateSubmissionDataRequestTokenResponse>, Integer, Hash)> create_data_request_token_with_http_info(data_request_id, opts)
536
+ > <Array(<SignatureRequestToken>, Integer, Hash)> create_signature_request_token_with_http_info(signature_request_id, opts)
527
537
 
528
538
  ```ruby
529
539
  begin
530
- # Create a new data request token for form authentication
531
- data, status_code, headers = api_instance.create_data_request_token_with_http_info(data_request_id, opts)
540
+ # Create a signature request token
541
+ data, status_code, headers = api_instance.create_signature_request_token_with_http_info(signature_request_id, opts)
532
542
  p status_code # => 2xx
533
543
  p headers # => { ... }
534
- p data # => <CreateSubmissionDataRequestTokenResponse>
544
+ p data # => <SignatureRequestToken>
535
545
  rescue DocSpring::ApiError => e
536
- puts "Error when calling Client->create_data_request_token_with_http_info: #{e}"
546
+ puts "Error when calling Client->create_signature_request_token_with_http_info: #{e}"
537
547
  end
538
548
  ```
539
549
 
@@ -541,12 +551,12 @@ end
541
551
 
542
552
  | Name | Type | Description | Notes |
543
553
  | ---- | ---- | ----------- | ----- |
544
- | **data_request_id** | **String** | | |
545
- | **type** | **String** | | [optional] |
554
+ | **signature_request_id** | **String** | The signature request's ID. | |
555
+ | **body** | [**CreateSignatureRequestTokenRequest**](CreateSignatureRequestTokenRequest.md) | The kind of link to make. Send no body for an `api` token. | [optional] |
546
556
 
547
557
  ### Return type
548
558
 
549
- [**CreateSubmissionDataRequestTokenResponse**](CreateSubmissionDataRequestTokenResponse.md)
559
+ [**SignatureRequestToken**](SignatureRequestToken.md)
550
560
 
551
561
  ### Authorization
552
562
 
@@ -554,17 +564,17 @@ end
554
564
 
555
565
  ### HTTP request headers
556
566
 
557
- - **Content-Type**: Not defined
567
+ - **Content-Type**: application/json
558
568
  - **Accept**: application/json
559
569
 
560
570
 
561
- ## create_folder
571
+ ## create_submission
562
572
 
563
- > <Folder> create_folder(data)
573
+ > <Submission> create_submission(template_id, body, opts)
564
574
 
565
- Create a folder
575
+ Generate a PDF
566
576
 
567
- Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.
577
+ Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
568
578
 
569
579
  ### Examples
570
580
 
@@ -579,32 +589,37 @@ DocSpring.configure do |config|
579
589
  end
580
590
 
581
591
  api_instance = DocSpring::Client.new
582
- data = DocSpring::CreateFolderData.new({folder: 3.56}) # CreateFolderData |
592
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
593
+ body = DocSpring::CreateSubmissionRequest.new # CreateSubmissionRequest | The submission's data and settings.
594
+ opts = {
595
+ version: 'version_example', # String | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
596
+ wait: true # Boolean | Wait until the files have been generated before responding. Default true on sync.api hosts.
597
+ }
583
598
 
584
599
  begin
585
- # Create a folder
586
- result = api_instance.create_folder(data)
600
+ # Generate a PDF
601
+ result = api_instance.create_submission(template_id, body, opts)
587
602
  p result
588
603
  rescue DocSpring::ApiError => e
589
- puts "Error when calling Client->create_folder: #{e}"
604
+ puts "Error when calling Client->create_submission: #{e}"
590
605
  end
591
606
  ```
592
607
 
593
- #### Using the create_folder_with_http_info variant
608
+ #### Using the create_submission_with_http_info variant
594
609
 
595
610
  This returns an Array which contains the response data, status code and headers.
596
611
 
597
- > <Array(<Folder>, Integer, Hash)> create_folder_with_http_info(data)
612
+ > <Array(<Submission>, Integer, Hash)> create_submission_with_http_info(template_id, body, opts)
598
613
 
599
614
  ```ruby
600
615
  begin
601
- # Create a folder
602
- data, status_code, headers = api_instance.create_folder_with_http_info(data)
616
+ # Generate a PDF
617
+ data, status_code, headers = api_instance.create_submission_with_http_info(template_id, body, opts)
603
618
  p status_code # => 2xx
604
619
  p headers # => { ... }
605
- p data # => <Folder>
620
+ p data # => <Submission>
606
621
  rescue DocSpring::ApiError => e
607
- puts "Error when calling Client->create_folder_with_http_info: #{e}"
622
+ puts "Error when calling Client->create_submission_with_http_info: #{e}"
608
623
  end
609
624
  ```
610
625
 
@@ -612,11 +627,14 @@ end
612
627
 
613
628
  | Name | Type | Description | Notes |
614
629
  | ---- | ---- | ----------- | ----- |
615
- | **data** | [**CreateFolderData**](CreateFolderData.md) | | |
630
+ | **template_id** | **String** | The template's ID. | |
631
+ | **body** | [**CreateSubmissionRequest**](CreateSubmissionRequest.md) | The submission's data and settings. | |
632
+ | **version** | **String** | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published). | [optional] |
633
+ | **wait** | **Boolean** | Wait until the files have been generated before responding. Default true on sync.api hosts. | [optional] |
616
634
 
617
635
  ### Return type
618
636
 
619
- [**Folder**](Folder.md)
637
+ [**Submission**](Submission.md)
620
638
 
621
639
  ### Authorization
622
640
 
@@ -628,13 +646,13 @@ end
628
646
  - **Accept**: application/json
629
647
 
630
648
 
631
- ## create_html_template
649
+ ## create_submission_batch
632
650
 
633
- > <TemplatePreview> create_html_template(data)
651
+ > <SubmissionBatch> create_submission_batch(body, opts)
634
652
 
635
- Create a new HTML template
653
+ Generate PDFs in a batch
636
654
 
637
- Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.
655
+ Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
638
656
 
639
657
  ### Examples
640
658
 
@@ -649,32 +667,35 @@ DocSpring.configure do |config|
649
667
  end
650
668
 
651
669
  api_instance = DocSpring::Client.new
652
- data = DocSpring::CreateHtmlTemplate.new({template: 3.56}) # CreateHtmlTemplate |
670
+ body = DocSpring::CreateSubmissionBatchRequest.new({submissions: [DocSpring::SubmissionInput.new]}) # CreateSubmissionBatchRequest | The submissions to create, and the settings they share.
671
+ opts = {
672
+ wait: true # Boolean | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
673
+ }
653
674
 
654
675
  begin
655
- # Create a new HTML template
656
- result = api_instance.create_html_template(data)
676
+ # Generate PDFs in a batch
677
+ result = api_instance.create_submission_batch(body, opts)
657
678
  p result
658
679
  rescue DocSpring::ApiError => e
659
- puts "Error when calling Client->create_html_template: #{e}"
680
+ puts "Error when calling Client->create_submission_batch: #{e}"
660
681
  end
661
682
  ```
662
683
 
663
- #### Using the create_html_template_with_http_info variant
684
+ #### Using the create_submission_batch_with_http_info variant
664
685
 
665
686
  This returns an Array which contains the response data, status code and headers.
666
687
 
667
- > <Array(<TemplatePreview>, Integer, Hash)> create_html_template_with_http_info(data)
688
+ > <Array(<SubmissionBatch>, Integer, Hash)> create_submission_batch_with_http_info(body, opts)
668
689
 
669
690
  ```ruby
670
691
  begin
671
- # Create a new HTML template
672
- data, status_code, headers = api_instance.create_html_template_with_http_info(data)
692
+ # Generate PDFs in a batch
693
+ data, status_code, headers = api_instance.create_submission_batch_with_http_info(body, opts)
673
694
  p status_code # => 2xx
674
695
  p headers # => { ... }
675
- p data # => <TemplatePreview>
696
+ p data # => <SubmissionBatch>
676
697
  rescue DocSpring::ApiError => e
677
- puts "Error when calling Client->create_html_template_with_http_info: #{e}"
698
+ puts "Error when calling Client->create_submission_batch_with_http_info: #{e}"
678
699
  end
679
700
  ```
680
701
 
@@ -682,11 +703,12 @@ end
682
703
 
683
704
  | Name | Type | Description | Notes |
684
705
  | ---- | ---- | ----------- | ----- |
685
- | **data** | [**CreateHtmlTemplate**](CreateHtmlTemplate.md) | | |
706
+ | **body** | [**CreateSubmissionBatchRequest**](CreateSubmissionBatchRequest.md) | The submissions to create, and the settings they share. | |
707
+ | **wait** | **Boolean** | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts. | [optional] |
686
708
 
687
709
  ### Return type
688
710
 
689
- [**TemplatePreview**](TemplatePreview.md)
711
+ [**SubmissionBatch**](SubmissionBatch.md)
690
712
 
691
713
  ### Authorization
692
714
 
@@ -698,13 +720,13 @@ end
698
720
  - **Accept**: application/json
699
721
 
700
722
 
701
- ## create_pdf_template
723
+ ## create_template
702
724
 
703
- > <TemplatePreview> create_pdf_template(template_document, template_name, opts)
725
+ > <Template> create_template(body, opts)
704
726
 
705
- Create a new PDF template with a form POST file upload
727
+ Create a template
706
728
 
707
- Creates a new PDF template by uploading a PDF file. The uploaded PDF becomes the foundation for your template, and you can then add fillable fields using the template editor. Use the wait parameter to control whether the request waits for document processing to complete.
729
+ Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
708
730
 
709
731
  ### Examples
710
732
 
@@ -719,38 +741,35 @@ DocSpring.configure do |config|
719
741
  end
720
742
 
721
743
  api_instance = DocSpring::Client.new
722
- template_document = File.new('/path/to/some/file') # File |
723
- template_name = 'template_name_example' # String |
744
+ body = DocSpring::CreateTemplateRequest.new({template_type: DocSpring::TemplateType::PDF}) # CreateTemplateRequest | The template to create.
724
745
  opts = {
725
- wait: true, # Boolean | Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
726
- template_description: 'template_description_example', # String |
727
- template_parent_folder_id: 'template_parent_folder_id_example' # String |
746
+ wait: true # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
728
747
  }
729
748
 
730
749
  begin
731
- # Create a new PDF template with a form POST file upload
732
- result = api_instance.create_pdf_template(template_document, template_name, opts)
750
+ # Create a template
751
+ result = api_instance.create_template(body, opts)
733
752
  p result
734
753
  rescue DocSpring::ApiError => e
735
- puts "Error when calling Client->create_pdf_template: #{e}"
754
+ puts "Error when calling Client->create_template: #{e}"
736
755
  end
737
756
  ```
738
757
 
739
- #### Using the create_pdf_template_with_http_info variant
758
+ #### Using the create_template_with_http_info variant
740
759
 
741
760
  This returns an Array which contains the response data, status code and headers.
742
761
 
743
- > <Array(<TemplatePreview>, Integer, Hash)> create_pdf_template_with_http_info(template_document, template_name, opts)
762
+ > <Array(<Template>, Integer, Hash)> create_template_with_http_info(body, opts)
744
763
 
745
764
  ```ruby
746
765
  begin
747
- # Create a new PDF template with a form POST file upload
748
- data, status_code, headers = api_instance.create_pdf_template_with_http_info(template_document, template_name, opts)
766
+ # Create a template
767
+ data, status_code, headers = api_instance.create_template_with_http_info(body, opts)
749
768
  p status_code # => 2xx
750
769
  p headers # => { ... }
751
- p data # => <TemplatePreview>
770
+ p data # => <Template>
752
771
  rescue DocSpring::ApiError => e
753
- puts "Error when calling Client->create_pdf_template_with_http_info: #{e}"
772
+ puts "Error when calling Client->create_template_with_http_info: #{e}"
754
773
  end
755
774
  ```
756
775
 
@@ -758,15 +777,12 @@ end
758
777
 
759
778
  | Name | Type | Description | Notes |
760
779
  | ---- | ---- | ----------- | ----- |
761
- | **template_document** | **File** | | |
762
- | **template_name** | **String** | | |
763
- | **wait** | **Boolean** | Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) | [optional][default to true] |
764
- | **template_description** | **String** | | [optional] |
765
- | **template_parent_folder_id** | **String** | | [optional] |
780
+ | **body** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | The template to create. | |
781
+ | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
766
782
 
767
783
  ### Return type
768
784
 
769
- [**TemplatePreview**](TemplatePreview.md)
785
+ [**Template**](Template.md)
770
786
 
771
787
  ### Authorization
772
788
 
@@ -774,17 +790,17 @@ end
774
790
 
775
791
  ### HTTP request headers
776
792
 
777
- - **Content-Type**: multipart/form-data
793
+ - **Content-Type**: application/json
778
794
  - **Accept**: application/json
779
795
 
780
796
 
781
- ## create_pdf_template_from_upload
797
+ ## create_webhook
782
798
 
783
- > <TemplatePreview> create_pdf_template_from_upload(data)
799
+ > <Webhook> create_webhook(body)
784
800
 
785
- Create a new PDF template from a cached S3 file upload
801
+ Create a webhook
786
802
 
787
- Creates a new PDF template from a file previously uploaded to S3 using a presigned URL. This two-step process allows for more reliable large file uploads by first uploading the file to S3, then creating the template using the cached upload ID.
803
+ Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
788
804
 
789
805
  ### Examples
790
806
 
@@ -799,32 +815,32 @@ DocSpring.configure do |config|
799
815
  end
800
816
 
801
817
  api_instance = DocSpring::Client.new
802
- data = DocSpring::CreatePdfTemplate.new({template: 3.56}) # CreatePdfTemplate |
818
+ body = DocSpring::CreateWebhookRequest.new({url: 'url_example', event_types: [DocSpring::WebhookEventType::SUBMISSION_PROCESSED]}) # CreateWebhookRequest | The webhook to create.
803
819
 
804
820
  begin
805
- # Create a new PDF template from a cached S3 file upload
806
- result = api_instance.create_pdf_template_from_upload(data)
821
+ # Create a webhook
822
+ result = api_instance.create_webhook(body)
807
823
  p result
808
824
  rescue DocSpring::ApiError => e
809
- puts "Error when calling Client->create_pdf_template_from_upload: #{e}"
825
+ puts "Error when calling Client->create_webhook: #{e}"
810
826
  end
811
827
  ```
812
828
 
813
- #### Using the create_pdf_template_from_upload_with_http_info variant
829
+ #### Using the create_webhook_with_http_info variant
814
830
 
815
831
  This returns an Array which contains the response data, status code and headers.
816
832
 
817
- > <Array(<TemplatePreview>, Integer, Hash)> create_pdf_template_from_upload_with_http_info(data)
833
+ > <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(body)
818
834
 
819
835
  ```ruby
820
836
  begin
821
- # Create a new PDF template from a cached S3 file upload
822
- data, status_code, headers = api_instance.create_pdf_template_from_upload_with_http_info(data)
837
+ # Create a webhook
838
+ data, status_code, headers = api_instance.create_webhook_with_http_info(body)
823
839
  p status_code # => 2xx
824
840
  p headers # => { ... }
825
- p data # => <TemplatePreview>
841
+ p data # => <Webhook>
826
842
  rescue DocSpring::ApiError => e
827
- puts "Error when calling Client->create_pdf_template_from_upload_with_http_info: #{e}"
843
+ puts "Error when calling Client->create_webhook_with_http_info: #{e}"
828
844
  end
829
845
  ```
830
846
 
@@ -832,11 +848,11 @@ end
832
848
 
833
849
  | Name | Type | Description | Notes |
834
850
  | ---- | ---- | ----------- | ----- |
835
- | **data** | [**CreatePdfTemplate**](CreatePdfTemplate.md) | | |
851
+ | **body** | [**CreateWebhookRequest**](CreateWebhookRequest.md) | The webhook to create. | |
836
852
 
837
853
  ### Return type
838
854
 
839
- [**TemplatePreview**](TemplatePreview.md)
855
+ [**Webhook**](Webhook.md)
840
856
 
841
857
  ### Authorization
842
858
 
@@ -848,13 +864,13 @@ end
848
864
  - **Accept**: application/json
849
865
 
850
866
 
851
- ## create_webhook
867
+ ## delete_custom_file
852
868
 
853
- > <Webhook> create_webhook(data)
869
+ > <CustomFile> delete_custom_file(custom_file_id)
854
870
 
855
- Create a webhook
871
+ Delete a custom file
856
872
 
857
- Creates a webhook that delivers a POST request to your endpoint whenever a subscribed event occurs. Optionally scope the webhook to specific API tokens, templates, or folders.
873
+ Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
858
874
 
859
875
  ### Examples
860
876
 
@@ -869,32 +885,32 @@ DocSpring.configure do |config|
869
885
  end
870
886
 
871
887
  api_instance = DocSpring::Client.new
872
- data = DocSpring::CreateWebhookData.new({webhook: 3.56}) # CreateWebhookData |
888
+ custom_file_id = 'custom_file_id_example' # String | The custom file's ID.
873
889
 
874
890
  begin
875
- # Create a webhook
876
- result = api_instance.create_webhook(data)
891
+ # Delete a custom file
892
+ result = api_instance.delete_custom_file(custom_file_id)
877
893
  p result
878
894
  rescue DocSpring::ApiError => e
879
- puts "Error when calling Client->create_webhook: #{e}"
895
+ puts "Error when calling Client->delete_custom_file: #{e}"
880
896
  end
881
897
  ```
882
898
 
883
- #### Using the create_webhook_with_http_info variant
899
+ #### Using the delete_custom_file_with_http_info variant
884
900
 
885
901
  This returns an Array which contains the response data, status code and headers.
886
902
 
887
- > <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(data)
903
+ > <Array(<CustomFile>, Integer, Hash)> delete_custom_file_with_http_info(custom_file_id)
888
904
 
889
905
  ```ruby
890
906
  begin
891
- # Create a webhook
892
- data, status_code, headers = api_instance.create_webhook_with_http_info(data)
907
+ # Delete a custom file
908
+ data, status_code, headers = api_instance.delete_custom_file_with_http_info(custom_file_id)
893
909
  p status_code # => 2xx
894
910
  p headers # => { ... }
895
- p data # => <Webhook>
911
+ p data # => <CustomFile>
896
912
  rescue DocSpring::ApiError => e
897
- puts "Error when calling Client->create_webhook_with_http_info: #{e}"
913
+ puts "Error when calling Client->delete_custom_file_with_http_info: #{e}"
898
914
  end
899
915
  ```
900
916
 
@@ -902,11 +918,11 @@ end
902
918
 
903
919
  | Name | Type | Description | Notes |
904
920
  | ---- | ---- | ----------- | ----- |
905
- | **data** | [**CreateWebhookData**](CreateWebhookData.md) | | |
921
+ | **custom_file_id** | **String** | The custom file's ID. | |
906
922
 
907
923
  ### Return type
908
924
 
909
- [**Webhook**](Webhook.md)
925
+ [**CustomFile**](CustomFile.md)
910
926
 
911
927
  ### Authorization
912
928
 
@@ -914,7 +930,7 @@ end
914
930
 
915
931
  ### HTTP request headers
916
932
 
917
- - **Content-Type**: application/json
933
+ - **Content-Type**: Not defined
918
934
  - **Accept**: application/json
919
935
 
920
936
 
@@ -924,7 +940,7 @@ end
924
940
 
925
941
  Delete a folder
926
942
 
927
- Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.
943
+ Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
928
944
 
929
945
  ### Examples
930
946
 
@@ -939,7 +955,7 @@ DocSpring.configure do |config|
939
955
  end
940
956
 
941
957
  api_instance = DocSpring::Client.new
942
- folder_id = 'fld_1234567890abcdef01' # String |
958
+ folder_id = 'folder_id_example' # String | The folder's ID.
943
959
 
944
960
  begin
945
961
  # Delete a folder
@@ -972,7 +988,7 @@ end
972
988
 
973
989
  | Name | Type | Description | Notes |
974
990
  | ---- | ---- | ----------- | ----- |
975
- | **folder_id** | **String** | | |
991
+ | **folder_id** | **String** | The folder's ID. | |
976
992
 
977
993
  ### Return type
978
994
 
@@ -990,11 +1006,11 @@ end
990
1006
 
991
1007
  ## delete_template
992
1008
 
993
- > <TemplateDeleteResponse> delete_template(template_id, opts)
1009
+ > <Template> delete_template(template_id, opts)
994
1010
 
995
1011
  Delete a template
996
1012
 
997
- Deletes a template or a specific template version. When no version is specified, deletes the entire template including all versions. When a version is specified, deletes only that version while preserving others. Returns remaining version information.
1013
+ Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
998
1014
 
999
1015
  ### Examples
1000
1016
 
@@ -1009,9 +1025,9 @@ DocSpring.configure do |config|
1009
1025
  end
1010
1026
 
1011
1027
  api_instance = DocSpring::Client.new
1012
- template_id = 'tpl_1234567890abcdef01' # String |
1028
+ template_id = 'tpl_1234567890abcdef02' # String | The template's ID.
1013
1029
  opts = {
1014
- version: '0.1.0' # String |
1030
+ version: 'version_example' # String | Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
1015
1031
  }
1016
1032
 
1017
1033
  begin
@@ -1027,7 +1043,7 @@ end
1027
1043
 
1028
1044
  This returns an Array which contains the response data, status code and headers.
1029
1045
 
1030
- > <Array(<TemplateDeleteResponse>, Integer, Hash)> delete_template_with_http_info(template_id, opts)
1046
+ > <Array(<Template>, Integer, Hash)> delete_template_with_http_info(template_id, opts)
1031
1047
 
1032
1048
  ```ruby
1033
1049
  begin
@@ -1035,7 +1051,7 @@ begin
1035
1051
  data, status_code, headers = api_instance.delete_template_with_http_info(template_id, opts)
1036
1052
  p status_code # => 2xx
1037
1053
  p headers # => { ... }
1038
- p data # => <TemplateDeleteResponse>
1054
+ p data # => <Template>
1039
1055
  rescue DocSpring::ApiError => e
1040
1056
  puts "Error when calling Client->delete_template_with_http_info: #{e}"
1041
1057
  end
@@ -1045,12 +1061,12 @@ end
1045
1061
 
1046
1062
  | Name | Type | Description | Notes |
1047
1063
  | ---- | ---- | ----------- | ----- |
1048
- | **template_id** | **String** | | |
1049
- | **version** | **String** | | [optional] |
1064
+ | **template_id** | **String** | The template's ID. | |
1065
+ | **version** | **String** | Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted. | [optional] |
1050
1066
 
1051
1067
  ### Return type
1052
1068
 
1053
- [**TemplateDeleteResponse**](TemplateDeleteResponse.md)
1069
+ [**Template**](Template.md)
1054
1070
 
1055
1071
  ### Authorization
1056
1072
 
@@ -1068,7 +1084,7 @@ end
1068
1084
 
1069
1085
  Delete a webhook
1070
1086
 
1071
- Permanently deletes a webhook so it stops receiving events, and returns the deleted webhook.
1087
+ Deletes a webhook so it stops receiving events, and returns it.
1072
1088
 
1073
1089
  ### Examples
1074
1090
 
@@ -1083,7 +1099,7 @@ DocSpring.configure do |config|
1083
1099
  end
1084
1100
 
1085
1101
  api_instance = DocSpring::Client.new
1086
- webhook_id = 'whk_1234567890abcdef01' # String |
1102
+ webhook_id = 'webhook_id_example' # String | The webhook's ID.
1087
1103
 
1088
1104
  begin
1089
1105
  # Delete a webhook
@@ -1116,7 +1132,7 @@ end
1116
1132
 
1117
1133
  | Name | Type | Description | Notes |
1118
1134
  | ---- | ---- | ----------- | ----- |
1119
- | **webhook_id** | **String** | | |
1135
+ | **webhook_id** | **String** | The webhook's ID. | |
1120
1136
 
1121
1137
  ### Return type
1122
1138
 
@@ -1132,13 +1148,13 @@ end
1132
1148
  - **Accept**: application/json
1133
1149
 
1134
1150
 
1135
- ## expire_combined_submission
1151
+ ## expire_combined_pdf
1136
1152
 
1137
- > <CombinedSubmission> expire_combined_submission(combined_submission_id)
1153
+ > <CombinedPdf> expire_combined_pdf(combined_pdf_id)
1138
1154
 
1139
- Expire a combined submission
1155
+ Expire a combined PDF
1140
1156
 
1141
- Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.
1157
+ Deletes a combined PDF's PDF and returns the expired combined PDF.
1142
1158
 
1143
1159
  ### Examples
1144
1160
 
@@ -1153,32 +1169,32 @@ DocSpring.configure do |config|
1153
1169
  end
1154
1170
 
1155
1171
  api_instance = DocSpring::Client.new
1156
- combined_submission_id = 'com_1234567890abcdef01' # String |
1172
+ combined_pdf_id = 'com_1234567890abcdef05' # String | The combined PDF's ID.
1157
1173
 
1158
1174
  begin
1159
- # Expire a combined submission
1160
- result = api_instance.expire_combined_submission(combined_submission_id)
1175
+ # Expire a combined PDF
1176
+ result = api_instance.expire_combined_pdf(combined_pdf_id)
1161
1177
  p result
1162
1178
  rescue DocSpring::ApiError => e
1163
- puts "Error when calling Client->expire_combined_submission: #{e}"
1179
+ puts "Error when calling Client->expire_combined_pdf: #{e}"
1164
1180
  end
1165
1181
  ```
1166
1182
 
1167
- #### Using the expire_combined_submission_with_http_info variant
1183
+ #### Using the expire_combined_pdf_with_http_info variant
1168
1184
 
1169
1185
  This returns an Array which contains the response data, status code and headers.
1170
1186
 
1171
- > <Array(<CombinedSubmission>, Integer, Hash)> expire_combined_submission_with_http_info(combined_submission_id)
1187
+ > <Array(<CombinedPdf>, Integer, Hash)> expire_combined_pdf_with_http_info(combined_pdf_id)
1172
1188
 
1173
1189
  ```ruby
1174
1190
  begin
1175
- # Expire a combined submission
1176
- data, status_code, headers = api_instance.expire_combined_submission_with_http_info(combined_submission_id)
1191
+ # Expire a combined PDF
1192
+ data, status_code, headers = api_instance.expire_combined_pdf_with_http_info(combined_pdf_id)
1177
1193
  p status_code # => 2xx
1178
1194
  p headers # => { ... }
1179
- p data # => <CombinedSubmission>
1195
+ p data # => <CombinedPdf>
1180
1196
  rescue DocSpring::ApiError => e
1181
- puts "Error when calling Client->expire_combined_submission_with_http_info: #{e}"
1197
+ puts "Error when calling Client->expire_combined_pdf_with_http_info: #{e}"
1182
1198
  end
1183
1199
  ```
1184
1200
 
@@ -1186,11 +1202,11 @@ end
1186
1202
 
1187
1203
  | Name | Type | Description | Notes |
1188
1204
  | ---- | ---- | ----------- | ----- |
1189
- | **combined_submission_id** | **String** | | |
1205
+ | **combined_pdf_id** | **String** | The combined PDF's ID. | |
1190
1206
 
1191
1207
  ### Return type
1192
1208
 
1193
- [**CombinedSubmission**](CombinedSubmission.md)
1209
+ [**CombinedPdf**](CombinedPdf.md)
1194
1210
 
1195
1211
  ### Authorization
1196
1212
 
@@ -1204,11 +1220,11 @@ end
1204
1220
 
1205
1221
  ## expire_submission
1206
1222
 
1207
- > <SubmissionPreview> expire_submission(submission_id)
1223
+ > <Submission> expire_submission(submission_id)
1208
1224
 
1209
- Expire a PDF submission
1225
+ Expire a submission
1210
1226
 
1211
- Expiring a PDF submission deletes the PDF and removes the data from our database. This is useful for invalidating sensitive documents after they've been downloaded. You can also [configure a data retention policy for your submissions](https://docspring.com/docs/template-editor/settings/#expire-submissions) so that they automatically expire.
1227
+ Deletes a submission's data and PDF now, and returns the expired submission.
1212
1228
 
1213
1229
  ### Examples
1214
1230
 
@@ -1223,10 +1239,10 @@ DocSpring.configure do |config|
1223
1239
  end
1224
1240
 
1225
1241
  api_instance = DocSpring::Client.new
1226
- submission_id = 'sub_1234567890abcdef01' # String |
1242
+ submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
1227
1243
 
1228
1244
  begin
1229
- # Expire a PDF submission
1245
+ # Expire a submission
1230
1246
  result = api_instance.expire_submission(submission_id)
1231
1247
  p result
1232
1248
  rescue DocSpring::ApiError => e
@@ -1238,15 +1254,15 @@ end
1238
1254
 
1239
1255
  This returns an Array which contains the response data, status code and headers.
1240
1256
 
1241
- > <Array(<SubmissionPreview>, Integer, Hash)> expire_submission_with_http_info(submission_id)
1257
+ > <Array(<Submission>, Integer, Hash)> expire_submission_with_http_info(submission_id)
1242
1258
 
1243
1259
  ```ruby
1244
1260
  begin
1245
- # Expire a PDF submission
1261
+ # Expire a submission
1246
1262
  data, status_code, headers = api_instance.expire_submission_with_http_info(submission_id)
1247
1263
  p status_code # => 2xx
1248
1264
  p headers # => { ... }
1249
- p data # => <SubmissionPreview>
1265
+ p data # => <Submission>
1250
1266
  rescue DocSpring::ApiError => e
1251
1267
  puts "Error when calling Client->expire_submission_with_http_info: #{e}"
1252
1268
  end
@@ -1256,11 +1272,11 @@ end
1256
1272
 
1257
1273
  | Name | Type | Description | Notes |
1258
1274
  | ---- | ---- | ----------- | ----- |
1259
- | **submission_id** | **String** | | |
1275
+ | **submission_id** | **String** | The submission's ID. | |
1260
1276
 
1261
1277
  ### Return type
1262
1278
 
1263
- [**SubmissionPreview**](SubmissionPreview.md)
1279
+ [**Submission**](Submission.md)
1264
1280
 
1265
1281
  ### Authorization
1266
1282
 
@@ -1272,13 +1288,13 @@ end
1272
1288
  - **Accept**: application/json
1273
1289
 
1274
1290
 
1275
- ## generate_pdf
1291
+ ## generate_submission_files
1276
1292
 
1277
- > <CreateSubmissionResponse> generate_pdf(template_id, submission, opts)
1293
+ > <Submission> generate_submission_files(submission_id, body, opts)
1278
1294
 
1279
- Generate a PDF
1295
+ Generate more files
1280
1296
 
1281
- Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
1297
+ Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
1282
1298
 
1283
1299
  ### Examples
1284
1300
 
@@ -1293,36 +1309,36 @@ DocSpring.configure do |config|
1293
1309
  end
1294
1310
 
1295
1311
  api_instance = DocSpring::Client.new
1296
- template_id = 'tpl_1234567890abcdef01' # String |
1297
- submission = DocSpring::CreatePdfSubmissionData.new({data: 3.56}) # CreatePdfSubmissionData |
1312
+ submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
1313
+ body = DocSpring::GenerateSubmissionFilesRequest.new({formats: [DocSpring::GenerateFilesFormat::PNG]}) # GenerateSubmissionFilesRequest | The formats to make.
1298
1314
  opts = {
1299
- wait: true # Boolean | Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
1315
+ wait: true # Boolean | Wait until the files have been generated before responding. Default true on sync.api hosts.
1300
1316
  }
1301
1317
 
1302
1318
  begin
1303
- # Generate a PDF
1304
- result = api_instance.generate_pdf(template_id, submission, opts)
1319
+ # Generate more files
1320
+ result = api_instance.generate_submission_files(submission_id, body, opts)
1305
1321
  p result
1306
1322
  rescue DocSpring::ApiError => e
1307
- puts "Error when calling Client->generate_pdf: #{e}"
1323
+ puts "Error when calling Client->generate_submission_files: #{e}"
1308
1324
  end
1309
1325
  ```
1310
1326
 
1311
- #### Using the generate_pdf_with_http_info variant
1327
+ #### Using the generate_submission_files_with_http_info variant
1312
1328
 
1313
1329
  This returns an Array which contains the response data, status code and headers.
1314
1330
 
1315
- > <Array(<CreateSubmissionResponse>, Integer, Hash)> generate_pdf_with_http_info(template_id, submission, opts)
1331
+ > <Array(<Submission>, Integer, Hash)> generate_submission_files_with_http_info(submission_id, body, opts)
1316
1332
 
1317
1333
  ```ruby
1318
1334
  begin
1319
- # Generate a PDF
1320
- data, status_code, headers = api_instance.generate_pdf_with_http_info(template_id, submission, opts)
1335
+ # Generate more files
1336
+ data, status_code, headers = api_instance.generate_submission_files_with_http_info(submission_id, body, opts)
1321
1337
  p status_code # => 2xx
1322
1338
  p headers # => { ... }
1323
- p data # => <CreateSubmissionResponse>
1339
+ p data # => <Submission>
1324
1340
  rescue DocSpring::ApiError => e
1325
- puts "Error when calling Client->generate_pdf_with_http_info: #{e}"
1341
+ puts "Error when calling Client->generate_submission_files_with_http_info: #{e}"
1326
1342
  end
1327
1343
  ```
1328
1344
 
@@ -1330,13 +1346,13 @@ end
1330
1346
 
1331
1347
  | Name | Type | Description | Notes |
1332
1348
  | ---- | ---- | ----------- | ----- |
1333
- | **template_id** | **String** | | |
1334
- | **submission** | [**CreatePdfSubmissionData**](CreatePdfSubmissionData.md) | | |
1335
- | **wait** | **Boolean** | Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) | [optional][default to true] |
1349
+ | **submission_id** | **String** | The submission's ID. | |
1350
+ | **body** | [**GenerateSubmissionFilesRequest**](GenerateSubmissionFilesRequest.md) | The formats to make. | |
1351
+ | **wait** | **Boolean** | Wait until the files have been generated before responding. Default true on sync.api hosts. | [optional] |
1336
1352
 
1337
1353
  ### Return type
1338
1354
 
1339
- [**CreateSubmissionResponse**](CreateSubmissionResponse.md)
1355
+ [**Submission**](Submission.md)
1340
1356
 
1341
1357
  ### Authorization
1342
1358
 
@@ -1348,13 +1364,13 @@ end
1348
1364
  - **Accept**: application/json
1349
1365
 
1350
1366
 
1351
- ## generate_preview
1367
+ ## generate_submission_preview
1352
1368
 
1353
- > <SuccessErrorResponse> generate_preview(submission_id)
1369
+ > <Submission> generate_submission_preview(submission_id)
1354
1370
 
1355
- Generate a preview PDF for partially completed data requests
1371
+ Generate a preview PDF
1356
1372
 
1357
- Generates a preview PDF for a submission with partially completed data requests. Useful for showing users what the final document will look like before all signatures or data have been collected. The preview includes any data collected so far.
1373
+ Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
1358
1374
 
1359
1375
  ### Examples
1360
1376
 
@@ -1369,32 +1385,32 @@ DocSpring.configure do |config|
1369
1385
  end
1370
1386
 
1371
1387
  api_instance = DocSpring::Client.new
1372
- submission_id = 'sub_1234567890abcdef01' # String |
1388
+ submission_id = 'sub_1234567890abcdef03' # String | The submission's ID.
1373
1389
 
1374
1390
  begin
1375
- # Generate a preview PDF for partially completed data requests
1376
- result = api_instance.generate_preview(submission_id)
1391
+ # Generate a preview PDF
1392
+ result = api_instance.generate_submission_preview(submission_id)
1377
1393
  p result
1378
1394
  rescue DocSpring::ApiError => e
1379
- puts "Error when calling Client->generate_preview: #{e}"
1395
+ puts "Error when calling Client->generate_submission_preview: #{e}"
1380
1396
  end
1381
1397
  ```
1382
1398
 
1383
- #### Using the generate_preview_with_http_info variant
1399
+ #### Using the generate_submission_preview_with_http_info variant
1384
1400
 
1385
1401
  This returns an Array which contains the response data, status code and headers.
1386
1402
 
1387
- > <Array(<SuccessErrorResponse>, Integer, Hash)> generate_preview_with_http_info(submission_id)
1403
+ > <Array(<Submission>, Integer, Hash)> generate_submission_preview_with_http_info(submission_id)
1388
1404
 
1389
1405
  ```ruby
1390
1406
  begin
1391
- # Generate a preview PDF for partially completed data requests
1392
- data, status_code, headers = api_instance.generate_preview_with_http_info(submission_id)
1407
+ # Generate a preview PDF
1408
+ data, status_code, headers = api_instance.generate_submission_preview_with_http_info(submission_id)
1393
1409
  p status_code # => 2xx
1394
1410
  p headers # => { ... }
1395
- p data # => <SuccessErrorResponse>
1411
+ p data # => <Submission>
1396
1412
  rescue DocSpring::ApiError => e
1397
- puts "Error when calling Client->generate_preview_with_http_info: #{e}"
1413
+ puts "Error when calling Client->generate_submission_preview_with_http_info: #{e}"
1398
1414
  end
1399
1415
  ```
1400
1416
 
@@ -1402,11 +1418,11 @@ end
1402
1418
 
1403
1419
  | Name | Type | Description | Notes |
1404
1420
  | ---- | ---- | ----------- | ----- |
1405
- | **submission_id** | **String** | | |
1421
+ | **submission_id** | **String** | The submission's ID. | |
1406
1422
 
1407
1423
  ### Return type
1408
1424
 
1409
- [**SuccessErrorResponse**](SuccessErrorResponse.md)
1425
+ [**Submission**](Submission.md)
1410
1426
 
1411
1427
  ### Authorization
1412
1428
 
@@ -1418,13 +1434,13 @@ end
1418
1434
  - **Accept**: application/json
1419
1435
 
1420
1436
 
1421
- ## get_combined_submission
1437
+ ## get_combined_pdf
1422
1438
 
1423
- > <CombinedSubmission> get_combined_submission(combined_submission_id)
1439
+ > <CombinedPdf> get_combined_pdf(combined_pdf_id)
1424
1440
 
1425
- Check the status of a combined submission (merged PDFs)
1441
+ Get a combined PDF
1426
1442
 
1427
- Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads). `insufficient_credits` means the combined submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
1443
+ Returns a combined PDF, with a temporary link to download it once it has been generated.
1428
1444
 
1429
1445
  ### Examples
1430
1446
 
@@ -1439,32 +1455,32 @@ DocSpring.configure do |config|
1439
1455
  end
1440
1456
 
1441
1457
  api_instance = DocSpring::Client.new
1442
- combined_submission_id = 'com_1234567890abcdef01' # String |
1458
+ combined_pdf_id = 'com_1234567890abcdef05' # String | The combined PDF's ID.
1443
1459
 
1444
1460
  begin
1445
- # Check the status of a combined submission (merged PDFs)
1446
- result = api_instance.get_combined_submission(combined_submission_id)
1461
+ # Get a combined PDF
1462
+ result = api_instance.get_combined_pdf(combined_pdf_id)
1447
1463
  p result
1448
1464
  rescue DocSpring::ApiError => e
1449
- puts "Error when calling Client->get_combined_submission: #{e}"
1465
+ puts "Error when calling Client->get_combined_pdf: #{e}"
1450
1466
  end
1451
1467
  ```
1452
1468
 
1453
- #### Using the get_combined_submission_with_http_info variant
1469
+ #### Using the get_combined_pdf_with_http_info variant
1454
1470
 
1455
1471
  This returns an Array which contains the response data, status code and headers.
1456
1472
 
1457
- > <Array(<CombinedSubmission>, Integer, Hash)> get_combined_submission_with_http_info(combined_submission_id)
1473
+ > <Array(<CombinedPdf>, Integer, Hash)> get_combined_pdf_with_http_info(combined_pdf_id)
1458
1474
 
1459
1475
  ```ruby
1460
1476
  begin
1461
- # Check the status of a combined submission (merged PDFs)
1462
- data, status_code, headers = api_instance.get_combined_submission_with_http_info(combined_submission_id)
1477
+ # Get a combined PDF
1478
+ data, status_code, headers = api_instance.get_combined_pdf_with_http_info(combined_pdf_id)
1463
1479
  p status_code # => 2xx
1464
1480
  p headers # => { ... }
1465
- p data # => <CombinedSubmission>
1481
+ p data # => <CombinedPdf>
1466
1482
  rescue DocSpring::ApiError => e
1467
- puts "Error when calling Client->get_combined_submission_with_http_info: #{e}"
1483
+ puts "Error when calling Client->get_combined_pdf_with_http_info: #{e}"
1468
1484
  end
1469
1485
  ```
1470
1486
 
@@ -1472,11 +1488,11 @@ end
1472
1488
 
1473
1489
  | Name | Type | Description | Notes |
1474
1490
  | ---- | ---- | ----------- | ----- |
1475
- | **combined_submission_id** | **String** | | |
1491
+ | **combined_pdf_id** | **String** | The combined PDF's ID. | |
1476
1492
 
1477
1493
  ### Return type
1478
1494
 
1479
- [**CombinedSubmission**](CombinedSubmission.md)
1495
+ [**CombinedPdf**](CombinedPdf.md)
1480
1496
 
1481
1497
  ### Authorization
1482
1498
 
@@ -1488,13 +1504,13 @@ end
1488
1504
  - **Accept**: application/json
1489
1505
 
1490
1506
 
1491
- ## get_data_request
1507
+ ## get_custom_file
1492
1508
 
1493
- > <SubmissionDataRequestShow> get_data_request(data_request_id)
1509
+ > <CustomFile> get_custom_file(custom_file_id)
1494
1510
 
1495
- Look up a submission data request
1511
+ Get a custom file
1496
1512
 
1497
- Retrieves the details and status of a data request. Returns information about the request state (pending, viewed, completed), authentication details, and metadata. Includes audit information like IP address, browseruser agent, and timestamps. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow
1513
+ Returns a custom file, with a temporary URL to download it.
1498
1514
 
1499
1515
  ### Examples
1500
1516
 
@@ -1509,32 +1525,32 @@ DocSpring.configure do |config|
1509
1525
  end
1510
1526
 
1511
1527
  api_instance = DocSpring::Client.new
1512
- data_request_id = 'drq_1234567890abcdef01' # String |
1528
+ custom_file_id = 'custom_file_id_example' # String | The custom file's ID.
1513
1529
 
1514
1530
  begin
1515
- # Look up a submission data request
1516
- result = api_instance.get_data_request(data_request_id)
1531
+ # Get a custom file
1532
+ result = api_instance.get_custom_file(custom_file_id)
1517
1533
  p result
1518
1534
  rescue DocSpring::ApiError => e
1519
- puts "Error when calling Client->get_data_request: #{e}"
1535
+ puts "Error when calling Client->get_custom_file: #{e}"
1520
1536
  end
1521
1537
  ```
1522
1538
 
1523
- #### Using the get_data_request_with_http_info variant
1539
+ #### Using the get_custom_file_with_http_info variant
1524
1540
 
1525
1541
  This returns an Array which contains the response data, status code and headers.
1526
1542
 
1527
- > <Array(<SubmissionDataRequestShow>, Integer, Hash)> get_data_request_with_http_info(data_request_id)
1543
+ > <Array(<CustomFile>, Integer, Hash)> get_custom_file_with_http_info(custom_file_id)
1528
1544
 
1529
1545
  ```ruby
1530
1546
  begin
1531
- # Look up a submission data request
1532
- data, status_code, headers = api_instance.get_data_request_with_http_info(data_request_id)
1547
+ # Get a custom file
1548
+ data, status_code, headers = api_instance.get_custom_file_with_http_info(custom_file_id)
1533
1549
  p status_code # => 2xx
1534
1550
  p headers # => { ... }
1535
- p data # => <SubmissionDataRequestShow>
1551
+ p data # => <CustomFile>
1536
1552
  rescue DocSpring::ApiError => e
1537
- puts "Error when calling Client->get_data_request_with_http_info: #{e}"
1553
+ puts "Error when calling Client->get_custom_file_with_http_info: #{e}"
1538
1554
  end
1539
1555
  ```
1540
1556
 
@@ -1542,11 +1558,11 @@ end
1542
1558
 
1543
1559
  | Name | Type | Description | Notes |
1544
1560
  | ---- | ---- | ----------- | ----- |
1545
- | **data_request_id** | **String** | | |
1561
+ | **custom_file_id** | **String** | The custom file's ID. | |
1546
1562
 
1547
1563
  ### Return type
1548
1564
 
1549
- [**SubmissionDataRequestShow**](SubmissionDataRequestShow.md)
1565
+ [**CustomFile**](CustomFile.md)
1550
1566
 
1551
1567
  ### Authorization
1552
1568
 
@@ -1558,13 +1574,13 @@ end
1558
1574
  - **Accept**: application/json
1559
1575
 
1560
1576
 
1561
- ## get_full_template
1577
+ ## get_folder
1562
1578
 
1563
- > <Template> get_full_template(template_id)
1579
+ > <Folder> get_folder(folder_id)
1564
1580
 
1565
- Fetch the full attributes for a PDF template
1581
+ Get a folder
1566
1582
 
1567
- Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content. Use this to get all template data needed for automated updates or analysis. Returns more detailed information than the basic `getTemplate` endpoint.
1583
+ Returns a folder.
1568
1584
 
1569
1585
  ### Examples
1570
1586
 
@@ -1579,32 +1595,32 @@ DocSpring.configure do |config|
1579
1595
  end
1580
1596
 
1581
1597
  api_instance = DocSpring::Client.new
1582
- template_id = 'tpl_1234567890abcdef01' # String |
1598
+ folder_id = 'folder_id_example' # String | The folder's ID.
1583
1599
 
1584
1600
  begin
1585
- # Fetch the full attributes for a PDF template
1586
- result = api_instance.get_full_template(template_id)
1601
+ # Get a folder
1602
+ result = api_instance.get_folder(folder_id)
1587
1603
  p result
1588
1604
  rescue DocSpring::ApiError => e
1589
- puts "Error when calling Client->get_full_template: #{e}"
1605
+ puts "Error when calling Client->get_folder: #{e}"
1590
1606
  end
1591
1607
  ```
1592
1608
 
1593
- #### Using the get_full_template_with_http_info variant
1609
+ #### Using the get_folder_with_http_info variant
1594
1610
 
1595
1611
  This returns an Array which contains the response data, status code and headers.
1596
1612
 
1597
- > <Array(<Template>, Integer, Hash)> get_full_template_with_http_info(template_id)
1613
+ > <Array(<Folder>, Integer, Hash)> get_folder_with_http_info(folder_id)
1598
1614
 
1599
1615
  ```ruby
1600
1616
  begin
1601
- # Fetch the full attributes for a PDF template
1602
- data, status_code, headers = api_instance.get_full_template_with_http_info(template_id)
1617
+ # Get a folder
1618
+ data, status_code, headers = api_instance.get_folder_with_http_info(folder_id)
1603
1619
  p status_code # => 2xx
1604
1620
  p headers # => { ... }
1605
- p data # => <Template>
1621
+ p data # => <Folder>
1606
1622
  rescue DocSpring::ApiError => e
1607
- puts "Error when calling Client->get_full_template_with_http_info: #{e}"
1623
+ puts "Error when calling Client->get_folder_with_http_info: #{e}"
1608
1624
  end
1609
1625
  ```
1610
1626
 
@@ -1612,11 +1628,11 @@ end
1612
1628
 
1613
1629
  | Name | Type | Description | Notes |
1614
1630
  | ---- | ---- | ----------- | ----- |
1615
- | **template_id** | **String** | | |
1631
+ | **folder_id** | **String** | The folder's ID. | |
1616
1632
 
1617
1633
  ### Return type
1618
1634
 
1619
- [**Template**](Template.md)
1635
+ [**Folder**](Folder.md)
1620
1636
 
1621
1637
  ### Authorization
1622
1638
 
@@ -1630,11 +1646,11 @@ end
1630
1646
 
1631
1647
  ## get_presign_url
1632
1648
 
1633
- > <UploadPresignResponse> get_presign_url
1649
+ > <UploadPresign> get_presign_url
1634
1650
 
1635
- Get a presigned S3 URL for direct file upload
1651
+ Get a presigned URL to upload a file
1636
1652
 
1637
- Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this endpoint to upload large files before creating templates or custom files. S3 will respond with a JSON object that you can include in your DocSpring API request. Uploaded files can be used to: - [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload) - [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload) - [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)
1653
+ Returns a presigned S3 form for uploading a file directly to DocSpring, for files too large to send in a request body. POST the `fields` and the file (as `file`) to `url` as multipart/form-data, then pass `fields.key` as the `cache_id` when you create a custom file.
1638
1654
 
1639
1655
  ### Examples
1640
1656
 
@@ -1651,7 +1667,7 @@ end
1651
1667
  api_instance = DocSpring::Client.new
1652
1668
 
1653
1669
  begin
1654
- # Get a presigned S3 URL for direct file upload
1670
+ # Get a presigned URL to upload a file
1655
1671
  result = api_instance.get_presign_url
1656
1672
  p result
1657
1673
  rescue DocSpring::ApiError => e
@@ -1663,15 +1679,15 @@ end
1663
1679
 
1664
1680
  This returns an Array which contains the response data, status code and headers.
1665
1681
 
1666
- > <Array(<UploadPresignResponse>, Integer, Hash)> get_presign_url_with_http_info
1682
+ > <Array(<UploadPresign>, Integer, Hash)> get_presign_url_with_http_info
1667
1683
 
1668
1684
  ```ruby
1669
1685
  begin
1670
- # Get a presigned S3 URL for direct file upload
1686
+ # Get a presigned URL to upload a file
1671
1687
  data, status_code, headers = api_instance.get_presign_url_with_http_info
1672
1688
  p status_code # => 2xx
1673
1689
  p headers # => { ... }
1674
- p data # => <UploadPresignResponse>
1690
+ p data # => <UploadPresign>
1675
1691
  rescue DocSpring::ApiError => e
1676
1692
  puts "Error when calling Client->get_presign_url_with_http_info: #{e}"
1677
1693
  end
@@ -1683,7 +1699,7 @@ This endpoint does not need any parameter.
1683
1699
 
1684
1700
  ### Return type
1685
1701
 
1686
- [**UploadPresignResponse**](UploadPresignResponse.md)
1702
+ [**UploadPresign**](UploadPresign.md)
1687
1703
 
1688
1704
  ### Authorization
1689
1705
 
@@ -1695,13 +1711,13 @@ This endpoint does not need any parameter.
1695
1711
  - **Accept**: application/json
1696
1712
 
1697
1713
 
1698
- ## get_submission
1714
+ ## get_signature_request
1699
1715
 
1700
- > <Submission> get_submission(submission_id, opts)
1716
+ > <SignatureRequest> get_signature_request(signature_request_id)
1701
1717
 
1702
- Check the status of a PDF
1718
+ Get a signature request
1703
1719
 
1704
- Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing. `insufficient_credits` means the submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
1720
+ Returns a signature request, with the values the person has entered so far.
1705
1721
 
1706
1722
  ### Examples
1707
1723
 
@@ -1716,35 +1732,32 @@ DocSpring.configure do |config|
1716
1732
  end
1717
1733
 
1718
1734
  api_instance = DocSpring::Client.new
1719
- submission_id = 'sub_1234567890abcdef01' # String |
1720
- opts = {
1721
- include_data: true # Boolean |
1722
- }
1735
+ signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
1723
1736
 
1724
1737
  begin
1725
- # Check the status of a PDF
1726
- result = api_instance.get_submission(submission_id, opts)
1738
+ # Get a signature request
1739
+ result = api_instance.get_signature_request(signature_request_id)
1727
1740
  p result
1728
1741
  rescue DocSpring::ApiError => e
1729
- puts "Error when calling Client->get_submission: #{e}"
1742
+ puts "Error when calling Client->get_signature_request: #{e}"
1730
1743
  end
1731
1744
  ```
1732
1745
 
1733
- #### Using the get_submission_with_http_info variant
1746
+ #### Using the get_signature_request_with_http_info variant
1734
1747
 
1735
1748
  This returns an Array which contains the response data, status code and headers.
1736
1749
 
1737
- > <Array(<Submission>, Integer, Hash)> get_submission_with_http_info(submission_id, opts)
1750
+ > <Array(<SignatureRequest>, Integer, Hash)> get_signature_request_with_http_info(signature_request_id)
1738
1751
 
1739
1752
  ```ruby
1740
1753
  begin
1741
- # Check the status of a PDF
1742
- data, status_code, headers = api_instance.get_submission_with_http_info(submission_id, opts)
1754
+ # Get a signature request
1755
+ data, status_code, headers = api_instance.get_signature_request_with_http_info(signature_request_id)
1743
1756
  p status_code # => 2xx
1744
1757
  p headers # => { ... }
1745
- p data # => <Submission>
1758
+ p data # => <SignatureRequest>
1746
1759
  rescue DocSpring::ApiError => e
1747
- puts "Error when calling Client->get_submission_with_http_info: #{e}"
1760
+ puts "Error when calling Client->get_signature_request_with_http_info: #{e}"
1748
1761
  end
1749
1762
  ```
1750
1763
 
@@ -1752,12 +1765,11 @@ end
1752
1765
 
1753
1766
  | Name | Type | Description | Notes |
1754
1767
  | ---- | ---- | ----------- | ----- |
1755
- | **submission_id** | **String** | | |
1756
- | **include_data** | **Boolean** | | [optional] |
1768
+ | **signature_request_id** | **String** | The signature request's ID. | |
1757
1769
 
1758
1770
  ### Return type
1759
1771
 
1760
- [**Submission**](Submission.md)
1772
+ [**SignatureRequest**](SignatureRequest.md)
1761
1773
 
1762
1774
  ### Authorization
1763
1775
 
@@ -1769,13 +1781,13 @@ end
1769
1781
  - **Accept**: application/json
1770
1782
 
1771
1783
 
1772
- ## get_submission_batch
1784
+ ## get_submission
1773
1785
 
1774
- > <SubmissionBatchWithSubmissions> get_submission_batch(submission_batch_id, opts)
1786
+ > <Submission> get_submission(submission_id)
1775
1787
 
1776
- Check the status of a submission batch job
1788
+ Get a submission
1777
1789
 
1778
- Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing. Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the batch stays `pending` until you add credits or they stop waiting after 30 days.
1790
+ Returns a submission, with its data and links to download its PDF.
1779
1791
 
1780
1792
  ### Examples
1781
1793
 
@@ -1790,35 +1802,32 @@ DocSpring.configure do |config|
1790
1802
  end
1791
1803
 
1792
1804
  api_instance = DocSpring::Client.new
1793
- submission_batch_id = 'sbb_1234567890abcdef01' # String |
1794
- opts = {
1795
- include_submissions: true # Boolean |
1796
- }
1805
+ submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
1797
1806
 
1798
1807
  begin
1799
- # Check the status of a submission batch job
1800
- result = api_instance.get_submission_batch(submission_batch_id, opts)
1808
+ # Get a submission
1809
+ result = api_instance.get_submission(submission_id)
1801
1810
  p result
1802
1811
  rescue DocSpring::ApiError => e
1803
- puts "Error when calling Client->get_submission_batch: #{e}"
1812
+ puts "Error when calling Client->get_submission: #{e}"
1804
1813
  end
1805
1814
  ```
1806
1815
 
1807
- #### Using the get_submission_batch_with_http_info variant
1816
+ #### Using the get_submission_with_http_info variant
1808
1817
 
1809
1818
  This returns an Array which contains the response data, status code and headers.
1810
1819
 
1811
- > <Array(<SubmissionBatchWithSubmissions>, Integer, Hash)> get_submission_batch_with_http_info(submission_batch_id, opts)
1820
+ > <Array(<Submission>, Integer, Hash)> get_submission_with_http_info(submission_id)
1812
1821
 
1813
1822
  ```ruby
1814
1823
  begin
1815
- # Check the status of a submission batch job
1816
- data, status_code, headers = api_instance.get_submission_batch_with_http_info(submission_batch_id, opts)
1824
+ # Get a submission
1825
+ data, status_code, headers = api_instance.get_submission_with_http_info(submission_id)
1817
1826
  p status_code # => 2xx
1818
1827
  p headers # => { ... }
1819
- p data # => <SubmissionBatchWithSubmissions>
1828
+ p data # => <Submission>
1820
1829
  rescue DocSpring::ApiError => e
1821
- puts "Error when calling Client->get_submission_batch_with_http_info: #{e}"
1830
+ puts "Error when calling Client->get_submission_with_http_info: #{e}"
1822
1831
  end
1823
1832
  ```
1824
1833
 
@@ -1826,12 +1835,11 @@ end
1826
1835
 
1827
1836
  | Name | Type | Description | Notes |
1828
1837
  | ---- | ---- | ----------- | ----- |
1829
- | **submission_batch_id** | **String** | | |
1830
- | **include_submissions** | **Boolean** | | [optional] |
1838
+ | **submission_id** | **String** | The submission's ID. | |
1831
1839
 
1832
1840
  ### Return type
1833
1841
 
1834
- [**SubmissionBatchWithSubmissions**](SubmissionBatchWithSubmissions.md)
1842
+ [**Submission**](Submission.md)
1835
1843
 
1836
1844
  ### Authorization
1837
1845
 
@@ -1843,13 +1851,13 @@ end
1843
1851
  - **Accept**: application/json
1844
1852
 
1845
1853
 
1846
- ## get_template
1854
+ ## get_submission_batch
1847
1855
 
1848
- > <TemplatePreview> get_template(template_id)
1856
+ > <SubmissionBatch> get_submission_batch(submission_batch_id, opts)
1849
1857
 
1850
- Check the status of an uploaded template
1858
+ Get a batch
1851
1859
 
1852
- Retrieves information about a template including processing status and document URL. Use this to check if template is ready to view in the template editor or generate PDFs.
1860
+ Returns a batch with its submissions. The batch has finished once `processed_at` is set: its `state` is `processed` when every PDF was generated, or `error` when any submission failed.
1853
1861
 
1854
1862
  ### Examples
1855
1863
 
@@ -1864,32 +1872,35 @@ DocSpring.configure do |config|
1864
1872
  end
1865
1873
 
1866
1874
  api_instance = DocSpring::Client.new
1867
- template_id = 'tpl_1234567890abcdef01' # String |
1875
+ submission_batch_id = 'sbb_1234567890abcdef05' # String | The batch's ID.
1876
+ opts = {
1877
+ include_data: true # Boolean | Include each submission's `data` (null without it).
1878
+ }
1868
1879
 
1869
1880
  begin
1870
- # Check the status of an uploaded template
1871
- result = api_instance.get_template(template_id)
1881
+ # Get a batch
1882
+ result = api_instance.get_submission_batch(submission_batch_id, opts)
1872
1883
  p result
1873
1884
  rescue DocSpring::ApiError => e
1874
- puts "Error when calling Client->get_template: #{e}"
1885
+ puts "Error when calling Client->get_submission_batch: #{e}"
1875
1886
  end
1876
1887
  ```
1877
1888
 
1878
- #### Using the get_template_with_http_info variant
1889
+ #### Using the get_submission_batch_with_http_info variant
1879
1890
 
1880
1891
  This returns an Array which contains the response data, status code and headers.
1881
1892
 
1882
- > <Array(<TemplatePreview>, Integer, Hash)> get_template_with_http_info(template_id)
1893
+ > <Array(<SubmissionBatch>, Integer, Hash)> get_submission_batch_with_http_info(submission_batch_id, opts)
1883
1894
 
1884
1895
  ```ruby
1885
1896
  begin
1886
- # Check the status of an uploaded template
1887
- data, status_code, headers = api_instance.get_template_with_http_info(template_id)
1897
+ # Get a batch
1898
+ data, status_code, headers = api_instance.get_submission_batch_with_http_info(submission_batch_id, opts)
1888
1899
  p status_code # => 2xx
1889
1900
  p headers # => { ... }
1890
- p data # => <TemplatePreview>
1901
+ p data # => <SubmissionBatch>
1891
1902
  rescue DocSpring::ApiError => e
1892
- puts "Error when calling Client->get_template_with_http_info: #{e}"
1903
+ puts "Error when calling Client->get_submission_batch_with_http_info: #{e}"
1893
1904
  end
1894
1905
  ```
1895
1906
 
@@ -1897,11 +1908,12 @@ end
1897
1908
 
1898
1909
  | Name | Type | Description | Notes |
1899
1910
  | ---- | ---- | ----------- | ----- |
1900
- | **template_id** | **String** | | |
1911
+ | **submission_batch_id** | **String** | The batch's ID. | |
1912
+ | **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
1901
1913
 
1902
1914
  ### Return type
1903
1915
 
1904
- [**TemplatePreview**](TemplatePreview.md)
1916
+ [**SubmissionBatch**](SubmissionBatch.md)
1905
1917
 
1906
1918
  ### Authorization
1907
1919
 
@@ -1913,13 +1925,13 @@ end
1913
1925
  - **Accept**: application/json
1914
1926
 
1915
1927
 
1916
- ## get_template_model_code
1928
+ ## get_template
1917
1929
 
1918
- > <TemplateModelCodeResponse> get_template_model_code(template_id, lang)
1930
+ > <Template> get_template(template_id, opts)
1919
1931
 
1920
- Generate typed model code for a template
1932
+ Get a template
1921
1933
 
1922
- Generates typed model code for a template's submission data from its JSON schema, in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go. Build your submission data with the generated types so your app catches mistakes before it calls the API. `root_type_name` is the type that describes the whole submission data object, qualified with its namespace or package where there is one. Java returns every class in `code`, each under a `// ClassName.java` comment: split them into one file per class. A template with no named fields returns 422, since there are no types to generate. See also: - [Generate Model Code](https://docspring.com/docs/template-editor/generate-model-code/) - Use the generated types
1934
+ Returns a template: its draft, or one of its published versions.
1923
1935
 
1924
1936
  ### Examples
1925
1937
 
@@ -1934,33 +1946,35 @@ DocSpring.configure do |config|
1934
1946
  end
1935
1947
 
1936
1948
  api_instance = DocSpring::Client.new
1937
- template_id = 'tpl_1234567890abcdef01' # String |
1938
- lang = 'typescript' # String | The language to generate code for
1949
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
1950
+ opts = {
1951
+ version: 'latest' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
1952
+ }
1939
1953
 
1940
1954
  begin
1941
- # Generate typed model code for a template
1942
- result = api_instance.get_template_model_code(template_id, lang)
1955
+ # Get a template
1956
+ result = api_instance.get_template(template_id, opts)
1943
1957
  p result
1944
1958
  rescue DocSpring::ApiError => e
1945
- puts "Error when calling Client->get_template_model_code: #{e}"
1959
+ puts "Error when calling Client->get_template: #{e}"
1946
1960
  end
1947
1961
  ```
1948
1962
 
1949
- #### Using the get_template_model_code_with_http_info variant
1963
+ #### Using the get_template_with_http_info variant
1950
1964
 
1951
1965
  This returns an Array which contains the response data, status code and headers.
1952
1966
 
1953
- > <Array(<TemplateModelCodeResponse>, Integer, Hash)> get_template_model_code_with_http_info(template_id, lang)
1967
+ > <Array(<Template>, Integer, Hash)> get_template_with_http_info(template_id, opts)
1954
1968
 
1955
1969
  ```ruby
1956
1970
  begin
1957
- # Generate typed model code for a template
1958
- data, status_code, headers = api_instance.get_template_model_code_with_http_info(template_id, lang)
1971
+ # Get a template
1972
+ data, status_code, headers = api_instance.get_template_with_http_info(template_id, opts)
1959
1973
  p status_code # => 2xx
1960
1974
  p headers # => { ... }
1961
- p data # => <TemplateModelCodeResponse>
1975
+ p data # => <Template>
1962
1976
  rescue DocSpring::ApiError => e
1963
- puts "Error when calling Client->get_template_model_code_with_http_info: #{e}"
1977
+ puts "Error when calling Client->get_template_with_http_info: #{e}"
1964
1978
  end
1965
1979
  ```
1966
1980
 
@@ -1968,12 +1982,12 @@ end
1968
1982
 
1969
1983
  | Name | Type | Description | Notes |
1970
1984
  | ---- | ---- | ----------- | ----- |
1971
- | **template_id** | **String** | | |
1972
- | **lang** | **String** | The language to generate code for | |
1985
+ | **template_id** | **String** | The template's ID. | |
1986
+ | **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
1973
1987
 
1974
1988
  ### Return type
1975
1989
 
1976
- [**TemplateModelCodeResponse**](TemplateModelCodeResponse.md)
1990
+ [**Template**](Template.md)
1977
1991
 
1978
1992
  ### Authorization
1979
1993
 
@@ -1985,13 +1999,13 @@ end
1985
1999
  - **Accept**: application/json
1986
2000
 
1987
2001
 
1988
- ## get_template_schema
2002
+ ## get_template_diff
1989
2003
 
1990
- > <JsonSchema> get_template_schema(template_id)
2004
+ > <TemplateDiff> get_template_diff(template_id, opts)
1991
2005
 
1992
- Fetch the JSON schema for a template
2006
+ Compare a version of a template with the one before it
1993
2007
 
1994
- Retrieves the JSON Schema definition for a template's fields. Use this to validate data before submitting it for PDF generation, or to build dynamic forms that match the template's field structure and validation requirements. See also: - [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data
2008
+ Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
1995
2009
 
1996
2010
  ### Examples
1997
2011
 
@@ -2006,32 +2020,35 @@ DocSpring.configure do |config|
2006
2020
  end
2007
2021
 
2008
2022
  api_instance = DocSpring::Client.new
2009
- template_id = 'tpl_1234567890abcdef01' # String |
2023
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2024
+ opts = {
2025
+ version: '0.1.0' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
2026
+ }
2010
2027
 
2011
2028
  begin
2012
- # Fetch the JSON schema for a template
2013
- result = api_instance.get_template_schema(template_id)
2029
+ # Compare a version of a template with the one before it
2030
+ result = api_instance.get_template_diff(template_id, opts)
2014
2031
  p result
2015
2032
  rescue DocSpring::ApiError => e
2016
- puts "Error when calling Client->get_template_schema: #{e}"
2033
+ puts "Error when calling Client->get_template_diff: #{e}"
2017
2034
  end
2018
2035
  ```
2019
2036
 
2020
- #### Using the get_template_schema_with_http_info variant
2037
+ #### Using the get_template_diff_with_http_info variant
2021
2038
 
2022
2039
  This returns an Array which contains the response data, status code and headers.
2023
2040
 
2024
- > <Array(<JsonSchema>, Integer, Hash)> get_template_schema_with_http_info(template_id)
2041
+ > <Array(<TemplateDiff>, Integer, Hash)> get_template_diff_with_http_info(template_id, opts)
2025
2042
 
2026
2043
  ```ruby
2027
2044
  begin
2028
- # Fetch the JSON schema for a template
2029
- data, status_code, headers = api_instance.get_template_schema_with_http_info(template_id)
2045
+ # Compare a version of a template with the one before it
2046
+ data, status_code, headers = api_instance.get_template_diff_with_http_info(template_id, opts)
2030
2047
  p status_code # => 2xx
2031
2048
  p headers # => { ... }
2032
- p data # => <JsonSchema>
2049
+ p data # => <TemplateDiff>
2033
2050
  rescue DocSpring::ApiError => e
2034
- puts "Error when calling Client->get_template_schema_with_http_info: #{e}"
2051
+ puts "Error when calling Client->get_template_diff_with_http_info: #{e}"
2035
2052
  end
2036
2053
  ```
2037
2054
 
@@ -2039,11 +2056,12 @@ end
2039
2056
 
2040
2057
  | Name | Type | Description | Notes |
2041
2058
  | ---- | ---- | ----------- | ----- |
2042
- | **template_id** | **String** | | |
2059
+ | **template_id** | **String** | The template's ID. | |
2060
+ | **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
2043
2061
 
2044
2062
  ### Return type
2045
2063
 
2046
- [**JsonSchema**](JsonSchema.md)
2064
+ [**TemplateDiff**](TemplateDiff.md)
2047
2065
 
2048
2066
  ### Authorization
2049
2067
 
@@ -2055,13 +2073,13 @@ end
2055
2073
  - **Accept**: application/json
2056
2074
 
2057
2075
 
2058
- ## get_webhook
2076
+ ## get_template_model_code
2059
2077
 
2060
- > <Webhook> get_webhook(webhook_id)
2078
+ > <TemplateModelCode> get_template_model_code(template_id, lang, opts)
2061
2079
 
2062
- Get a webhook
2080
+ Generate typed code for a template's submission data
2063
2081
 
2064
- Retrieves a single webhook by its ID.
2082
+ Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
2065
2083
 
2066
2084
  ### Examples
2067
2085
 
@@ -2076,32 +2094,36 @@ DocSpring.configure do |config|
2076
2094
  end
2077
2095
 
2078
2096
  api_instance = DocSpring::Client.new
2079
- webhook_id = 'whk_1234567890abcdef01' # String |
2097
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2098
+ lang = DocSpring::ModelCodeLanguage::TYPESCRIPT # ModelCodeLanguage | The language to generate the code in.
2099
+ opts = {
2100
+ version: 'draft' # String | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
2101
+ }
2080
2102
 
2081
2103
  begin
2082
- # Get a webhook
2083
- result = api_instance.get_webhook(webhook_id)
2104
+ # Generate typed code for a template's submission data
2105
+ result = api_instance.get_template_model_code(template_id, lang, opts)
2084
2106
  p result
2085
2107
  rescue DocSpring::ApiError => e
2086
- puts "Error when calling Client->get_webhook: #{e}"
2108
+ puts "Error when calling Client->get_template_model_code: #{e}"
2087
2109
  end
2088
2110
  ```
2089
2111
 
2090
- #### Using the get_webhook_with_http_info variant
2112
+ #### Using the get_template_model_code_with_http_info variant
2091
2113
 
2092
2114
  This returns an Array which contains the response data, status code and headers.
2093
2115
 
2094
- > <Array(<Webhook>, Integer, Hash)> get_webhook_with_http_info(webhook_id)
2116
+ > <Array(<TemplateModelCode>, Integer, Hash)> get_template_model_code_with_http_info(template_id, lang, opts)
2095
2117
 
2096
2118
  ```ruby
2097
2119
  begin
2098
- # Get a webhook
2099
- data, status_code, headers = api_instance.get_webhook_with_http_info(webhook_id)
2120
+ # Generate typed code for a template's submission data
2121
+ data, status_code, headers = api_instance.get_template_model_code_with_http_info(template_id, lang, opts)
2100
2122
  p status_code # => 2xx
2101
2123
  p headers # => { ... }
2102
- p data # => <Webhook>
2124
+ p data # => <TemplateModelCode>
2103
2125
  rescue DocSpring::ApiError => e
2104
- puts "Error when calling Client->get_webhook_with_http_info: #{e}"
2126
+ puts "Error when calling Client->get_template_model_code_with_http_info: #{e}"
2105
2127
  end
2106
2128
  ```
2107
2129
 
@@ -2109,11 +2131,13 @@ end
2109
2131
 
2110
2132
  | Name | Type | Description | Notes |
2111
2133
  | ---- | ---- | ----------- | ----- |
2112
- | **webhook_id** | **String** | | |
2134
+ | **template_id** | **String** | The template's ID. | |
2135
+ | **lang** | [**ModelCodeLanguage**](.md) | The language to generate the code in. | |
2136
+ | **version** | **String** | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default. | [optional] |
2113
2137
 
2114
2138
  ### Return type
2115
2139
 
2116
- [**Webhook**](Webhook.md)
2140
+ [**TemplateModelCode**](TemplateModelCode.md)
2117
2141
 
2118
2142
  ### Authorization
2119
2143
 
@@ -2125,13 +2149,13 @@ end
2125
2149
  - **Accept**: application/json
2126
2150
 
2127
2151
 
2128
- ## list_combined_submissions
2152
+ ## get_template_page_images
2129
2153
 
2130
- > <Array<CombinedSubmission>> list_combined_submissions(opts)
2154
+ > <TemplatePageImages> get_template_page_images(template_id, opts)
2131
2155
 
2132
- Get a list of all combined submissions
2156
+ Get images of a template's pages
2133
2157
 
2134
- Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.
2158
+ Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
2135
2159
 
2136
2160
  ### Examples
2137
2161
 
@@ -2146,35 +2170,35 @@ DocSpring.configure do |config|
2146
2170
  end
2147
2171
 
2148
2172
  api_instance = DocSpring::Client.new
2173
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2149
2174
  opts = {
2150
- page: 3, # Integer | Default: 1
2151
- per_page: 1 # Integer | Default: 50
2175
+ version: 'latest' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
2152
2176
  }
2153
2177
 
2154
2178
  begin
2155
- # Get a list of all combined submissions
2156
- result = api_instance.list_combined_submissions(opts)
2179
+ # Get images of a template's pages
2180
+ result = api_instance.get_template_page_images(template_id, opts)
2157
2181
  p result
2158
2182
  rescue DocSpring::ApiError => e
2159
- puts "Error when calling Client->list_combined_submissions: #{e}"
2183
+ puts "Error when calling Client->get_template_page_images: #{e}"
2160
2184
  end
2161
2185
  ```
2162
2186
 
2163
- #### Using the list_combined_submissions_with_http_info variant
2187
+ #### Using the get_template_page_images_with_http_info variant
2164
2188
 
2165
2189
  This returns an Array which contains the response data, status code and headers.
2166
2190
 
2167
- > <Array(<Array<CombinedSubmission>>, Integer, Hash)> list_combined_submissions_with_http_info(opts)
2191
+ > <Array(<TemplatePageImages>, Integer, Hash)> get_template_page_images_with_http_info(template_id, opts)
2168
2192
 
2169
2193
  ```ruby
2170
2194
  begin
2171
- # Get a list of all combined submissions
2172
- data, status_code, headers = api_instance.list_combined_submissions_with_http_info(opts)
2195
+ # Get images of a template's pages
2196
+ data, status_code, headers = api_instance.get_template_page_images_with_http_info(template_id, opts)
2173
2197
  p status_code # => 2xx
2174
2198
  p headers # => { ... }
2175
- p data # => <Array<CombinedSubmission>>
2199
+ p data # => <TemplatePageImages>
2176
2200
  rescue DocSpring::ApiError => e
2177
- puts "Error when calling Client->list_combined_submissions_with_http_info: #{e}"
2201
+ puts "Error when calling Client->get_template_page_images_with_http_info: #{e}"
2178
2202
  end
2179
2203
  ```
2180
2204
 
@@ -2182,12 +2206,12 @@ end
2182
2206
 
2183
2207
  | Name | Type | Description | Notes |
2184
2208
  | ---- | ---- | ----------- | ----- |
2185
- | **page** | **Integer** | Default: 1 | [optional] |
2186
- | **per_page** | **Integer** | Default: 50 | [optional] |
2209
+ | **template_id** | **String** | The template's ID. | |
2210
+ | **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
2187
2211
 
2188
2212
  ### Return type
2189
2213
 
2190
- [**Array&lt;CombinedSubmission&gt;**](CombinedSubmission.md)
2214
+ [**TemplatePageImages**](TemplatePageImages.md)
2191
2215
 
2192
2216
  ### Authorization
2193
2217
 
@@ -2199,13 +2223,13 @@ end
2199
2223
  - **Accept**: application/json
2200
2224
 
2201
2225
 
2202
- ## list_folders
2226
+ ## get_template_schema
2203
2227
 
2204
- > <Array<Folder>> list_folders(opts)
2228
+ > Hash&lt;String, Object&gt; get_template_schema(template_id, opts)
2205
2229
 
2206
- Get a list of all folders
2230
+ Get the JSON Schema of a template's submission data
2207
2231
 
2208
- Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve subfolders. Folders help organize templates and maintain a hierarchical structure.
2232
+ Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
2209
2233
 
2210
2234
  ### Examples
2211
2235
 
@@ -2220,34 +2244,35 @@ DocSpring.configure do |config|
2220
2244
  end
2221
2245
 
2222
2246
  api_instance = DocSpring::Client.new
2247
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2223
2248
  opts = {
2224
- parent_folder_id: 'fld_1234567890abcdef02' # String | Filter By Folder Id
2249
+ version: 'draft' # String | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
2225
2250
  }
2226
2251
 
2227
2252
  begin
2228
- # Get a list of all folders
2229
- result = api_instance.list_folders(opts)
2253
+ # Get the JSON Schema of a template's submission data
2254
+ result = api_instance.get_template_schema(template_id, opts)
2230
2255
  p result
2231
2256
  rescue DocSpring::ApiError => e
2232
- puts "Error when calling Client->list_folders: #{e}"
2257
+ puts "Error when calling Client->get_template_schema: #{e}"
2233
2258
  end
2234
2259
  ```
2235
2260
 
2236
- #### Using the list_folders_with_http_info variant
2261
+ #### Using the get_template_schema_with_http_info variant
2237
2262
 
2238
2263
  This returns an Array which contains the response data, status code and headers.
2239
2264
 
2240
- > <Array(<Array<Folder>>, Integer, Hash)> list_folders_with_http_info(opts)
2265
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> get_template_schema_with_http_info(template_id, opts)
2241
2266
 
2242
2267
  ```ruby
2243
2268
  begin
2244
- # Get a list of all folders
2245
- data, status_code, headers = api_instance.list_folders_with_http_info(opts)
2269
+ # Get the JSON Schema of a template's submission data
2270
+ data, status_code, headers = api_instance.get_template_schema_with_http_info(template_id, opts)
2246
2271
  p status_code # => 2xx
2247
2272
  p headers # => { ... }
2248
- p data # => <Array<Folder>>
2273
+ p data # => Hash&lt;String, Object&gt;
2249
2274
  rescue DocSpring::ApiError => e
2250
- puts "Error when calling Client->list_folders_with_http_info: #{e}"
2275
+ puts "Error when calling Client->get_template_schema_with_http_info: #{e}"
2251
2276
  end
2252
2277
  ```
2253
2278
 
@@ -2255,11 +2280,12 @@ end
2255
2280
 
2256
2281
  | Name | Type | Description | Notes |
2257
2282
  | ---- | ---- | ----------- | ----- |
2258
- | **parent_folder_id** | **String** | Filter By Folder Id | [optional] |
2283
+ | **template_id** | **String** | The template's ID. | |
2284
+ | **version** | **String** | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default. | [optional] |
2259
2285
 
2260
2286
  ### Return type
2261
2287
 
2262
- [**Array&lt;Folder&gt;**](Folder.md)
2288
+ **Hash&lt;String, Object&gt;**
2263
2289
 
2264
2290
  ### Authorization
2265
2291
 
@@ -2271,13 +2297,13 @@ end
2271
2297
  - **Accept**: application/json
2272
2298
 
2273
2299
 
2274
- ## list_submissions
2300
+ ## get_webhook
2275
2301
 
2276
- > <ListSubmissionsResponse> list_submissions(opts)
2302
+ > <Webhook> get_webhook(webhook_id)
2277
2303
 
2278
- List all submissions
2304
+ Get a webhook
2279
2305
 
2280
- Returns a paginated list of all PDF submissions across all templates in your account. Can be filtered by date range and submission type (test/live). Supports cursor-based pagination and optionally includes submission data for each result.
2306
+ Returns a webhook.
2281
2307
 
2282
2308
  ### Examples
2283
2309
 
@@ -2292,39 +2318,32 @@ DocSpring.configure do |config|
2292
2318
  end
2293
2319
 
2294
2320
  api_instance = DocSpring::Client.new
2295
- opts = {
2296
- cursor: 'sub_1234567890abcdef12', # String |
2297
- limit: 3, # Integer |
2298
- created_after: '2019-01-01T09:00:00-05:00', # String |
2299
- created_before: '2020-01-01T09:00:00.000+0200', # String |
2300
- type: 'test', # String |
2301
- include_data: true # Boolean |
2302
- }
2321
+ webhook_id = 'webhook_id_example' # String | The webhook's ID.
2303
2322
 
2304
2323
  begin
2305
- # List all submissions
2306
- result = api_instance.list_submissions(opts)
2324
+ # Get a webhook
2325
+ result = api_instance.get_webhook(webhook_id)
2307
2326
  p result
2308
2327
  rescue DocSpring::ApiError => e
2309
- puts "Error when calling Client->list_submissions: #{e}"
2328
+ puts "Error when calling Client->get_webhook: #{e}"
2310
2329
  end
2311
2330
  ```
2312
2331
 
2313
- #### Using the list_submissions_with_http_info variant
2332
+ #### Using the get_webhook_with_http_info variant
2314
2333
 
2315
2334
  This returns an Array which contains the response data, status code and headers.
2316
2335
 
2317
- > <Array(<ListSubmissionsResponse>, Integer, Hash)> list_submissions_with_http_info(opts)
2336
+ > <Array(<Webhook>, Integer, Hash)> get_webhook_with_http_info(webhook_id)
2318
2337
 
2319
2338
  ```ruby
2320
2339
  begin
2321
- # List all submissions
2322
- data, status_code, headers = api_instance.list_submissions_with_http_info(opts)
2340
+ # Get a webhook
2341
+ data, status_code, headers = api_instance.get_webhook_with_http_info(webhook_id)
2323
2342
  p status_code # => 2xx
2324
2343
  p headers # => { ... }
2325
- p data # => <ListSubmissionsResponse>
2344
+ p data # => <Webhook>
2326
2345
  rescue DocSpring::ApiError => e
2327
- puts "Error when calling Client->list_submissions_with_http_info: #{e}"
2346
+ puts "Error when calling Client->get_webhook_with_http_info: #{e}"
2328
2347
  end
2329
2348
  ```
2330
2349
 
@@ -2332,16 +2351,11 @@ end
2332
2351
 
2333
2352
  | Name | Type | Description | Notes |
2334
2353
  | ---- | ---- | ----------- | ----- |
2335
- | **cursor** | **String** | | [optional] |
2336
- | **limit** | **Integer** | | [optional] |
2337
- | **created_after** | **String** | | [optional] |
2338
- | **created_before** | **String** | | [optional] |
2339
- | **type** | **String** | | [optional] |
2340
- | **include_data** | **Boolean** | | [optional] |
2354
+ | **webhook_id** | **String** | The webhook's ID. | |
2341
2355
 
2342
2356
  ### Return type
2343
2357
 
2344
- [**ListSubmissionsResponse**](ListSubmissionsResponse.md)
2358
+ [**Webhook**](Webhook.md)
2345
2359
 
2346
2360
  ### Authorization
2347
2361
 
@@ -2353,13 +2367,13 @@ end
2353
2367
  - **Accept**: application/json
2354
2368
 
2355
2369
 
2356
- ## list_template_submissions
2370
+ ## list_combined_pdfs
2357
2371
 
2358
- > <ListSubmissionsResponse> list_template_submissions(template_id, opts)
2372
+ > <CombinedPdfList> list_combined_pdfs(opts)
2359
2373
 
2360
- List all submissions for a given template
2374
+ List combined PDFs
2361
2375
 
2362
- Returns a paginated list of all submissions for a specific template. Can be filtered by date range, submission type (test/live), and optionally include submission data. Supports cursor-based pagination for efficient retrieval of large result sets.
2376
+ Returns the combined PDFs in your account, newest first, one page at a time.
2363
2377
 
2364
2378
  ### Examples
2365
2379
 
@@ -2374,40 +2388,35 @@ DocSpring.configure do |config|
2374
2388
  end
2375
2389
 
2376
2390
  api_instance = DocSpring::Client.new
2377
- template_id = 'tpl_1234567890abcdef02' # String |
2378
2391
  opts = {
2379
- cursor: 'cursor_example', # String |
2380
- limit: 56, # Integer |
2381
- created_after: 'created_after_example', # String |
2382
- created_before: 'created_before_example', # String |
2383
- type: 'type_example', # String |
2384
- include_data: true # Boolean |
2392
+ limit: 56, # Integer | How many items to return (1-100, default 50).
2393
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2385
2394
  }
2386
2395
 
2387
2396
  begin
2388
- # List all submissions for a given template
2389
- result = api_instance.list_template_submissions(template_id, opts)
2397
+ # List combined PDFs
2398
+ result = api_instance.list_combined_pdfs(opts)
2390
2399
  p result
2391
2400
  rescue DocSpring::ApiError => e
2392
- puts "Error when calling Client->list_template_submissions: #{e}"
2401
+ puts "Error when calling Client->list_combined_pdfs: #{e}"
2393
2402
  end
2394
2403
  ```
2395
2404
 
2396
- #### Using the list_template_submissions_with_http_info variant
2405
+ #### Using the list_combined_pdfs_with_http_info variant
2397
2406
 
2398
2407
  This returns an Array which contains the response data, status code and headers.
2399
2408
 
2400
- > <Array(<ListSubmissionsResponse>, Integer, Hash)> list_template_submissions_with_http_info(template_id, opts)
2409
+ > <Array(<CombinedPdfList>, Integer, Hash)> list_combined_pdfs_with_http_info(opts)
2401
2410
 
2402
2411
  ```ruby
2403
2412
  begin
2404
- # List all submissions for a given template
2405
- data, status_code, headers = api_instance.list_template_submissions_with_http_info(template_id, opts)
2413
+ # List combined PDFs
2414
+ data, status_code, headers = api_instance.list_combined_pdfs_with_http_info(opts)
2406
2415
  p status_code # => 2xx
2407
2416
  p headers # => { ... }
2408
- p data # => <ListSubmissionsResponse>
2417
+ p data # => <CombinedPdfList>
2409
2418
  rescue DocSpring::ApiError => e
2410
- puts "Error when calling Client->list_template_submissions_with_http_info: #{e}"
2419
+ puts "Error when calling Client->list_combined_pdfs_with_http_info: #{e}"
2411
2420
  end
2412
2421
  ```
2413
2422
 
@@ -2415,17 +2424,12 @@ end
2415
2424
 
2416
2425
  | Name | Type | Description | Notes |
2417
2426
  | ---- | ---- | ----------- | ----- |
2418
- | **template_id** | **String** | | |
2419
- | **cursor** | **String** | | [optional] |
2420
- | **limit** | **Integer** | | [optional] |
2421
- | **created_after** | **String** | | [optional] |
2422
- | **created_before** | **String** | | [optional] |
2423
- | **type** | **String** | | [optional] |
2424
- | **include_data** | **Boolean** | | [optional] |
2427
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2428
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2425
2429
 
2426
2430
  ### Return type
2427
2431
 
2428
- [**ListSubmissionsResponse**](ListSubmissionsResponse.md)
2432
+ [**CombinedPdfList**](CombinedPdfList.md)
2429
2433
 
2430
2434
  ### Authorization
2431
2435
 
@@ -2437,13 +2441,13 @@ end
2437
2441
  - **Accept**: application/json
2438
2442
 
2439
2443
 
2440
- ## list_templates
2444
+ ## list_custom_files
2441
2445
 
2442
- > <Array<TemplatePreview>> list_templates(opts)
2446
+ > <CustomFileList> list_custom_files(opts)
2443
2447
 
2444
- Get a list of all templates
2448
+ List custom files
2445
2449
 
2446
- Retrieves a list of your templates with search, filtering, and pagination options. Returns basic template information including ID, name, type (PDF or HTML), and folder location. Supports text search by name and filtering by parent folder.
2450
+ Returns the custom files in your account, newest first, one page at a time.
2447
2451
 
2448
2452
  ### Examples
2449
2453
 
@@ -2459,36 +2463,34 @@ end
2459
2463
 
2460
2464
  api_instance = DocSpring::Client.new
2461
2465
  opts = {
2462
- query: '2', # String | Search By Name
2463
- parent_folder_id: 'fld_1234567890abcdef01', # String | Filter By Folder Id
2464
- page: 2, # Integer | Default: 1
2465
- per_page: 1 # Integer | Default: 50
2466
+ limit: 56, # Integer | How many items to return (1-100, default 50).
2467
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2466
2468
  }
2467
2469
 
2468
2470
  begin
2469
- # Get a list of all templates
2470
- result = api_instance.list_templates(opts)
2471
+ # List custom files
2472
+ result = api_instance.list_custom_files(opts)
2471
2473
  p result
2472
2474
  rescue DocSpring::ApiError => e
2473
- puts "Error when calling Client->list_templates: #{e}"
2475
+ puts "Error when calling Client->list_custom_files: #{e}"
2474
2476
  end
2475
2477
  ```
2476
2478
 
2477
- #### Using the list_templates_with_http_info variant
2479
+ #### Using the list_custom_files_with_http_info variant
2478
2480
 
2479
2481
  This returns an Array which contains the response data, status code and headers.
2480
2482
 
2481
- > <Array(<Array<TemplatePreview>>, Integer, Hash)> list_templates_with_http_info(opts)
2483
+ > <Array(<CustomFileList>, Integer, Hash)> list_custom_files_with_http_info(opts)
2482
2484
 
2483
2485
  ```ruby
2484
2486
  begin
2485
- # Get a list of all templates
2486
- data, status_code, headers = api_instance.list_templates_with_http_info(opts)
2487
+ # List custom files
2488
+ data, status_code, headers = api_instance.list_custom_files_with_http_info(opts)
2487
2489
  p status_code # => 2xx
2488
2490
  p headers # => { ... }
2489
- p data # => <Array<TemplatePreview>>
2491
+ p data # => <CustomFileList>
2490
2492
  rescue DocSpring::ApiError => e
2491
- puts "Error when calling Client->list_templates_with_http_info: #{e}"
2493
+ puts "Error when calling Client->list_custom_files_with_http_info: #{e}"
2492
2494
  end
2493
2495
  ```
2494
2496
 
@@ -2496,14 +2498,12 @@ end
2496
2498
 
2497
2499
  | Name | Type | Description | Notes |
2498
2500
  | ---- | ---- | ----------- | ----- |
2499
- | **query** | **String** | Search By Name | [optional] |
2500
- | **parent_folder_id** | **String** | Filter By Folder Id | [optional] |
2501
- | **page** | **Integer** | Default: 1 | [optional] |
2502
- | **per_page** | **Integer** | Default: 50 | [optional] |
2501
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2502
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2503
2503
 
2504
2504
  ### Return type
2505
2505
 
2506
- [**Array&lt;TemplatePreview&gt;**](TemplatePreview.md)
2506
+ [**CustomFileList**](CustomFileList.md)
2507
2507
 
2508
2508
  ### Authorization
2509
2509
 
@@ -2515,13 +2515,13 @@ end
2515
2515
  - **Accept**: application/json
2516
2516
 
2517
2517
 
2518
- ## list_webhooks
2518
+ ## list_folders
2519
2519
 
2520
- > <Array<Webhook>> list_webhooks(opts)
2520
+ > <FolderList> list_folders(opts)
2521
2521
 
2522
- Get a list of all webhooks
2522
+ List folders
2523
2523
 
2524
- Returns a list of the webhooks configured for your account. Supports pagination and filtering by event type, mode, and the API token, template, or folder a webhook is scoped to.
2524
+ Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
2525
2525
 
2526
2526
  ### Examples
2527
2527
 
@@ -2537,39 +2537,35 @@ end
2537
2537
 
2538
2538
  api_instance = DocSpring::Client.new
2539
2539
  opts = {
2540
- page: 56, # Integer | Default: 1
2541
- per_page: 56, # Integer | Default: 50
2542
- event_type: 'submission.processed', # String | Filter by a subscribed event type
2543
- mode: 'live', # String | Filter by mode (test or live)
2544
- template_id: 'tpl_1234567890abcdef01', # String | Filter by a scoped template ID
2545
- folder_id: 'folder_id_example', # String | Filter by a scoped folder ID
2546
- api_token_id: 'api_token_id_example' # String | Filter by a scoped API token ID
2540
+ parent_folder_id: 'fld_1234567890abcdef02', # String | Only list the folders in this folder. Without it, the list has every folder, at any depth.
2541
+ limit: 2, # Integer | How many items to return (1-100, default 50).
2542
+ cursor: 'fld_1234567890abcdef02' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2547
2543
  }
2548
2544
 
2549
2545
  begin
2550
- # Get a list of all webhooks
2551
- result = api_instance.list_webhooks(opts)
2546
+ # List folders
2547
+ result = api_instance.list_folders(opts)
2552
2548
  p result
2553
2549
  rescue DocSpring::ApiError => e
2554
- puts "Error when calling Client->list_webhooks: #{e}"
2550
+ puts "Error when calling Client->list_folders: #{e}"
2555
2551
  end
2556
2552
  ```
2557
2553
 
2558
- #### Using the list_webhooks_with_http_info variant
2554
+ #### Using the list_folders_with_http_info variant
2559
2555
 
2560
2556
  This returns an Array which contains the response data, status code and headers.
2561
2557
 
2562
- > <Array(<Array<Webhook>>, Integer, Hash)> list_webhooks_with_http_info(opts)
2558
+ > <Array(<FolderList>, Integer, Hash)> list_folders_with_http_info(opts)
2563
2559
 
2564
2560
  ```ruby
2565
2561
  begin
2566
- # Get a list of all webhooks
2567
- data, status_code, headers = api_instance.list_webhooks_with_http_info(opts)
2562
+ # List folders
2563
+ data, status_code, headers = api_instance.list_folders_with_http_info(opts)
2568
2564
  p status_code # => 2xx
2569
2565
  p headers # => { ... }
2570
- p data # => <Array<Webhook>>
2566
+ p data # => <FolderList>
2571
2567
  rescue DocSpring::ApiError => e
2572
- puts "Error when calling Client->list_webhooks_with_http_info: #{e}"
2568
+ puts "Error when calling Client->list_folders_with_http_info: #{e}"
2573
2569
  end
2574
2570
  ```
2575
2571
 
@@ -2577,17 +2573,13 @@ end
2577
2573
 
2578
2574
  | Name | Type | Description | Notes |
2579
2575
  | ---- | ---- | ----------- | ----- |
2580
- | **page** | **Integer** | Default: 1 | [optional] |
2581
- | **per_page** | **Integer** | Default: 50 | [optional] |
2582
- | **event_type** | **String** | Filter by a subscribed event type | [optional] |
2583
- | **mode** | **String** | Filter by mode (test or live) | [optional] |
2584
- | **template_id** | **String** | Filter by a scoped template ID | [optional] |
2585
- | **folder_id** | **String** | Filter by a scoped folder ID | [optional] |
2586
- | **api_token_id** | **String** | Filter by a scoped API token ID | [optional] |
2576
+ | **parent_folder_id** | **String** | Only list the folders in this folder. Without it, the list has every folder, at any depth. | [optional] |
2577
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2578
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2587
2579
 
2588
2580
  ### Return type
2589
2581
 
2590
- [**Array&lt;Webhook&gt;**](Webhook.md)
2582
+ [**FolderList**](FolderList.md)
2591
2583
 
2592
2584
  ### Authorization
2593
2585
 
@@ -2599,13 +2591,13 @@ end
2599
2591
  - **Accept**: application/json
2600
2592
 
2601
2593
 
2602
- ## move_folder_to_folder
2594
+ ## list_submissions
2603
2595
 
2604
- > <Folder> move_folder_to_folder(folder_id, data)
2596
+ > <SubmissionList> list_submissions(opts)
2605
2597
 
2606
- Move a folder
2598
+ List submissions
2607
2599
 
2608
- Moves a folder to a new parent folder or to the root level. All templates and subfolders within the folder are moved together. Cannot move a folder into one of its own subfolders.
2600
+ Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
2609
2601
 
2610
2602
  ### Examples
2611
2603
 
@@ -2620,33 +2612,40 @@ DocSpring.configure do |config|
2620
2612
  end
2621
2613
 
2622
2614
  api_instance = DocSpring::Client.new
2623
- folder_id = 'fld_1234567890abcdef01' # String |
2624
- data = DocSpring::MoveFolderData.new # MoveFolderData |
2615
+ opts = {
2616
+ template_id: 'tpl_1234567890abcdef01', # String | Only list this template's submissions.
2617
+ test: false, # Boolean | Only list test submissions (true) or live submissions (false).
2618
+ created_after: Time.parse('2018-10-20T08:40:00Z'), # Time | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
2619
+ created_before: Time.parse('2018-10-20T09:00:00Z'), # Time | Only list submissions created before this time.
2620
+ include_data: true, # Boolean | Include each submission's `data` (null without it).
2621
+ limit: 56, # Integer | How many items to return (1-100, default 50).
2622
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2623
+ }
2625
2624
 
2626
2625
  begin
2627
- # Move a folder
2628
- result = api_instance.move_folder_to_folder(folder_id, data)
2626
+ # List submissions
2627
+ result = api_instance.list_submissions(opts)
2629
2628
  p result
2630
2629
  rescue DocSpring::ApiError => e
2631
- puts "Error when calling Client->move_folder_to_folder: #{e}"
2630
+ puts "Error when calling Client->list_submissions: #{e}"
2632
2631
  end
2633
2632
  ```
2634
2633
 
2635
- #### Using the move_folder_to_folder_with_http_info variant
2634
+ #### Using the list_submissions_with_http_info variant
2636
2635
 
2637
2636
  This returns an Array which contains the response data, status code and headers.
2638
2637
 
2639
- > <Array(<Folder>, Integer, Hash)> move_folder_to_folder_with_http_info(folder_id, data)
2638
+ > <Array(<SubmissionList>, Integer, Hash)> list_submissions_with_http_info(opts)
2640
2639
 
2641
2640
  ```ruby
2642
2641
  begin
2643
- # Move a folder
2644
- data, status_code, headers = api_instance.move_folder_to_folder_with_http_info(folder_id, data)
2642
+ # List submissions
2643
+ data, status_code, headers = api_instance.list_submissions_with_http_info(opts)
2645
2644
  p status_code # => 2xx
2646
2645
  p headers # => { ... }
2647
- p data # => <Folder>
2646
+ p data # => <SubmissionList>
2648
2647
  rescue DocSpring::ApiError => e
2649
- puts "Error when calling Client->move_folder_to_folder_with_http_info: #{e}"
2648
+ puts "Error when calling Client->list_submissions_with_http_info: #{e}"
2650
2649
  end
2651
2650
  ```
2652
2651
 
@@ -2654,12 +2653,17 @@ end
2654
2653
 
2655
2654
  | Name | Type | Description | Notes |
2656
2655
  | ---- | ---- | ----------- | ----- |
2657
- | **folder_id** | **String** | | |
2658
- | **data** | [**MoveFolderData**](MoveFolderData.md) | | |
2656
+ | **template_id** | **String** | Only list this template's submissions. | [optional] |
2657
+ | **test** | **Boolean** | Only list test submissions (true) or live submissions (false). | [optional] |
2658
+ | **created_after** | **Time** | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`). | [optional] |
2659
+ | **created_before** | **Time** | Only list submissions created before this time. | [optional] |
2660
+ | **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
2661
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2662
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2659
2663
 
2660
2664
  ### Return type
2661
2665
 
2662
- [**Folder**](Folder.md)
2666
+ [**SubmissionList**](SubmissionList.md)
2663
2667
 
2664
2668
  ### Authorization
2665
2669
 
@@ -2667,17 +2671,17 @@ end
2667
2671
 
2668
2672
  ### HTTP request headers
2669
2673
 
2670
- - **Content-Type**: application/json
2674
+ - **Content-Type**: Not defined
2671
2675
  - **Accept**: application/json
2672
2676
 
2673
2677
 
2674
- ## move_template_to_folder
2678
+ ## list_template_fields
2675
2679
 
2676
- > <TemplatePreview> move_template_to_folder(template_id, data)
2680
+ > <TemplateFields> list_template_fields(template_id, opts)
2677
2681
 
2678
- Move Template to folder
2682
+ List a template's fields
2679
2683
 
2680
- Moves a template to a different folder or to the root level. Use this to organize templates within your folders. Provide a folder ID to move to a specific folder, or `null` to move to the root level.
2684
+ Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
2681
2685
 
2682
2686
  ### Examples
2683
2687
 
@@ -2692,33 +2696,35 @@ DocSpring.configure do |config|
2692
2696
  end
2693
2697
 
2694
2698
  api_instance = DocSpring::Client.new
2695
- template_id = 'tpl_1234567890abcdef01' # String |
2696
- data = DocSpring::MoveTemplateData.new({parent_folder_id: 'parent_folder_id_example'}) # MoveTemplateData |
2699
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2700
+ opts = {
2701
+ version: 'latest' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
2702
+ }
2697
2703
 
2698
2704
  begin
2699
- # Move Template to folder
2700
- result = api_instance.move_template_to_folder(template_id, data)
2705
+ # List a template's fields
2706
+ result = api_instance.list_template_fields(template_id, opts)
2701
2707
  p result
2702
2708
  rescue DocSpring::ApiError => e
2703
- puts "Error when calling Client->move_template_to_folder: #{e}"
2709
+ puts "Error when calling Client->list_template_fields: #{e}"
2704
2710
  end
2705
2711
  ```
2706
2712
 
2707
- #### Using the move_template_to_folder_with_http_info variant
2713
+ #### Using the list_template_fields_with_http_info variant
2708
2714
 
2709
2715
  This returns an Array which contains the response data, status code and headers.
2710
2716
 
2711
- > <Array(<TemplatePreview>, Integer, Hash)> move_template_to_folder_with_http_info(template_id, data)
2717
+ > <Array(<TemplateFields>, Integer, Hash)> list_template_fields_with_http_info(template_id, opts)
2712
2718
 
2713
2719
  ```ruby
2714
2720
  begin
2715
- # Move Template to folder
2716
- data, status_code, headers = api_instance.move_template_to_folder_with_http_info(template_id, data)
2721
+ # List a template's fields
2722
+ data, status_code, headers = api_instance.list_template_fields_with_http_info(template_id, opts)
2717
2723
  p status_code # => 2xx
2718
2724
  p headers # => { ... }
2719
- p data # => <TemplatePreview>
2725
+ p data # => <TemplateFields>
2720
2726
  rescue DocSpring::ApiError => e
2721
- puts "Error when calling Client->move_template_to_folder_with_http_info: #{e}"
2727
+ puts "Error when calling Client->list_template_fields_with_http_info: #{e}"
2722
2728
  end
2723
2729
  ```
2724
2730
 
@@ -2726,12 +2732,12 @@ end
2726
2732
 
2727
2733
  | Name | Type | Description | Notes |
2728
2734
  | ---- | ---- | ----------- | ----- |
2729
- | **template_id** | **String** | | |
2730
- | **data** | [**MoveTemplateData**](MoveTemplateData.md) | | |
2735
+ | **template_id** | **String** | The template's ID. | |
2736
+ | **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
2731
2737
 
2732
2738
  ### Return type
2733
2739
 
2734
- [**TemplatePreview**](TemplatePreview.md)
2740
+ [**TemplateFields**](TemplateFields.md)
2735
2741
 
2736
2742
  ### Authorization
2737
2743
 
@@ -2739,17 +2745,17 @@ end
2739
2745
 
2740
2746
  ### HTTP request headers
2741
2747
 
2742
- - **Content-Type**: application/json
2748
+ - **Content-Type**: Not defined
2743
2749
  - **Accept**: application/json
2744
2750
 
2745
2751
 
2746
- ## publish_template_version
2752
+ ## list_template_submissions
2747
2753
 
2748
- > <TemplatePublishVersionResponse> publish_template_version(template_id, data)
2754
+ > <SubmissionList> list_template_submissions(template_id, opts)
2749
2755
 
2750
- Publish a template version
2756
+ List a template's submissions
2751
2757
 
2752
- Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).
2758
+ Returns a template's submissions (from every version of the template), newest first.
2753
2759
 
2754
2760
  ### Examples
2755
2761
 
@@ -2764,33 +2770,495 @@ DocSpring.configure do |config|
2764
2770
  end
2765
2771
 
2766
2772
  api_instance = DocSpring::Client.new
2767
- template_id = 'tpl_1234567890abcdef01' # String |
2768
- data = DocSpring::PublishVersionData.new({version_type: 'version_type_example'}) # PublishVersionData |
2773
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2774
+ opts = {
2775
+ test: true, # Boolean | Only list test submissions (true) or live submissions (false).
2776
+ created_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
2777
+ created_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only list submissions created before this time.
2778
+ include_data: true, # Boolean | Include each submission's `data` (null without it).
2779
+ limit: 56, # Integer | How many items to return (1-100, default 50).
2780
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2781
+ }
2769
2782
 
2770
2783
  begin
2771
- # Publish a template version
2772
- result = api_instance.publish_template_version(template_id, data)
2784
+ # List a template's submissions
2785
+ result = api_instance.list_template_submissions(template_id, opts)
2773
2786
  p result
2774
2787
  rescue DocSpring::ApiError => e
2775
- puts "Error when calling Client->publish_template_version: #{e}"
2788
+ puts "Error when calling Client->list_template_submissions: #{e}"
2776
2789
  end
2777
2790
  ```
2778
2791
 
2779
- #### Using the publish_template_version_with_http_info variant
2792
+ #### Using the list_template_submissions_with_http_info variant
2780
2793
 
2781
2794
  This returns an Array which contains the response data, status code and headers.
2782
2795
 
2783
- > <Array(<TemplatePublishVersionResponse>, Integer, Hash)> publish_template_version_with_http_info(template_id, data)
2796
+ > <Array(<SubmissionList>, Integer, Hash)> list_template_submissions_with_http_info(template_id, opts)
2784
2797
 
2785
2798
  ```ruby
2799
+ begin
2800
+ # List a template's submissions
2801
+ data, status_code, headers = api_instance.list_template_submissions_with_http_info(template_id, opts)
2802
+ p status_code # => 2xx
2803
+ p headers # => { ... }
2804
+ p data # => <SubmissionList>
2805
+ rescue DocSpring::ApiError => e
2806
+ puts "Error when calling Client->list_template_submissions_with_http_info: #{e}"
2807
+ end
2808
+ ```
2809
+
2810
+ ### Parameters
2811
+
2812
+ | Name | Type | Description | Notes |
2813
+ | ---- | ---- | ----------- | ----- |
2814
+ | **template_id** | **String** | The template's ID. | |
2815
+ | **test** | **Boolean** | Only list test submissions (true) or live submissions (false). | [optional] |
2816
+ | **created_after** | **Time** | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`). | [optional] |
2817
+ | **created_before** | **Time** | Only list submissions created before this time. | [optional] |
2818
+ | **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
2819
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2820
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2821
+
2822
+ ### Return type
2823
+
2824
+ [**SubmissionList**](SubmissionList.md)
2825
+
2826
+ ### Authorization
2827
+
2828
+ [api_token_basic](../README.md#api_token_basic)
2829
+
2830
+ ### HTTP request headers
2831
+
2832
+ - **Content-Type**: Not defined
2833
+ - **Accept**: application/json
2834
+
2835
+
2836
+ ## list_templates
2837
+
2838
+ > <TemplateSummaryList> list_templates(opts)
2839
+
2840
+ List templates
2841
+
2842
+ Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
2843
+
2844
+ ### Examples
2845
+
2846
+ ```ruby
2847
+ require 'time'
2848
+ require 'docspring'
2849
+ # setup authorization
2850
+ DocSpring.configure do |config|
2851
+ # Configure HTTP basic authorization: api_token_basic
2852
+ config.username = 'YOUR USERNAME'
2853
+ config.password = 'YOUR PASSWORD'
2854
+ end
2855
+
2856
+ api_instance = DocSpring::Client.new
2857
+ opts = {
2858
+ query: 'rental', # String | Only list templates whose name contains this text (ignoring case).
2859
+ parent_folder_id: 'fld_1234567890abcdef01', # String | Only list the templates in this folder (not in its subfolders).
2860
+ limit: 1, # Integer | How many items to return (1-100, default 50).
2861
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2862
+ }
2863
+
2864
+ begin
2865
+ # List templates
2866
+ result = api_instance.list_templates(opts)
2867
+ p result
2868
+ rescue DocSpring::ApiError => e
2869
+ puts "Error when calling Client->list_templates: #{e}"
2870
+ end
2871
+ ```
2872
+
2873
+ #### Using the list_templates_with_http_info variant
2874
+
2875
+ This returns an Array which contains the response data, status code and headers.
2876
+
2877
+ > <Array(<TemplateSummaryList>, Integer, Hash)> list_templates_with_http_info(opts)
2878
+
2879
+ ```ruby
2880
+ begin
2881
+ # List templates
2882
+ data, status_code, headers = api_instance.list_templates_with_http_info(opts)
2883
+ p status_code # => 2xx
2884
+ p headers # => { ... }
2885
+ p data # => <TemplateSummaryList>
2886
+ rescue DocSpring::ApiError => e
2887
+ puts "Error when calling Client->list_templates_with_http_info: #{e}"
2888
+ end
2889
+ ```
2890
+
2891
+ ### Parameters
2892
+
2893
+ | Name | Type | Description | Notes |
2894
+ | ---- | ---- | ----------- | ----- |
2895
+ | **query** | **String** | Only list templates whose name contains this text (ignoring case). | [optional] |
2896
+ | **parent_folder_id** | **String** | Only list the templates in this folder (not in its subfolders). | [optional] |
2897
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2898
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2899
+
2900
+ ### Return type
2901
+
2902
+ [**TemplateSummaryList**](TemplateSummaryList.md)
2903
+
2904
+ ### Authorization
2905
+
2906
+ [api_token_basic](../README.md#api_token_basic)
2907
+
2908
+ ### HTTP request headers
2909
+
2910
+ - **Content-Type**: Not defined
2911
+ - **Accept**: application/json
2912
+
2913
+
2914
+ ## list_webhooks
2915
+
2916
+ > <WebhookList> list_webhooks(opts)
2917
+
2918
+ List webhooks
2919
+
2920
+ Returns the webhooks in your account, newest first, one page at a time. Filter them by event type, mode, or the API token, template or folder they're scoped to.
2921
+
2922
+ ### Examples
2923
+
2924
+ ```ruby
2925
+ require 'time'
2926
+ require 'docspring'
2927
+ # setup authorization
2928
+ DocSpring.configure do |config|
2929
+ # Configure HTTP basic authorization: api_token_basic
2930
+ config.username = 'YOUR USERNAME'
2931
+ config.password = 'YOUR PASSWORD'
2932
+ end
2933
+
2934
+ api_instance = DocSpring::Client.new
2935
+ opts = {
2936
+ event_type: DocSpring::WebhookEventType::SUBMISSION_PROCESSED, # WebhookEventType | Only list webhooks that subscribe to this event.
2937
+ mode: DocSpring::WebhookMode::TEST, # WebhookMode | Only list webhooks set to this mode.
2938
+ template_id: 'tpl_1234567890abcdef01', # String | Only list webhooks scoped to this template.
2939
+ folder_id: 'folder_id_example', # String | Only list webhooks scoped to this folder.
2940
+ api_token_id: 'api_token_id_example', # String | Only list webhooks scoped to this API token.
2941
+ limit: 56, # Integer | How many items to return (1-100, default 50).
2942
+ cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2943
+ }
2944
+
2945
+ begin
2946
+ # List webhooks
2947
+ result = api_instance.list_webhooks(opts)
2948
+ p result
2949
+ rescue DocSpring::ApiError => e
2950
+ puts "Error when calling Client->list_webhooks: #{e}"
2951
+ end
2952
+ ```
2953
+
2954
+ #### Using the list_webhooks_with_http_info variant
2955
+
2956
+ This returns an Array which contains the response data, status code and headers.
2957
+
2958
+ > <Array(<WebhookList>, Integer, Hash)> list_webhooks_with_http_info(opts)
2959
+
2960
+ ```ruby
2961
+ begin
2962
+ # List webhooks
2963
+ data, status_code, headers = api_instance.list_webhooks_with_http_info(opts)
2964
+ p status_code # => 2xx
2965
+ p headers # => { ... }
2966
+ p data # => <WebhookList>
2967
+ rescue DocSpring::ApiError => e
2968
+ puts "Error when calling Client->list_webhooks_with_http_info: #{e}"
2969
+ end
2970
+ ```
2971
+
2972
+ ### Parameters
2973
+
2974
+ | Name | Type | Description | Notes |
2975
+ | ---- | ---- | ----------- | ----- |
2976
+ | **event_type** | [**WebhookEventType**](.md) | Only list webhooks that subscribe to this event. | [optional] |
2977
+ | **mode** | [**WebhookMode**](.md) | Only list webhooks set to this mode. | [optional] |
2978
+ | **template_id** | **String** | Only list webhooks scoped to this template. | [optional] |
2979
+ | **folder_id** | **String** | Only list webhooks scoped to this folder. | [optional] |
2980
+ | **api_token_id** | **String** | Only list webhooks scoped to this API token. | [optional] |
2981
+ | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2982
+ | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2983
+
2984
+ ### Return type
2985
+
2986
+ [**WebhookList**](WebhookList.md)
2987
+
2988
+ ### Authorization
2989
+
2990
+ [api_token_basic](../README.md#api_token_basic)
2991
+
2992
+ ### HTTP request headers
2993
+
2994
+ - **Content-Type**: Not defined
2995
+ - **Accept**: application/json
2996
+
2997
+
2998
+ ## move_folder
2999
+
3000
+ > <Folder> move_folder(folder_id, body)
3001
+
3002
+ Move a folder
3003
+
3004
+ Moves a folder into another folder, or to the root with `parent_folder_id: null`. Its templates and folders move with it. A folder can't move into itself or one of its own folders.
3005
+
3006
+ ### Examples
3007
+
3008
+ ```ruby
3009
+ require 'time'
3010
+ require 'docspring'
3011
+ # setup authorization
3012
+ DocSpring.configure do |config|
3013
+ # Configure HTTP basic authorization: api_token_basic
3014
+ config.username = 'YOUR USERNAME'
3015
+ config.password = 'YOUR PASSWORD'
3016
+ end
3017
+
3018
+ api_instance = DocSpring::Client.new
3019
+ folder_id = 'folder_id_example' # String | The folder's ID.
3020
+ body = DocSpring::MoveFolderRequest.new({parent_folder_id: 'parent_folder_id_example'}) # MoveFolderRequest | Where to move the folder.
3021
+
3022
+ begin
3023
+ # Move a folder
3024
+ result = api_instance.move_folder(folder_id, body)
3025
+ p result
3026
+ rescue DocSpring::ApiError => e
3027
+ puts "Error when calling Client->move_folder: #{e}"
3028
+ end
3029
+ ```
3030
+
3031
+ #### Using the move_folder_with_http_info variant
3032
+
3033
+ This returns an Array which contains the response data, status code and headers.
3034
+
3035
+ > <Array(<Folder>, Integer, Hash)> move_folder_with_http_info(folder_id, body)
3036
+
3037
+ ```ruby
3038
+ begin
3039
+ # Move a folder
3040
+ data, status_code, headers = api_instance.move_folder_with_http_info(folder_id, body)
3041
+ p status_code # => 2xx
3042
+ p headers # => { ... }
3043
+ p data # => <Folder>
3044
+ rescue DocSpring::ApiError => e
3045
+ puts "Error when calling Client->move_folder_with_http_info: #{e}"
3046
+ end
3047
+ ```
3048
+
3049
+ ### Parameters
3050
+
3051
+ | Name | Type | Description | Notes |
3052
+ | ---- | ---- | ----------- | ----- |
3053
+ | **folder_id** | **String** | The folder's ID. | |
3054
+ | **body** | [**MoveFolderRequest**](MoveFolderRequest.md) | Where to move the folder. | |
3055
+
3056
+ ### Return type
3057
+
3058
+ [**Folder**](Folder.md)
3059
+
3060
+ ### Authorization
3061
+
3062
+ [api_token_basic](../README.md#api_token_basic)
3063
+
3064
+ ### HTTP request headers
3065
+
3066
+ - **Content-Type**: application/json
3067
+ - **Accept**: application/json
3068
+
3069
+
3070
+ ## move_template
3071
+
3072
+ > <Template> move_template(template_id, body)
3073
+
3074
+ Move a template to a folder
3075
+
3076
+ Moves a template and all of its published versions to a folder, or to the root (`null`).
3077
+
3078
+ ### Examples
3079
+
3080
+ ```ruby
3081
+ require 'time'
3082
+ require 'docspring'
3083
+ # setup authorization
3084
+ DocSpring.configure do |config|
3085
+ # Configure HTTP basic authorization: api_token_basic
3086
+ config.username = 'YOUR USERNAME'
3087
+ config.password = 'YOUR PASSWORD'
3088
+ end
3089
+
3090
+ api_instance = DocSpring::Client.new
3091
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3092
+ body = DocSpring::MoveTemplateRequest.new({parent_folder_id: 'parent_folder_id_example'}) # MoveTemplateRequest | Where to move the template.
3093
+
3094
+ begin
3095
+ # Move a template to a folder
3096
+ result = api_instance.move_template(template_id, body)
3097
+ p result
3098
+ rescue DocSpring::ApiError => e
3099
+ puts "Error when calling Client->move_template: #{e}"
3100
+ end
3101
+ ```
3102
+
3103
+ #### Using the move_template_with_http_info variant
3104
+
3105
+ This returns an Array which contains the response data, status code and headers.
3106
+
3107
+ > <Array(<Template>, Integer, Hash)> move_template_with_http_info(template_id, body)
3108
+
3109
+ ```ruby
3110
+ begin
3111
+ # Move a template to a folder
3112
+ data, status_code, headers = api_instance.move_template_with_http_info(template_id, body)
3113
+ p status_code # => 2xx
3114
+ p headers # => { ... }
3115
+ p data # => <Template>
3116
+ rescue DocSpring::ApiError => e
3117
+ puts "Error when calling Client->move_template_with_http_info: #{e}"
3118
+ end
3119
+ ```
3120
+
3121
+ ### Parameters
3122
+
3123
+ | Name | Type | Description | Notes |
3124
+ | ---- | ---- | ----------- | ----- |
3125
+ | **template_id** | **String** | The template's ID. | |
3126
+ | **body** | [**MoveTemplateRequest**](MoveTemplateRequest.md) | Where to move the template. | |
3127
+
3128
+ ### Return type
3129
+
3130
+ [**Template**](Template.md)
3131
+
3132
+ ### Authorization
3133
+
3134
+ [api_token_basic](../README.md#api_token_basic)
3135
+
3136
+ ### HTTP request headers
3137
+
3138
+ - **Content-Type**: application/json
3139
+ - **Accept**: application/json
3140
+
3141
+
3142
+ ## publish_template_version
3143
+
3144
+ > <TemplateVersion> publish_template_version(template_id, body)
3145
+
3146
+ Publish a template version
3147
+
3148
+ Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
3149
+
3150
+ ### Examples
3151
+
3152
+ ```ruby
3153
+ require 'time'
3154
+ require 'docspring'
3155
+ # setup authorization
3156
+ DocSpring.configure do |config|
3157
+ # Configure HTTP basic authorization: api_token_basic
3158
+ config.username = 'YOUR USERNAME'
3159
+ config.password = 'YOUR PASSWORD'
3160
+ end
3161
+
3162
+ api_instance = DocSpring::Client.new
3163
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3164
+ body = DocSpring::PublishTemplateVersionRequest.new({version_type: DocSpring::TemplateVersionType::MAJOR}) # PublishTemplateVersionRequest | The version to publish.
3165
+
2786
3166
  begin
2787
3167
  # Publish a template version
2788
- data, status_code, headers = api_instance.publish_template_version_with_http_info(template_id, data)
3168
+ result = api_instance.publish_template_version(template_id, body)
3169
+ p result
3170
+ rescue DocSpring::ApiError => e
3171
+ puts "Error when calling Client->publish_template_version: #{e}"
3172
+ end
3173
+ ```
3174
+
3175
+ #### Using the publish_template_version_with_http_info variant
3176
+
3177
+ This returns an Array which contains the response data, status code and headers.
3178
+
3179
+ > <Array(<TemplateVersion>, Integer, Hash)> publish_template_version_with_http_info(template_id, body)
3180
+
3181
+ ```ruby
3182
+ begin
3183
+ # Publish a template version
3184
+ data, status_code, headers = api_instance.publish_template_version_with_http_info(template_id, body)
3185
+ p status_code # => 2xx
3186
+ p headers # => { ... }
3187
+ p data # => <TemplateVersion>
3188
+ rescue DocSpring::ApiError => e
3189
+ puts "Error when calling Client->publish_template_version_with_http_info: #{e}"
3190
+ end
3191
+ ```
3192
+
3193
+ ### Parameters
3194
+
3195
+ | Name | Type | Description | Notes |
3196
+ | ---- | ---- | ----------- | ----- |
3197
+ | **template_id** | **String** | The template's ID. | |
3198
+ | **body** | [**PublishTemplateVersionRequest**](PublishTemplateVersionRequest.md) | The version to publish. | |
3199
+
3200
+ ### Return type
3201
+
3202
+ [**TemplateVersion**](TemplateVersion.md)
3203
+
3204
+ ### Authorization
3205
+
3206
+ [api_token_basic](../README.md#api_token_basic)
3207
+
3208
+ ### HTTP request headers
3209
+
3210
+ - **Content-Type**: application/json
3211
+ - **Accept**: application/json
3212
+
3213
+
3214
+ ## remove_template_fields
3215
+
3216
+ > <TemplateFields> remove_template_fields(template_id, body)
3217
+
3218
+ Remove fields from a template
3219
+
3220
+ Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
3221
+
3222
+ ### Examples
3223
+
3224
+ ```ruby
3225
+ require 'time'
3226
+ require 'docspring'
3227
+ # setup authorization
3228
+ DocSpring.configure do |config|
3229
+ # Configure HTTP basic authorization: api_token_basic
3230
+ config.username = 'YOUR USERNAME'
3231
+ config.password = 'YOUR PASSWORD'
3232
+ end
3233
+
3234
+ api_instance = DocSpring::Client.new
3235
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3236
+ body = DocSpring::RemoveTemplateFieldsRequest.new({field_ids: [37]}) # RemoveTemplateFieldsRequest | The fields to remove from the template's draft.
3237
+
3238
+ begin
3239
+ # Remove fields from a template
3240
+ result = api_instance.remove_template_fields(template_id, body)
3241
+ p result
3242
+ rescue DocSpring::ApiError => e
3243
+ puts "Error when calling Client->remove_template_fields: #{e}"
3244
+ end
3245
+ ```
3246
+
3247
+ #### Using the remove_template_fields_with_http_info variant
3248
+
3249
+ This returns an Array which contains the response data, status code and headers.
3250
+
3251
+ > <Array(<TemplateFields>, Integer, Hash)> remove_template_fields_with_http_info(template_id, body)
3252
+
3253
+ ```ruby
3254
+ begin
3255
+ # Remove fields from a template
3256
+ data, status_code, headers = api_instance.remove_template_fields_with_http_info(template_id, body)
2789
3257
  p status_code # => 2xx
2790
3258
  p headers # => { ... }
2791
- p data # => <TemplatePublishVersionResponse>
3259
+ p data # => <TemplateFields>
2792
3260
  rescue DocSpring::ApiError => e
2793
- puts "Error when calling Client->publish_template_version_with_http_info: #{e}"
3261
+ puts "Error when calling Client->remove_template_fields_with_http_info: #{e}"
2794
3262
  end
2795
3263
  ```
2796
3264
 
@@ -2798,12 +3266,12 @@ end
2798
3266
 
2799
3267
  | Name | Type | Description | Notes |
2800
3268
  | ---- | ---- | ----------- | ----- |
2801
- | **template_id** | **String** | | |
2802
- | **data** | [**PublishVersionData**](PublishVersionData.md) | | |
3269
+ | **template_id** | **String** | The template's ID. | |
3270
+ | **body** | [**RemoveTemplateFieldsRequest**](RemoveTemplateFieldsRequest.md) | The fields to remove from the template's draft. | |
2803
3271
 
2804
3272
  ### Return type
2805
3273
 
2806
- [**TemplatePublishVersionResponse**](TemplatePublishVersionResponse.md)
3274
+ [**TemplateFields**](TemplateFields.md)
2807
3275
 
2808
3276
  ### Authorization
2809
3277
 
@@ -2817,11 +3285,11 @@ end
2817
3285
 
2818
3286
  ## rename_folder
2819
3287
 
2820
- > <Folder> rename_folder(folder_id, data)
3288
+ > <Folder> rename_folder(folder_id, body)
2821
3289
 
2822
3290
  Rename a folder
2823
3291
 
2824
- Renames an existing folder. The new name must be unique within the same parent folder. This operation only changes the folder name, not its location or contents.
3292
+ Renames a folder. The name must be unique within its parent folder.
2825
3293
 
2826
3294
  ### Examples
2827
3295
 
@@ -2836,12 +3304,12 @@ DocSpring.configure do |config|
2836
3304
  end
2837
3305
 
2838
3306
  api_instance = DocSpring::Client.new
2839
- folder_id = 'fld_1234567890abcdef01' # String |
2840
- data = DocSpring::RenameFolderData.new({name: 'name_example'}) # RenameFolderData |
3307
+ folder_id = 'folder_id_example' # String | The folder's ID.
3308
+ body = DocSpring::RenameFolderRequest.new({name: 'name_example'}) # RenameFolderRequest | The folder's new name.
2841
3309
 
2842
3310
  begin
2843
3311
  # Rename a folder
2844
- result = api_instance.rename_folder(folder_id, data)
3312
+ result = api_instance.rename_folder(folder_id, body)
2845
3313
  p result
2846
3314
  rescue DocSpring::ApiError => e
2847
3315
  puts "Error when calling Client->rename_folder: #{e}"
@@ -2852,12 +3320,12 @@ end
2852
3320
 
2853
3321
  This returns an Array which contains the response data, status code and headers.
2854
3322
 
2855
- > <Array(<Folder>, Integer, Hash)> rename_folder_with_http_info(folder_id, data)
3323
+ > <Array(<Folder>, Integer, Hash)> rename_folder_with_http_info(folder_id, body)
2856
3324
 
2857
3325
  ```ruby
2858
3326
  begin
2859
3327
  # Rename a folder
2860
- data, status_code, headers = api_instance.rename_folder_with_http_info(folder_id, data)
3328
+ data, status_code, headers = api_instance.rename_folder_with_http_info(folder_id, body)
2861
3329
  p status_code # => 2xx
2862
3330
  p headers # => { ... }
2863
3331
  p data # => <Folder>
@@ -2870,8 +3338,8 @@ end
2870
3338
 
2871
3339
  | Name | Type | Description | Notes |
2872
3340
  | ---- | ---- | ----------- | ----- |
2873
- | **folder_id** | **String** | | |
2874
- | **data** | [**RenameFolderData**](RenameFolderData.md) | | |
3341
+ | **folder_id** | **String** | The folder's ID. | |
3342
+ | **body** | [**RenameFolderRequest**](RenameFolderRequest.md) | The folder's new name. | |
2875
3343
 
2876
3344
  ### Return type
2877
3345
 
@@ -2887,13 +3355,85 @@ end
2887
3355
  - **Accept**: application/json
2888
3356
 
2889
3357
 
3358
+ ## reorder_template_fields
3359
+
3360
+ > <TemplateFields> reorder_template_fields(template_id, body)
3361
+
3362
+ Reorder a template's fields
3363
+
3364
+ Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
3365
+
3366
+ ### Examples
3367
+
3368
+ ```ruby
3369
+ require 'time'
3370
+ require 'docspring'
3371
+ # setup authorization
3372
+ DocSpring.configure do |config|
3373
+ # Configure HTTP basic authorization: api_token_basic
3374
+ config.username = 'YOUR USERNAME'
3375
+ config.password = 'YOUR PASSWORD'
3376
+ end
3377
+
3378
+ api_instance = DocSpring::Client.new
3379
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3380
+ body = DocSpring::ReorderTemplateFieldsRequest.new({field_ids: [37]}) # ReorderTemplateFieldsRequest | The new order of the fields in the template's draft.
3381
+
3382
+ begin
3383
+ # Reorder a template's fields
3384
+ result = api_instance.reorder_template_fields(template_id, body)
3385
+ p result
3386
+ rescue DocSpring::ApiError => e
3387
+ puts "Error when calling Client->reorder_template_fields: #{e}"
3388
+ end
3389
+ ```
3390
+
3391
+ #### Using the reorder_template_fields_with_http_info variant
3392
+
3393
+ This returns an Array which contains the response data, status code and headers.
3394
+
3395
+ > <Array(<TemplateFields>, Integer, Hash)> reorder_template_fields_with_http_info(template_id, body)
3396
+
3397
+ ```ruby
3398
+ begin
3399
+ # Reorder a template's fields
3400
+ data, status_code, headers = api_instance.reorder_template_fields_with_http_info(template_id, body)
3401
+ p status_code # => 2xx
3402
+ p headers # => { ... }
3403
+ p data # => <TemplateFields>
3404
+ rescue DocSpring::ApiError => e
3405
+ puts "Error when calling Client->reorder_template_fields_with_http_info: #{e}"
3406
+ end
3407
+ ```
3408
+
3409
+ ### Parameters
3410
+
3411
+ | Name | Type | Description | Notes |
3412
+ | ---- | ---- | ----------- | ----- |
3413
+ | **template_id** | **String** | The template's ID. | |
3414
+ | **body** | [**ReorderTemplateFieldsRequest**](ReorderTemplateFieldsRequest.md) | The new order of the fields in the template's draft. | |
3415
+
3416
+ ### Return type
3417
+
3418
+ [**TemplateFields**](TemplateFields.md)
3419
+
3420
+ ### Authorization
3421
+
3422
+ [api_token_basic](../README.md#api_token_basic)
3423
+
3424
+ ### HTTP request headers
3425
+
3426
+ - **Content-Type**: application/json
3427
+ - **Accept**: application/json
3428
+
3429
+
2890
3430
  ## restore_template_version
2891
3431
 
2892
- > <SuccessErrorResponse> restore_template_version(template_id, data)
3432
+ > <Template> restore_template_version(template_id, body)
2893
3433
 
2894
3434
  Restore a template version
2895
3435
 
2896
- Restores your template to a previously published version, copying that version's content and configuration to the current draft. Use this to revert changes or recover from an unwanted modification.
3436
+ Replaces the template's draft with a copy of one of its published versions.
2897
3437
 
2898
3438
  ### Examples
2899
3439
 
@@ -2908,12 +3448,12 @@ DocSpring.configure do |config|
2908
3448
  end
2909
3449
 
2910
3450
  api_instance = DocSpring::Client.new
2911
- template_id = 'tpl_1234567890abcdef01' # String |
2912
- data = DocSpring::RestoreVersionData.new({version: 'version_example'}) # RestoreVersionData |
3451
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3452
+ body = DocSpring::RestoreTemplateVersionRequest.new({version: 'version_example'}) # RestoreTemplateVersionRequest | The version to restore.
2913
3453
 
2914
3454
  begin
2915
3455
  # Restore a template version
2916
- result = api_instance.restore_template_version(template_id, data)
3456
+ result = api_instance.restore_template_version(template_id, body)
2917
3457
  p result
2918
3458
  rescue DocSpring::ApiError => e
2919
3459
  puts "Error when calling Client->restore_template_version: #{e}"
@@ -2924,15 +3464,15 @@ end
2924
3464
 
2925
3465
  This returns an Array which contains the response data, status code and headers.
2926
3466
 
2927
- > <Array(<SuccessErrorResponse>, Integer, Hash)> restore_template_version_with_http_info(template_id, data)
3467
+ > <Array(<Template>, Integer, Hash)> restore_template_version_with_http_info(template_id, body)
2928
3468
 
2929
3469
  ```ruby
2930
3470
  begin
2931
3471
  # Restore a template version
2932
- data, status_code, headers = api_instance.restore_template_version_with_http_info(template_id, data)
3472
+ data, status_code, headers = api_instance.restore_template_version_with_http_info(template_id, body)
2933
3473
  p status_code # => 2xx
2934
3474
  p headers # => { ... }
2935
- p data # => <SuccessErrorResponse>
3475
+ p data # => <Template>
2936
3476
  rescue DocSpring::ApiError => e
2937
3477
  puts "Error when calling Client->restore_template_version_with_http_info: #{e}"
2938
3478
  end
@@ -2942,12 +3482,12 @@ end
2942
3482
 
2943
3483
  | Name | Type | Description | Notes |
2944
3484
  | ---- | ---- | ----------- | ----- |
2945
- | **template_id** | **String** | | |
2946
- | **data** | [**RestoreVersionData**](RestoreVersionData.md) | | |
3485
+ | **template_id** | **String** | The template's ID. | |
3486
+ | **body** | [**RestoreTemplateVersionRequest**](RestoreTemplateVersionRequest.md) | The version to restore. | |
2947
3487
 
2948
3488
  ### Return type
2949
3489
 
2950
- [**SuccessErrorResponse**](SuccessErrorResponse.md)
3490
+ [**Template**](Template.md)
2951
3491
 
2952
3492
  ### Authorization
2953
3493
 
@@ -2961,11 +3501,11 @@ end
2961
3501
 
2962
3502
  ## test_authentication
2963
3503
 
2964
- > <SuccessErrorResponse> test_authentication
3504
+ > <AuthenticationCheck> test_authentication
2965
3505
 
2966
3506
  Test authentication
2967
3507
 
2968
- Checks whether your API token is valid by making an authenticated request. Returns a success response if authentication passes. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
3508
+ Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
2969
3509
 
2970
3510
  ### Examples
2971
3511
 
@@ -2994,7 +3534,7 @@ end
2994
3534
 
2995
3535
  This returns an Array which contains the response data, status code and headers.
2996
3536
 
2997
- > <Array(<SuccessErrorResponse>, Integer, Hash)> test_authentication_with_http_info
3537
+ > <Array(<AuthenticationCheck>, Integer, Hash)> test_authentication_with_http_info
2998
3538
 
2999
3539
  ```ruby
3000
3540
  begin
@@ -3002,7 +3542,7 @@ begin
3002
3542
  data, status_code, headers = api_instance.test_authentication_with_http_info
3003
3543
  p status_code # => 2xx
3004
3544
  p headers # => { ... }
3005
- p data # => <SuccessErrorResponse>
3545
+ p data # => <AuthenticationCheck>
3006
3546
  rescue DocSpring::ApiError => e
3007
3547
  puts "Error when calling Client->test_authentication_with_http_info: #{e}"
3008
3548
  end
@@ -3014,7 +3554,7 @@ This endpoint does not need any parameter.
3014
3554
 
3015
3555
  ### Return type
3016
3556
 
3017
- [**SuccessErrorResponse**](SuccessErrorResponse.md)
3557
+ [**AuthenticationCheck**](AuthenticationCheck.md)
3018
3558
 
3019
3559
  ### Authorization
3020
3560
 
@@ -3026,13 +3566,13 @@ This endpoint does not need any parameter.
3026
3566
  - **Accept**: application/json
3027
3567
 
3028
3568
 
3029
- ## update_data_request
3569
+ ## update_signature_request
3030
3570
 
3031
- > <CreateSubmissionDataRequestResponse> update_data_request(data_request_id, data)
3571
+ > <SignatureRequest> update_signature_request(signature_request_id, body)
3032
3572
 
3033
- Update a submission data request
3573
+ Update a signature request
3034
3574
 
3035
- Updates authentication details for a data request. Use this when a user logs in to record their authentication method, provider, session information, and hashed identifiers. Updates metadata and tracks authentication state changes for auditing and compliance.
3575
+ Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
3036
3576
 
3037
3577
  ### Examples
3038
3578
 
@@ -3047,33 +3587,33 @@ DocSpring.configure do |config|
3047
3587
  end
3048
3588
 
3049
3589
  api_instance = DocSpring::Client.new
3050
- data_request_id = 'drq_1234567890abcdef01' # String |
3051
- data = DocSpring::UpdateSubmissionDataRequestData.new # UpdateSubmissionDataRequestData |
3590
+ signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
3591
+ body = DocSpring::UpdateSignatureRequestRequest.new # UpdateSignatureRequestRequest | The settings to change. Properties left out keep their values.
3052
3592
 
3053
3593
  begin
3054
- # Update a submission data request
3055
- result = api_instance.update_data_request(data_request_id, data)
3594
+ # Update a signature request
3595
+ result = api_instance.update_signature_request(signature_request_id, body)
3056
3596
  p result
3057
3597
  rescue DocSpring::ApiError => e
3058
- puts "Error when calling Client->update_data_request: #{e}"
3598
+ puts "Error when calling Client->update_signature_request: #{e}"
3059
3599
  end
3060
3600
  ```
3061
3601
 
3062
- #### Using the update_data_request_with_http_info variant
3602
+ #### Using the update_signature_request_with_http_info variant
3063
3603
 
3064
3604
  This returns an Array which contains the response data, status code and headers.
3065
3605
 
3066
- > <Array(<CreateSubmissionDataRequestResponse>, Integer, Hash)> update_data_request_with_http_info(data_request_id, data)
3606
+ > <Array(<SignatureRequest>, Integer, Hash)> update_signature_request_with_http_info(signature_request_id, body)
3067
3607
 
3068
3608
  ```ruby
3069
3609
  begin
3070
- # Update a submission data request
3071
- data, status_code, headers = api_instance.update_data_request_with_http_info(data_request_id, data)
3610
+ # Update a signature request
3611
+ data, status_code, headers = api_instance.update_signature_request_with_http_info(signature_request_id, body)
3072
3612
  p status_code # => 2xx
3073
3613
  p headers # => { ... }
3074
- p data # => <CreateSubmissionDataRequestResponse>
3614
+ p data # => <SignatureRequest>
3075
3615
  rescue DocSpring::ApiError => e
3076
- puts "Error when calling Client->update_data_request_with_http_info: #{e}"
3616
+ puts "Error when calling Client->update_signature_request_with_http_info: #{e}"
3077
3617
  end
3078
3618
  ```
3079
3619
 
@@ -3081,12 +3621,12 @@ end
3081
3621
 
3082
3622
  | Name | Type | Description | Notes |
3083
3623
  | ---- | ---- | ----------- | ----- |
3084
- | **data_request_id** | **String** | | |
3085
- | **data** | [**UpdateSubmissionDataRequestData**](UpdateSubmissionDataRequestData.md) | | |
3624
+ | **signature_request_id** | **String** | The signature request's ID. | |
3625
+ | **body** | [**UpdateSignatureRequestRequest**](UpdateSignatureRequestRequest.md) | The settings to change. Properties left out keep their values. | |
3086
3626
 
3087
3627
  ### Return type
3088
3628
 
3089
- [**CreateSubmissionDataRequestResponse**](CreateSubmissionDataRequestResponse.md)
3629
+ [**SignatureRequest**](SignatureRequest.md)
3090
3630
 
3091
3631
  ### Authorization
3092
3632
 
@@ -3100,11 +3640,11 @@ end
3100
3640
 
3101
3641
  ## update_template
3102
3642
 
3103
- > <SuccessMultipleErrorsResponse> update_template(template_id, data)
3643
+ > <Template> update_template(template_id, body)
3104
3644
 
3105
- Update a Template
3645
+ Update a template
3106
3646
 
3107
- Updates template content and properties. For HTML templates, you can modify the HTML, SCSS, headers, footers, name, and description. Changes are applied to your draft template and do not affect published template versions. The exception is `parent_folder_id`: moving the template to another folder moves its published versions too.
3647
+ Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
3108
3648
 
3109
3649
  ### Examples
3110
3650
 
@@ -3119,12 +3659,12 @@ DocSpring.configure do |config|
3119
3659
  end
3120
3660
 
3121
3661
  api_instance = DocSpring::Client.new
3122
- template_id = 'tpl_1234567890abcdef03' # String |
3123
- data = DocSpring::UpdateHtmlTemplate.new({template: 3.56}) # UpdateHtmlTemplate |
3662
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3663
+ body = DocSpring::UpdateTemplateRequest.new # UpdateTemplateRequest | The settings to change. Properties left out keep their values.
3124
3664
 
3125
3665
  begin
3126
- # Update a Template
3127
- result = api_instance.update_template(template_id, data)
3666
+ # Update a template
3667
+ result = api_instance.update_template(template_id, body)
3128
3668
  p result
3129
3669
  rescue DocSpring::ApiError => e
3130
3670
  puts "Error when calling Client->update_template: #{e}"
@@ -3135,15 +3675,15 @@ end
3135
3675
 
3136
3676
  This returns an Array which contains the response data, status code and headers.
3137
3677
 
3138
- > <Array(<SuccessMultipleErrorsResponse>, Integer, Hash)> update_template_with_http_info(template_id, data)
3678
+ > <Array(<Template>, Integer, Hash)> update_template_with_http_info(template_id, body)
3139
3679
 
3140
3680
  ```ruby
3141
3681
  begin
3142
- # Update a Template
3143
- data, status_code, headers = api_instance.update_template_with_http_info(template_id, data)
3682
+ # Update a template
3683
+ data, status_code, headers = api_instance.update_template_with_http_info(template_id, body)
3144
3684
  p status_code # => 2xx
3145
3685
  p headers # => { ... }
3146
- p data # => <SuccessMultipleErrorsResponse>
3686
+ p data # => <Template>
3147
3687
  rescue DocSpring::ApiError => e
3148
3688
  puts "Error when calling Client->update_template_with_http_info: #{e}"
3149
3689
  end
@@ -3153,12 +3693,12 @@ end
3153
3693
 
3154
3694
  | Name | Type | Description | Notes |
3155
3695
  | ---- | ---- | ----------- | ----- |
3156
- | **template_id** | **String** | | |
3157
- | **data** | [**UpdateHtmlTemplate**](UpdateHtmlTemplate.md) | | |
3696
+ | **template_id** | **String** | The template's ID. | |
3697
+ | **body** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | The settings to change. Properties left out keep their values. | |
3158
3698
 
3159
3699
  ### Return type
3160
3700
 
3161
- [**SuccessMultipleErrorsResponse**](SuccessMultipleErrorsResponse.md)
3701
+ [**Template**](Template.md)
3162
3702
 
3163
3703
  ### Authorization
3164
3704
 
@@ -3172,11 +3712,11 @@ end
3172
3712
 
3173
3713
  ## update_template_document
3174
3714
 
3175
- > <SuccessMultipleErrorsResponse> update_template_document(template_id, template_document, opts)
3715
+ > <Template> update_template_document(template_id, body, opts)
3176
3716
 
3177
- Update a template's document with a form POST file upload
3717
+ Replace a template's PDF
3178
3718
 
3179
- Upload a new PDF file to update a PDF template's document. This replaces the template's PDF while preserving all of the existing fields. If you upload a PDF with fewer pages than the current document, any fields on the removed pages will be deleted.
3719
+ Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
3180
3720
 
3181
3721
  ### Examples
3182
3722
 
@@ -3191,15 +3731,15 @@ DocSpring.configure do |config|
3191
3731
  end
3192
3732
 
3193
3733
  api_instance = DocSpring::Client.new
3194
- template_id = 'tpl_1234567890abcdef01' # String |
3195
- template_document = File.new('/path/to/some/file') # File |
3734
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3735
+ body = DocSpring::UpdateTemplateDocumentRequest.new # UpdateTemplateDocumentRequest | The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
3196
3736
  opts = {
3197
- template_name: 'template_name_example' # String |
3737
+ wait: true # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
3198
3738
  }
3199
3739
 
3200
3740
  begin
3201
- # Update a template's document with a form POST file upload
3202
- result = api_instance.update_template_document(template_id, template_document, opts)
3741
+ # Replace a template's PDF
3742
+ result = api_instance.update_template_document(template_id, body, opts)
3203
3743
  p result
3204
3744
  rescue DocSpring::ApiError => e
3205
3745
  puts "Error when calling Client->update_template_document: #{e}"
@@ -3210,15 +3750,15 @@ end
3210
3750
 
3211
3751
  This returns an Array which contains the response data, status code and headers.
3212
3752
 
3213
- > <Array(<SuccessMultipleErrorsResponse>, Integer, Hash)> update_template_document_with_http_info(template_id, template_document, opts)
3753
+ > <Array(<Template>, Integer, Hash)> update_template_document_with_http_info(template_id, body, opts)
3214
3754
 
3215
3755
  ```ruby
3216
3756
  begin
3217
- # Update a template's document with a form POST file upload
3218
- data, status_code, headers = api_instance.update_template_document_with_http_info(template_id, template_document, opts)
3757
+ # Replace a template's PDF
3758
+ data, status_code, headers = api_instance.update_template_document_with_http_info(template_id, body, opts)
3219
3759
  p status_code # => 2xx
3220
3760
  p headers # => { ... }
3221
- p data # => <SuccessMultipleErrorsResponse>
3761
+ p data # => <Template>
3222
3762
  rescue DocSpring::ApiError => e
3223
3763
  puts "Error when calling Client->update_template_document_with_http_info: #{e}"
3224
3764
  end
@@ -3228,13 +3768,13 @@ end
3228
3768
 
3229
3769
  | Name | Type | Description | Notes |
3230
3770
  | ---- | ---- | ----------- | ----- |
3231
- | **template_id** | **String** | | |
3232
- | **template_document** | **File** | | |
3233
- | **template_name** | **String** | | [optional] |
3771
+ | **template_id** | **String** | The template's ID. | |
3772
+ | **body** | [**UpdateTemplateDocumentRequest**](UpdateTemplateDocumentRequest.md) | The new PDF, as one of `cache_id`, `document_url` and `document_base64`. | |
3773
+ | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
3234
3774
 
3235
3775
  ### Return type
3236
3776
 
3237
- [**SuccessMultipleErrorsResponse**](SuccessMultipleErrorsResponse.md)
3777
+ [**Template**](Template.md)
3238
3778
 
3239
3779
  ### Authorization
3240
3780
 
@@ -3242,17 +3782,17 @@ end
3242
3782
 
3243
3783
  ### HTTP request headers
3244
3784
 
3245
- - **Content-Type**: multipart/form-data
3785
+ - **Content-Type**: application/json
3246
3786
  - **Accept**: application/json
3247
3787
 
3248
3788
 
3249
- ## update_template_document_from_upload
3789
+ ## update_template_fields
3250
3790
 
3251
- > <SuccessMultipleErrorsResponse> update_template_document_from_upload(template_id, data)
3791
+ > <TemplateFields> update_template_fields(template_id, body)
3252
3792
 
3253
- Update a template's document with a cached S3 file upload
3793
+ Update a template's fields
3254
3794
 
3255
- Updates a PDF template's document using a cached file upload. This is a three-step process: First, request a presigned URL to upload your PDF file to our S3 bucket. Then, use that URL to upload your PDF file. Finally, submit the ID of the uploaded file to replace the template's document.
3795
+ Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
3256
3796
 
3257
3797
  ### Examples
3258
3798
 
@@ -3267,33 +3807,33 @@ DocSpring.configure do |config|
3267
3807
  end
3268
3808
 
3269
3809
  api_instance = DocSpring::Client.new
3270
- template_id = 'tpl_1234567890abcdef01' # String |
3271
- data = DocSpring::UpdatePdfTemplate.new({template: 3.56}) # UpdatePdfTemplate |
3810
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3811
+ body = DocSpring::UpdateTemplateFieldsRequest.new({fields: [DocSpring::FieldInput.new]}) # UpdateTemplateFieldsRequest | The fields to change in the template's draft.
3272
3812
 
3273
3813
  begin
3274
- # Update a template's document with a cached S3 file upload
3275
- result = api_instance.update_template_document_from_upload(template_id, data)
3814
+ # Update a template's fields
3815
+ result = api_instance.update_template_fields(template_id, body)
3276
3816
  p result
3277
3817
  rescue DocSpring::ApiError => e
3278
- puts "Error when calling Client->update_template_document_from_upload: #{e}"
3818
+ puts "Error when calling Client->update_template_fields: #{e}"
3279
3819
  end
3280
3820
  ```
3281
3821
 
3282
- #### Using the update_template_document_from_upload_with_http_info variant
3822
+ #### Using the update_template_fields_with_http_info variant
3283
3823
 
3284
3824
  This returns an Array which contains the response data, status code and headers.
3285
3825
 
3286
- > <Array(<SuccessMultipleErrorsResponse>, Integer, Hash)> update_template_document_from_upload_with_http_info(template_id, data)
3826
+ > <Array(<TemplateFields>, Integer, Hash)> update_template_fields_with_http_info(template_id, body)
3287
3827
 
3288
3828
  ```ruby
3289
3829
  begin
3290
- # Update a template's document with a cached S3 file upload
3291
- data, status_code, headers = api_instance.update_template_document_from_upload_with_http_info(template_id, data)
3830
+ # Update a template's fields
3831
+ data, status_code, headers = api_instance.update_template_fields_with_http_info(template_id, body)
3292
3832
  p status_code # => 2xx
3293
3833
  p headers # => { ... }
3294
- p data # => <SuccessMultipleErrorsResponse>
3834
+ p data # => <TemplateFields>
3295
3835
  rescue DocSpring::ApiError => e
3296
- puts "Error when calling Client->update_template_document_from_upload_with_http_info: #{e}"
3836
+ puts "Error when calling Client->update_template_fields_with_http_info: #{e}"
3297
3837
  end
3298
3838
  ```
3299
3839
 
@@ -3301,12 +3841,12 @@ end
3301
3841
 
3302
3842
  | Name | Type | Description | Notes |
3303
3843
  | ---- | ---- | ----------- | ----- |
3304
- | **template_id** | **String** | | |
3305
- | **data** | [**UpdatePdfTemplate**](UpdatePdfTemplate.md) | | |
3844
+ | **template_id** | **String** | The template's ID. | |
3845
+ | **body** | [**UpdateTemplateFieldsRequest**](UpdateTemplateFieldsRequest.md) | The fields to change in the template's draft. | |
3306
3846
 
3307
3847
  ### Return type
3308
3848
 
3309
- [**SuccessMultipleErrorsResponse**](SuccessMultipleErrorsResponse.md)
3849
+ [**TemplateFields**](TemplateFields.md)
3310
3850
 
3311
3851
  ### Authorization
3312
3852
 
@@ -3320,11 +3860,11 @@ end
3320
3860
 
3321
3861
  ## update_webhook
3322
3862
 
3323
- > <Webhook> update_webhook(webhook_id, data)
3863
+ > <Webhook> update_webhook(webhook_id, body)
3324
3864
 
3325
3865
  Update a webhook
3326
3866
 
3327
- Updates the configuration of an existing webhook.
3867
+ Updates a webhook. Only the properties you send change.
3328
3868
 
3329
3869
  ### Examples
3330
3870
 
@@ -3339,12 +3879,12 @@ DocSpring.configure do |config|
3339
3879
  end
3340
3880
 
3341
3881
  api_instance = DocSpring::Client.new
3342
- webhook_id = 'whk_1234567890abcdef01' # String |
3343
- data = DocSpring::UpdateWebhookData.new({webhook: 3.56}) # UpdateWebhookData |
3882
+ webhook_id = 'webhook_id_example' # String | The webhook's ID.
3883
+ body = DocSpring::UpdateWebhookRequest.new # UpdateWebhookRequest | The settings to change. Properties left out keep their values.
3344
3884
 
3345
3885
  begin
3346
3886
  # Update a webhook
3347
- result = api_instance.update_webhook(webhook_id, data)
3887
+ result = api_instance.update_webhook(webhook_id, body)
3348
3888
  p result
3349
3889
  rescue DocSpring::ApiError => e
3350
3890
  puts "Error when calling Client->update_webhook: #{e}"
@@ -3355,12 +3895,12 @@ end
3355
3895
 
3356
3896
  This returns an Array which contains the response data, status code and headers.
3357
3897
 
3358
- > <Array(<Webhook>, Integer, Hash)> update_webhook_with_http_info(webhook_id, data)
3898
+ > <Array(<Webhook>, Integer, Hash)> update_webhook_with_http_info(webhook_id, body)
3359
3899
 
3360
3900
  ```ruby
3361
3901
  begin
3362
3902
  # Update a webhook
3363
- data, status_code, headers = api_instance.update_webhook_with_http_info(webhook_id, data)
3903
+ data, status_code, headers = api_instance.update_webhook_with_http_info(webhook_id, body)
3364
3904
  p status_code # => 2xx
3365
3905
  p headers # => { ... }
3366
3906
  p data # => <Webhook>
@@ -3373,8 +3913,8 @@ end
3373
3913
 
3374
3914
  | Name | Type | Description | Notes |
3375
3915
  | ---- | ---- | ----------- | ----- |
3376
- | **webhook_id** | **String** | | |
3377
- | **data** | [**UpdateWebhookData**](UpdateWebhookData.md) | | |
3916
+ | **webhook_id** | **String** | The webhook's ID. | |
3917
+ | **body** | [**UpdateWebhookRequest**](UpdateWebhookRequest.md) | The settings to change. Properties left out keep their values. | |
3378
3918
 
3379
3919
  ### Return type
3380
3920
 
@@ -3389,3 +3929,247 @@ end
3389
3929
  - **Content-Type**: application/json
3390
3930
  - **Accept**: application/json
3391
3931
 
3932
+
3933
+ ## upload_template
3934
+
3935
+ > <Template> upload_template(document, opts)
3936
+
3937
+ Create a PDF template from an uploaded PDF
3938
+
3939
+ Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
3940
+
3941
+ ### Examples
3942
+
3943
+ ```ruby
3944
+ require 'time'
3945
+ require 'docspring'
3946
+ # setup authorization
3947
+ DocSpring.configure do |config|
3948
+ # Configure HTTP basic authorization: api_token_basic
3949
+ config.username = 'YOUR USERNAME'
3950
+ config.password = 'YOUR PASSWORD'
3951
+ end
3952
+
3953
+ api_instance = DocSpring::Client.new
3954
+ document = File.new('/path/to/some/file') # File | The PDF.
3955
+ opts = {
3956
+ wait: true, # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
3957
+ name: 'name_example', # String | The template's name.
3958
+ description: 'description_example', # String | The template's description.
3959
+ parent_folder_id: 'parent_folder_id_example', # String | The folder to put the template in. Left out, it's created at the root.
3960
+ ai_field_naming_language: DocSpring::AiFieldNamingLanguage::AUTO, # AiFieldNamingLanguage | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
3961
+ detect_fields: true, # Boolean | Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
3962
+ field_source: DocSpring::FieldSetupSource::AUTO, # FieldSetupSource | With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
3963
+ field_naming: DocSpring::FieldSetupNaming::AI, # FieldSetupNaming | With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
3964
+ field_logic: DocSpring::FieldSetupLogic::AI # FieldSetupLogic | With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
3965
+ }
3966
+
3967
+ begin
3968
+ # Create a PDF template from an uploaded PDF
3969
+ result = api_instance.upload_template(document, opts)
3970
+ p result
3971
+ rescue DocSpring::ApiError => e
3972
+ puts "Error when calling Client->upload_template: #{e}"
3973
+ end
3974
+ ```
3975
+
3976
+ #### Using the upload_template_with_http_info variant
3977
+
3978
+ This returns an Array which contains the response data, status code and headers.
3979
+
3980
+ > <Array(<Template>, Integer, Hash)> upload_template_with_http_info(document, opts)
3981
+
3982
+ ```ruby
3983
+ begin
3984
+ # Create a PDF template from an uploaded PDF
3985
+ data, status_code, headers = api_instance.upload_template_with_http_info(document, opts)
3986
+ p status_code # => 2xx
3987
+ p headers # => { ... }
3988
+ p data # => <Template>
3989
+ rescue DocSpring::ApiError => e
3990
+ puts "Error when calling Client->upload_template_with_http_info: #{e}"
3991
+ end
3992
+ ```
3993
+
3994
+ ### Parameters
3995
+
3996
+ | Name | Type | Description | Notes |
3997
+ | ---- | ---- | ----------- | ----- |
3998
+ | **document** | **File** | The PDF. | |
3999
+ | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
4000
+ | **name** | **String** | The template's name. | [optional] |
4001
+ | **description** | **String** | The template's description. | [optional] |
4002
+ | **parent_folder_id** | **String** | The folder to put the template in. Left out, it's created at the root. | [optional] |
4003
+ | **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings. | [optional] |
4004
+ | **detect_fields** | **Boolean** | Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up. | [optional] |
4005
+ | **field_source** | [**FieldSetupSource**](FieldSetupSource.md) | With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields. | [optional] |
4006
+ | **field_naming** | [**FieldSetupNaming**](FieldSetupNaming.md) | With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`. | [optional] |
4007
+ | **field_logic** | [**FieldSetupLogic**](FieldSetupLogic.md) | With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings. | [optional] |
4008
+
4009
+ ### Return type
4010
+
4011
+ [**Template**](Template.md)
4012
+
4013
+ ### Authorization
4014
+
4015
+ [api_token_basic](../README.md#api_token_basic)
4016
+
4017
+ ### HTTP request headers
4018
+
4019
+ - **Content-Type**: multipart/form-data
4020
+ - **Accept**: application/json
4021
+
4022
+
4023
+ ## upload_template_document
4024
+
4025
+ > <Template> upload_template_document(template_id, document, opts)
4026
+
4027
+ Replace a template's PDF with an uploaded PDF
4028
+
4029
+ Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields.
4030
+
4031
+ ### Examples
4032
+
4033
+ ```ruby
4034
+ require 'time'
4035
+ require 'docspring'
4036
+ # setup authorization
4037
+ DocSpring.configure do |config|
4038
+ # Configure HTTP basic authorization: api_token_basic
4039
+ config.username = 'YOUR USERNAME'
4040
+ config.password = 'YOUR PASSWORD'
4041
+ end
4042
+
4043
+ api_instance = DocSpring::Client.new
4044
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
4045
+ document = File.new('/path/to/some/file') # File | The new PDF.
4046
+ opts = {
4047
+ wait: true, # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
4048
+ reimport_fields: true # Boolean | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
4049
+ }
4050
+
4051
+ begin
4052
+ # Replace a template's PDF with an uploaded PDF
4053
+ result = api_instance.upload_template_document(template_id, document, opts)
4054
+ p result
4055
+ rescue DocSpring::ApiError => e
4056
+ puts "Error when calling Client->upload_template_document: #{e}"
4057
+ end
4058
+ ```
4059
+
4060
+ #### Using the upload_template_document_with_http_info variant
4061
+
4062
+ This returns an Array which contains the response data, status code and headers.
4063
+
4064
+ > <Array(<Template>, Integer, Hash)> upload_template_document_with_http_info(template_id, document, opts)
4065
+
4066
+ ```ruby
4067
+ begin
4068
+ # Replace a template's PDF with an uploaded PDF
4069
+ data, status_code, headers = api_instance.upload_template_document_with_http_info(template_id, document, opts)
4070
+ p status_code # => 2xx
4071
+ p headers # => { ... }
4072
+ p data # => <Template>
4073
+ rescue DocSpring::ApiError => e
4074
+ puts "Error when calling Client->upload_template_document_with_http_info: #{e}"
4075
+ end
4076
+ ```
4077
+
4078
+ ### Parameters
4079
+
4080
+ | Name | Type | Description | Notes |
4081
+ | ---- | ---- | ----------- | ----- |
4082
+ | **template_id** | **String** | The template's ID. | |
4083
+ | **document** | **File** | The new PDF. | |
4084
+ | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
4085
+ | **reimport_fields** | **Boolean** | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. | [optional] |
4086
+
4087
+ ### Return type
4088
+
4089
+ [**Template**](Template.md)
4090
+
4091
+ ### Authorization
4092
+
4093
+ [api_token_basic](../README.md#api_token_basic)
4094
+
4095
+ ### HTTP request headers
4096
+
4097
+ - **Content-Type**: multipart/form-data
4098
+ - **Accept**: application/json
4099
+
4100
+
4101
+ ## validate_submission
4102
+
4103
+ > <SubmissionValidation> validate_submission(template_id, body, opts)
4104
+
4105
+ Check a submission without creating it
4106
+
4107
+ Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
4108
+
4109
+ ### Examples
4110
+
4111
+ ```ruby
4112
+ require 'time'
4113
+ require 'docspring'
4114
+ # setup authorization
4115
+ DocSpring.configure do |config|
4116
+ # Configure HTTP basic authorization: api_token_basic
4117
+ config.username = 'YOUR USERNAME'
4118
+ config.password = 'YOUR PASSWORD'
4119
+ end
4120
+
4121
+ api_instance = DocSpring::Client.new
4122
+ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
4123
+ body = DocSpring::ValidateSubmissionRequest.new # ValidateSubmissionRequest | The submission's data and settings.
4124
+ opts = {
4125
+ version: 'latest' # String | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
4126
+ }
4127
+
4128
+ begin
4129
+ # Check a submission without creating it
4130
+ result = api_instance.validate_submission(template_id, body, opts)
4131
+ p result
4132
+ rescue DocSpring::ApiError => e
4133
+ puts "Error when calling Client->validate_submission: #{e}"
4134
+ end
4135
+ ```
4136
+
4137
+ #### Using the validate_submission_with_http_info variant
4138
+
4139
+ This returns an Array which contains the response data, status code and headers.
4140
+
4141
+ > <Array(<SubmissionValidation>, Integer, Hash)> validate_submission_with_http_info(template_id, body, opts)
4142
+
4143
+ ```ruby
4144
+ begin
4145
+ # Check a submission without creating it
4146
+ data, status_code, headers = api_instance.validate_submission_with_http_info(template_id, body, opts)
4147
+ p status_code # => 2xx
4148
+ p headers # => { ... }
4149
+ p data # => <SubmissionValidation>
4150
+ rescue DocSpring::ApiError => e
4151
+ puts "Error when calling Client->validate_submission_with_http_info: #{e}"
4152
+ end
4153
+ ```
4154
+
4155
+ ### Parameters
4156
+
4157
+ | Name | Type | Description | Notes |
4158
+ | ---- | ---- | ----------- | ----- |
4159
+ | **template_id** | **String** | The template's ID. | |
4160
+ | **body** | [**ValidateSubmissionRequest**](ValidateSubmissionRequest.md) | The submission's data and settings. | |
4161
+ | **version** | **String** | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published). | [optional] |
4162
+
4163
+ ### Return type
4164
+
4165
+ [**SubmissionValidation**](SubmissionValidation.md)
4166
+
4167
+ ### Authorization
4168
+
4169
+ [api_token_basic](../README.md#api_token_basic)
4170
+
4171
+ ### HTTP request headers
4172
+
4173
+ - **Content-Type**: application/json
4174
+ - **Accept**: application/json
4175
+