@apifreaks/openapi-specs 0.1.2 → 0.3.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 (214) hide show
  1. package/README.md +37 -37
  2. package/dist/index.cjs +4288 -1107
  3. package/dist/index.d.cts +2 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +4288 -1107
  6. package/dist/specs/commodity/commodity-fluctuation.yaml +14 -0
  7. package/dist/specs/commodity/commodity-prices.yaml +14 -0
  8. package/dist/specs/commodity/commodity-symbols.yaml +8 -0
  9. package/dist/specs/commodity/commodity-time-series.yaml +14 -0
  10. package/dist/specs/commodity/historical-commodity-prices.yaml +14 -0
  11. package/dist/specs/currency/currency-converter.yaml +14 -0
  12. package/dist/specs/currency/currency-fluctuation.yaml +14 -0
  13. package/dist/specs/currency/currency-historical-data-limit.yaml +11 -0
  14. package/dist/specs/currency/currency-rate.yaml +14 -0
  15. package/dist/specs/currency/currency-supported.yaml +11 -0
  16. package/dist/specs/currency/currency-symbols.yaml +11 -0
  17. package/dist/specs/currency/currency-time-series.yaml +14 -0
  18. package/dist/specs/currency/geolocalized-currency-conversion.yaml +14 -0
  19. package/dist/specs/currency/historical-currency-converter.yaml +14 -0
  20. package/dist/specs/currency/historical-currency-rate.yaml +14 -0
  21. package/dist/specs/dns/bulk-dns-lookup.yaml +14 -0
  22. package/dist/specs/dns/dns-history-lookup.yaml +14 -0
  23. package/dist/specs/dns/dns-lookup.yaml +11 -0
  24. package/dist/specs/dns/reverse-dns-lookup.yaml +34 -0
  25. package/dist/specs/domain/bulk-domain-checker.yaml +17 -0
  26. package/dist/specs/domain/domain-search-with-suggestions.yaml +14 -0
  27. package/dist/specs/domain/domain-search.yaml +14 -0
  28. package/dist/specs/domain/subdomain-lookup.yaml +14 -0
  29. package/dist/specs/email-validation/bulk-email-validation.yaml +17 -0
  30. package/dist/specs/email-validation/email-checker.yaml +41 -0
  31. package/dist/specs/financial/bulk-vat-rates-country.yaml +14 -0
  32. package/dist/specs/financial/financial-apis-supported-countries.yaml +8 -0
  33. package/dist/specs/financial/iban-validation.yaml +11 -0
  34. package/dist/specs/financial/swift-code-finder.yaml +11 -0
  35. package/dist/specs/financial/swift-code-lookup.yaml +14 -0
  36. package/dist/specs/financial/vat-number-validation.yaml +14 -0
  37. package/dist/specs/financial/vat-rates-by-ip.yaml +14 -0
  38. package/dist/specs/financial/vat-rates-country.yaml +14 -0
  39. package/dist/specs/general/usage-credits.yaml +11 -0
  40. package/dist/specs/geocoding/forward-geocoding.yaml +14 -0
  41. package/dist/specs/geocoding/reverse-geocoding.yaml +11 -0
  42. package/dist/specs/geodb/administrative-units-details.yaml +14 -0
  43. package/dist/specs/geodb/administrative-units-levels.yaml +14 -0
  44. package/dist/specs/geodb/administrative-units.yaml +14 -0
  45. package/dist/specs/geodb/cities.yaml +14 -0
  46. package/dist/specs/geodb/countries-details.yaml +11 -0
  47. package/dist/specs/geodb/countries.yaml +11 -0
  48. package/dist/specs/geodb/flags-supported.yaml +8 -0
  49. package/dist/specs/geodb/flags.yaml +14 -0
  50. package/dist/specs/geodb/regions.yaml +8 -0
  51. package/dist/specs/geodb/subregions.yaml +14 -0
  52. package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +14 -0
  53. package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +11 -0
  54. package/dist/specs/ip-intelligence/ip-locator.yaml +17 -0
  55. package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +14 -0
  56. package/dist/specs/other/astronomy-data.yaml +14 -0
  57. package/dist/specs/pdf/bulk-pdf-generator.yaml +231 -0
  58. package/dist/specs/pdf/delete-pdf-page.yaml +14 -0
  59. package/dist/specs/pdf/linearize-pdf.yaml +14 -0
  60. package/dist/specs/pdf/merge-pdf.yaml +14 -0
  61. package/dist/specs/pdf/pdf-compress.yaml +14 -0
  62. package/dist/specs/pdf/pdf-decrypt.yaml +14 -0
  63. package/dist/specs/pdf/pdf-encrypt.yaml +14 -0
  64. package/dist/specs/pdf/pdf-extract-pages.yaml +14 -0
  65. package/dist/specs/pdf/pdf-file-status.yaml +14 -0
  66. package/dist/specs/pdf/pdf-file.yaml +14 -0
  67. package/dist/specs/pdf/pdf-files.yaml +8 -0
  68. package/dist/specs/pdf/pdf-generator.yaml +348 -0
  69. package/dist/specs/pdf/pdf-resource-download.yaml +14 -0
  70. package/dist/specs/pdf/pdf-resource-upload-binary.yaml +14 -0
  71. package/dist/specs/pdf/pdf-resource-upload.yaml +14 -0
  72. package/dist/specs/pdf/pdf-restrict.yaml +14 -0
  73. package/dist/specs/pdf/pdf-split-pages.yaml +14 -0
  74. package/dist/specs/pdf/pdf-task-status.yaml +14 -0
  75. package/dist/specs/pdf/pdf-to-image.yaml +35 -0
  76. package/dist/specs/pdf/pdf-unrestrict.yaml +14 -0
  77. package/dist/specs/pdf/rotate-pdf-pages.yaml +14 -0
  78. package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +23 -0
  79. package/dist/specs/phone-validation/phone-number-validation.yaml +20 -0
  80. package/dist/specs/scraper/web-scraper.yaml +34 -0
  81. package/dist/specs/screenshot/bulk-screenshot.yaml +34 -0
  82. package/dist/specs/screenshot/website-screenshot.yaml +34 -0
  83. package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +17 -0
  84. package/dist/specs/ssl/ssl-certificate-lookup.yaml +17 -0
  85. package/dist/specs/timezone/timezone-converter.yaml +14 -0
  86. package/dist/specs/timezone/timezone-lookup.yaml +14 -0
  87. package/dist/specs/user-agent/bulk-user-agent-parser.yaml +11 -0
  88. package/dist/specs/user-agent/user-agent-parser.yaml +11 -0
  89. package/dist/specs/weather/air-quality.yaml +14 -0
  90. package/dist/specs/weather/bulk-live-weather.yaml +11 -0
  91. package/dist/specs/weather/flood-forecast.yaml +14 -0
  92. package/dist/specs/weather/historical-weather.yaml +14 -0
  93. package/dist/specs/weather/live-weather.yaml +14 -0
  94. package/dist/specs/weather/marine-weather.yaml +14 -0
  95. package/dist/specs/weather/time-series-weather.yaml +11 -0
  96. package/dist/specs/weather/weather-forecast.yaml +11 -0
  97. package/dist/specs/whois/asn-lookup.yaml +14 -0
  98. package/dist/specs/whois/bulk-whois-lookup.yaml +17 -0
  99. package/dist/specs/whois/domain-whois-history-lookup.yaml +14 -0
  100. package/dist/specs/whois/reverse-whois.yaml +34 -0
  101. package/dist/specs/whois/whois-domain-lookup.yaml +17 -0
  102. package/dist/specs/whois/whois-ip-lookup.yaml +14 -0
  103. package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +14 -0
  104. package/dist/specs/zip-code/zip-code-api.yaml +14 -0
  105. package/dist/specs/zip-code/zip-code-distance-match.yaml +14 -0
  106. package/dist/specs/zip-code/zip-code-distance.yaml +14 -0
  107. package/dist/specs/zip-code/zip-codes-by-city.yaml +14 -0
  108. package/dist/specs/zip-code/zip-codes-by-region.yaml +14 -0
  109. package/dist/specs/zip-code/zip-codes-radius-search.yaml +34 -0
  110. package/package.json +1 -1
  111. package/specs/commodity/commodity-fluctuation.json +23 -0
  112. package/specs/commodity/commodity-prices.json +23 -0
  113. package/specs/commodity/commodity-symbols.json +13 -0
  114. package/specs/commodity/commodity-time-series.json +27 -13
  115. package/specs/commodity/historical-commodity-prices.json +23 -0
  116. package/specs/currency/currency-converter.json +23 -0
  117. package/specs/currency/currency-fluctuation.json +23 -0
  118. package/specs/currency/currency-historical-data-limit.json +18 -0
  119. package/specs/currency/currency-rate.json +23 -0
  120. package/specs/currency/currency-supported.json +18 -0
  121. package/specs/currency/currency-symbols.json +18 -0
  122. package/specs/currency/currency-time-series.json +23 -0
  123. package/specs/currency/geolocalized-currency-conversion.json +23 -0
  124. package/specs/currency/historical-currency-converter.json +23 -0
  125. package/specs/currency/historical-currency-rate.json +23 -0
  126. package/specs/dns/bulk-dns-lookup.json +23 -0
  127. package/specs/dns/dns-history-lookup.json +23 -0
  128. package/specs/dns/dns-lookup.json +18 -0
  129. package/specs/dns/reverse-dns-lookup.json +61 -1
  130. package/specs/domain/bulk-domain-checker.json +28 -0
  131. package/specs/domain/domain-search-with-suggestions.json +23 -0
  132. package/specs/domain/domain-search.json +23 -0
  133. package/specs/domain/subdomain-lookup.json +23 -0
  134. package/specs/email-validation/bulk-email-validation.json +28 -0
  135. package/specs/email-validation/email-checker.json +64 -0
  136. package/specs/financial/bulk-vat-rates-country.json +23 -0
  137. package/specs/financial/financial-apis-supported-countries.json +34 -5
  138. package/specs/financial/iban-validation.json +18 -0
  139. package/specs/financial/swift-code-finder.json +31 -2
  140. package/specs/financial/swift-code-lookup.json +23 -0
  141. package/specs/financial/vat-number-validation.json +23 -0
  142. package/specs/financial/vat-rates-by-ip.json +23 -0
  143. package/specs/financial/vat-rates-country.json +23 -0
  144. package/specs/general/usage-credits.json +18 -0
  145. package/specs/geocoding/forward-geocoding.json +23 -0
  146. package/specs/geocoding/reverse-geocoding.json +18 -0
  147. package/specs/geodb/administrative-units-details.json +23 -0
  148. package/specs/geodb/administrative-units-levels.json +23 -0
  149. package/specs/geodb/administrative-units.json +23 -0
  150. package/specs/geodb/cities.json +23 -0
  151. package/specs/geodb/countries-details.json +18 -0
  152. package/specs/geodb/countries.json +18 -0
  153. package/specs/geodb/flags-supported.json +13 -0
  154. package/specs/geodb/flags.json +23 -0
  155. package/specs/geodb/regions.json +13 -0
  156. package/specs/geodb/subregions.json +23 -0
  157. package/specs/ip-intelligence/bulk-ip-lookup.json +23 -0
  158. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +18 -0
  159. package/specs/ip-intelligence/ip-locator.json +33 -5
  160. package/specs/ip-intelligence/ip-threat-intelligence.json +23 -0
  161. package/specs/other/astronomy-data.json +24 -2
  162. package/specs/pdf/bulk-pdf-generator.json +343 -0
  163. package/specs/pdf/delete-pdf-page.json +33 -21
  164. package/specs/pdf/linearize-pdf.json +31 -19
  165. package/specs/pdf/merge-pdf.json +30 -18
  166. package/specs/pdf/pdf-compress.json +32 -25
  167. package/specs/pdf/pdf-decrypt.json +32 -21
  168. package/specs/pdf/pdf-encrypt.json +31 -19
  169. package/specs/pdf/pdf-extract-pages.json +33 -21
  170. package/specs/pdf/pdf-file-status.json +23 -0
  171. package/specs/pdf/pdf-file.json +23 -0
  172. package/specs/pdf/pdf-files.json +13 -0
  173. package/specs/pdf/pdf-generator.json +497 -0
  174. package/specs/pdf/pdf-resource-download.json +23 -0
  175. package/specs/pdf/pdf-resource-upload-binary.json +29 -16
  176. package/specs/pdf/pdf-resource-upload.json +30 -19
  177. package/specs/pdf/pdf-restrict.json +32 -20
  178. package/specs/pdf/pdf-split-pages.json +33 -21
  179. package/specs/pdf/pdf-task-status.json +23 -0
  180. package/specs/pdf/pdf-to-image.json +90 -101
  181. package/specs/pdf/pdf-unrestrict.json +32 -20
  182. package/specs/pdf/rotate-pdf-pages.json +32 -20
  183. package/specs/phone-validation/bulk-phone-number-validation.json +54 -16
  184. package/specs/phone-validation/phone-number-validation.json +33 -0
  185. package/specs/scraper/web-scraper.json +53 -0
  186. package/specs/screenshot/bulk-screenshot.json +53 -0
  187. package/specs/screenshot/website-screenshot.json +53 -0
  188. package/specs/ssl/ssl-certificate-chain-lookup.json +28 -0
  189. package/specs/ssl/ssl-certificate-lookup.json +28 -0
  190. package/specs/timezone/timezone-converter.json +23 -0
  191. package/specs/timezone/timezone-lookup.json +25 -2
  192. package/specs/user-agent/bulk-user-agent-parser.json +20 -2
  193. package/specs/user-agent/user-agent-parser.json +18 -0
  194. package/specs/weather/air-quality.json +23 -0
  195. package/specs/weather/bulk-live-weather.json +18 -0
  196. package/specs/weather/flood-forecast.json +23 -0
  197. package/specs/weather/historical-weather.json +23 -0
  198. package/specs/weather/live-weather.json +23 -0
  199. package/specs/weather/marine-weather.json +23 -0
  200. package/specs/weather/time-series-weather.json +18 -0
  201. package/specs/weather/weather-forecast.json +18 -0
  202. package/specs/whois/asn-lookup.json +23 -0
  203. package/specs/whois/bulk-whois-lookup.json +28 -0
  204. package/specs/whois/domain-whois-history-lookup.json +23 -0
  205. package/specs/whois/reverse-whois.json +53 -0
  206. package/specs/whois/whois-domain-lookup.json +28 -0
  207. package/specs/whois/whois-ip-lookup.json +23 -0
  208. package/specs/zip-code/bulk-zip-code-lookup.json +23 -0
  209. package/specs/zip-code/zip-code-api.json +23 -0
  210. package/specs/zip-code/zip-code-distance-match.json +23 -0
  211. package/specs/zip-code/zip-code-distance.json +23 -0
  212. package/specs/zip-code/zip-codes-by-city.json +23 -0
  213. package/specs/zip-code/zip-codes-by-region.json +24 -7
  214. package/specs/zip-code/zip-codes-radius-search.json +53 -0
