docspring 3.3.0 → 3.5.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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +3 -0
  3. data/.travis.yml +1 -1
  4. data/AGENTS.md +33 -0
  5. data/CHANGELOG.md +19 -0
  6. data/Gemfile.lock +2 -2
  7. data/README.md +145 -178
  8. data/docs/BatchGeneratePdfs201Response.md +3 -1
  9. data/docs/Client.md +6 -6
  10. data/docs/CombinePdfsData.md +1 -1
  11. data/docs/CreateCombinedSubmissionResponse.md +5 -1
  12. data/docs/CreateCustomFileResponse.md +2 -0
  13. data/docs/CreatePdfSubmissionData.md +1 -1
  14. data/docs/CreateSubmissionDataRequestEventResponse.md +2 -0
  15. data/docs/CreateSubmissionDataRequestResponse.md +2 -0
  16. data/docs/CreateSubmissionDataRequestTokenResponse.md +2 -0
  17. data/docs/CreateSubmissionResponse.md +5 -1
  18. data/docs/ForbiddenErrorResponse.md +22 -0
  19. data/docs/SubmissionBatchData.md +1 -1
  20. data/docs/Template.md +2 -0
  21. data/docs/TemplatePreview.md +2 -0
  22. data/docspring.gemspec +1 -1
  23. data/lib/docspring/api/client.rb +13 -13
  24. data/lib/docspring/api_client.rb +2 -2
  25. data/lib/docspring/api_error.rb +1 -1
  26. data/lib/docspring/configuration.rb +1 -1
  27. data/lib/docspring/models/add_fields_data.rb +1 -1
  28. data/lib/docspring/models/batch_generate_pdfs201_response.rb +15 -5
  29. data/lib/docspring/models/combine_pdfs_data.rb +2 -2
  30. data/lib/docspring/models/combined_submission.rb +3 -3
  31. data/lib/docspring/models/combined_submission_action.rb +1 -1
  32. data/lib/docspring/models/copy_template_options.rb +1 -1
  33. data/lib/docspring/models/create_combined_submission_response.rb +24 -5
  34. data/lib/docspring/models/create_custom_file_data.rb +1 -1
  35. data/lib/docspring/models/create_custom_file_response.rb +11 -2
  36. data/lib/docspring/models/create_folder_data.rb +1 -1
  37. data/lib/docspring/models/create_html_template.rb +1 -1
  38. data/lib/docspring/models/create_pdf_submission_data.rb +2 -1
  39. data/lib/docspring/models/create_pdf_template.rb +1 -1
  40. data/lib/docspring/models/create_submission_data_request_data.rb +1 -1
  41. data/lib/docspring/models/create_submission_data_request_event_request.rb +1 -1
  42. data/lib/docspring/models/create_submission_data_request_event_response.rb +11 -2
  43. data/lib/docspring/models/create_submission_data_request_response.rb +11 -2
  44. data/lib/docspring/models/create_submission_data_request_token_response.rb +11 -2
  45. data/lib/docspring/models/create_submission_response.rb +24 -5
  46. data/lib/docspring/models/create_webhook_data.rb +1 -1
  47. data/lib/docspring/models/custom_file.rb +1 -1
  48. data/lib/docspring/models/error_or_multiple_errors_response.rb +1 -1
  49. data/lib/docspring/models/error_response.rb +1 -1
  50. data/lib/docspring/models/folder.rb +1 -1
  51. data/lib/docspring/models/forbidden_error_response.rb +323 -0
  52. data/lib/docspring/models/json_schema.rb +1 -1
  53. data/lib/docspring/models/list_submissions_response.rb +1 -1
  54. data/lib/docspring/models/move_folder_data.rb +1 -1
  55. data/lib/docspring/models/move_template_data.rb +1 -1
  56. data/lib/docspring/models/multiple_errors_response.rb +1 -1
  57. data/lib/docspring/models/publish_version_data.rb +1 -1
  58. data/lib/docspring/models/rename_folder_data.rb +1 -1
  59. data/lib/docspring/models/restore_version_data.rb +1 -1
  60. data/lib/docspring/models/submission.rb +3 -3
  61. data/lib/docspring/models/submission422_response.rb +1 -1
  62. data/lib/docspring/models/submission_action.rb +1 -1
  63. data/lib/docspring/models/submission_batch.rb +1 -1
  64. data/lib/docspring/models/submission_batch_data.rb +2 -1
  65. data/lib/docspring/models/submission_batch_with_submissions.rb +1 -1
  66. data/lib/docspring/models/submission_data_request.rb +1 -1
  67. data/lib/docspring/models/submission_data_request_event.rb +1 -1
  68. data/lib/docspring/models/submission_data_request_show.rb +1 -1
  69. data/lib/docspring/models/submission_data_request_token.rb +1 -1
  70. data/lib/docspring/models/submission_preview.rb +3 -3
  71. data/lib/docspring/models/success_error_response.rb +1 -1
  72. data/lib/docspring/models/success_multiple_errors_response.rb +1 -1
  73. data/lib/docspring/models/template.rb +28 -2
  74. data/lib/docspring/models/template_add_fields_response.rb +1 -1
  75. data/lib/docspring/models/template_delete_response.rb +1 -1
  76. data/lib/docspring/models/template_model_code_response.rb +1 -1
  77. data/lib/docspring/models/template_preview.rb +28 -2
  78. data/lib/docspring/models/template_publish_version_response.rb +1 -1
  79. data/lib/docspring/models/update_html_template.rb +1 -1
  80. data/lib/docspring/models/update_pdf_template.rb +1 -1
  81. data/lib/docspring/models/update_submission_data_request_data.rb +1 -1
  82. data/lib/docspring/models/update_webhook_data.rb +1 -1
  83. data/lib/docspring/models/upload_presign_response.rb +1 -1
  84. data/lib/docspring/models/webhook.rb +1 -1
  85. data/lib/docspring/version.rb +2 -2
  86. data/lib/docspring.rb +2 -1
  87. data/spec/api/client_spec.rb +7 -7
  88. data/spec/models/add_fields_data_spec.rb +1 -1
  89. data/spec/models/batch_generate_pdfs201_response_spec.rb +7 -1
  90. data/spec/models/combine_pdfs_data_spec.rb +1 -1
  91. data/spec/models/combined_submission_action_spec.rb +1 -1
  92. data/spec/models/combined_submission_spec.rb +2 -2
  93. data/spec/models/copy_template_options_spec.rb +1 -1
  94. data/spec/models/create_combined_submission_response_spec.rb +13 -1
  95. data/spec/models/create_custom_file_data_spec.rb +1 -1
  96. data/spec/models/create_custom_file_response_spec.rb +7 -1
  97. data/spec/models/create_folder_data_spec.rb +1 -1
  98. data/spec/models/create_html_template_spec.rb +1 -1
  99. data/spec/models/create_pdf_submission_data_spec.rb +1 -1
  100. data/spec/models/create_pdf_template_spec.rb +1 -1
  101. data/spec/models/create_submission_data_request_data_spec.rb +1 -1
  102. data/spec/models/create_submission_data_request_event_request_spec.rb +1 -1
  103. data/spec/models/create_submission_data_request_event_response_spec.rb +7 -1
  104. data/spec/models/create_submission_data_request_response_spec.rb +7 -1
  105. data/spec/models/create_submission_data_request_token_response_spec.rb +7 -1
  106. data/spec/models/create_submission_response_spec.rb +13 -1
  107. data/spec/models/create_webhook_data_spec.rb +1 -1
  108. data/spec/models/custom_file_spec.rb +1 -1
  109. data/spec/models/error_or_multiple_errors_response_spec.rb +1 -1
  110. data/spec/models/error_response_spec.rb +1 -1
  111. data/spec/models/folder_spec.rb +1 -1
  112. data/spec/models/forbidden_error_response_spec.rb +56 -0
  113. data/spec/models/json_schema_spec.rb +1 -1
  114. data/spec/models/list_submissions_response_spec.rb +1 -1
  115. data/spec/models/move_folder_data_spec.rb +1 -1
  116. data/spec/models/move_template_data_spec.rb +1 -1
  117. data/spec/models/multiple_errors_response_spec.rb +1 -1
  118. data/spec/models/publish_version_data_spec.rb +1 -1
  119. data/spec/models/rename_folder_data_spec.rb +1 -1
  120. data/spec/models/restore_version_data_spec.rb +1 -1
  121. data/spec/models/submission422_response_spec.rb +1 -1
  122. data/spec/models/submission_action_spec.rb +1 -1
  123. data/spec/models/submission_batch_data_spec.rb +1 -1
  124. data/spec/models/submission_batch_spec.rb +1 -1
  125. data/spec/models/submission_batch_with_submissions_spec.rb +1 -1
  126. data/spec/models/submission_data_request_event_spec.rb +1 -1
  127. data/spec/models/submission_data_request_show_spec.rb +1 -1
  128. data/spec/models/submission_data_request_spec.rb +1 -1
  129. data/spec/models/submission_data_request_token_spec.rb +1 -1
  130. data/spec/models/submission_preview_spec.rb +2 -2
  131. data/spec/models/submission_spec.rb +2 -2
  132. data/spec/models/success_error_response_spec.rb +1 -1
  133. data/spec/models/success_multiple_errors_response_spec.rb +1 -1
  134. data/spec/models/template_add_fields_response_spec.rb +1 -1
  135. data/spec/models/template_delete_response_spec.rb +1 -1
  136. data/spec/models/template_model_code_response_spec.rb +1 -1
  137. data/spec/models/template_preview_spec.rb +7 -1
  138. data/spec/models/template_publish_version_response_spec.rb +1 -1
  139. data/spec/models/template_spec.rb +7 -1
  140. data/spec/models/update_html_template_spec.rb +1 -1
  141. data/spec/models/update_pdf_template_spec.rb +1 -1
  142. data/spec/models/update_submission_data_request_data_spec.rb +1 -1
  143. data/spec/models/update_webhook_data_spec.rb +1 -1
  144. data/spec/models/upload_presign_response_spec.rb +1 -1
  145. data/spec/models/webhook_spec.rb +1 -1
  146. data/spec/spec_helper.rb +1 -1
  147. metadata +6 -2
  148. data/git_push.sh +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38cd07210f52669a3a99ee5615b49d16a2e495b2f3ac99ab173b30fb26853ff0
