@apifreaks/openapi-specs 0.1.0 → 0.1.2

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 (108) hide show
  1. package/dist/index.cjs +133 -2
  2. package/dist/index.d.cts +140 -3
  3. package/dist/index.d.ts +140 -3
  4. package/dist/index.js +131 -2
  5. package/dist/specs/commodity/commodity-fluctuation.yaml +225 -0
  6. package/dist/specs/commodity/commodity-prices.yaml +236 -0
  7. package/dist/specs/commodity/commodity-symbols.yaml +159 -0
  8. package/dist/specs/commodity/commodity-time-series.yaml +238 -0
  9. package/dist/specs/commodity/historical-commodity-prices.yaml +208 -0
  10. package/dist/specs/currency/currency-converter.yaml +193 -0
  11. package/dist/specs/currency/currency-fluctuation.yaml +211 -0
  12. package/dist/specs/currency/currency-historical-data-limit.yaml +112 -0
  13. package/dist/specs/currency/currency-rate.yaml +173 -0
  14. package/dist/specs/currency/currency-supported.yaml +176 -0
  15. package/dist/specs/currency/currency-symbols.yaml +115 -0
  16. package/dist/specs/currency/currency-time-series.yaml +232 -0
  17. package/dist/specs/currency/geolocalized-currency-conversion.yaml +214 -0
  18. package/dist/specs/currency/historical-currency-converter.yaml +195 -0
  19. package/dist/specs/currency/historical-currency-rate.yaml +180 -0
  20. package/dist/specs/dns/bulk-dns-lookup.yaml +484 -0
  21. package/dist/specs/dns/dns-history-lookup.yaml +451 -0
  22. package/dist/specs/dns/dns-lookup.yaml +360 -0
  23. package/dist/specs/dns/reverse-dns-lookup.yaml +338 -0
  24. package/dist/specs/domain/bulk-domain-checker.yaml +198 -0
  25. package/dist/specs/domain/domain-search-with-suggestions.yaml +196 -0
  26. package/dist/specs/domain/domain-search.yaml +149 -0
  27. package/dist/specs/domain/subdomain-lookup.yaml +251 -0
  28. package/dist/specs/email-validation/bulk-email-validation.yaml +403 -0
  29. package/dist/specs/email-validation/email-checker.yaml +451 -0
  30. package/dist/specs/financial/bulk-vat-rates-country.yaml +250 -0
  31. package/dist/specs/financial/financial-apis-supported-countries.yaml +152 -0
  32. package/dist/specs/financial/iban-validation.yaml +270 -0
  33. package/dist/specs/financial/swift-code-finder.yaml +146 -0
  34. package/dist/specs/financial/swift-code-lookup.yaml +156 -0
  35. package/dist/specs/financial/vat-number-validation.yaml +205 -0
  36. package/dist/specs/financial/vat-rates-by-ip.yaml +200 -0
  37. package/dist/specs/financial/vat-rates-country.yaml +212 -0
  38. package/dist/specs/general/usage-credits.yaml +188 -0
  39. package/dist/specs/geocoding/forward-geocoding.yaml +292 -0
  40. package/dist/specs/geocoding/reverse-geocoding.yaml +237 -0
  41. package/dist/specs/geodb/administrative-units-details.yaml +180 -0
  42. package/dist/specs/geodb/administrative-units-levels.yaml +140 -0
  43. package/dist/specs/geodb/administrative-units.yaml +168 -0
  44. package/dist/specs/geodb/cities.yaml +209 -0
  45. package/dist/specs/geodb/countries-details.yaml +207 -0
  46. package/dist/specs/geodb/countries.yaml +199 -0
  47. package/dist/specs/geodb/flags-supported.yaml +119 -0
  48. package/dist/specs/geodb/flags.yaml +170 -0
  49. package/dist/specs/geodb/regions.yaml +76 -0
  50. package/dist/specs/geodb/subregions.yaml +158 -0
  51. package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +895 -0
  52. package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +310 -0
  53. package/dist/specs/ip-intelligence/ip-locator.yaml +708 -0
  54. package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +230 -0
  55. package/dist/specs/other/astronomy-data.yaml +632 -0
  56. package/dist/specs/pdf/delete-pdf-page.yaml +193 -0
  57. package/dist/specs/pdf/linearize-pdf.yaml +187 -0
  58. package/dist/specs/pdf/merge-pdf.yaml +193 -0
  59. package/dist/specs/pdf/pdf-compress.yaml +208 -0
  60. package/dist/specs/pdf/pdf-decrypt.yaml +202 -0
  61. package/dist/specs/pdf/pdf-encrypt.yaml +213 -0
  62. package/dist/specs/pdf/pdf-extract-pages.yaml +199 -0
  63. package/dist/specs/pdf/pdf-file-status.yaml +148 -0
  64. package/dist/specs/pdf/pdf-file.yaml +136 -0
  65. package/dist/specs/pdf/pdf-files.yaml +85 -0
  66. package/dist/specs/pdf/pdf-resource-download.yaml +117 -0
  67. package/dist/specs/pdf/pdf-resource-upload-binary.yaml +152 -0
  68. package/dist/specs/pdf/pdf-resource-upload.yaml +163 -0
  69. package/dist/specs/pdf/pdf-restrict.yaml +246 -0
  70. package/dist/specs/pdf/pdf-split-pages.yaml +208 -0
  71. package/dist/specs/pdf/pdf-task-status.yaml +187 -0
  72. package/dist/specs/pdf/pdf-to-image.yaml +844 -0
  73. package/dist/specs/pdf/pdf-unrestrict.yaml +221 -0
  74. package/dist/specs/pdf/rotate-pdf-pages.yaml +207 -0
  75. package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +374 -0
  76. package/dist/specs/phone-validation/phone-number-validation.yaml +344 -0
  77. package/dist/specs/scraper/web-scraper.yaml +479 -0
  78. package/dist/specs/screenshot/bulk-screenshot.yaml +728 -0
  79. package/dist/specs/screenshot/website-screenshot.yaml +822 -0
  80. package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +593 -0
  81. package/dist/specs/ssl/ssl-certificate-lookup.yaml +478 -0
  82. package/dist/specs/timezone/timezone-converter.yaml +249 -0
  83. package/dist/specs/timezone/timezone-lookup.yaml +712 -0
  84. package/dist/specs/user-agent/bulk-user-agent-parser.yaml +340 -0
  85. package/dist/specs/user-agent/user-agent-parser.yaml +271 -0
  86. package/dist/specs/weather/air-quality.yaml +590 -0
  87. package/dist/specs/weather/bulk-live-weather.yaml +654 -0
  88. package/dist/specs/weather/flood-forecast.yaml +519 -0
  89. package/dist/specs/weather/historical-weather.yaml +842 -0
  90. package/dist/specs/weather/live-weather.yaml +633 -0
  91. package/dist/specs/weather/marine-weather.yaml +806 -0
  92. package/dist/specs/weather/time-series-weather.yaml +821 -0
  93. package/dist/specs/weather/weather-forecast.yaml +935 -0
  94. package/dist/specs/whois/asn-lookup.yaml +618 -0
  95. package/dist/specs/whois/bulk-whois-lookup.yaml +827 -0
  96. package/dist/specs/whois/domain-whois-history-lookup.yaml +445 -0
  97. package/dist/specs/whois/reverse-whois.yaml +566 -0
  98. package/dist/specs/whois/whois-domain-lookup.yaml +537 -0
  99. package/dist/specs/whois/whois-ip-lookup.yaml +1123 -0
  100. package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +232 -0
  101. package/dist/specs/zip-code/zip-code-api.yaml +216 -0
  102. package/dist/specs/zip-code/zip-code-distance-match.yaml +239 -0
  103. package/dist/specs/zip-code/zip-code-distance.yaml +233 -0
  104. package/dist/specs/zip-code/zip-codes-by-city.yaml +201 -0
  105. package/dist/specs/zip-code/zip-codes-by-region.yaml +200 -0
  106. package/dist/specs/zip-code/zip-codes-radius-search.yaml +262 -0
  107. package/package.json +6 -2
  108. package/specs/pdf/merge-pdf.json +2 -2