@@ -127,7 +127,7 @@
127
127
  "is_eu": false,
128
128
  "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
129
129
  "geoname_id": "6301403",
130
- "country_emoji": "\ud83c\uddfa\ud83c\uddf8"
130
+ "country_emoji": "🇺🇸"
131
131
  },
132
132
  "country_metadata": {
133
133
  "calling_code": "+1",
@@ -194,10 +194,15 @@
194
194
  }
195
195
  }
196
196
  }
197
+ },
198
+ "headers": {
199
+ "X-AF-Credits-Cost": {
200
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
201
+ }
197
202
  }
198
203
  },
199
204
  "400": {
200
- "description": "Bad Request \u2014 Invalid or missing parameters",
205
+ "description": "Bad Request Invalid or missing parameters",
201
206
  "content": {
202
207
  "application/json": {
203
208
  "schema": {
@@ -212,10 +217,15 @@
212
217
  }
213
218
  }
214
219
  }
220
+ },
221
+ "headers": {
222
+ "X-AF-Credits-Cost": {
223
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
224
+ }
215
225
  }
216
226
  },
217
227
  "404": {
218
- "description": "Not Found \u2014 IP address not in database",
228
+ "description": "Not Found IP address not in database",
219
229
  "content": {
220
230
  "application/json": {
221
231
  "schema": {
@@ -230,10 +240,15 @@
230
240
  }
231
241
  }
232
242
  }
243
+ },
244
+ "headers": {
245
+ "X-AF-Credits-Cost": {
246
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
247
+ }
233
248
  }