4
- data.tar.gz: 40c104f6b2803806db1b63efc2a28b2536d0dd28a175054f0d000950c33bddf7
3
+ metadata.gz: 3a11774c889c3f5f78b06ecc109d774135778e4a127e9231cca7c01c80646808
4
+ data.tar.gz: ba8a09b96fbd6136bab001bede610a25ad54ce945b8d4716db979c312d9f6bf9
5
5
  SHA512:
6
- metadata.gz: 7614ebbf9e21cd24f4f0f226698722040a79fc102c100dd96106b6d12f93171fc76f50f4d8dad6770386712907c7e30b3383196b674fd16633bd219dd8bb22c9
7
- data.tar.gz: 1e8eba3789174fb7e0f5602fae560740e3b054adae86743d199c753fa942dc0096068b544832d25bf1a5772cfc2079aed712e4817f9e7a4223af1f57ceb2c493
6
+ metadata.gz: 580764cb088cc7ba219e28565d191c94841074e686b386e405945eeac2542a1bdc9867ada62cac93cfa479e942339f8b3aba246eca4f4f43d94ae6c8d44cab2c
7
+ data.tar.gz: bf9881c8bfb725c6560bc742b26bb1983909536b7cf4c9c13aca70e3223021f983b67d256bd45a4153b854ce97307bf2417fea06bb440960454a4eb30ddbd929
@@ -31,6 +31,7 @@ docs/CustomFile.md
31
31
  docs/ErrorOrMultipleErrorsResponse.md
