@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.
- package/dist/index.cjs +133 -2
- package/dist/index.d.cts +140 -3
- package/dist/index.d.ts +140 -3
- package/dist/index.js +131 -2
- package/dist/specs/commodity/commodity-fluctuation.yaml +225 -0
- package/dist/specs/commodity/commodity-prices.yaml +236 -0
- package/dist/specs/commodity/commodity-symbols.yaml +159 -0
- package/dist/specs/commodity/commodity-time-series.yaml +238 -0
- package/dist/specs/commodity/historical-commodity-prices.yaml +208 -0
- package/dist/specs/currency/currency-converter.yaml +193 -0
- package/dist/specs/currency/currency-fluctuation.yaml +211 -0
- package/dist/specs/currency/currency-historical-data-limit.yaml +112 -0
- package/dist/specs/currency/currency-rate.yaml +173 -0
- package/dist/specs/currency/currency-supported.yaml +176 -0
- package/dist/specs/currency/currency-symbols.yaml +115 -0
- package/dist/specs/currency/currency-time-series.yaml +232 -0
- package/dist/specs/currency/geolocalized-currency-conversion.yaml +214 -0
- package/dist/specs/currency/historical-currency-converter.yaml +195 -0
- package/dist/specs/currency/historical-currency-rate.yaml +180 -0
- package/dist/specs/dns/bulk-dns-lookup.yaml +484 -0
- package/dist/specs/dns/dns-history-lookup.yaml +451 -0
- package/dist/specs/dns/dns-lookup.yaml +360 -0
- package/dist/specs/dns/reverse-dns-lookup.yaml +338 -0
- package/dist/specs/domain/bulk-domain-checker.yaml +198 -0
- package/dist/specs/domain/domain-search-with-suggestions.yaml +196 -0
- package/dist/specs/domain/domain-search.yaml +149 -0
- package/dist/specs/domain/subdomain-lookup.yaml +251 -0
- package/dist/specs/email-validation/bulk-email-validation.yaml +403 -0
- package/dist/specs/email-validation/email-checker.yaml +451 -0
- package/dist/specs/financial/bulk-vat-rates-country.yaml +250 -0
- package/dist/specs/financial/financial-apis-supported-countries.yaml +152 -0
- package/dist/specs/financial/iban-validation.yaml +270 -0
- package/dist/specs/financial/swift-code-finder.yaml +146 -0
- package/dist/specs/financial/swift-code-lookup.yaml +156 -0
- package/dist/specs/financial/vat-number-validation.yaml +205 -0
- package/dist/specs/financial/vat-rates-by-ip.yaml +200 -0
- package/dist/specs/financial/vat-rates-country.yaml +212 -0
- package/dist/specs/general/usage-credits.yaml +188 -0
- package/dist/specs/geocoding/forward-geocoding.yaml +292 -0
- package/dist/specs/geocoding/reverse-geocoding.yaml +237 -0
- package/dist/specs/geodb/administrative-units-details.yaml +180 -0
- package/dist/specs/geodb/administrative-units-levels.yaml +140 -0
- package/dist/specs/geodb/administrative-units.yaml +168 -0
- package/dist/specs/geodb/cities.yaml +209 -0
- package/dist/specs/geodb/countries-details.yaml +207 -0
- package/dist/specs/geodb/countries.yaml +199 -0
- package/dist/specs/geodb/flags-supported.yaml +119 -0
- package/dist/specs/geodb/flags.yaml +170 -0
- package/dist/specs/geodb/regions.yaml +76 -0
- package/dist/specs/geodb/subregions.yaml +158 -0
- package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +895 -0
- package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +310 -0
- package/dist/specs/ip-intelligence/ip-locator.yaml +708 -0
- package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +230 -0
- package/dist/specs/other/astronomy-data.yaml +632 -0
- package/dist/specs/pdf/delete-pdf-page.yaml +193 -0
- package/dist/specs/pdf/linearize-pdf.yaml +187 -0
- package/dist/specs/pdf/merge-pdf.yaml +193 -0
- package/dist/specs/pdf/pdf-compress.yaml +208 -0
- package/dist/specs/pdf/pdf-decrypt.yaml +202 -0
- package/dist/specs/pdf/pdf-encrypt.yaml +213 -0
- package/dist/specs/pdf/pdf-extract-pages.yaml +199 -0
- package/dist/specs/pdf/pdf-file-status.yaml +148 -0
- package/dist/specs/pdf/pdf-file.yaml +136 -0
- package/dist/specs/pdf/pdf-files.yaml +85 -0
- package/dist/specs/pdf/pdf-resource-download.yaml +117 -0
- package/dist/specs/pdf/pdf-resource-upload-binary.yaml +152 -0
- package/dist/specs/pdf/pdf-resource-upload.yaml +163 -0
- package/dist/specs/pdf/pdf-restrict.yaml +246 -0
- package/dist/specs/pdf/pdf-split-pages.yaml +208 -0
- package/dist/specs/pdf/pdf-task-status.yaml +187 -0
- package/dist/specs/pdf/pdf-to-image.yaml +844 -0
- package/dist/specs/pdf/pdf-unrestrict.yaml +221 -0
- package/dist/specs/pdf/rotate-pdf-pages.yaml +207 -0
- package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +374 -0
- package/dist/specs/phone-validation/phone-number-validation.yaml +344 -0
- package/dist/specs/scraper/web-scraper.yaml +479 -0
- package/dist/specs/screenshot/bulk-screenshot.yaml +728 -0
- package/dist/specs/screenshot/website-screenshot.yaml +822 -0
- package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +593 -0
- package/dist/specs/ssl/ssl-certificate-lookup.yaml +478 -0
- package/dist/specs/timezone/timezone-converter.yaml +249 -0
- package/dist/specs/timezone/timezone-lookup.yaml +712 -0
- package/dist/specs/user-agent/bulk-user-agent-parser.yaml +340 -0
- package/dist/specs/user-agent/user-agent-parser.yaml +271 -0
- package/dist/specs/weather/air-quality.yaml +590 -0
- package/dist/specs/weather/bulk-live-weather.yaml +654 -0
- package/dist/specs/weather/flood-forecast.yaml +519 -0
- package/dist/specs/weather/historical-weather.yaml +842 -0
- package/dist/specs/weather/live-weather.yaml +633 -0
- package/dist/specs/weather/marine-weather.yaml +806 -0
- package/dist/specs/weather/time-series-weather.yaml +821 -0
- package/dist/specs/weather/weather-forecast.yaml +935 -0
- package/dist/specs/whois/asn-lookup.yaml +618 -0
- package/dist/specs/whois/bulk-whois-lookup.yaml +827 -0
- package/dist/specs/whois/domain-whois-history-lookup.yaml +445 -0
- package/dist/specs/whois/reverse-whois.yaml +566 -0
- package/dist/specs/whois/whois-domain-lookup.yaml +537 -0
- package/dist/specs/whois/whois-ip-lookup.yaml +1123 -0
- package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +232 -0
- package/dist/specs/zip-code/zip-code-api.yaml +216 -0
- package/dist/specs/zip-code/zip-code-distance-match.yaml +239 -0
- package/dist/specs/zip-code/zip-code-distance.yaml +233 -0
- package/dist/specs/zip-code/zip-codes-by-city.yaml +201 -0
- package/dist/specs/zip-code/zip-codes-by-region.yaml +200 -0
- package/dist/specs/zip-code/zip-codes-radius-search.yaml +262 -0
- package/package.json +6 -2
- package/specs/pdf/merge-pdf.json +2 -2
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: SWIFT/BIC Code API - Look Up Bank Details or Find Codes by Country, Bank & City
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Look up a SWIFT/BIC code to retrieve bank details. Returns the bank name, address, city, country, country code, and bank code for any valid 8 or 11 character SWIFT/BIC code. Supports both headquarters and branch-level SWIFT codes.
|
|
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: SWIFT/BIC Code Lookup API Server
|
|
13
|
+
paths:
|
|
14
|
+
/swift-code/lookup:
|
|
15
|
+
get:
|
|
16
|
+
tags:
|
|
17
|
+
- Financial APIs
|
|
18
|
+
summary: Lookup SWIFT code details
|
|
19
|
+
description: Fetches detailed information about a SWIFT code.
|
|
20
|
+
parameters:
|
|
21
|
+
- name: format
|
|
22
|
+
in: query
|
|
23
|
+
required: false
|
|
24
|
+
schema:
|
|
25
|
+
type: string
|
|
26
|
+
enum:
|
|
27
|
+
- json
|
|
28
|
+
- xml
|
|
29
|
+
default: json
|
|
30
|
+
description: 'Specify the desired response format. Options: ''json'' (default) or ''xml''.'
|
|
31
|
+
- name: swiftCode
|
|
32
|
+
in: query
|
|
33
|
+
required: true
|
|
34
|
+
schema:
|
|
35
|
+
type: string
|
|
36
|
+
description: SWIFT/BIC code to lookup (must be 8 or 11 characters).
|
|
37
|
+
responses:
|
|
38
|
+
'200':
|
|
39
|
+
description: Successful response
|
|
40
|
+
content:
|
|
41
|
+
application/json:
|
|
42
|
+
schema:
|
|
43
|
+
$ref: '#/components/schemas/SwiftCodeLookup'
|
|
44
|
+
examples:
|
|
45
|
+
typicalSuccess:
|
|
46
|
+
summary: Typical successful response — normalized to 11-character form
|
|
47
|
+
value:
|
|
48
|
+
swiftCode: NWBKGB2LXXX
|
|
49
|
+
countryCode: GB
|
|
50
|
+
bankAddress: 250 BISHOPSGATE
|
|
51
|
+
bankCode: NWBK
|
|
52
|
+
bankName: NATIONAL WESTMINSTER BANK PLC
|
|
53
|
+
city: LONDON
|
|
54
|
+
country: United Kingdom
|
|
55
|
+
'400':
|
|
56
|
+
description: Bad Request
|
|
57
|
+
content:
|
|
58
|
+
application/json:
|
|
59
|
+
schema:
|
|
60
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
61
|
+
examples:
|
|
62
|
+
MissingSwiftCode:
|
|
63
|
+
summary: Missing required swiftCode parameter
|
|
64
|
+
value:
|
|
65
|
+
error: Invalid Param Exception
|
|
66
|
+
message: please pass correct parameters
|
|
67
|
+
path: /v1.0/swift-code/lookup
|
|
68
|
+
status: 400
|
|
69
|
+
timestamp: '2026-07-27T11:50:49.650Z'
|
|
70
|
+
BadLength:
|
|
71
|
+
summary: swiftCode is not 8 or 11 characters
|
|
72
|
+
value:
|
|
73
|
+
message: 'Bad request: SWIFT code input must be either 8 characters or 11 characters'
|
|
74
|
+
'404':
|
|
75
|
+
description: Not Found
|
|
76
|
+
content:
|
|
77
|
+
application/json:
|
|
78
|
+
schema:
|
|
79
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
80
|
+
examples:
|
|
81
|
+
NotFound:
|
|
82
|
+
summary: SWIFT code not found
|
|
83
|
+
value:
|
|
84
|
+
message: No bank found with the provided SWIFT code
|
|
85
|
+
operationId: lookupSwiftCode
|
|
86
|
+
components:
|
|
87
|
+
securitySchemes:
|
|
88
|
+
ApiKeyAuthHeader:
|
|
89
|
+
type: apiKey
|
|
90
|
+
in: header
|
|
91
|
+
name: X-apiKey
|
|
92
|
+
description: Pass your API key via the X-apiKey request header.
|
|
93
|
+
ApiKeyAuthQuery:
|
|
94
|
+
type: apiKey
|
|
95
|
+
in: query
|
|
96
|
+
name: apiKey
|
|
97
|
+
description: Pass your API key via the apiKey query parameter.
|
|
98
|
+
schemas:
|
|
99
|
+
SwiftCodeLookup:
|
|
100
|
+
type: object
|
|
101
|
+
properties:
|
|
102
|
+
swiftCode:
|
|
103
|
+
type: string
|
|
104
|
+
description: SWIFT/BIC code, normalized to its 11-character form (an 8-character input is returned padded with XXX).
|
|
105
|
+
countryCode:
|
|
106
|
+
type: string
|
|
107
|
+
description: ISO 3166-1 alpha-2 country code where the bank is registered.
|
|
108
|
+
bankAddress:
|
|
109
|
+
type: string
|
|
110
|
+
description: Physical address of the bank branch.
|
|
111
|
+
bankCode:
|
|
112
|
+
type: string
|
|
113
|
+
description: Bank code portion of the SWIFT code (first 4 characters).
|
|
114
|
+
bankName:
|
|
115
|
+
type: string
|
|
116
|
+
description: Full name of the bank or financial institution.
|
|
117
|
+
city:
|
|
118
|
+
type: string
|
|
119
|
+
description: City where the bank branch is located.
|
|
120
|
+
country:
|
|
121
|
+
type: string
|
|
122
|
+
description: Full country name where the bank is registered.
|
|
123
|
+
required:
|
|
124
|
+
- swiftCode
|
|
125
|
+
- countryCode
|
|
126
|
+
- bankAddress
|
|
127
|
+
- bankCode
|
|
128
|
+
- bankName
|
|
129
|
+
- city
|
|
130
|
+
- country
|
|
131
|
+
description: Bank details returned for a SWIFT/BIC code lookup.
|
|
132
|
+
ErrorResponse:
|
|
133
|
+
type: object
|
|
134
|
+
required:
|
|
135
|
+
- message
|
|
136
|
+
properties:
|
|
137
|
+
error:
|
|
138
|
+
type: string
|
|
139
|
+
description: Short error category or exception type.
|
|
140
|
+
message:
|
|
141
|
+
type: string
|
|
142
|
+
description: Human-readable error message describing the failure.
|
|
143
|
+
path:
|
|
144
|
+
type: string
|
|
145
|
+
description: API endpoint path that produced the error.
|
|
146
|
+
status:
|
|
147
|
+
type: integer
|
|
148
|
+
description: HTTP status code returned with the error.
|
|
149
|
+
timestamp:
|
|
150
|
+
type: string
|
|
151
|
+
format: date-time
|
|
152
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
153
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
154
|
+
security:
|
|
155
|
+
- ApiKeyAuthHeader: []
|
|
156
|
+
- ApiKeyAuthQuery: []
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: VAT Number Validation API - Real-time VAT Validations across EU & UK
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Validate a VAT number against the VIES or HMRC databases. Supports all EU VAT numbers (validated against VIES) and UK VAT numbers (validated against HMRC). Returns validation status, consultation number, authority used, and company registration details. Optionally accepts a requester VAT number for match-based validation.
|
|
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: VAT Number Validation API Server
|
|
13
|
+
paths:
|
|
14
|
+
/vat/validation:
|
|
15
|
+
get:
|
|
16
|
+
tags:
|
|
17
|
+
- Financial APIs
|
|
18
|
+
summary: Validate EU and UK VAT number
|
|
19
|
+
description: Validates an EU or UK VAT number and returns registration status details.
|
|
20
|
+
parameters:
|
|
21
|
+
- name: format
|
|
22
|
+
in: query
|
|
23
|
+
required: false
|
|
24
|
+
schema:
|
|
25
|
+
type: string
|
|
26
|
+
enum:
|
|
27
|
+
- json
|
|
28
|
+
- xml
|
|
29
|
+
default: json
|
|
30
|
+
description: 'Specify the desired response format. Options: ''json'' (default) or ''xml''.'
|
|
31
|
+
- name: vatNumber
|
|
32
|
+
in: query
|
|
33
|
+
required: true
|
|
34
|
+
schema:
|
|
35
|
+
type: string
|
|
36
|
+
description: EU or UK VAT number to validate.
|
|
37
|
+
- name: requesterVatNumber
|
|
38
|
+
in: query
|
|
39
|
+
required: false
|
|
40
|
+
schema:
|
|
41
|
+
type: string
|
|
42
|
+
description: Requester EU or UK VAT number.
|
|
43
|
+
responses:
|
|
44
|
+
'200':
|
|
45
|
+
description: Successful response
|
|
46
|
+
content:
|
|
47
|
+
application/json:
|
|
48
|
+
schema:
|
|
49
|
+
$ref: '#/components/schemas/VatValidationResponse'
|
|
50
|
+
examples:
|
|
51
|
+
typicalSuccess:
|
|
52
|
+
summary: Validation without a requester VAT number
|
|
53
|
+
value:
|
|
54
|
+
country_code: GB
|
|
55
|
+
vat_number: '289111588'
|
|
56
|
+
requested_at: '2026-07-27T11:48:43.000Z'
|
|
57
|
+
validation:
|
|
58
|
+
is_valid: true
|
|
59
|
+
consultation_authority: HMRC
|
|
60
|
+
company:
|
|
61
|
+
company_name: EVENTURED LTD
|
|
62
|
+
company_address: SUITE 10, BEAUFORT COURT, ADMIRALS WAY, LONDON, E14 9XL, GB
|
|
63
|
+
withRequesterVatNumber:
|
|
64
|
+
summary: Validation with a requester VAT number (returns a consultation_number)
|
|
65
|
+
value:
|
|
66
|
+
country_code: GB
|
|
67
|
+
vat_number: '289111588'
|
|
68
|
+
requester_country_code: GB
|
|
69
|
+
requester_vat_number: '288305674'
|
|
70
|
+
requested_at: '2026-07-27T11:48:44.000Z'
|
|
71
|
+
validation:
|
|
72
|
+
is_valid: true
|
|
73
|
+
consultation_number: YCM-VHX-WXF
|
|
74
|
+
consultation_authority: HMRC
|
|
75
|
+
company:
|
|
76
|
+
company_name: EVENTURED LTD
|
|
77
|
+
company_address: SUITE 10, BEAUFORT COURT, ADMIRALS WAY, LONDON, E14 9XL, GB
|
|
78
|
+
'400':
|
|
79
|
+
description: Bad Request
|
|
80
|
+
content:
|
|
81
|
+
application/json:
|
|
82
|
+
schema:
|
|
83
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
84
|
+
examples:
|
|
85
|
+
MissingVatNumber:
|
|
86
|
+
summary: Missing required vatNumber parameter
|
|
87
|
+
value:
|
|
88
|
+
error: Invalid Param Exception
|
|
89
|
+
message: please pass correct parameters
|
|
90
|
+
path: /v1.0/vat/validation
|
|
91
|
+
status: 400
|
|
92
|
+
timestamp: '2026-07-27T11:48:44.845Z'
|
|
93
|
+
UnsupportedCountry:
|
|
94
|
+
summary: Unsupported VAT country code
|
|
95
|
+
value:
|
|
96
|
+
message: Unsupported VAT country code. Supported prefixes are UK/GB and EU VAT country codes.
|
|
97
|
+
'404':
|
|
98
|
+
description: Not Found
|
|
99
|
+
content:
|
|
100
|
+
application/json:
|
|
101
|
+
schema:
|
|
102
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
103
|
+
examples:
|
|
104
|
+
NotFound:
|
|
105
|
+
summary: VAT number not found
|
|
106
|
+
value:
|
|
107
|
+
message: targetVrn does not match a registered company
|
|
108
|
+
operationId: validateVatNumber
|
|
109
|
+
components:
|
|
110
|
+
securitySchemes:
|
|
111
|
+
ApiKeyAuthHeader:
|
|
112
|
+
type: apiKey
|
|
113
|
+
in: header
|
|
114
|
+
name: X-apiKey
|
|
115
|
+
description: Pass your API key via the X-apiKey request header.
|
|
116
|
+
ApiKeyAuthQuery:
|
|
117
|
+
type: apiKey
|
|
118
|
+
in: query
|
|
119
|
+
name: apiKey
|
|
120
|
+
description: Pass your API key via the apiKey query parameter.
|
|
121
|
+
schemas:
|
|
122
|
+
VatValidationResponse:
|
|
123
|
+
type: object
|
|
124
|
+
properties:
|
|
125
|
+
country_code:
|
|
126
|
+
type: string
|
|
127
|
+
description: VAT country prefix extracted from the validated VAT number (e.g., DE, GB).
|
|
128
|
+
vat_number:
|
|
129
|
+
type: string
|
|
130
|
+
description: VAT number without country prefix.
|
|
131
|
+
requester_country_code:
|
|
132
|
+
type: string
|
|
133
|
+
description: Requester VAT country prefix (present only when requesterVatNumber was provided).
|
|
134
|
+
requester_vat_number:
|
|
135
|
+
type: string
|
|
136
|
+
description: Requester VAT number without country prefix.
|
|
137
|
+
requested_at:
|
|
138
|
+
type: string
|
|
139
|
+
format: date-time
|
|
140
|
+
description: ISO 8601 timestamp of the validation request.
|
|
141
|
+
validation:
|
|
142
|
+
$ref: '#/components/schemas/VatValidationResult'
|
|
143
|
+
company:
|
|
144
|
+
$ref: '#/components/schemas/VatValidationCompany'
|
|
145
|
+
required:
|
|
146
|
+
- country_code
|
|
147
|
+
- vat_number
|
|
148
|
+
- requested_at
|
|
149
|
+
- validation
|
|
150
|
+
- company
|
|
151
|
+
description: VAT number validation response containing registration status and company details.
|
|
152
|
+
VatValidationResult:
|
|
153
|
+
type: object
|
|
154
|
+
description: Validation result block.
|
|
155
|
+
required:
|
|
156
|
+
- is_valid
|
|
157
|
+
- consultation_authority
|
|
158
|
+
properties:
|
|
159
|
+
is_valid:
|
|
160
|
+
type: boolean
|
|
161
|
+
description: Whether the VAT number is active and registered.
|
|
162
|
+
consultation_number:
|
|
163
|
+
type: string
|
|
164
|
+
description: VIES/HMRC consultation number. Only present when requesterVatNumber is provided.
|
|
165
|
+
consultation_authority:
|
|
166
|
+
type: string
|
|
167
|
+
description: Upstream authority used for validation (VIES for EU, HMRC for UK).
|
|
168
|
+
VatValidationCompany:
|
|
169
|
+
type: object
|
|
170
|
+
description: Company details block.
|
|
171
|
+
required:
|
|
172
|
+
- company_name
|
|
173
|
+
- company_address
|
|
174
|
+
properties:
|
|
175
|
+
company_name:
|
|
176
|
+
type: string
|
|
177
|
+
description: Company or trader name (may be empty string when unavailable).
|
|
178
|
+
company_address:
|
|
179
|
+
type: string
|
|
180
|
+
description: Formatted company address (may be empty string when unavailable).
|
|
181
|
+
ErrorResponse:
|
|
182
|
+
type: object
|
|
183
|
+
required:
|
|
184
|
+
- message
|
|
185
|
+
properties:
|
|
186
|
+
error:
|
|
187
|
+
type: string
|
|
188
|
+
description: Short error category or exception type.
|
|
189
|
+
message:
|
|
190
|
+
type: string
|
|
191
|
+
description: Human-readable error message describing the failure.
|
|
192
|
+
path:
|
|
193
|
+
type: string
|
|
194
|
+
description: API endpoint path that produced the error.
|
|
195
|
+
status:
|
|
196
|
+
type: integer
|
|
197
|
+
description: HTTP status code returned with the error.
|
|
198
|
+
timestamp:
|
|
199
|
+
type: string
|
|
200
|
+
format: date-time
|
|
201
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
202
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
203
|
+
security:
|
|
204
|
+
- ApiKeyAuthHeader: []
|
|
205
|
+
- ApiKeyAuthQuery: []
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: VAT Rates by IP API Reference
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Get VAT rates for a country resolved from an IP address. Returns standard and reduced VAT rates based on the geographic location of the IP.
|
|
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: VAT Rates by IP API Server
|
|
13
|
+
paths:
|
|
14
|
+
/vat/rates/ip-address:
|
|
15
|
+
get:
|
|
16
|
+
tags:
|
|
17
|
+
- Financial APIs
|
|
18
|
+
summary: Get VAT rate by IP address
|
|
19
|
+
description: Fetches VAT rate based on the specified or originating IP address.
|
|
20
|
+
operationId: getVatRatesByIp
|
|
21
|
+
parameters:
|
|
22
|
+
- name: format
|
|
23
|
+
in: query
|
|
24
|
+
required: false
|
|
25
|
+
schema:
|
|
26
|
+
type: string
|
|
27
|
+
enum:
|
|
28
|
+
- json
|
|
29
|
+
- xml
|
|
30
|
+
default: json
|
|
31
|
+
description: 'Specify the desired response format. Options: ''json'' (default) or ''xml''.'
|
|
32
|
+
- name: ipAddress
|
|
33
|
+
in: query
|
|
34
|
+
required: false
|
|
35
|
+
schema:
|
|
36
|
+
type: string
|
|
37
|
+
description: IPv4 or IPv6 address to look up VAT rate for. If omitted, the originating IP address will be used.
|
|
38
|
+
responses:
|
|
39
|
+
'200':
|
|
40
|
+
description: Successful response
|
|
41
|
+
content:
|
|
42
|
+
application/json:
|
|
43
|
+
schema:
|
|
44
|
+
$ref: '#/components/schemas/VatIpItemArray'
|
|
45
|
+
examples:
|
|
46
|
+
typicalSuccess:
|
|
47
|
+
summary: Country-level VAT rate
|
|
48
|
+
value:
|
|
49
|
+
- country: GB
|
|
50
|
+
type: vat
|
|
51
|
+
currency: GBP
|
|
52
|
+
standard_rate: 0.2
|
|
53
|
+
reduced_rate:
|
|
54
|
+
- 0
|
|
55
|
+
- 0.05
|
|
56
|
+
categories:
|
|
57
|
+
books: 0.2
|
|
58
|
+
newspapers: 0.2
|
|
59
|
+
periodicals: 0.2
|
|
60
|
+
broadcasting: 0.2
|
|
61
|
+
stateLevel:
|
|
62
|
+
summary: IP resolved to a US state with sub-national sales tax
|
|
63
|
+
value:
|
|
64
|
+
- country: US
|
|
65
|
+
state: CA
|
|
66
|
+
type: vat
|
|
67
|
+
currency: ''
|
|
68
|
+
standard_rate: 0.0825
|
|
69
|
+
'400':
|
|
70
|
+
description: Bad Request
|
|
71
|
+
content:
|
|
72
|
+
application/json:
|
|
73
|
+
schema:
|
|
74
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
75
|
+
examples:
|
|
76
|
+
InvalidIp:
|
|
77
|
+
summary: Invalid IP address format
|
|
78
|
+
value:
|
|
79
|
+
message: Invalid IP address format. Please provide a valid IPv4 or IPv6 address.
|
|
80
|
+
'404':
|
|
81
|
+
description: Not Found
|
|
82
|
+
content:
|
|
83
|
+
application/json:
|
|
84
|
+
schema:
|
|
85
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
86
|
+
examples:
|
|
87
|
+
NotFound:
|
|
88
|
+
summary: VAT data not found for IP
|
|
89
|
+
value:
|
|
90
|
+
message: No VAT data found. Please provide a valid ipAddress.
|
|
91
|
+
components:
|
|
92
|
+
securitySchemes:
|
|
93
|
+
ApiKeyAuthHeader:
|
|
94
|
+
type: apiKey
|
|
95
|
+
in: header
|
|
96
|
+
name: X-apiKey
|
|
97
|
+
description: Pass your API key via the X-apiKey request header.
|
|
98
|
+
ApiKeyAuthQuery:
|
|
99
|
+
type: apiKey
|
|
100
|
+
in: query
|
|
101
|
+
name: apiKey
|
|
102
|
+
description: Pass your API key via the apiKey query parameter.
|
|
103
|
+
schemas:
|
|
104
|
+
VatIpItemArray:
|
|
105
|
+
type: array
|
|
106
|
+
description: Array of VAT rate objects for the country resolved from the IP address.
|
|
107
|
+
items:
|
|
108
|
+
$ref: '#/components/schemas/VatIpItem'
|
|
109
|
+
VatIpItem:
|
|
110
|
+
type: object
|
|
111
|
+
required:
|
|
112
|
+
- country
|
|
113
|
+
- type
|
|
114
|
+
- currency
|
|
115
|
+
- standard_rate
|
|
116
|
+
description: Each item in the array represents a VAT rate object for the country resolved from the IP.
|
|
117
|
+
properties:
|
|
118
|
+
country:
|
|
119
|
+
type: string
|
|
120
|
+
description: Country resolved from the IP address.
|
|
121
|
+
state:
|
|
122
|
+
type: string
|
|
123
|
+
description: State or region resolved from the IP address, for countries with sub-national tax rates (e.g. US). Only present when applicable.
|
|
124
|
+
type:
|
|
125
|
+
type: string
|
|
126
|
+
description: Tax type for the resolved country (e.g., vat).
|
|
127
|
+
currency:
|
|
128
|
+
type: string
|
|
129
|
+
description: ISO 4217 currency code for the resolved country.
|
|
130
|
+
standard_rate:
|
|
131
|
+
type: number
|
|
132
|
+
format: float
|
|
133
|
+
description: Standard VAT rate as a decimal.
|
|
134
|
+
reduced_rate:
|
|
135
|
+
type: array
|
|
136
|
+
items:
|
|
137
|
+
$ref: '#/components/schemas/VatRateDecimal'
|
|
138
|
+
description: Reduced VAT rates (EU/UK only).
|
|
139
|
+
super_reduced_rate:
|
|
140
|
+
type: array
|
|
141
|
+
items:
|
|
142
|
+
$ref: '#/components/schemas/VatRateDecimal'
|
|
143
|
+
description: Super-reduced VAT rates (EU/UK only).
|
|
144
|
+
parking_rate:
|
|
145
|
+
type: number
|
|
146
|
+
format: float
|
|
147
|
+
description: Parking rate (EU/UK only).
|
|
148
|
+
categories:
|
|
149
|
+
description: Category-specific VAT rates, where defined (EU/UK only). Keys vary by country.
|
|
150
|
+
$ref: '#/components/schemas/VatCategories'
|
|
151
|
+
VatRateDecimal:
|
|
152
|
+
type: number
|
|
153
|
+
format: float
|
|
154
|
+
description: A VAT rate expressed as a decimal (e.g., 0.19 = 19%).
|
|
155
|
+
VatCategories:
|
|
156
|
+
type: object
|
|
157
|
+
description: Category-specific VAT rates, where defined (EU/UK only). Keys vary by country.
|
|
158
|
+
properties:
|
|
159
|
+
books:
|
|
160
|
+
type: number
|
|
161
|
+
format: float
|
|
162
|
+
description: VAT rate for books, as a decimal (e.g., 0.07 = 7%).
|
|
163
|
+
newspapers:
|
|
164
|
+
type: number
|
|
165
|
+
format: float
|
|
166
|
+
description: VAT rate for newspapers, as a decimal (e.g., 0.07 = 7%).
|
|
167
|
+
periodicals:
|
|
168
|
+
type: number
|
|
169
|
+
format: float
|
|
170
|
+
description: VAT rate for periodicals, as a decimal (e.g., 0.07 = 7%).
|
|
171
|
+
broadcasting:
|
|
172
|
+
type: number
|
|
173
|
+
format: float
|
|
174
|
+
description: VAT rate for broadcasting services, as a decimal (e.g., 0.19 = 19%).
|
|
175
|
+
required: []
|
|
176
|
+
ErrorResponse:
|
|
177
|
+
type: object
|
|
178
|
+
required:
|
|
179
|
+
- message
|
|
180
|
+
properties:
|
|
181
|
+
error:
|
|
182
|
+
type: string
|
|
183
|
+
description: Short error category or exception type.
|
|
184
|
+
message:
|
|
185
|
+
type: string
|
|
186
|
+
description: Human-readable error message describing the failure.
|
|
187
|
+
path:
|
|
188
|
+
type: string
|
|
189
|
+
description: API endpoint path that produced the error.
|
|
190
|
+
status:
|
|
191
|
+
type: integer
|
|
192
|
+
description: HTTP status code returned with the error.
|
|
193
|
+
timestamp:
|
|
194
|
+
type: string
|
|
195
|
+
format: date-time
|
|
196
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
197
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
198
|
+
security:
|
|
199
|
+
- ApiKeyAuthHeader: []
|
|
200
|
+
- ApiKeyAuthQuery: []
|