234
249
  },
235
250
  "423": {
236
- "description": "Locked \u2014 Bogon or reserved IP address",
251
+ "description": "Locked Bogon or reserved IP address",
237
252
  "content": {
238
253
  "application/json": {
239
254
  "schema": {
@@ -248,6 +263,11 @@
248
263
  }
249
264
  }
250
265
  }
266
+ },
267
+ "headers": {
268
+ "X-AF-Credits-Cost": {
269
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
270
+ }
251
271
  }
252
272
  }
253
273
  }
@@ -743,7 +763,7 @@
743
763
  },
744
764
  "current_time": {
745
765
  "type": "string",
746
- "description": "Local date/time in YYYY-MM-DD HH:mm:ss.SSS\u00b1ZZZZ format."
766
+ "description": "Local date/time in YYYY-MM-DD HH:mm:ss.SSS±ZZZZ format."
747
767
  },
748
768
  "current_time_unix": {
749
769
  "type": "number",
@@ -928,6 +948,14 @@
928
948
  }
929
949
  }
930
950
  }
951
+ },
952
+ "headers": {
953
+ "X-AF-Credits-Cost": {
954
+ "description": "Specifies the number of credits consumed by the current request.",
955
+ "schema": {
956
+ "type": "integer"
957
+ }
958
+ }
931
959
  }
