-
Notifications
You must be signed in to change notification settings - Fork 20
/
base.json
188 lines (188 loc) · 8.13 KB
/
base.json
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
{
"openapi": "3.0.0",
"info": {
"title": "bunq API",
"description": "WIL BE POPULATED WITH THE TEXT IN DESCRIPTION.md",
"termsOfService": "http://bunq.com/terms-api/",
"contact": {
"name": "bunq Developer Support",
"url": "http://bunq.com/developer"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"servers": [
{
"url": "https://public-api.sandbox.bunq.com/{basePath}",
"description": "Sandbox server",
"variables": {
"basePath": {
"default": "v1"
}
}
},
{
"url": "https://api.bunq.com/{basePath}",
"description": "Production server",
"variables": {
"basePath": {
"default": "v1"
}
}
}
],
"components": {
"parameters": {
"Cache-Control": {
"description": "The standard HTTP Cache-Control header is required for all signed requests.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "Cache-Control"
},
"User-Agent": {
"description": "The User-Agent header field should contain information about the user agent originating the request. There are no restrictions on the value of this header.",
"schema": {
"type": "string"
},
"required": true,
"in": "header",
"name": "User-Agent"
},
"X-Bunq-Language": {
"description": "The X-Bunq-Language header must contain a preferred language indication. The value of this header is formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country code, separated by an underscore. Currently only the languages en_US and nl_NL are supported. Anything else will default to en_US.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "X-Bunq-Language"
},
"X-Bunq-Region": {
"description": "The X-Bunq-Region header must contain the region (country) of the client device. The value of this header is formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country code, separated by an underscore.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "X-Bunq-Region"
},
"X-Bunq-Client-Request-Id": {
"description": "This header must specify an ID with each request that is unique for the logged in user. There are no restrictions for the format of this ID. However, the server will respond with an error when the same ID is used again on the same DeviceServer.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "X-Bunq-Client-Request-Id"
},
"X-Bunq-Geolocation": {
"description": "This header must specify the geolocation of the device. The format of this value is longitude latitude altitude radius country. The country is expected to be formatted of an ISO 3166-1 alpha-2 country code. When no geolocation is available or known the header must still be included but can be zero valued.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "X-Bunq-Geolocation"
},
"X-Bunq-Client-Signature": {
"description": "The signature header is required for some API calls. See the signing page for details on how to create this signature.",
"schema": {
"type": "string"
},
"required": false,
"in": "header",
"name": "X-Bunq-Client-Signature"
},
"X-Bunq-Client-Authentication": {
"description": "The authentication token is used to authenticate the source of the API call. It is required by all API calls except for POST /v1/installation. It is important to note that the device and session calls are using the token from the response of the installation call, while all the other calls use the token from the response of the session-server call",
"schema": {
"type": "string"
},
"required": true,
"in": "header",
"name": "X-Bunq-Client-Authentication"
},
"X-Bunq-Attachment-Description": {
"description": "This header should be used when uploading an Attachment's content to give it a description.",
"schema": {
"type": "string"
},
"in": "header",
"name": "X-Bunq-Attachment-Description"
}
},
"headers": {
"X-Bunq-Client-Request-Id": {
"description": "This header must specify an ID with each request that is unique for the logged in user. There are no restrictions for the format of this ID. However, the server will respond with an error when the same ID is used again on the same DeviceServer.",
"schema": {
"type": "string"
},
"required": false
},
"X-Bunq-Client-Response-Id": {
"description": "A unique ID for the response formatted as a UUID. Clients can use it to add extra protection against replay attacks.",
"schema": {
"type": "string"
}
},
"X-Bunq-Server-Signature": {
"description": "The server's signature for this response. See the signing page for details on how to verify this signature.",
"schema": {
"type": "string"
}
}
},
"responses": {
"GenericError": {
"description": "This is how the error response looks like for 4XX response codes",
"headers": {
"X-Bunq-Client-Response-Id": {
"$ref": "#/components/headers/X-Bunq-Client-Response-Id"
},
"X-Bunq-Client-Request-Id": {
"$ref": "#/components/headers/X-Bunq-Client-Request-Id"
},
"X-Bunq-Server-Signature": {
"$ref": "#/components/headers/X-Bunq-Server-Signature"
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Error": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"schemas": {
"Error": {
"type": "array",
"items": {
"type": "object",
"properties": {
"error_description": {
"type": "string",
"description": "The error description in English."
},
"error_description_translated": {
"type": "string",
"description": "The error description translated to the user's language."
}
}
}
}
}
}
}