32
32
  docs/ErrorResponse.md
33
33
  docs/Folder.md
34
+ docs/ForbiddenErrorResponse.md
34
35
  docs/JsonSchema.md
35
36
  docs/ListSubmissionsResponse.md
36
37
  docs/MoveFolderData.md
@@ -95,6 +96,7 @@ lib/docspring/models/custom_file.rb
95
96
  lib/docspring/models/error_or_multiple_errors_response.rb
96
97
  lib/docspring/models/error_response.rb
97
98
  lib/docspring/models/folder.rb
99
+ lib/docspring/models/forbidden_error_response.rb
98
100
  lib/docspring/models/json_schema.rb
99
101
  lib/docspring/models/list_submissions_response.rb
100
102
  lib/docspring/models/move_folder_data.rb
@@ -154,6 +156,7 @@ spec/models/custom_file_spec.rb
154
156
  spec/models/error_or_multiple_errors_response_spec.rb
155
157
  spec/models/error_response_spec.rb
156
158
  spec/models/folder_spec.rb
159
+ spec/models/forbidden_error_response_spec.rb
157
160
  spec/models/json_schema_spec.rb
158
161
  spec/models/list_submissions_response_spec.rb
159
162
  spec/models/move_folder_data_spec.rb
data/.travis.yml CHANGED
@@ -8,4 +8,4 @@ script:
8
8
  - bundle install --path vendor/bundle
9
9
  - bundle exec rspec
10
10
  - gem build docspring.gemspec