932
960
  },
933
961
  "security": [
@@ -101,6 +101,11 @@
101
101
  }
102
102
  }
103
103
  }
104
+ },
105
+ "headers": {
106
+ "X-AF-Credits-Cost": {
107
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
108
+ }
104
109
  }
105
110
  },
106
111
  "400": {
@@ -119,6 +124,11 @@
119
124
  }
120
125
  }
121
126
  }
127
+ },
128
+ "headers": {
129
+ "X-AF-Credits-Cost": {
130
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
131
+ }
122
132
  }
123
133
  },
124
134
  "423": {
@@ -137,6 +147,11 @@
137
147
  }
138
148
  }
139
149
  }
150
+ },
151
+ "headers": {
152
+ "X-AF-Credits-Cost": {
153
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
154
+ }
140
155
  }
141
156
  }
142
157
  }
@@ -303,6 +318,14 @@
303
318
  }
304
319
  }
305
320
  }
321
+ },
322
+ "headers": {
323
+ "X-AF-Credits-Cost": {
324
+ "description": "Specifies the number of credits consumed by the current request.",
325
+ "schema": {
326
+ "type": "integer"
327
+ }
328
+ }
306
329
  }
307
330
  },
308
331
  "security": [
@@ -340,10 +340,15 @@
340
340
  }
