@apifreaks/openapi-specs 0.4.24 → 0.4.25
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/dist/index.cjs +3722 -546
- package/dist/index.js +3722 -546
- package/dist/specs/commodity/commodity-fluctuation.yaml +33 -2
- package/dist/specs/commodity/commodity-intraday-rates.yaml +33 -2
- package/dist/specs/commodity/commodity-prices.yaml +33 -2
- package/dist/specs/commodity/commodity-symbols.yaml +68 -1
- package/dist/specs/commodity/commodity-time-series.yaml +33 -2
- package/dist/specs/commodity/historical-commodity-prices.yaml +33 -2
- package/dist/specs/dns/bulk-dns-lookup.yaml +45 -3
- package/dist/specs/dns/dns-history-lookup.yaml +76 -3
- package/dist/specs/dns/dns-lookup.yaml +72 -6
- package/dist/specs/dns/reverse-dns-lookup.yaml +91 -2
- package/dist/specs/financial/bulk-vat-rates-country.yaml +18 -0
- package/dist/specs/financial/financial-apis-supported-countries.yaml +75 -17
- package/dist/specs/financial/iban-validation.yaml +19 -1
- package/dist/specs/financial/swift-code-finder.yaml +18 -0
- package/dist/specs/financial/swift-code-lookup.yaml +18 -0
- package/dist/specs/financial/vat-number-validation.yaml +48 -0
- package/dist/specs/financial/vat-rates-by-ip.yaml +18 -0
- package/dist/specs/financial/vat-rates-country.yaml +18 -0
- package/dist/specs/geocoding/forward-geocoding.yaml +95 -2
- package/dist/specs/geocoding/reverse-geocoding.yaml +71 -0
- package/dist/specs/phone-number-validation/bulk-phone-number-validation.yaml +25 -3
- package/dist/specs/phone-number-validation/phone-validation.yaml +49 -3
- package/dist/specs/scraper/web-scraper.yaml +85 -7
- package/dist/specs/weather/air-quality.yaml +71 -5
- package/dist/specs/weather/astronomy-data.yaml +84 -1
- package/dist/specs/weather/bulk-live-weather.yaml +159 -3
- package/dist/specs/weather/flood-forecast.yaml +61 -11
- package/dist/specs/weather/historical-weather.yaml +53 -3
- package/dist/specs/weather/live-weather.yaml +66 -15
- package/dist/specs/weather/marine-weather.yaml +74 -8
- package/dist/specs/weather/time-series-weather.yaml +60 -8
- package/dist/specs/weather/weather-forecast.yaml +76 -6
- package/package.json +1 -1
- package/specs/commodity/commodity-fluctuation.json +44 -2
- package/specs/commodity/commodity-intraday-rates.json +44 -2
- package/specs/commodity/commodity-prices.json +44 -2
- package/specs/commodity/commodity-symbols.json +95 -1
- package/specs/commodity/commodity-time-series.json +44 -2
- package/specs/commodity/historical-commodity-prices.json +44 -2
- package/specs/dns/bulk-dns-lookup.json +63 -4
- package/specs/dns/dns-history-lookup.json +102 -3
- package/specs/dns/dns-lookup.json +96 -6
- package/specs/dns/reverse-dns-lookup.json +121 -2
- package/specs/financial/bulk-vat-rates-country.json +27 -0
- package/specs/financial/financial-apis-supported-countries.json +114 -23
- package/specs/financial/iban-validation.json +28 -1
- package/specs/financial/swift-code-finder.json +27 -0
- package/specs/financial/swift-code-lookup.json +27 -0
- package/specs/financial/vat-number-validation.json +72 -0
- package/specs/financial/vat-rates-by-ip.json +27 -0
- package/specs/financial/vat-rates-country.json +27 -0
- package/specs/geocoding/forward-geocoding.json +127 -2
- package/specs/geocoding/reverse-geocoding.json +102 -0
- package/specs/phone-number-validation/bulk-phone-number-validation.json +35 -3
- package/specs/phone-number-validation/phone-validation.json +65 -3
- package/specs/scraper/web-scraper.json +110 -7
- package/specs/weather/air-quality.json +92 -5
- package/specs/weather/astronomy-data.json +122 -1
- package/specs/weather/bulk-live-weather.json +227 -3
- package/specs/weather/flood-forecast.json +78 -11
- package/specs/weather/historical-weather.json +70 -3
- package/specs/weather/live-weather.json +85 -17
- package/specs/weather/marine-weather.json +95 -8
- package/specs/weather/time-series-weather.json +82 -8
- package/specs/weather/weather-forecast.json +107 -6
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"default": "json",
|
|
34
34
|
"enum": ["json", "xml"]
|
|
35
35
|
},
|
|
36
|
-
"description": "Format of the response. Can be \"json\" or \"xml\"."
|
|
36
|
+
"description": "Format of the response. Can be \"json\" or \"xml\" (case-insensitive)."
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"in": "query",
|
|
@@ -339,6 +339,11 @@
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
+
},
|
|
343
|
+
"application/xml": {
|
|
344
|
+
"schema": {
|
|
345
|
+
"$ref": "#/components/schemas/AstronomyResponse"
|
|
346
|
+
}
|
|
342
347
|
}
|
|
343
348
|
},
|
|
344
349
|
"headers": {
|
|
@@ -372,6 +377,58 @@
|
|
|
372
377
|
"value": {
|
|
373
378
|
"message": "You must provide date in the 'yyyy-MM-dd' format"
|
|
374
379
|
}
|
|
380
|
+
},
|
|
381
|
+
"invalidLongitude": {
|
|
382
|
+
"summary": "Longitude out of range",
|
|
383
|
+
"value": {
|
|
384
|
+
"message": "Longitude must be between -180 and 180."
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"missingLong": {
|
|
388
|
+
"summary": "lat supplied without long",
|
|
389
|
+
"value": {
|
|
390
|
+
"message": "'long' must not be null"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"missingLat": {
|
|
394
|
+
"summary": "long supplied without lat",
|
|
395
|
+
"value": {
|
|
396
|
+
"message": "'lat' must not be null"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"nonNumericLat": {
|
|
400
|
+
"summary": "Non-numeric lat, long or elevation (parameter name in the message)",
|
|
401
|
+
"value": {
|
|
402
|
+
"message": "Invalid value 'abc' for parameter 'lat'."
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"elevationTooHigh": {
|
|
406
|
+
"summary": "elevation above 10000",
|
|
407
|
+
"value": {
|
|
408
|
+
"message": "Elevation cannot be greater than 10000 meters."
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"invalidLang": {
|
|
412
|
+
"summary": "Unsupported lang value",
|
|
413
|
+
"value": {
|
|
414
|
+
"message": "This 'zz' lang is not valid. Please use 'en' as the default language"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"invalidTimeZone": {
|
|
418
|
+
"summary": "Unknown time_zone value",
|
|
419
|
+
"value": {
|
|
420
|
+
"message": "Check whether your input value is correct; time_zone_name = Bad"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"missingApiKey": {
|
|
424
|
+
"summary": "No API key supplied",
|
|
425
|
+
"value": {
|
|
426
|
+
"error": "Invalid Param Exception",
|
|
427
|
+
"message": "Please provide apiKey",
|
|
428
|
+
"path": "/v2.0/geolocation/astronomy",
|
|
429
|
+
"status": 400,
|
|
430
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
431
|
+
}
|
|
375
432
|
}
|
|
376
433
|
}
|
|
377
434
|
}
|
|
@@ -395,6 +452,70 @@
|
|
|
395
452
|
"value": {
|
|
396
453
|
"message": "We couldn't find the location (ZZZNOTEXIST). Try a city or state level location address only."
|
|
397
454
|
}
|
|
455
|
+
},
|
|
456
|
+
"resourceNotFound": {
|
|
457
|
+
"summary": "Unsupported HTTP method (e.g. POST)",
|
|
458
|
+
"value": {
|
|
459
|
+
"error": "Resource Not Found",
|
|
460
|
+
"message": "The requested resource could not be found. Please verify the URL and try again.",
|
|
461
|
+
"path": "/v2.0/geolocation/astronomy",
|
|
462
|
+
"status": 404,
|
|
463
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"headers": {
|
|
470
|
+
"X-AF-Credits-Cost": {
|
|
471
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"401": {
|
|
476
|
+
"description": "Unauthorized — The API key is invalid",
|
|
477
|
+
"content": {
|
|
478
|
+
"application/json": {
|
|
479
|
+
"schema": {
|
|
480
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
481
|
+
},
|
|
482
|
+
"examples": {
|
|
483
|
+
"invalidApiKey": {
|
|
484
|
+
"summary": "Invalid API key",
|
|
485
|
+
"value": {
|
|
486
|
+
"error": "API Access Exception",
|
|
487
|
+
"message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
|
|
488
|
+
"path": "/v2.0/geolocation/astronomy",
|
|
489
|
+
"status": 401,
|
|
490
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"headers": {
|
|
497
|
+
"X-AF-Credits-Cost": {
|
|
498
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"406": {
|
|
503
|
+
"description": "Not Acceptable — Unsupported format value",
|
|
504
|
+
"content": {
|
|
505
|
+
"application/json": {
|
|
506
|
+
"schema": {
|
|
507
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
508
|
+
},
|
|
509
|
+
"examples": {
|
|
510
|
+
"unsupportedFormat": {
|
|
511
|
+
"summary": "format=csv (only json and xml are supported)",
|
|
512
|
+
"value": {
|
|
513
|
+
"error": "Unsupported Media Type",
|
|
514
|
+
"message": "The media type specified in the request is not supported. For more details, please refer to the API documentation.",
|
|
515
|
+
"path": "/v2.0/geolocation/astronomy",
|
|
516
|
+
"status": 406,
|
|
517
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
518
|
+
}
|
|
398
519
|
}
|
|
399
520
|
}
|
|
400
521
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"name": "format",
|
|
28
28
|
"in": "query",
|
|
29
29
|
"required": false,
|
|
30
|
-
"description": "Format of the response.
|
|
30
|
+
"description": "Format of the response. Only json is supported.",
|
|
31
31
|
"schema": {
|
|
32
32
|
"type": "string",
|
|
33
33
|
"enum": ["json"],
|
|
@@ -165,6 +165,32 @@
|
|
|
165
165
|
}
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
|
+
},
|
|
169
|
+
"invalidTimezone": {
|
|
170
|
+
"summary": "timezone query parameter is invalid — request still returns 200 with an error object per item",
|
|
171
|
+
"value": {
|
|
172
|
+
"bulk": [
|
|
173
|
+
{
|
|
174
|
+
"error": "Check whether your input value is correct; timezone = Bad"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"partialFailureMixed": {
|
|
180
|
+
"summary": "Per-item errors: unknown location, only one of lat/long, empty item, ip + lat/long",
|
|
181
|
+
"value": {
|
|
182
|
+
"bulk": [
|
|
183
|
+
{
|
|
184
|
+
"error": "Location not found"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"error": "Missing required location parameters"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"error": "Missing required location parameters"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
168
194
|
}
|
|
169
195
|
}
|
|
170
196
|
}
|
|
@@ -176,7 +202,7 @@
|
|
|
176
202
|
}
|
|
177
203
|
},
|
|
178
204
|
"400": {
|
|
179
|
-
"description": "Bad Request — Missing/malformed request body, or
|
|
205
|
+
"description": "Bad Request — Missing/malformed request body, an empty locations array, or an invalid item in the locations array (non-object item, unknown property, out-of-range or non-numeric lat/long, invalid ip, empty location)",
|
|
180
206
|
"content": {
|
|
181
207
|
"application/json": {
|
|
182
208
|
"schema": {
|
|
@@ -202,6 +228,204 @@
|
|
|
202
228
|
"error": "error",
|
|
203
229
|
"path": "/v1.0/weather/current/bulk"
|
|
204
230
|
}
|
|
231
|
+
},
|
|
232
|
+
"EmptyLocations": {
|
|
233
|
+
"summary": "locations missing, empty, not an array, or the body is not an object (same response as InvalidBody)",
|
|
234
|
+
"value": {
|
|
235
|
+
"error": "Invalid request body Exception",
|
|
236
|
+
"message": "Please provide data in required format in request body",
|
|
237
|
+
"path": "/v1.0/weather/current",
|
|
238
|
+
"status": 400,
|
|
239
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"ItemLatOutOfRange": {
|
|
243
|
+
"summary": "lat outside -90..90 in an item (the whole request fails, unlike an unresolvable location)",
|
|
244
|
+
"value": {
|
|
245
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
246
|
+
"status": 400,
|
|
247
|
+
"message": "\"locations[1].lat\" must be less than or equal to 90",
|
|
248
|
+
"error": "error",
|
|
249
|
+
"path": "/v1.0/weather/current/bulk"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"ItemLongOutOfRange": {
|
|
253
|
+
"summary": "long outside -180..180 in an item",
|
|
254
|
+
"value": {
|
|
255
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
256
|
+
"status": 400,
|
|
257
|
+
"message": "\"locations[0].long\" must be less than or equal to 180",
|
|
258
|
+
"error": "error",
|
|
259
|
+
"path": "/v1.0/weather/current/bulk"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"ItemLatNotNumber": {
|
|
263
|
+
"summary": "lat or long not a number in an item",
|
|
264
|
+
"value": {
|
|
265
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
266
|
+
"status": 400,
|
|
267
|
+
"message": "\"locations[0].lat\" must be a number",
|
|
268
|
+
"error": "error",
|
|
269
|
+
"path": "/v1.0/weather/current/bulk"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"ItemInvalidIp": {
|
|
273
|
+
"summary": "Invalid ip in an item",
|
|
274
|
+
"value": {
|
|
275
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
276
|
+
"status": 400,
|
|
277
|
+
"message": "\"locations[2].ip\" must be a valid ip address of one of the following versions [ipv4, ipv6] with a optional CIDR",
|
|
278
|
+
"error": "error",
|
|
279
|
+
"path": "/v1.0/weather/current/bulk"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"ItemUnknownField": {
|
|
283
|
+
"summary": "Unknown property in an item",
|
|
284
|
+
"value": {
|
|
285
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
286
|
+
"status": 400,
|
|
287
|
+
"message": "\"locations[0].bogus\" is not allowed",
|
|
288
|
+
"error": "error",
|
|
289
|
+
"path": "/v1.0/weather/current/bulk"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"ItemTimezoneNotAllowed": {
|
|
293
|
+
"summary": "timezone set on an item instead of as a query parameter",
|
|
294
|
+
"value": {
|
|
295
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
296
|
+
"status": 400,
|
|
297
|
+
"message": "\"locations[0].timezone\" is not allowed",
|
|
298
|
+
"error": "error",
|
|
299
|
+
"path": "/v1.0/weather/current/bulk"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"ItemEmptyLocation": {
|
|
303
|
+
"summary": "Empty location string in an item",
|
|
304
|
+
"value": {
|
|
305
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
306
|
+
"status": 400,
|
|
307
|
+
"message": "\"locations[0].location\" is not allowed to be empty",
|
|
308
|
+
"error": "error",
|
|
309
|
+
"path": "/v1.0/weather/current/bulk"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"MissingApiKey": {
|
|
313
|
+
"summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
|
|
314
|
+
"value": {
|
|
315
|
+
"error": "Invalid Param Exception",
|
|
316
|
+
"message": "Please provide apiKey",
|
|
317
|
+
"path": "/v1.0/weather/current",
|
|
318
|
+
"status": 400,
|
|
319
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"headers": {
|
|
326
|
+
"X-AF-Credits-Cost": {
|
|
327
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"401": {
|
|
332
|
+
"description": "Unauthorized — The API key is invalid",
|
|
333
|
+
"content": {
|
|
334
|
+
"application/json": {
|
|
335
|
+
"schema": {
|
|
336
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
337
|
+
},
|
|
338
|
+
"examples": {
|
|
339
|
+
"invalidApiKey": {
|
|
340
|
+
"summary": "Invalid API key",
|
|
341
|
+
"value": {
|
|
342
|
+
"error": "API Access Exception",
|
|
343
|
+
"message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
|
|
344
|
+
"path": "/v1.0/weather/current",
|
|
345
|
+
"status": 401,
|
|
346
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"headers": {
|
|
353
|
+
"X-AF-Credits-Cost": {
|
|
354
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"404": {
|
|
359
|
+
"description": "Not Found — Unsupported HTTP method (e.g. PUT)",
|
|
360
|
+
"content": {
|
|
361
|
+
"application/json": {
|
|
362
|
+
"schema": {
|
|
363
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
364
|
+
},
|
|
365
|
+
"examples": {
|
|
366
|
+
"ResourceNotFound": {
|
|
367
|
+
"summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
|
|
368
|
+
"value": {
|
|
369
|
+
"error": "Resource Not Found",
|
|
370
|
+
"message": "The requested resource could not be found. Please verify the URL and try again.",
|
|
371
|
+
"path": "/v1.0/weather/current",
|
|
372
|
+
"status": 404,
|
|
373
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"headers": {
|
|
380
|
+
"X-AF-Credits-Cost": {
|
|
381
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"413": {
|
|
386
|
+
"description": "Payload Too Large — More than 50 locations in the request",
|
|
387
|
+
"content": {
|
|
388
|
+
"application/json": {
|
|
389
|
+
"schema": {
|
|
390
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
391
|
+
},
|
|
392
|
+
"examples": {
|
|
393
|
+
"tooManyLocations": {
|
|
394
|
+
"summary": "51 or more items in locations",
|
|
395
|
+
"value": {
|
|
396
|
+
"error": "Payload too large Exception",
|
|
397
|
+
"message": "Maximum request body size limit exceeded",
|
|
398
|
+
"path": "/v1.0/weather/current",
|
|
399
|
+
"status": 413,
|
|
400
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"headers": {
|
|
407
|
+
"X-AF-Credits-Cost": {
|
|
408
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"500": {
|
|
413
|
+
"description": "Internal Server Error — Request body is not sent as JSON (missing or non-JSON Content-Type header)",
|
|
414
|
+
"content": {
|
|
415
|
+
"application/json": {
|
|
416
|
+
"schema": {
|
|
417
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
418
|
+
},
|
|
419
|
+
"examples": {
|
|
420
|
+
"missingContentType": {
|
|
421
|
+
"summary": "POST without Content-Type: application/json; note the path in this response is duplicated",
|
|
422
|
+
"value": {
|
|
423
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
424
|
+
"status": 500,
|
|
425
|
+
"message": "Internal Server Error",
|
|
426
|
+
"error": "internal-server-error",
|
|
427
|
+
"path": "/v1.0/weather/v1.0/weather/current/bulk"
|
|
428
|
+
}
|
|
205
429
|
}
|
|
206
430
|
}
|
|
207
431
|
}
|
|
@@ -250,7 +474,7 @@
|
|
|
250
474
|
},
|
|
251
475
|
"BulkLocationItem": {
|
|
252
476
|
"type": "object",
|
|
253
|
-
"description": "Each object specifies one location using
|
|
477
|
+
"description": "Each object specifies one location using one of the supported lookup methods: location alone, lat+long together, or ip alone. If more than one is given, lat+long takes precedence over location, and location over ip. None of these fields is required at the schema level — an item missing all of them (or with only one of lat/long, or with lat or long equal to 0) is still accepted by the request, but resolves to a per-item error object in the response (see BulkCurrentResponse) rather than failing the whole request. Only the properties below are allowed (e.g. a per-item timezone is rejected with a 400; use the timezone query parameter instead), lat must be between -90 and 90, long between -180 and 180, ip a valid IPv4/IPv6 address, and location a non-empty string, otherwise the whole request fails with a 400.",
|
|
254
478
|
"properties": {
|
|
255
479
|
"location": {
|
|
256
480
|
"type": "string",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"name": "format",
|
|
29
29
|
"in": "query",
|
|
30
30
|
"required": false,
|
|
31
|
-
"description": "Format of the response.
|
|
31
|
+
"description": "Format of the response. Only json is supported.",
|
|
32
32
|
"schema": {
|
|
33
33
|
"type": "string",
|
|
34
34
|
"enum": ["json"],
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"type": "string",
|
|
44
44
|
"format": "date"
|
|
45
45
|
},
|
|
46
|
-
"description": "Starting date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
|
|
46
|
+
"description": "Starting date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. Both dates must fall within today through 15 days ahead (16 days inclusive)."
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"name": "endDate",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"type": "string",
|
|
54
54
|
"format": "date"
|
|
55
55
|
},
|
|
56
|
-
"description": "End date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
|
|
56
|
+
"description": "End date for flood forecast data in YYYY-MM-DD format. Forecast dates must be current or future dates only. Past dates are not allowed for forecast data. Both dates must fall within today through 15 days ahead (16 days inclusive)."
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"name": "location",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"schema": {
|
|
62
62
|
"type": "string"
|
|
63
63
|
},
|
|
64
|
-
"description": "City name, place name, or full address.",
|
|
64
|
+
"description": "City name, place name, or full address. Ignored when lat and long are both provided; takes precedence over ip.",
|
|
65
65
|
"required": false
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"schema": {
|
|
71
71
|
"type": "number"
|
|
72
72
|
},
|
|
73
|
-
"description": "Latitude of the location.",
|
|
73
|
+
"description": "Latitude of the location. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.",
|
|
74
74
|
"required": false
|
|
75
75
|
},
|
|
76
76
|
{
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"schema": {
|
|
80
80
|
"type": "number"
|
|
81
81
|
},
|
|
82
|
-
"description": "Longitude of the location.",
|
|
82
|
+
"description": "Longitude of the location. lat=0 together with long=0 is treated as missing and the location falls back to the requester IP (or to location/ip if given); use a small non-zero value (for example 0.0001) to query the equator or prime meridian.",
|
|
83
83
|
"required": false
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"schema": {
|
|
89
89
|
"type": "string"
|
|
90
90
|
},
|
|
91
|
-
"description": "IP(v4 or v6) address for location inference.",
|
|
91
|
+
"description": "IP(v4 or v6) address for location inference. Ignored when location or lat/long is provided; if no location parameter is supplied at all, the requester's own IP is used.",
|
|
92
92
|
"required": false
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "precision",
|
|
96
96
|
"in": "query",
|
|
97
97
|
"required": false,
|
|
98
|
-
"description": "Forecast data granularity. Only 'daily' is supported
|
|
98
|
+
"description": "Forecast data granularity. Only 'daily' is supported.",
|
|
99
99
|
"schema": {
|
|
100
100
|
"type": "string",
|
|
101
101
|
"enum": ["daily"],
|
|
@@ -276,11 +276,11 @@
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"InvalidPrecision": {
|
|
279
|
-
"summary": "
|
|
279
|
+
"summary": "Unknown precision value (e.g. precision=foo)",
|
|
280
280
|
"value": {
|
|
281
|
-
"timestamp": "2026-
|
|
281
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
282
282
|
"status": 400,
|
|
283
|
-
"message": "
|
|
283
|
+
"message": "Invalid precision",
|
|
284
284
|
"error": "invalid-params",
|
|
285
285
|
"path": "/v1.0/weather/flood"
|
|
286
286
|
}
|
|
@@ -314,6 +314,36 @@
|
|
|
314
314
|
"error": "params-exception-error",
|
|
315
315
|
"path": "/v1.0/weather/flood"
|
|
316
316
|
}
|
|
317
|
+
},
|
|
318
|
+
"InvalidTimezone": {
|
|
319
|
+
"summary": "Invalid timezone",
|
|
320
|
+
"value": {
|
|
321
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
322
|
+
"status": 400,
|
|
323
|
+
"message": "Check whether your input value is correct; timezone = NotATimezone",
|
|
324
|
+
"error": "error",
|
|
325
|
+
"path": "/v1.0/weather/flood"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"InvalidCalendarDate": {
|
|
329
|
+
"summary": "Well-formed but impossible date (e.g. startDate=2026-13-45)",
|
|
330
|
+
"value": {
|
|
331
|
+
"timestamp": "2026-11-25T10:01:00.000Z",
|
|
332
|
+
"status": 400,
|
|
333
|
+
"message": "Bad Request",
|
|
334
|
+
"error": "error",
|
|
335
|
+
"path": "/v1.0/weather/flood"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"MissingApiKey": {
|
|
339
|
+
"summary": "No API key supplied (neither X-apiKey header nor apiKey query parameter)",
|
|
340
|
+
"value": {
|
|
341
|
+
"error": "Invalid Param Exception",
|
|
342
|
+
"message": "Please provide apiKey",
|
|
343
|
+
"path": "/v1.0/weather/flood",
|
|
344
|
+
"status": 400,
|
|
345
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
346
|
+
}
|
|
317
347
|
}
|
|
318
348
|
}
|
|
319
349
|
}
|
|
@@ -341,6 +371,43 @@
|
|
|
341
371
|
"error": "error",
|
|
342
372
|
"path": "/v1.0/weather/flood"
|
|
343
373
|
}
|
|
374
|
+
},
|
|
375
|
+
"ResourceNotFound": {
|
|
376
|
+
"summary": "Unsupported HTTP method for this endpoint (e.g. POST to a GET endpoint)",
|
|
377
|
+
"value": {
|
|
378
|
+
"error": "Resource Not Found",
|
|
379
|
+
"message": "The requested resource could not be found. Please verify the URL and try again.",
|
|
380
|
+
"path": "/v1.0/weather/flood",
|
|
381
|
+
"status": 404,
|
|
382
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"headers": {
|
|
389
|
+
"X-AF-Credits-Cost": {
|
|
390
|
+
"$ref": "#/components/headers/X-AF-Credits-Cost"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"401": {
|
|
395
|
+
"description": "Unauthorized — The API key is invalid",
|
|
396
|
+
"content": {
|
|
397
|
+
"application/json": {
|
|
398
|
+
"schema": {
|
|
399
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
400
|
+
},
|
|
401
|
+
"examples": {
|
|
402
|
+
"invalidApiKey": {
|
|
403
|
+
"summary": "Invalid API key",
|
|
404
|
+
"value": {
|
|
405
|
+
"error": "API Access Exception",
|
|
406
|
+
"message": "Provided API key is invalid. [For Technical Support: support@apifreaks.com]",
|
|
407
|
+
"path": "/v1.0/weather/flood",
|
|
408
|
+
"status": 401,
|
|
409
|
+
"timestamp": "2026-11-25T10:01:00.000Z"
|
|
410
|
+
}
|
|
344
411
|
}
|
|
345
412
|
}
|
|
346
413
|
}
|