@apifreaks/openapi-specs 0.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.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "PDF Extract Pages API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Extract specific pages from a PDF file. Specify page ranges or individual page numbers. Returns a task ID for tracking the extraction progress.",
|
|
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 Extract Pages API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/pdf/extract-pages": {
|
|
21
|
+
"post": {
|
|
22
|
+
"tags": [
|
|
23
|
+
"PDF Operations APIs"
|
|
24
|
+
],
|
|
25
|
+
"summary": "Extract pages from a PDF",
|
|
26
|
+
"description": "This API extracts specific pages or page ranges from a PDF file and returns them as a new PDF.",
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "format",
|
|
30
|
+
"in": "query",
|
|
31
|
+
"required": false,
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"json",
|
|
36
|
+
"xml"
|
|
37
|
+
],
|
|
38
|
+
"default": "json"
|
|
39
|
+
},
|
|
40
|
+
"description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "file_id",
|
|
44
|
+
"in": "query",
|
|
45
|
+
"required": false,
|
|
46
|
+
"schema": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"description": "The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "destroy",
|
|
53
|
+
"in": "query",
|
|
54
|
+
"required": false,
|
|
55
|
+
"schema": {
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
},
|
|
58
|
+
"description": "If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "output",
|
|
62
|
+
"in": "query",
|
|
63
|
+
"required": false,
|
|
64
|
+
"schema": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"description": "The desired name for the output PDF file after pages have been extracted. If not provided, a default name will be assigned."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "pages",
|
|
71
|
+
"in": "query",
|
|
72
|
+
"required": true,
|
|
73
|
+
"schema": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"description": "Specifies which pages to extract from the PDF. You can provide individual page numbers (e.g., '2') and/or page ranges in any order, including descending (e.g., '9-5', '16-last'). Use commas to separate entries and hyphens for ranges. You may alternatively pass only one of the special keywords: 'even' (extracts all even-numbered pages), 'odd' (extracts all odd-numbered pages), 'last' (extracts only the last page), or 'all' (extracts all pages into individual files). Examples: '2,6-3', 'even', 'all'. Mixing special keywords with specific pages/ranges is not allowed. Malformed values or page numbers exceeding the document's page count are not rejected on this call \u2014 the resulting task fails asynchronously (check task status)."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "separated",
|
|
80
|
+
"in": "query",
|
|
81
|
+
"required": false,
|
|
82
|
+
"schema": {
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"description": "If set to `true`, each of the specified pages will be extracted and returned as a separate PDF file."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "webhook_url",
|
|
89
|
+
"in": "query",
|
|
90
|
+
"required": false,
|
|
91
|
+
"schema": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"description": "The URL to which the webhook notification will be sent after the task is completed."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "webhook_failure_notification",
|
|
98
|
+
"in": "query",
|
|
99
|
+
"required": false,
|
|
100
|
+
"schema": {
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "X-Webhook-Authorization",
|
|
107
|
+
"in": "header",
|
|
108
|
+
"required": false,
|
|
109
|
+
"schema": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"description": "Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call."
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"requestBody": {
|
|
116
|
+
"description": "Multipart form-data body carrying the PDF file to extract pages from. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.",
|
|
117
|
+
"required": false,
|
|
118
|
+
"content": {
|
|
119
|
+
"multipart/form-data": {
|
|
120
|
+
"schema": {
|
|
121
|
+
"$ref": "#/components/schemas/PdfFileUploadRequest"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"responses": {
|
|
127
|
+
"200": {
|
|
128
|
+
"description": "Extract task created successfully. Malformed or out-of-range page specifications are not rejected synchronously \u2014 the task is created, then fails asynchronously; poll the task status endpoint and check for status \"failed\" with an error/message pair.",
|
|
129
|
+
"content": {
|
|
130
|
+
"application/json": {
|
|
131
|
+
"schema": {
|
|
132
|
+
"$ref": "#/components/schemas/PDFResponse"
|
|
133
|
+
},
|
|
134
|
+
"examples": {
|
|
135
|
+
"success": {
|
|
136
|
+
"summary": "Task created",
|
|
137
|
+
"value": {
|
|
138
|
+
"taskId": "dabcbcf5-d4ba-4143-bc34-3a8db6c8476e",
|
|
139
|
+
"inputIds": [
|
|
140
|
+
"01a77122-c457-475d-a6f2-f88cd4ad8924"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"400": {
|
|
149
|
+
"description": "Bad Request \u2014 Missing/invalid parameters or file ID",
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"examples": {
|
|
153
|
+
"MissingPages": {
|
|
154
|
+
"summary": "Missing required pages parameter",
|
|
155
|
+
"value": {
|
|
156
|
+
"error": "Invalid Param Exception",
|
|
157
|
+
"message": "please pass correct parameters",
|
|
158
|
+
"path": "/v1.0/pdf/extract-pages",
|
|
159
|
+
"status": 400,
|
|
160
|
+
"timestamp": "2026-07-27T10:53:18.573Z"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"InvalidID": {
|
|
164
|
+
"summary": "file_id is malformed or does not exist",
|
|
165
|
+
"value": {
|
|
166
|
+
"error": "Invalid File ID Provided",
|
|
167
|
+
"message": "Please provide a valid file ID",
|
|
168
|
+
"path": "/v1.0/pdf/extract-pages",
|
|
169
|
+
"status": 400,
|
|
170
|
+
"timestamp": "2026-07-27T10:53:19.182Z"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"schema": {
|
|
175
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"415": {
|
|
181
|
+
"description": "Unsupported Media Type \u2014 File type not supported",
|
|
182
|
+
"content": {
|
|
183
|
+
"application/json": {
|
|
184
|
+
"examples": {
|
|
185
|
+
"UnsupportedFileType": {
|
|
186
|
+
"summary": "Uploaded file is not a supported type",
|
|
187
|
+
"value": {
|
|
188
|
+
"timestamp": "2026-07-27T10:53:19.733Z",
|
|
189
|
+
"path": "/v1.0/pdf/extract-pages",
|
|
190
|
+
"status": 415,
|
|
191
|
+
"error": "Unsupported File Type",
|
|
192
|
+
"message": "The provided file type is not supported. Refer to the documentation for valid file types."
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"schema": {
|
|
197
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"operationId": "extractPdfPages"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"components": {
|
|
208
|
+
"securitySchemes": {
|
|
209
|
+
"ApiKeyAuthHeader": {
|
|
210
|
+
"type": "apiKey",
|
|
211
|
+
"in": "header",
|
|
212
|
+
"name": "X-apiKey",
|
|
213
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
214
|
+
},
|
|
215
|
+
"ApiKeyAuthQuery": {
|
|
216
|
+
"type": "apiKey",
|
|
217
|
+
"in": "query",
|
|
218
|
+
"name": "apiKey",
|
|
219
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"schemas": {
|
|
223
|
+
"PDFResponse": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"description": "Response containing the task ID and input file IDs for a PDF processing task.",
|
|
226
|
+
"required": [
|
|
227
|
+
"taskId"
|
|
228
|
+
],
|
|
229
|
+
"properties": {
|
|
230
|
+
"taskId": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "Task ID of the requested task, used to check the task status."
|
|
233
|
+
},
|
|
234
|
+
"inputIds": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"description": "File IDs for the input files provided for the task. Not returned when destroy parameter is true."
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"PdfFileUploadRequest": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"description": "Multipart form-data request body containing the PDF file to process.",
|
|
246
|
+
"required": [],
|
|
247
|
+
"properties": {
|
|
248
|
+
"file": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"format": "binary",
|
|
251
|
+
"description": "Raw PDF file bytes sent as a multipart/form-data field named 'file'. Omit this field entirely and pass file_id in the query string instead to use an already-uploaded file."
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"ErrorResponse": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
258
|
+
"required": [
|
|
259
|
+
"message"
|
|
260
|
+
],
|
|
261
|
+
"properties": {
|
|
262
|
+
"error": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Short error category or exception type."
|
|
265
|
+
},
|
|
266
|
+
"message": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "Human-readable error message describing the failure."
|
|
269
|
+
},
|
|
270
|
+
"path": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"description": "API endpoint path that produced the error."
|
|
273
|
+
},
|
|
274
|
+
"status": {
|
|
275
|
+
"type": "integer",
|
|
276
|
+
"description": "HTTP status code returned with the error."
|
|
277
|
+
},
|
|
278
|
+
"timestamp": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"format": "date-time",
|
|
281
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"security": [
|
|
288
|
+
{
|
|
289
|
+
"ApiKeyAuthHeader": []
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"ApiKeyAuthQuery": []
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "PDF File Status API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Check the status of a PDF file using its unique file ID. Returns file metadata including name, type, creation time, and scheduled deletion time. Use this endpoint to verify file availability after upload or before processing.",
|
|
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 File Status API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/pdf/file-status": {
|
|
21
|
+
"get": {
|
|
22
|
+
"tags": ["Task Status and File Info APIs"],
|
|
23
|
+
"summary": "Check file status",
|
|
24
|
+
"description": "This API checks the status of a PDF file using its unique file ID, providing information about its creation and potential deletion time.",
|
|
25
|
+
"parameters": [
|
|
26
|
+
{
|
|
27
|
+
"name": "format",
|
|
28
|
+
"in": "query",
|
|
29
|
+
"required": false,
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["json", "xml"],
|
|
33
|
+
"default": "json"
|
|
34
|
+
},
|
|
35
|
+
"description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "file_id",
|
|
39
|
+
"in": "query",
|
|
40
|
+
"description": "The unique ID of the file whose status is requested.",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"responses": {
|
|
48
|
+
"200": {
|
|
49
|
+
"description": "Successful operation",
|
|
50
|
+
"content": {
|
|
51
|
+
"application/json": {
|
|
52
|
+
"schema": {
|
|
53
|
+
"$ref": "#/components/schemas/FileStatusResponse"
|
|
54
|
+
},
|
|
55
|
+
"examples": {
|
|
56
|
+
"success": {
|
|
57
|
+
"summary": "File found",
|
|
58
|
+
"value": {
|
|
59
|
+
"fileId": "b7ece7d4-1141-4143-98cb-7b4b818d6d82",
|
|
60
|
+
"fileName": "test.pdf",
|
|
61
|
+
"fileType": "pdf",
|
|
62
|
+
"fileCreationTime": "2026-07-27T10:46:36",
|
|
63
|
+
"fileDeletionTime": "2026-08-26"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"400": {
|
|
71
|
+
"description": "Bad Request — Missing required file_id parameter",
|
|
72
|
+
"content": {
|
|
73
|
+
"application/json": {
|
|
74
|
+
"examples": {
|
|
75
|
+
"missingFileId": {
|
|
76
|
+
"summary": "Missing file_id parameter",
|
|
77
|
+
"value": {
|
|
78
|
+
"error": "Invalid Param Exception",
|
|
79
|
+
"message": "please pass correct parameters",
|
|
80
|
+
"path": "/v1.0/pdf/file-status",
|
|
81
|
+
"status": 400,
|
|
82
|
+
"timestamp": "2026-07-27T10:46:38.333Z"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"schema": {
|
|
87
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"404": {
|
|
93
|
+
"description": "File ID Not Found",
|
|
94
|
+
"content": {
|
|
95
|
+
"application/json": {
|
|
96
|
+
"examples": {
|
|
97
|
+
"error": {
|
|
98
|
+
"summary": "File ID not found",
|
|
99
|
+
"value": {
|
|
100
|
+
"timestamp": "2026-07-27T10:46:37.828Z",
|
|
101
|
+
"path": "/v1.0/pdf/file-status",
|
|
102
|
+
"status": 404,
|
|
103
|
+
"error": "File ID Not Found",
|
|
104
|
+
"message": "Please provide a valid file ID."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"schema": {
|
|
109
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"operationId": "getFileStatus"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"components": {
|
|
120
|
+
"securitySchemes": {
|
|
121
|
+
"ApiKeyAuthHeader": {
|
|
122
|
+
"type": "apiKey",
|
|
123
|
+
"in": "header",
|
|
124
|
+
"name": "X-apiKey",
|
|
125
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
126
|
+
},
|
|
127
|
+
"ApiKeyAuthQuery": {
|
|
128
|
+
"type": "apiKey",
|
|
129
|
+
"in": "query",
|
|
130
|
+
"name": "apiKey",
|
|
131
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"schemas": {
|
|
135
|
+
"FileStatusResponse": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": [
|
|
138
|
+
"fileId",
|
|
139
|
+
"fileName",
|
|
140
|
+
"fileType",
|
|
141
|
+
"fileCreationTime",
|
|
142
|
+
"fileDeletionTime"
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"fileId": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "The unique identifier of the file."
|
|
148
|
+
},
|
|
149
|
+
"fileName": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "The name of the file."
|
|
152
|
+
},
|
|
153
|
+
"fileType": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "The type of the file (e.g., 'pdf')."
|
|
156
|
+
},
|
|
157
|
+
"fileCreationTime": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"format": "date-time",
|
|
160
|
+
"description": "The timestamp when the file was created."
|
|
161
|
+
},
|
|
162
|
+
"fileDeletionTime": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "date",
|
|
165
|
+
"description": "Date on which the file is scheduled to be deleted, in UTC."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"description": "File status response containing metadata about the PDF file."
|
|
169
|
+
},
|
|
170
|
+
"ErrorResponse": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
173
|
+
"required": ["message"],
|
|
174
|
+
"properties": {
|
|
175
|
+
"error": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "Short error category or exception type."
|
|
178
|
+
},
|
|
179
|
+
"message": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"description": "Human-readable error message describing the failure."
|
|
182
|
+
},
|
|
183
|
+
"path": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"description": "API endpoint path that produced the error."
|
|
186
|
+
},
|
|
187
|
+
"status": {
|
|
188
|
+
"type": "integer",
|
|
189
|
+
"description": "HTTP status code returned with the error."
|
|
190
|
+
},
|
|
191
|
+
"timestamp": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"format": "date-time",
|
|
194
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"security": [
|
|
201
|
+
{
|
|
202
|
+
"ApiKeyAuthHeader": []
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"ApiKeyAuthQuery": []
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "PDF Delete File API Reference",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Delete a PDF file from the server using its unique file ID. Once deleted, the file ID cannot be used in other API calls. Returns a success indicator and confirmation message.",
|
|
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 Delete File API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/pdf/file": {
|
|
21
|
+
"delete": {
|
|
22
|
+
"tags": ["Task Status and File Info APIs"],
|
|
23
|
+
"summary": "Delete a PDF file",
|
|
24
|
+
"description": "This API deletes a PDF file using its unique file ID.",
|
|
25
|
+
"parameters": [
|
|
26
|
+
{
|
|
27
|
+
"name": "format",
|
|
28
|
+
"in": "query",
|
|
29
|
+
"required": false,
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["json", "xml"],
|
|
33
|
+
"default": "json"
|
|
34
|
+
},
|
|
35
|
+
"description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "file_id",
|
|
39
|
+
"in": "query",
|
|
40
|
+
"description": "The unique ID of the file to be deleted.",
|
|
41
|
+
"required": true,
|
|
42
|
+
"schema": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"responses": {
|
|
48
|
+
"200": {
|
|
49
|
+
"description": "Successful operation",
|
|
50
|
+
"content": {
|
|
51
|
+
"application/json": {
|
|
52
|
+
"schema": {
|
|
53
|
+
"$ref": "#/components/schemas/DeleteFileResponse"
|
|
54
|
+
},
|
|
55
|
+
"examples": {
|
|
56
|
+
"success": {
|
|
57
|
+
"summary": "File deleted",
|
|
58
|
+
"value": {
|
|
59
|
+
"fileId": "abc123",
|
|
60
|
+
"success": true,
|
|
61
|
+
"message": "File deleted successfully."
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"400": {
|
|
69
|
+
"description": "Bad Request — Missing required file_id parameter",
|
|
70
|
+
"content": {
|
|
71
|
+
"application/json": {
|
|
72
|
+
"examples": {
|
|
73
|
+
"missingFileId": {
|
|
74
|
+
"summary": "Missing file_id parameter",
|
|
75
|
+
"value": {
|
|
76
|
+
"error": "Invalid Param Exception",
|
|
77
|
+
"message": "please pass correct parameters",
|
|
78
|
+
"path": "/v1.0/pdf/file",
|
|
79
|
+
"status": 400,
|
|
80
|
+
"timestamp": "2026-07-27T10:45:56.656Z"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"schema": {
|
|
85
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"404": {
|
|
91
|
+
"description": "File ID Not Found",
|
|
92
|
+
"content": {
|
|
93
|
+
"application/json": {
|
|
94
|
+
"examples": {
|
|
95
|
+
"error": {
|
|
96
|
+
"summary": "File ID not found or already deleted",
|
|
97
|
+
"value": {
|
|
98
|
+
"timestamp": "2026-07-27T10:45:55.737Z",
|
|
99
|
+
"path": "/v1.0/pdf/file",
|
|
100
|
+
"status": 404,
|
|
101
|
+
"error": "File ID Not Found",
|
|
102
|
+
"message": "Please provide a valid file ID."
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"schema": {
|
|
107
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"operationId": "deleteFile"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"components": {
|
|
118
|
+
"securitySchemes": {
|
|
119
|
+
"ApiKeyAuthHeader": {
|
|
120
|
+
"type": "apiKey",
|
|
121
|
+
"in": "header",
|
|
122
|
+
"name": "X-apiKey",
|
|
123
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
124
|
+
},
|
|
125
|
+
"ApiKeyAuthQuery": {
|
|
126
|
+
"type": "apiKey",
|
|
127
|
+
"in": "query",
|
|
128
|
+
"name": "apiKey",
|
|
129
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"schemas": {
|
|
133
|
+
"DeleteFileResponse": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": ["fileId", "success", "message"],
|
|
136
|
+
"properties": {
|
|
137
|
+
"fileId": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "The unique identifier of the file."
|
|
140
|
+
},
|
|
141
|
+
"success": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "Indicates whether the file deletion request was successful."
|
|
144
|
+
},
|
|
145
|
+
"message": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "A message indicating the result of the file deletion request."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"description": "File deletion response containing the result of the delete operation."
|
|
151
|
+
},
|
|
152
|
+
"ErrorResponse": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
155
|
+
"required": ["message"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"error": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Short error category or exception type."
|
|
160
|
+
},
|
|
161
|
+
"message": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Human-readable error message describing the failure."
|
|
164
|
+
},
|
|
165
|
+
"path": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "API endpoint path that produced the error."
|
|
168
|
+
},
|
|
169
|
+
"status": {
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"description": "HTTP status code returned with the error."
|
|
172
|
+
},
|
|
173
|
+
"timestamp": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"format": "date-time",
|
|
176
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"security": [
|
|
183
|
+
{
|
|
184
|
+
"ApiKeyAuthHeader": []
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"ApiKeyAuthQuery": []
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|