341
341
  }
342
342
  }
343
+ },
344
+ "headers": {
345
+ "X-AF-Credits-Cost": {
346
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
347
+ }
343
348
  }
344
349
  },
345
350
  "400": {
346
- "description": "Bad Request \u2013 Invalid parameters provided",
351
+ "description": "Bad Request Invalid parameters provided",
347
352
  "content": {
348
353
  "application/json": {
349
354
  "schema": {
@@ -370,6 +375,11 @@
370
375
  }
371
376
  }
372
377
  }
378
+ },
379
+ "headers": {
380
+ "X-AF-Credits-Cost": {
381
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
382
+ }
373
383
  }
374
384
  },
375
385
  "404": {
@@ -388,6 +398,11 @@
388
398
  }
389
399
  }
390
400
  }
401
+ },
402
+ "headers": {
403
+ "X-AF-Credits-Cost": {
404
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
405
+ }
391
406
  }
392
407
  }
393
408
  }
@@ -427,7 +442,6 @@
427
442
  },
428
443
  "description": "Astronomy data response containing location information and astronomical data."
429
444
  },
430
-
431
445
  "AstronomyLocation": {
432
446
  "type": "object",
433
447
  "description": "Geographic location information for the astronomy calculation. The set of populated fields depends on which lookup mode the request used: (1) location param (geocode-by-address) returns location_string plus a basic field set (country_name, state_prov, city, locality, latitude, longitude, elevation); (2) lat + long params (geocode-by-coordinates) returns the same basic field set minus location_string, and locality may be an empty string when the coordinates don't resolve to a named sub-area; (3) ip param, or no location/lat/long/ip param at all (falls back to geo-IP lookup of the client's IP), returns the full geo-IP field set — continent_code, continent_name, country_code2, country_code3, country_name_official, is_eu, state_code, district, zipcode — in addition to the basic fields, but never location_string. elevation can be an empty string when elevation data is unavailable for the resolved location.",
@@ -790,6 +804,14 @@
790
804
  }