11
- - gem install ./docspring-3.3.0.gem
11
+ - gem install ./docspring-3.5.0.gem
data/AGENTS.md ADDED
@@ -0,0 +1,33 @@
1
+ # AGENTS.md
2
+
3
+ Notes for AI coding agents working with the DocSpring Ruby SDK (`docspring`), in this repository or
4
+ as a dependency of an app.
5
+
6
+ ## This code is generated
7
+
8
+ Every file here is generated from DocSpring's OpenAPI spec by
9
+ [DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches), and each release replaces
10
+ all of it. Don't edit it or open pull requests that change it, and don't patch an installed copy: the next release
11
+ overwrites the change. Report bugs at https://github.com/DocSpring/docspring-ruby/issues or to support@docspring.com, and DocSpring fixes them in
12
+ the generator.
13
+
14
+ ## Where to look
15
+
16
+ - [README.md](README.md): install, configuration, an example and how errors and API changes are handled.
17
+ - [docs/Client.md](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md): every method, with its parameters and return type.
18
+ - [docs/](https://github.com/DocSpring/docspring-ruby/tree/main/docs): every model and its fields.
19
+ - https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (`llms-small.txt`, `llms-full.txt`).
20
+ - https://docspring.com/docs/api/: the API reference, with Ruby code for every method.
21
+ - https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
22
+
23
+ ## Using it in an app
24
+
25
+ - Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET`. Keep them in the environment or a secret
26
+ store, never in code. Accounts in the EU region also need `DOCSPRING_REGION=EU`.
27
+ - Template IDs look like `tpl_...` and submission IDs like `sub_...`.
28
+ - Pass `test: true` when you generate PDFs during development: test PDFs are free and watermarked.
29
+ - Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set `wait` to false and use
30
+ webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
31
+ - Errors: Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
32
+ - Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
33
+ version. The model leaves out a response field added to the API after this release. An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ### 3.5.0 [October 18, 2026]
2
+
3
+ - Submissions and combined submissions can be in the new `insufficient_credits` state: a live PDF that your credit
4
+ balance can't cover is saved and processed once you add credits. See
5
+ https://docspring.com/docs/api-guide/credits-and-rate-limits/.
6
+ - generate_pdf, batch_generate_pdfs and combine_pdfs document the 402 response for insufficient credits. Their
7
+ responses can include a `code`, which is `insufficient_credits` on a 402.
8
+ - generate_pdf, batch_generate_pdfs, create_pdf_template, create_pdf_template_from_upload, create_html_template and
9
+ copy_template document a 403 response with a `code` of `upgrade_required` (the plan doesn't include it) or
10
+ `account_suspended`.
11
+
12
+ ### 3.4.0 [October 18, 2026]
13
+
14
+ - Templates: new `parse_dates_using_template_date_format` setting, when you create or update a template. When it's
15
+ true, date values sent as NN/NN/YYYY (with slashes, dashes or dots) are read in the order of the template's default
16
+ date format: month first for `%m/%d/%Y`, day first for `%d/%m/%Y`. When it's false, they're read day first.
17
+ - A new README: installing, a quick start, every API method, errors, and how API changes are handled. The repository
18
+ also has an AGENTS.md for coding agents.
19
+
1
20
  ### 3.3.0 [October 15, 2026]
2
21
 
3
22
  - Submissions and data requests can now be in the `declined` state, when a signer declines to sign. Data
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docspring (3.3.0)
4
+ docspring (3.5.0)
5
5
  logger
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -104,7 +104,7 @@ CHECKSUMS
104
104
  coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
105
105
  date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580
106
106
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
107
- docspring (3.3.0)
107
+ docspring (3.5.0)
108
108
  ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2
109
109
  ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
110
110
  ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
data/README.md CHANGED
@@ -1,203 +1,170 @@
1
- # docspring
1
+ # DocSpring Ruby SDK
2
2
 
3
- DocSpring - the Ruby gem for the DocSpring API
3
+ The official Ruby client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
4
+ templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
4
5
 
5
- Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
6
+ [Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
7
+ [RubyGems](https://rubygems.org/gems/docspring) · [Changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md)
6
8
 
7
- This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
9
+ Version 3.5.0. Requires Ruby >= 2.7.
8
10
 
9
- - API version: v1
10
- - Package version: 3.3.0
11
- - Generator version: 7.16.0-DOCSPRING
12
- - Build package: org.openapitools.codegen.languages.RubyClientCodegen
11
+ ## Install and configure
13
12
 
14
- ## Installation
13
+ Add the following line to your Gemfile:
15
14
 
16
- ### Build a gem
17
-
18
- To build the Ruby code into a gem:
19
-
20
- ```shell
21
- gem build docspring.gemspec
15
+ ```ruby
16
+ gem "docspring"
22
17
  ```
23
18
 
24
- Then either install the gem locally:
19
+ Then run:
25
20
 
26
- ```shell
27
- gem install ./docspring-3.3.0.gem
21
+ ```bash
22
+ bundle install
28
23
  ```
29
24
 
30
- (for development, run `gem install --dev ./docspring-3.3.0.gem` to install the development dependencies)
25
+ Configure authentication via environment variables:
31
26
 
32
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
-
34
- Finally add this to the Gemfile:
35
-
36
- gem 'docspring', '~> 3.3.0'
27
+ ```bash
28
+ export DOCSPRING_TOKEN_ID="API_TOKEN_ID"
29
+ export DOCSPRING_TOKEN_SECRET="API_TOKEN_SECRET"
30
+ ```
37
31
 
38
- ### Install from Git
32
+ You can also configure the region or host. The host takes priority over the region:
39
33
 
40
- If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
34
+ ```bash
35
+ export DOCSPRING_REGION="US" # US or EU (defaults to US)
36
+ export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
37
+ ```
41
38
 
42
- gem 'docspring', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
39
+ Initialize the DocSpring client with no arguments:
43
40
 
44
- ### Include the Ruby code directly
41
+ ```ruby
42
+ client = DocSpring::Client.new
43
+ ```
45
44
 
46
- Include the Ruby code directly using `-I` as follows:
45
+ Or pass credentials directly as arguments:
47
46
 
48
- ```shell
49
- ruby -Ilib script.rb
47
+ ```ruby
48
+ client = DocSpring::Client.new(
49
+ api_token_id: 'API_TOKEN_ID',
50
+ api_token_secret: 'API_TOKEN_SECRET'
51
+ )
50
52
  ```
51
53
 
52
- ## Getting Started
54
+ ## Generate a PDF
53
55
 
54
- Please follow the [installation](#installation) procedure and then run the following code:
56
+ Fill a template with data (use your template's ID in place of `tpl_1234567890abcdef01`):
55
57
 
56
58
  ```ruby
57
- # Load the gem
58
- require 'docspring'
59
-
60
- # Setup authorization
61
- DocSpring.configure do |config|
62
- # Configure HTTP basic authorization: api_token_basic
63
- config.username = 'YOUR_USERNAME'
64
- config.password = 'YOUR_PASSWORD'
65
- end
66
-
67
- api_instance = DocSpring::Client.new
68
- template_id = 'tpl_1234567890abcdef02' # String |
69
- data = DocSpring::AddFieldsData.new({fields: [3.56]}) # AddFieldsData |
70
-
71
- begin
72
- #Add new fields to a Template
73
- result = api_instance.add_fields_to_template(template_id, data)
74
- p result
75
- rescue DocSpring::ApiError => e
76
- puts "Exception when calling Client->add_fields_to_template: #{e}"
77
- end
78
-
59
+ template_id = 'tpl_1234567890abcdef01'
60
+ submission = {
61
+ data: { first_name: 'John', last_name: 'Smith', phone_number: '+11234567890' },
62
+ metadata: { foo: 123, bar: :baz },
63
+ }
64
+ wait = nil
65
+
66
+ response = client.generate_pdf(
67
+ template_id,
68
+ submission,
69
+ wait: wait
70
+ )
71
+ puts response
79
72
  ```
80
73
 
81
- ## Documentation for API Endpoints
82
-
83
- All URIs are relative to *https://sync.api.docspring.com/api/v1*
84
-
85
- Class | Method | HTTP request | Description
86
- ------------ | ------------- | ------------- | -------------
87
- *DocSpring::Client* | [**add_fields_to_template**](docs/Client.md#add_fields_to_template) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template
88
- *DocSpring::Client* | [**batch_generate_pdfs**](docs/Client.md#batch_generate_pdfs) | **POST** /submissions/batches | Generate multiple PDFs
89
- *DocSpring::Client* | [**combine_pdfs**](docs/Client.md#combine_pdfs) | **POST** /combined_submissions | Merge submission PDFs, template PDFs, or custom files
90
- *DocSpring::Client* | [**copy_template**](docs/Client.md#copy_template) | **POST** /templates/{template_id}/copy | Copy a template
91
- *DocSpring::Client* | [**create_custom_file_from_upload**](docs/Client.md#create_custom_file_from_upload) | **POST** /custom_files | Create a new custom file from a cached S3 upload
92
- *DocSpring::Client* | [**create_data_request_event**](docs/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
93
- *DocSpring::Client* | [**create_data_request_token**](docs/Client.md#create_data_request_token) | **POST** /data_requests/{data_request_id}/tokens | Create a new data request token for form authentication
94
- *DocSpring::Client* | [**create_folder**](docs/Client.md#create_folder) | **POST** /folders/ | Create a folder
95
- *DocSpring::Client* | [**create_html_template**](docs/Client.md#create_html_template) | **POST** /templates?endpoint_variant=create_html_template | Create a new HTML template
96
- *DocSpring::Client* | [**create_pdf_template**](docs/Client.md#create_pdf_template) | **POST** /templates | Create a new PDF template with a form POST file upload
97
- *DocSpring::Client* | [**create_pdf_template_from_upload**](docs/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
98
- *DocSpring::Client* | [**create_webhook**](docs/Client.md#create_webhook) | **POST** /webhooks | Create a webhook
99
- *DocSpring::Client* | [**delete_folder**](docs/Client.md#delete_folder) | **DELETE** /folders/{folder_id} | Delete a folder
100
- *DocSpring::Client* | [**delete_template**](docs/Client.md#delete_template) | **DELETE** /templates/{template_id} | Delete a template
101
- *DocSpring::Client* | [**delete_webhook**](docs/Client.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | Delete a webhook
102
- *DocSpring::Client* | [**expire_combined_submission**](docs/Client.md#expire_combined_submission) | **DELETE** /combined_submissions/{combined_submission_id} | Expire a combined submission
103
- *DocSpring::Client* | [**expire_submission**](docs/Client.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a PDF submission
104
- *DocSpring::Client* | [**generate_pdf**](docs/Client.md#generate_pdf) | **POST** /templates/{template_id}/submissions | Generate a PDF
105
- *DocSpring::Client* | [**generate_preview**](docs/Client.md#generate_preview) | **POST** /submissions/{submission_id}/generate_preview | Generate a preview PDF for partially completed data requests
106
- *DocSpring::Client* | [**get_combined_submission**](docs/Client.md#get_combined_submission) | **GET** /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs)
107
- *DocSpring::Client* | [**get_data_request**](docs/Client.md#get_data_request) | **GET** /data_requests/{data_request_id} | Look up a submission data request
108
- *DocSpring::Client* | [**get_full_template**](docs/Client.md#get_full_template) | **GET** /templates/{template_id}?full=true | Fetch the full attributes for a PDF template
109
- *DocSpring::Client* | [**get_presign_url**](docs/Client.md#get_presign_url) | **GET** /uploads/presign | Get a presigned S3 URL for direct file upload
110
- *DocSpring::Client* | [**get_submission**](docs/Client.md#get_submission) | **GET** /submissions/{submission_id} | Check the status of a PDF
111
- *DocSpring::Client* | [**get_submission_batch**](docs/Client.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} | Check the status of a submission batch job
112
- *DocSpring::Client* | [**get_template**](docs/Client.md#get_template) | **GET** /templates/{template_id} | Check the status of an uploaded template
113
- *DocSpring::Client* | [**get_template_model_code**](docs/Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed model code for a template
114
- *DocSpring::Client* | [**get_template_schema**](docs/Client.md#get_template_schema) | **GET** /templates/{template_id}/schema | Fetch the JSON schema for a template
115
- *DocSpring::Client* | [**get_webhook**](docs/Client.md#get_webhook) | **GET** /webhooks/{webhook_id} | Get a webhook
116
- *DocSpring::Client* | [**list_combined_submissions**](docs/Client.md#list_combined_submissions) | **GET** /combined_submissions | Get a list of all combined submissions
117
- *DocSpring::Client* | [**list_folders**](docs/Client.md#list_folders) | **GET** /folders/ | Get a list of all folders
118
- *DocSpring::Client* | [**list_submissions**](docs/Client.md#list_submissions) | **GET** /submissions | List all submissions
119
- *DocSpring::Client* | [**list_template_submissions**](docs/Client.md#list_template_submissions) | **GET** /templates/{template_id}/submissions | List all submissions for a given template
120
- *DocSpring::Client* | [**list_templates**](docs/Client.md#list_templates) | **GET** /templates | Get a list of all templates
121
- *DocSpring::Client* | [**list_webhooks**](docs/Client.md#list_webhooks) | **GET** /webhooks | Get a list of all webhooks
122
- *DocSpring::Client* | [**move_folder_to_folder**](docs/Client.md#move_folder_to_folder) | **POST** /folders/{folder_id}/move | Move a folder
123
- *DocSpring::Client* | [**move_template_to_folder**](docs/Client.md#move_template_to_folder) | **POST** /templates/{template_id}/move | Move Template to folder
124
- *DocSpring::Client* | [**publish_template_version**](docs/Client.md#publish_template_version) | **POST** /templates/{template_id}/publish_version | Publish a template version
125
- *DocSpring::Client* | [**rename_folder**](docs/Client.md#rename_folder) | **POST** /folders/{folder_id}/rename | Rename a folder
126
- *DocSpring::Client* | [**restore_template_version**](docs/Client.md#restore_template_version) | **POST** /templates/{template_id}/restore_version | Restore a template version
127
- *DocSpring::Client* | [**test_authentication**](docs/Client.md#test_authentication) | **GET** /authentication | Test authentication
128
- *DocSpring::Client* | [**update_data_request**](docs/Client.md#update_data_request) | **PUT** /data_requests/{data_request_id} | Update a submission data request
129
- *DocSpring::Client* | [**update_template**](docs/Client.md#update_template) | **PUT** /templates/{template_id} | Update a Template
130
- *DocSpring::Client* | [**update_template_document**](docs/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
131
- *DocSpring::Client* | [**update_template_document_from_upload**](docs/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
132
- *DocSpring::Client* | [**update_webhook**](docs/Client.md#update_webhook) | **PUT** /webhooks/{webhook_id} | Update a webhook
133
-
134
-
135
- ## Documentation for Models
136
-
137
- - [DocSpring::AddFieldsData](docs/AddFieldsData.md)
138
- - [DocSpring::BatchGeneratePdfs201Response](docs/BatchGeneratePdfs201Response.md)
139
- - [DocSpring::CombinePdfsData](docs/CombinePdfsData.md)
140
- - [DocSpring::CombinedSubmission](docs/CombinedSubmission.md)
141
- - [DocSpring::CombinedSubmissionAction](docs/CombinedSubmissionAction.md)
142
- - [DocSpring::CopyTemplateOptions](docs/CopyTemplateOptions.md)
143
- - [DocSpring::CreateCombinedSubmissionResponse](docs/CreateCombinedSubmissionResponse.md)
144
- - [DocSpring::CreateCustomFileData](docs/CreateCustomFileData.md)
145
- - [DocSpring::CreateCustomFileResponse](docs/CreateCustomFileResponse.md)
146
- - [DocSpring::CreateFolderData](docs/CreateFolderData.md)
147
- - [DocSpring::CreateHtmlTemplate](docs/CreateHtmlTemplate.md)
148
- - [DocSpring::CreatePdfSubmissionData](docs/CreatePdfSubmissionData.md)
149
- - [DocSpring::CreatePdfTemplate](docs/CreatePdfTemplate.md)
150
- - [DocSpring::CreateSubmissionDataRequestData](docs/CreateSubmissionDataRequestData.md)
151
- - [DocSpring::CreateSubmissionDataRequestEventRequest](docs/CreateSubmissionDataRequestEventRequest.md)
152
- - [DocSpring::CreateSubmissionDataRequestEventResponse](docs/CreateSubmissionDataRequestEventResponse.md)
153
- - [DocSpring::CreateSubmissionDataRequestResponse](docs/CreateSubmissionDataRequestResponse.md)
154
- - [DocSpring::CreateSubmissionDataRequestTokenResponse](docs/CreateSubmissionDataRequestTokenResponse.md)
155
- - [DocSpring::CreateSubmissionResponse](docs/CreateSubmissionResponse.md)
156
- - [DocSpring::CreateWebhookData](docs/CreateWebhookData.md)
157
- - [DocSpring::CustomFile](docs/CustomFile.md)
158
- - [DocSpring::ErrorOrMultipleErrorsResponse](docs/ErrorOrMultipleErrorsResponse.md)
159
- - [DocSpring::ErrorResponse](docs/ErrorResponse.md)
160
- - [DocSpring::Folder](docs/Folder.md)
161
- - [DocSpring::JsonSchema](docs/JsonSchema.md)
162
- - [DocSpring::ListSubmissionsResponse](docs/ListSubmissionsResponse.md)
163
- - [DocSpring::MoveFolderData](docs/MoveFolderData.md)
164
- - [DocSpring::MoveTemplateData](docs/MoveTemplateData.md)
165
- - [DocSpring::MultipleErrorsResponse](docs/MultipleErrorsResponse.md)
166
- - [DocSpring::PublishVersionData](docs/PublishVersionData.md)
167
- - [DocSpring::RenameFolderData](docs/RenameFolderData.md)
168
- - [DocSpring::RestoreVersionData](docs/RestoreVersionData.md)
169
- - [DocSpring::Submission](docs/Submission.md)
170
- - [DocSpring::Submission422Response](docs/Submission422Response.md)
171
- - [DocSpring::SubmissionAction](docs/SubmissionAction.md)
172
- - [DocSpring::SubmissionBatch](docs/SubmissionBatch.md)
173
- - [DocSpring::SubmissionBatchData](docs/SubmissionBatchData.md)
174
- - [DocSpring::SubmissionBatchWithSubmissions](docs/SubmissionBatchWithSubmissions.md)
175
- - [DocSpring::SubmissionDataRequest](docs/SubmissionDataRequest.md)
176
- - [DocSpring::SubmissionDataRequestEvent](docs/SubmissionDataRequestEvent.md)
177
- - [DocSpring::SubmissionDataRequestShow](docs/SubmissionDataRequestShow.md)
178
- - [DocSpring::SubmissionDataRequestToken](docs/SubmissionDataRequestToken.md)
179
- - [DocSpring::SubmissionPreview](docs/SubmissionPreview.md)
180
- - [DocSpring::SuccessErrorResponse](docs/SuccessErrorResponse.md)
181
- - [DocSpring::SuccessMultipleErrorsResponse](docs/SuccessMultipleErrorsResponse.md)
182
- - [DocSpring::Template](docs/Template.md)
183
- - [DocSpring::TemplateAddFieldsResponse](docs/TemplateAddFieldsResponse.md)
184
- - [DocSpring::TemplateDeleteResponse](docs/TemplateDeleteResponse.md)
185
- - [DocSpring::TemplateModelCodeResponse](docs/TemplateModelCodeResponse.md)
186
- - [DocSpring::TemplatePreview](docs/TemplatePreview.md)
187
- - [DocSpring::TemplatePublishVersionResponse](docs/TemplatePublishVersionResponse.md)
188
- - [DocSpring::UpdateHtmlTemplate](docs/UpdateHtmlTemplate.md)
189
- - [DocSpring::UpdatePdfTemplate](docs/UpdatePdfTemplate.md)
190
- - [DocSpring::UpdateSubmissionDataRequestData](docs/UpdateSubmissionDataRequestData.md)
191
- - [DocSpring::UpdateWebhookData](docs/UpdateWebhookData.md)
192
- - [DocSpring::UploadPresignResponse](docs/UploadPresignResponse.md)
193
- - [DocSpring::Webhook](docs/Webhook.md)
194
-
195
-
196
- ## Documentation for Authorization
197
-
198
-
199
- Authentication schemes defined for the API:
200
- ### api_token_basic
201
-
202
- - **Type**: HTTP basic authentication
203
-
74
+ By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has its
75
+ `download_url`. Set `wait` to false to get a pending submission straight away.
76
+ [Sync vs. async processing](https://docspring.com/docs/api-guide/synchronous-requests/) covers the time limit, status
77
+ checks and webhooks.
78
+
79
+ ## Methods
80
+
81
+ [docs/Client.md](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md) has each method's parameters and return type, and
82
+ [docs/](https://github.com/DocSpring/docspring-ruby/tree/main/docs) has the models. The [API reference](https://docspring.com/docs/api/) has
83
+ Ruby code for every method.
84
+
85
+ | Method | Description |
86
+ | ------ | ----------- |
87
+ | [`add_fields_to_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#add_fields_to_template) | Add new fields to a Template |
88
+ | [`batch_generate_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#batch_generate_pdfs) | Generate multiple PDFs |
89
+ | [`combine_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#combine_pdfs) | Merge submission PDFs, template PDFs, or custom files |
90
+ | [`copy_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#copy_template) | Copy a template |
91
+ | [`create_custom_file_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_custom_file_from_upload) | Create a new custom file from a cached S3 upload |
92
+ | [`create_data_request_event`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_event) | Create a new event for emailing a signee a request for signature |
93
+ | [`create_data_request_token`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_token) | Create a new data request token for form authentication |
94
+ | [`create_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_folder) | Create a folder |
95
+ | [`create_html_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_html_template) | Create a new HTML template |
96
+ | [`create_pdf_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template) | Create a new PDF template with a form POST file upload |
97
+ | [`create_pdf_template_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template_from_upload) | Create a new PDF template from a cached S3 file upload |
98
+ | [`create_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_webhook) | Create a webhook |
99
+ | [`delete_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_folder) | Delete a folder |
100
+ | [`delete_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_template) | Delete a template |
101
+ | [`delete_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_webhook) | Delete a webhook |
102
+ | [`expire_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_combined_submission) | Expire a combined submission |
103
+ | [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a PDF submission |
104
+ | [`generate_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_pdf) | Generate a PDF |
105
+ | [`generate_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_preview) | Generate a preview PDF for partially completed data requests |
106
+ | [`get_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_combined_submission) | Check the status of a combined submission (merged PDFs) |
107
+ | [`get_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_data_request) | Look up a submission data request |
108
+ | [`get_full_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_full_template) | Fetch the full attributes for a PDF template |
109
+ | [`get_presign_url`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_presign_url) | Get a presigned S3 URL for direct file upload |
110
+ | [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) | Check the status of a PDF |
111
+ | [`get_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission_batch) | Check the status of a submission batch job |
112
+ | [`get_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template) | Check the status of an uploaded template |
113
+ | [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed model code for a template |
114
+ | [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) | Fetch the JSON schema for a template |
115
+ | [`get_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_webhook) | Get a webhook |
116
+ | [`list_combined_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_submissions) | Get a list of all combined submissions |
117
+ | [`list_folders`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_folders) | Get a list of all folders |
118
+ | [`list_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_submissions) | List all submissions |
119
+ | [`list_template_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_submissions) | List all submissions for a given template |
120
+ | [`list_templates`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_templates) | Get a list of all templates |
121
+ | [`list_webhooks`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_webhooks) | Get a list of all webhooks |
122
+ | [`move_folder_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_folder_to_folder) | Move a folder |
123
+ | [`move_template_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_template_to_folder) | Move Template to folder |
124
+ | [`publish_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#publish_template_version) | Publish a template version |
125
+ | [`rename_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#rename_folder) | Rename a folder |
126
+ | [`restore_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#restore_template_version) | Restore a template version |
127
+ | [`test_authentication`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#test_authentication) | Test authentication |
128
+ | [`update_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_data_request) | Update a submission data request |
129
+ | [`update_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template) | Update a Template |
130
+ | [`update_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document) | Update a template's document with a form POST file upload |
131
+ | [`update_template_document_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document_from_upload) | Update a template's document with a cached S3 file upload |
132
+ | [`update_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_webhook) | Update a webhook |
133
+
134
+ ## Errors
135
+
136
+ Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
137
+
138
+ ## API changes
139
+
140
+ DocSpring adds fields and enum values to API v1 without releasing a new API version. Changes that would break
141
+ existing code, such as removing or renaming a field, go in a new API version
142
+ ([API changes](https://docspring.com/docs/api-guide/openapi-schema/#api-changes)). So this SDK keeps working with
143
+ responses that are newer than it is:
144
+
145
+ - The model leaves out a response field added to the API after this release.
146
+ - An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
147
+
148
+ Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md) lists
149
+ what each release adds.
150
+
151
+ ## About this SDK
152
+
153
+ This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/v1/openapi.json) with
154
+ [DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.16.0.
155
+ The fork changes the Ruby generator:
156
+
157
+ - Responses with an enum value added to the API after this release don't raise `ArgumentError`. Setting an attribute yourself still checks its value.
158
+
159
+ On top of the generated code, we add:
160
+
161
+ - A client constructor that reads your credentials, region and host from the environment.
162
+ - A fix for multipart PUT requests in Ethon (file uploads to `update_template_document`).
163
+
164
+ Because the code is generated, we can't merge pull requests that change it. Please
165
+ [open an issue](https://github.com/DocSpring/docspring-ruby/issues) or email [support@docspring.com](mailto:support@docspring.com) instead, and
166
+ we'll fix it in the generator. [AGENTS.md](https://github.com/DocSpring/docspring-ruby/blob/main/AGENTS.md) is a short guide for AI coding agents.
167
+
168
+ ## License
169
+
170
+ MIT. See [LICENSE](https://github.com/DocSpring/docspring-ruby/blob/main/LICENSE).
@@ -9,6 +9,7 @@
9
9
  | **errors** | **Array<String>** | | [optional] |
10
10
  | **submission_batch** | [**SubmissionBatch**](SubmissionBatch.md) | | |
11
11
  | **submissions** | **Array<Object>** | | |
12
+ | **code** | **String** | `insufficient_credits` when the response is a 402. | [optional] |
12
13
 
13
14
  ## Example
14
15
 
@@ -20,7 +21,8 @@ instance = DocSpring::BatchGeneratePdfs201Response.new(
20
21
  error: null,
21
22
  errors: null,
22
23
  submission_batch: null,
23
- submissions: null
24
+ submissions: null,
25
+ code: null
24
26
  )
25
27
  ```
26
28
 
data/docs/Client.md CHANGED
@@ -130,7 +130,7 @@ end
130
130
 
131
131
  Generate multiple PDFs
132
132
 
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. See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
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
134
134
 
135
135
  ### Examples
136
136
 
@@ -204,7 +204,7 @@ end
204
204
 
205
205
  Merge submission PDFs, template PDFs, or custom files
206
206
 
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.
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/).
208
208
 
209
209
  ### Examples
210
210
 
@@ -1278,7 +1278,7 @@ end
1278
1278
 
1279
1279
  Generate a PDF
1280
1280
 
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. 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
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
1282
1282
 
1283
1283
  ### Examples
1284
1284
 
@@ -1424,7 +1424,7 @@ end
1424
1424
 
1425
1425
  Check the status of a combined submission (merged PDFs)
1426
1426
 
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).
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`.
1428
1428
 
1429
1429
  ### Examples
1430
1430
 
@@ -1701,7 +1701,7 @@ This endpoint does not need any parameter.
1701
1701
 
1702
1702
  Check the status of a PDF
1703
1703
 
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.
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`.
1705
1705
 
1706
1706
  ### Examples
1707
1707
 
@@ -1775,7 +1775,7 @@ end
1775
1775
 
1776
1776
  Check the status of a submission batch job
1777
1777
 
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.
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.
1779
1779
 
1780
1780
  ### Examples
1781
1781
 
@@ -9,7 +9,7 @@
9
9
  | **metadata** | **Object** | | [optional] |
10
10
  | **password** | **String** | | [optional] |
11
11
  | **source_pdfs** | **Array<Object>** | | |
12
- | **test** | **Boolean** | Deprecated, and has no effect. A combined PDF is a test or live document because of its source PDFs. | [optional] |
12
+ | **test** | **Boolean** | Deprecated, and has no effect. Combining always uses credits, even with a test API token or watermarked source PDFs. | [optional] |
13
13
 
14
14
  ## Example
15
15
 
@@ -6,7 +6,9 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **status** | **String** | | |
8
8
  | **combined_submission** | [**CombinedSubmission**](CombinedSubmission.md) | | |
9
+ | **error** | **String** | | [optional] |
9
10
  | **errors** | **Array<String>** | | [optional] |
11
+ | **code** | **String** | `insufficient_credits` when the response is a 402. | [optional] |
10
12
 
11
13
  ## Example
12
14
 
@@ -16,7 +18,9 @@ require 'docspring'
16
18
  instance = DocSpring::CreateCombinedSubmissionResponse.new(
17
19
  status: null,
18
20
  combined_submission: null,
19
- errors: null
21
+ error: null,
22
+ errors: null,
23
+ code: null
20
24
  )
21
25
  ```
22
26