-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
194 lines (194 loc) · 4.98 KB
/
openapi.yml
File metadata and controls
194 lines (194 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
swagger: "2.0"
info:
description: "This is the contract for Vies on-the-Web endpoints. The checkVat service supports exact and approximate matching at the same time. In order to retrieve the requestIdentifier, the information about requesterMemberStateCode and requesterNumber have to be provided."
version: "1.0.0"
title: "Vies on-the-Web Endpoint"
produces:
- "application/json"
host: "ec.europa.eu"
basePath: "/taxation_customs/vies/rest-api"
schemes:
- "https"
paths:
/check-vat-number:
post:
tags:
- "public"
summary: "Check a Vat Number for a specific country"
operationId: "checkVatNumber"
parameters:
- name: "body"
in: "body"
description: "The request body"
required: true
schema:
$ref: "#/definitions/CheckVatRequest"
responses:
"200":
description: "Successful operation"
schema:
$ref: "#/definitions/CheckVatResponse"
"400":
description: "Bad Request"
schema:
$ref: "#/definitions/CommonResponse"
"500":
description: "Internal server error"
schema:
$ref: "#/definitions/CommonResponse"
/check-vat-test-service:
post:
tags:
- "public"
summary: "Test the check vat service"
operationId: "checkVatTestService"
parameters:
- name: "body"
in: "body"
description: "The request body"
required: true
schema:
$ref: "#/definitions/CheckVatRequest"
responses:
"200":
description: "Successful operation"
schema:
$ref: "#/definitions/CheckVatResponse"
"400":
description: "Bad Request"
schema:
$ref: "#/definitions/CommonResponse"
"500":
description: "Internal server error"
schema:
$ref: "#/definitions/CommonResponse"
/check-status:
get:
tags:
- "public"
summary: "Check the status of each member states"
operationId: "checkStatus"
responses:
"200":
description: "Successful operation"
schema:
$ref: "#/definitions/StatusInformationResponse"
"400":
description: "Bad Request"
schema:
$ref: "#/definitions/CommonResponse"
"500":
description: "Internal server error"
schema:
$ref: "#/definitions/CommonResponse"
definitions:
Status:
type: "string"
enum:
- "VALID"
- "INVALID"
- "NOT_PROCESSED"
CheckVatRequest:
type: "object"
properties:
countryCode:
type: "string"
vatNumber:
type: "string"
requesterMemberStateCode:
type: "string"
requesterNumber:
type: "string"
traderName:
type: "string"
traderStreet:
type: "string"
traderPostalCode:
type: "string"
traderCity:
type: "string"
traderCompanyType:
type: "string"
CheckVatResponse:
type: "object"
properties:
countryCode:
type: "string"
vatNumber:
type: "string"
requestDate:
type: "string"
format: "date-time"
valid:
type: "boolean"
requestIdentifier:
type: "string"
name:
type: "string"
address:
type: "string"
traderName:
type: "string"
traderStreet:
type: "string"
traderPostalCode:
type: "string"
traderCity:
type: "string"
traderCompanyType:
type: "string"
traderNameMatch:
$ref: "#/definitions/Status"
traderStreetMatch:
$ref: "#/definitions/Status"
traderPostalCodeMatch:
$ref: "#/definitions/Status"
traderCityMatch:
$ref: "#/definitions/Status"
traderCompanyTypeMatch:
$ref: "#/definitions/Status"
CountryStatus:
type: "object"
properties:
countryCode:
type: "string"
availability:
type: "string"
enum:
- "Available"
- "Unavailable"
- "Monitoring Disabled"
StatusInformationResponse:
type: "object"
properties:
vow:
type: "object"
properties:
available:
type: "boolean"
countries:
type: "array"
items:
$ref: "#/definitions/CountryStatus"
CommonResponse:
type: "object"
properties:
actionSucceed:
type: "boolean"
description: "Indicate if the action succeed or not"
errorWrappers:
$ref: "#/definitions/ErrorWrappers"
ErrorWrappers:
type: "array"
description: "Indicate the cause of the error when actionSucceed is false."
items:
$ref: "#/definitions/ErrorWrapper"
ErrorWrapper:
type: "object"
description: "Define information about an error"
properties:
error:
type: "string"
description: "The error code"
message:
type: "string"