791
805
  }
792
806
  }
807
+ },
808
+ "headers": {
809
+ "X-AF-Credits-Cost": {
810
+ "description": "Specifies the number of credits consumed by the current request.",
811
+ "schema": {
812
+ "type": "integer"
813
+ }
814
+ }
793
815
  }
794
816
  },
795
817
  "security": [
@@ -0,0 +1,343 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "PDF Generator API - Bulk PDF Generation from CSV",
5
+ "version": "1.0.0",
6
+ "description": "Generate one PDF per row from an uploaded CSV file against a template you designed in the APIFreaks PDF Template Builder. Each row is processed independently, and the response returns an array of results, each with its own pdf_url. Authentication is done with your APIFreaks API key passed in the X-apikey header.",
7
+ "contact": {
8
+ "name": "APIFreaks Support",
9
+ "url": "https://apifreaks.com/contact",
10
+ "email": "support@apifreaks.com"
11
+ }
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://api.apifreaks.com/v1.0",
16
+ "description": "PDF Generator API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/pdf/template/generate/bulk": {
21
+ "post": {
22
+ "tags": ["PDF Template APIs"],
23
+ "summary": "Generate PDFs in bulk from a CSV",
24
+ "description": "Upload a CSV file where each row is one record. The API generates one PDF per row and returns an array of results, each with its own pdf_url. Rows are processed independently, so a failure in one row does not block the rest of the batch. The response gives a row-by-row breakdown of which PDFs succeeded and which failed.",
25
+ "parameters": [
26
+ {
27
+ "name": "template_id",
28
+ "in": "query",
29
+ "required": true,
30
+ "schema": {
31
+ "type": "string"
32
+ },
33
+ "description": "The template to render, from the APIFreaks PDF Template Builder. Copy it from your dashboard when you save the template."
34
+ },
35
+ {
36
+ "name": "version",
37
+ "in": "query",
38
+ "required": false,
39
+ "schema": {
40
+ "type": "string",
41
+ "pattern": "^v"
42
+ },
43
+ "description": "Template version to render, e.g. v2. Must start with v. Omit this parameter entirely to use the latest version; the literal value 'latest' is not accepted by the API."
44
+ }
45
+ ],
46
+ "requestBody": {
47
+ "description": "Multipart form-data body carrying the CSV file to render. Each row in the CSV is one record and produces one PDF.",
48
+ "required": true,
49
+ "content": {
50
+ "multipart/form-data": {
51
+ "schema": {
52
+ "$ref": "#/components/schemas/CsvUploadRequest"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "responses": {
58
+ "200": {
59
+ "description": "PDFs generated successfully. The response is an array of results, one entry per CSV row, each with its own pdf_url.",
60
+ "content": {
61
+ "application/json": {
62
+ "schema": {
63
+ "type": "array",
64
+ "items": {
65
+ "$ref": "#/components/schemas/TemplateGenerationResponse"
66
+ }
67
+ },
68
+ "examples": {
69
+ "success": {
70
+ "summary": "Generated PDFs for two rows",
71
+ "value": [
72
+ {
73
+ "template_id": "73691bce-1c58-4370-acc6-64b2dd14f81c",
74
+ "pdf_url": "https://s3.eu-central-2.wasabisys.com/w.storage.apifreaks.com/pdf_templates/73691bce-1c58-4370-acc6-64b2dd14f81c/Candidate%20Resume_20260810141245054106_1.pdf",
75
+ "created_at": "2026-08-10T14:12:47.887Z",
76
+ "expiration_time": "2026-11-10T14:12:47.887Z"
77
+ },
78
+ {
79
+ "template_id": "73691bce-1c58-4370-acc6-64b2dd14f81c",
80
+ "pdf_url": "https://s3.eu-central-2.wasabisys.com/w.storage.apifreaks.com/pdf_templates/73691bce-1c58-4370-acc6-64b2dd14f81c/Candidate%20Resume_20260810141245054154_2.pdf",
81
+ "created_at": "2026-08-10T14:12:47.940Z",
82
+ "expiration_time": "2026-11-10T14:12:47.940Z"
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "headers": {
90
+ "X-AF-Credits-Cost": {
91
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
92
+ }
93
+ }
94
+ },
95
+ "400": {
96
+ "description": "Bad Request — Missing parameters, a file that is not a CSV, or data larger than 10 MB.",
97
+ "content": {
98
+ "application/json": {
99
+ "schema": {
100
+ "$ref": "#/components/schemas/ErrorResponse"
101
+ },
102
+ "examples": {
103
+ "CsvFileRequired": {
104
+ "summary": "Uploaded file is not a CSV",
105
+ "value": {
106
+ "timestamp": "2026-08-10T14:13:14.497Z",
107
+ "path": "/v1.0/generate-pdf/bulk",
108
+ "status": 400,
109
+ "error": "CSV File Required",
110
+ "message": "Only CSV files are supported. Please upload a valid CSV file."
111
+ }
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "headers": {
117
+ "X-AF-Credits-Cost": {
118
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
119
+ }
120
+ }
121
+ },
122
+ "401": {
123
+ "description": "Unauthorized — The API key is missing or invalid.",
124
+ "content": {
125
+ "application/json": {
126
+ "schema": {
127
+ "$ref": "#/components/schemas/ErrorResponse"
128
+ },
129
+ "examples": {
130
+ "InvalidApiKey": {
131
+ "summary": "Provided API key is invalid",
132
+ "value": {
133
+ "error": "API Access Exception",
134
+ "message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
135
+ "path": "/v1.0/pdf/template/generate/bulk",
136
+ "status": 401,
137
+ "timestamp": "2026-08-10T14:13:14.996Z"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "headers": {
144
+ "X-AF-Credits-Cost": {
145
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
146
+ }
147
+ }
148
+ },
149
+ "403": {
150
+ "description": "Forbidden — The account does not have access to this template.",
151
+ "content": {
152
+ "application/json": {
153
+ "schema": {
154
+ "$ref": "#/components/schemas/ErrorResponse"
155
+ }
156
+ }
157
+ },
158
+ "headers": {
159
+ "X-AF-Credits-Cost": {
160
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
161
+ }
162
+ }
163
+ },
164
+ "404": {
165
+ "description": "Not Found — No template matches the template_id, or the requested version does not exist.",
166
+ "content": {
167
+ "application/json": {
168
+ "schema": {
169
+ "$ref": "#/components/schemas/ErrorResponse"
170
+ }
171
+ }
172
+ },
173
+ "headers": {
174
+ "X-AF-Credits-Cost": {
175
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
176
+ }
177
+ }
178
+ },
179
+ "415": {
180
+ "description": "Unsupported Media Type — The request Content-Type is not supported for this endpoint.",
181
+ "content": {
182
+ "application/json": {
183
+ "schema": {
184
+ "$ref": "#/components/schemas/ErrorResponse"
185
+ }
186
+ }
187
+ },
188
+ "headers": {
189
+ "X-AF-Credits-Cost": {
190
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
191
+ }
192
+ }
193
+ },
194
+ "422": {
195
+ "description": "Unprocessable Entity — The request contains invalid or missing data.",
196
+ "content": {
197
+ "application/json": {
198
+ "schema": {
199
+ "$ref": "#/components/schemas/ErrorResponse"
200
+ }
201
+ }
202
+ },
203
+ "headers": {
204
+ "X-AF-Credits-Cost": {
205
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
206
+ }
207
+ }
208
+ },
209
+ "500": {
210
+ "description": "Internal Server Error — An unexpected error occurred, or the PDF could not be generated.",
211
+ "content": {
212
+ "application/json": {
213
+ "schema": {
214
+ "$ref": "#/components/schemas/ErrorResponse"
215
+ }
216
+ }
217
+ },
218
+ "headers": {
219
+ "X-AF-Credits-Cost": {
220
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
221
+ }
222
+ }
223
+ },
224
+ "504": {
225
+ "description": "Gateway Timeout — The request went past the 100 second processing limit.",
226
+ "content": {
227
+ "application/json": {
228
+ "schema": {
229
+ "$ref": "#/components/schemas/ErrorResponse"
230
+ }
231
+ }
232
+ },
233
+ "headers": {
234
+ "X-AF-Credits-Cost": {
235
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
236
+ }
237
+ }
238
+ }
239
+ },
240
+ "operationId": "generatePdfsFromCsv"
241
+ }
242
+ }
243
+ },
244
+ "components": {
245
+ "securitySchemes": {
246
+ "ApiKeyAuthHeader": {
247
+ "type": "apiKey",
248
+ "in": "header",
249
+ "name": "X-apikey",
250
+ "description": "Pass your API key via the X-apikey request header."
251
+ },
252
+ "ApiKeyAuthQuery": {
253
+ "type": "apiKey",
254
+ "in": "query",
255
+ "name": "apiKey",
256
+ "description": "Pass your API key via the apiKey query parameter."
257
+ }
258
+ },
259
+ "schemas": {
260
+ "TemplateGenerationResponse": {
261
+ "type": "object",
262
+ "description": "Result of a PDF generation request, containing the hosted URL of the generated PDF.",
263
+ "required": ["template_id", "pdf_url", "created_at", "expiration_time"],
264
+ "properties": {
265
+ "template_id": {
266
+ "type": "string",
267
+ "description": "The template that was rendered."
268
+ },
269
+ "pdf_url": {
270
+ "type": "string",
271
+ "description": "Hosted URL of the generated PDF."
272
+ },
273
+ "created_at": {
274
+ "type": "string",
275
+ "format": "date-time",
276
+ "description": "When the PDF was generated (ISO 8601)."
277
+ },
278
+ "expiration_time": {
279
+ "type": "string",
280
+ "format": "date-time",
281
+ "description": "When the hosted PDF expires (ISO 8601)."
282
+ }
283
+ }
284
+ },
285
+ "CsvUploadRequest": {
286
+ "type": "object",
287
+ "description": "Multipart form-data request body containing the CSV file to render in bulk.",
288
+ "required": ["file"],
289
+ "properties": {
290
+ "file": {
291
+ "type": "string",
292
+ "format": "binary",
293
+ "description": "A CSV file uploaded as form-data where each row is one record. One PDF is generated per row."
294
+ }
295
+ }
296
+ },
297
+ "ErrorResponse": {
298
+ "type": "object",
299
+ "description": "Standard error envelope returned by the API on failed requests.",
300
+ "required": ["message"],
301
+ "properties": {
302
+ "error": {
303
+ "type": "string",
304
+ "description": "Short error category or exception type."
305
+ },
306
+ "message": {
307
+ "type": "string",
308
+ "description": "Human-readable error message describing the failure."
309
+ },
310
+ "path": {
311
+ "type": "string",
312
+ "description": "API endpoint path that produced the error."
313
+ },
314
+ "status": {
315
+ "type": "integer",
316
+ "description": "HTTP status code returned with the error."
317
+ },
318
+ "timestamp": {
319
+ "type": "string",
320
+ "format": "date-time",
321
+ "description": "Timestamp when the error occurred (ISO 8601)."
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "headers": {
327
+ "X-AF-Credits-Cost": {
328
+ "description": "Specifies the number of credits consumed by the current request.",
329
+ "schema": {
330
+ "type": "integer"
331
+ }
332
+ }
333
+ }
334
+ },
335
+ "security": [
336
+ {
337
+ "ApiKeyAuthHeader": []
338
+ },
339
+ {
340
+ "ApiKeyAuthQuery": []
341
+ }
342
+ ]
343
+ }