@@ -0,0 +1,115 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Currency Symbols API Reference
4
+ version: 1.0.0
5
+ description: Retrieve the complete map of all supported currency codes to their full names. Returns an object where each key is a currency code (USD, EUR, GBP, PKR, BTC, XAU, etc.) and the value is the corresponding currency name. Covers fiat currencies, cryptocurrencies, and precious metals.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Currency Symbols API Server
13
+ paths:
14
+ /currency/symbols:
15
+ get:
16
+ tags:
17
+ - Currency APIs
18
+ summary: Get all currency symbols
19
+ description: Returns a map of currency codes to their full names.
20
+ operationId: getCurrencySymbols
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Response format: `json` (default) or `xml`.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ responses:
33
+ '200':
34
+ description: Successful operation
35
+ content:
36
+ application/json:
37
+ schema:
38
+ $ref: '#/components/schemas/CurrencySymbolsResponse'
39
+ examples:
40
+ success:
41
+ summary: Successful response
42
+ value:
43
+ currencySymbols:
44
+ USD: US Dollar
45
+ EUR: Euro
46
+ GBP: British Pound Sterling
47
+ PKR: Pakistani Rupee
48
+ BTC: Bitcoin
49
+ XAU: Gold (troy ounce)
50
+ '406':
51
+ description: Unsupported Media Type — format is not json or xml
52
+ content:
53
+ application/json:
54
+ schema:
55
+ $ref: '#/components/schemas/ErrorResponse'
56
+ examples:
57
+ badFormat:
58
+ summary: format value not supported
59
+ value:
60
+ error: Unsupported Media Type
61
+ message: The media type specified in the request is not supported. For more details, please refer to the API documentation.
62
+ path: /v1.0/currency/symbols
63
+ status: 406
64
+ timestamp: '2026-07-27T12:13:24.369Z'
65
+ components:
66
+ securitySchemes:
67
+ ApiKeyAuthHeader:
68
+ type: apiKey
69
+ in: header
70
+ name: X-apiKey
71
+ description: Pass your API key via the X-apiKey request header.
72
+ ApiKeyAuthQuery:
73
+ type: apiKey
74
+ in: query
75
+ name: apiKey
76
+ description: Pass your API key via the apiKey query parameter.
77
+ schemas:
78
+ CurrencySymbolsResponse:
79
+ type: object
80
+ required:
81
+ - currencySymbols
82
+ properties:
83
+ currencySymbols:
84
+ type: object
85
+ description: Map of currency codes to their full names. Each key is a currency code and the value is the currency name string.
86
+ additionalProperties:
87
+ title: CurrencySymbolName
88
+ type: string
89
+ description: Full name of the currency (e.g., US Dollar, Euro).
90
+ description: Currency symbols response containing the map of all currency codes to their names.
91
+ ErrorResponse:
92
+ type: object
93
+ description: Standard error envelope returned by the API on failed requests.
94
+ required:
95
+ - message
96
+ properties:
97
+ error:
98
+ type: string
99
+ description: Short error category or exception type.
100
+ message:
101
+ type: string
102
+ description: Human-readable error message describing the failure.
103
+ path:
104
+ type: string
105
+ description: API endpoint path that produced the error.
106
+ status:
107
+ type: integer
108
+ description: HTTP status code returned with the error.
109
+ timestamp:
110
+ type: string
111
+ format: date-time
112
+ description: Timestamp when the error occurred (ISO 8601).
113
+ security:
114
+ - ApiKeyAuthHeader: []
115
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,232 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: Currency Time Series - Historical Currency Exchange Rates for a Time Interval
4
+ version: 1.0.0
5
+ description: Retrieve day-by-day historical exchange rates for any base currency over a custom date range up to 1 year. Returns an array of daily rate objects, each containing the date and a map of currency codes to exchange rate strings. Accepts optional target symbols and a base currency (defaults to USD). Returns a 400 error for invalid dates or range exceeded, and a 404 error when no data is available.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Currency Time Series API Server
13
+ paths:
14
+ /currency/time-series:
15
+ get:
16
+ tags:
17
+ - Currency APIs
18
+ summary: Get time series of exchange rates
19
+ description: Returns day-by-day historical exchange rates for a custom date range.
20
+ operationId: getTimeSeries
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Response format: `json` (default) or `xml`.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ - name: startDate
33
+ in: query
34
+ required: true
35
+ description: Start date in `YYYY-MM-DD` format.
36
+ schema:
37
+ type: string
38
+ - name: endDate
39
+ in: query
40
+ required: false
41
+ description: End date in `YYYY-MM-DD` format. Defaults to yesterday.
42
+ schema:
43
+ type: string
44
+ - name: base
45
+ in: query
46
+ required: false
47
+ description: Base currency code. Defaults to `USD`.
48
+ schema:
49
+ type: string
50
+ default: USD
51
+ - name: symbols
52
+ in: query
53
+ required: false
54
+ description: Comma-separated currency codes. Omit to get all available rates.
55
+ schema:
56
+ type: string
57
+ responses:
58
+ '200':
59
+ description: Successful operation
60
+ content:
61
+ application/json:
62
+ schema:
63
+ $ref: '#/components/schemas/CurrencyTimeseriesResponse'
64
+ examples:
65
+ success:
66
+ summary: Successful response
67
+ value:
68
+ startDate: '2025-01-01'
69
+ endDate: '2025-01-07'
70
+ base: USD
71
+ historicalRatesList:
72
+ - date: '2025-01-01'
73
+ rates:
74
+ EUR: '0.96605'
75
+ PKR: '278.4'
76
+ - date: '2025-01-02'
77
+ rates:
78
+ EUR: '0.9739'
79
+ PKR: '278.4'
80
+ - date: '2025-01-03'
81
+ rates:
82
+ EUR: '0.97005'
83
+ PKR: '278.4'
84
+ - date: '2025-01-04'
85
+ rates:
86
+ EUR: '0.97005'
87
+ PKR: '278.4'
88
+ - date: '2025-01-05'
89
+ rates:
90
+ EUR: '0.9704'
91
+ PKR: '278.4'
92
+ - date: '2025-01-06'
93
+ rates:
94
+ EUR: '0.96305'
95
+ PKR: '278.4'
96
+ - date: '2025-01-07'
97
+ rates:
98
+ EUR: '0.967'
99
+ PKR: '278.4'
100
+ '400':
101
+ description: Bad request - Invalid dates or range exceeded
102
+ content:
103
+ application/json:
104
+ schema:
105
+ $ref: '#/components/schemas/ErrorResponse'
106
+ examples:
107
+ missingStartDate:
108
+ summary: Missing required startDate parameter
109
+ value:
110
+ error: Invalid Param Exception
111
+ message: please pass correct parameters
112
+ path: /v1.0/currency/time-series
113
+ status: 400
114
+ timestamp: '2026-07-27T12:08:01.002Z'
115
+ rangeExceeded:
116
+ summary: Interval exceeds 1 year
117
+ value:
118
+ timestamp: 1785154081486
119
+ status: 400
120
+ error: Invalid Param Exception
121
+ message: You can only retrieve time series data for a maximum interval of 1 Year
122
+ path: /v2.0/timeseries
123
+ startAfterEnd:
124
+ summary: startDate is after endDate or the current date (includes any future date)
125
+ value:
126
+ timestamp: 1785154082031
127
+ status: 400
128
+ error: Invalid Param Exception
129
+ message: Starting date cannot be after current date or ending date.
130
+ path: /v2.0/timeseries
131
+ invalidDateFormat:
132
+ summary: startDate/endDate not in YYYY-MM-DD format
133
+ value:
134
+ timestamp: 1785154106063
135
+ status: 400
136
+ error: Invalid Param Exception
137
+ message: Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!
138
+ path: /v2.0/timeseries
139
+ '404':
140
+ description: Not found - No data for interval
141
+ content:
142
+ application/json:
143
+ schema:
144
+ $ref: '#/components/schemas/ErrorResponse'
145
+ examples:
146
+ noData:
147
+ summary: base or symbols not supported for the given interval
148
+ value:
149
+ timestamp: 1785154125982
150
+ status: 404
151
+ error: Not Found Exception
152
+ message: Rates of provided base and symbols are not found for given intervals.
153
+ path: /v2.0/timeseries
154
+ components:
155
+ securitySchemes:
156
+ ApiKeyAuthHeader:
157
+ type: apiKey
158
+ in: header
159
+ name: X-apiKey
160
+ description: Pass your API key via the X-apiKey request header.
161
+ ApiKeyAuthQuery:
162
+ type: apiKey
163
+ in: query
164
+ name: apiKey
165
+ description: Pass your API key via the apiKey query parameter.
166
+ schemas:
167
+ CurrencyTimeseriesResponse:
168
+ type: object
169
+ required:
170
+ - startDate
171
+ - endDate
172
+ - base
173
+ - historicalRatesList
174
+ properties:
175
+ startDate:
176
+ type: string
177
+ description: Start date of the interval (YYYY-MM-DD).
178
+ endDate:
179
+ type: string
180
+ description: End date of the interval (YYYY-MM-DD).
181
+ base:
182
+ type: string
183
+ description: Base currency used for all rates in the series.
184
+ historicalRatesList:
185
+ type: array
186
+ description: Array of daily rate objects within the specified interval.
187
+ items:
188
+ $ref: '#/components/schemas/CurrencyTimeSeriesItem'
189
+ description: Currency time series response containing daily exchange rate data over a date range.
190
+ CurrencyTimeSeriesItem:
191
+ type: object
192
+ description: Daily exchange rate data for a specific date.
193
+ required:
194
+ - date
195
+ - rates
196
+ properties:
197
+ date:
198
+ type: string
199
+ description: Date within the interval (YYYY-MM-DD).
200
+ rates:
201
+ type: object
202
+ description: Map of currency codes to exchange rate strings for that date. Each key is a currency code and the value is an exchange rate string.
203
+ additionalProperties:
204
+ title: ExchangeRateString
205
+ type: string
206
+ description: Exchange rate value as a string for this currency code.
207
+ ErrorResponse:
208
+ type: object
209
+ description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.
210
+ required:
211
+ - message
212
+ properties:
213
+ timestamp:
214
+ type:
215
+ - string
216
+ - integer
217
+ description: Timestamp when the error occurred — ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.
218
+ status:
219
+ type: integer
220
+ description: HTTP status code returned with the error.
221
+ error:
222
+ type: string
223
+ description: Specific error type (e.g., Invalid Param Exception, Not Found Exception).
224
+ message:
225
+ type: string
226
+ description: Human-readable error message describing the failure.
227
+ path:
228
+ type: string
229
+ description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.
230
+ security:
231
+ - ApiKeyAuthHeader: []
232
+ - ApiKeyAuthQuery: []
@@ -0,0 +1,214 @@
1
+ openapi: 3.1.1
2
+ info:
3
+ title: IP Currency API - Convert Any Amount to Local Currency from an IP Address
4
+ version: 1.0.0
5
+ description: Convert an amount from one currency to the local currency of a given IP address using the latest exchange rates. Uses IP geolocation to determine the target currency based on the visitor country. Accepts source currency, IP address, and amount. Supports fiat, crypto, and metals. All parameters are case-insensitive for both fiat/currency codes and crypto/symbols.
6
+ contact:
7
+ name: APIFreaks Support
8
+ url: https://apifreaks.com/contact
9
+ email: support@apifreaks.com
10
+ servers:
11
+ - url: https://api.apifreaks.com/v1.0
12
+ description: Geolocalized Currency Converter API Server
13
+ paths:
14
+ /currency/converter/ip-to-currency:
15
+ get:
16
+ tags:
17
+ - Currency APIs
18
+ summary: Convert currency based on IP geolocation
19
+ description: Converts an amount to the local currency of a given IP address.
20
+ operationId: convertByIp
21
+ parameters:
22
+ - name: format
23
+ in: query
24
+ required: false
25
+ description: 'Response format: `json` (default) or `xml`.'
26
+ schema:
27
+ type: string
28
+ enum:
29
+ - json
30
+ - xml
31
+ default: json
32
+ - name: from
33
+ in: query
34
+ required: true
35
+ description: Source currency code.
36
+ schema:
37
+ type: string
38
+ - name: ip
39
+ in: query
40
+ required: false
41
+ description: IPv4 or IPv6 address. Defaults to the request IP.
42
+ schema:
43
+ type: string
44
+ - name: amount
45
+ in: query
46
+ required: false
47
+ description: Amount to convert, as a decimal. Defaults to `1`. Non-numeric values return a 400.
48
+ schema:
49
+ type: string
50
+ default: '1'
51
+ - name: updates
52
+ in: query
53
+ required: false
54
+ description: 'Update frequency: `1m` (default), `10m`, `1h`, or `1d`.'
55
+ schema:
56
+ type: string
57
+ enum:
58
+ - 1m
59
+ - 10m
60
+ - 1h
61
+ - 1d
62
+ default: 1m
63
+ responses:
64
+ '200':
65
+ description: Successful operation
66
+ content:
67
+ application/json:
68
+ schema:
69
+ $ref: '#/components/schemas/GeolocalizedCurrencyConverterResponse'
70
+ examples:
71
+ success:
72
+ summary: Successful response
73
+ value:
74
+ date: '2026-07-27 12:10:00+00'
75
+ from: USD
76
+ to: PKR
77
+ rate: '277.863'
78
+ ipAddress: 182.186.18.91
79
+ givenAmount: '100.0'
80
+ convertedAmount: '27786.300'
81
+ '400':
82
+ description: Bad request - Invalid IP, amount, or updates
83
+ content:
84
+ application/json:
85
+ schema:
86
+ $ref: '#/components/schemas/ErrorResponse'
87
+ examples:
88
+ missingFrom:
89
+ summary: Missing required from parameter
90
+ value:
91
+ error: Invalid Param Exception
92
+ message: please pass correct parameters
93
+ path: /v1.0/currency/converter/ip-to-currency
94
+ status: 400
95
+ timestamp: '2026-07-27T12:10:31.824Z'
96
+ invalidAmount:
97
+ summary: amount is not numeric
98
+ value:
99
+ timestamp: 1785154232373
100
+ status: 400
101
+ error: Method Argument Type Mismatch
102
+ message: Invalid Amount. Please provide amount in decimal format and greater than 0!
103
+ path: /v2.0/iptocurrency
104
+ invalidIp:
105
+ summary: ip is not a valid IPv4/IPv6 address
106
+ value:
107
+ timestamp: 1785154232944
108
+ status: 400
109
+ error: Invalid Param Exception
110
+ message: Provided IP Address not-an-ip is invalid.
111
+ path: /v2.0/iptocurrency
112
+ invalidUpdates:
113
+ summary: updates is not one of 1m/10m/1h/1d
114
+ value:
115
+ timestamp: 1785154262483
116
+ status: 400
117
+ error: Invalid Param Exception
118
+ message: Please provide valid updates parameter (1d,1h,10m,1m)
119
+ path: /v2.0/iptocurrency
120
+ '404':
121
+ description: Not found - IP geolocation or currency not available
122
+ content:
123
+ application/json:
124
+ schema:
125
+ $ref: '#/components/schemas/ErrorResponse'
126
+ examples:
127
+ unknownIp:
128
+ summary: IP could not be geolocated
129
+ value:
130
+ timestamp: 1785154233555
131
+ status: 404
132
+ error: Not Found Exception
133
+ message: Geolocation of provided IP 0.0.0.0 is unknown.
134
+ path: /v2.0/iptocurrency
135
+ invalidBase:
136
+ summary: from currency not supported
137
+ value:
138
+ timestamp: 1785154234101
139
+ status: 404
140
+ error: Not Found Exception
141
+ message: Rates of provided currency ZZZ are not available in our database!
142
+ path: /v2.0/iptocurrency
143
+ components:
144
+ securitySchemes:
145
+ ApiKeyAuthHeader:
146
+ type: apiKey
147
+ in: header
148
+ name: X-apiKey
149
+ description: Pass your API key via the X-apiKey request header.
150
+ ApiKeyAuthQuery:
151
+ type: apiKey
152
+ in: query
153
+ name: apiKey
154
+ description: Pass your API key via the apiKey query parameter.
155
+ schemas:
156
+ GeolocalizedCurrencyConverterResponse:
157
+ type: object
158
+ required:
159
+ - date
160
+ - from
161
+ - to
162
+ - rate
163
+ - ipAddress
164
+ - givenAmount
165
+ - convertedAmount
166
+ properties:
167
+ date:
168
+ type: string
169
+ description: Date and time with timezone (UTC) when the rate was recorded.
170
+ from:
171
+ type: string
172
+ description: Source currency code.
173
+ to:
174
+ type: string
175
+ description: Target currency code — the local currency of the IP.
176
+ rate:
177
+ type: string
178
+ description: Exchange rate from source to target currency.
179
+ ipAddress:
180
+ type: string
181
+ description: IP address used for geolocation.
182
+ givenAmount:
183
+ type: string
184
+ description: Amount provided for conversion.
185
+ convertedAmount:
186
+ type: string
187
+ description: Converted amount in the target (local) currency.
188
+ description: Geolocalized currency conversion response containing the rate and converted amount based on IP geolocation.
189
+ ErrorResponse:
190
+ type: object
191
+ description: Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.
192
+ required:
193
+ - message
194
+ properties:
195
+ timestamp:
196
+ type:
197
+ - string
198
+ - integer
199
+ description: Timestamp when the error occurred — ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.
200
+ status:
201
+ type: integer
202
+ description: HTTP status code returned with the error.
203
+ error:
204
+ type: string
205
+ description: Specific error type (e.g., Invalid Param Exception, Method Argument Type Mismatch, Not Found Exception).
206
+ message:
207
+ type: string
208
+ description: Human-readable error message describing the failure.
209
+ path:
210
+ type: string
211
+ description: API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.
212
+ security:
213
+ - ApiKeyAuthHeader: []
214
+ - ApiKeyAuthQuery: []