This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
enrich.yml
451 lines (448 loc) · 16.6 KB
/
enrich.yml
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
openapi: 3.0.1
info:
title: Enrich
description: All included utility endpoints for Basiq partners
version: 3.0.0
servers:
- url: https://au-api.basiq.io/
paths:
/enrich:
get:
tags:
- Enrich
summary: Enrich
description: >-
The Enrich resource enables you to retrieve details by passing in a search query containing a bank transaction description. The service enriches transaction data with multiple attributes, returning a transaction classification and three metadata components.
The transaction classification will first determine if the transaction is of type payment, transfer, cash-withdrawal, bank-fee etc. The engine then derives merchant information, purchase location and prescribes an industry standard categorisation for each payment transaction.
parameters:
- name: q
in: query
description: >-
This is the search string that is used to lookup the entity (merchant) information.
```**q=garfish%20MANLY%20NS**&country=AU&institution=AU06703```
schema:
type: string
required: true
- name: institution
in: query
description: >-
Identifies the institution from where the transaction was derived. This must be a Basiq recognisable institution ID.
```enrich?METRO%20PETROLEUM%20FR%20FORE&country=AU&accountType=transaction&amount=-12.95&**institution=AU04301**```
schema:
type: string
required: true
- name: country
in: query
description: >-
Specifies the country the search should be narrowed down to. Passing in a country value will limit the search to the specified country.
The country must be in ISO 3166 Alpha-2 format
```q=garfish%20MANLY%20NS&**country=AU**&institution=AU06703```
schema:
type: string
required: true
responses:
200:
description: >-
The enrich endpoint will always return a 200 response to the user, along with a set of results for each of the datasets subscribed to: category, entity and location. If no results are found for the search query then an empty result set is returned. If parameter inputs are invalid an error is returned.
content:
application/json:
schema:
$ref: '#/components/schemas/Enrich'
example:
type: enrich
direction: debit
class: payment
data:
merchant:
id: f0ff1071-6a1a-45d6-b7af-8be668a3411a
businessName: Woolworths
website: https://www.woolworths.com.au/shop/storelocator/nsw-shellharbour-1197?utm_source=google&utm_medium=organic&utm_campaign=googleplaces
abn: '88000014675'
phoneNumber:
local: (02) 4276 6018
international: +61 2 4276 6018
category:
anzsic:
division:
code: G
title: Retail Trade
subdivision:
code: '41'
title: Food Retailing
group:
code: '411'
title: Supermarket and Grocery Stores
class:
code: '4110'
title: Supermarket and Grocery Stores
subclass:
code: '411000'
title: Supermarket and Grocery Stores
location:
routeNo: '29'
route: 'E Esplanade'
postalCode: '2095'
suburb: 'NSW'
state: 'MANLY'
country: 'Australia'
formattedAddress: '1/39 E Esplanade, Manly NSW 2095'
geometry:
lat: '-33.79988520000001'
lng: '151.2858021'
links:
self: https://au-api.basiq.io/enrich?country=AU&institution=AU00000&q=WOOLWORTHS
logo-master: https://enrich-enrichmerchantslogobucket-6or17iuhdvs9.s3-ap-southeast-2.amazonaws.com/woolworths-master.svg
logo-thumb: https://enrich-enrichmerchantslogobucket-6or17iuhdvs9.s3-ap-southeast-2.amazonaws.com/woolworths-thumb.svg
400:
description: Returns error that server cannot or will not process the request
due to something that is perceived to be a client error.
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestError'
examples:
Bad Request:
value:
type: list
correlationId: ac5ah5i
data:
- type: error
title: Parameter not valid.
code: parameter-not-valid
detail: ID value is not valid.
source:
parameter: id
Invalid Filters:
value:
type: list
correlationId: ac5ah55
data:
- type: error
code: parameter-not-valid
title: Parameter value is not valid
detail: The provided filter parameter is in invalid format or unsupported
source:
parameter: filter
403:
description: Error that access is forbidden and tied to the application
logic, such as insufficient rights to a resource.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenAccessError'
500:
description: Returns error response code indicates that the server encountered
an unexpected condition that prevented it from fulfilling the request.
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
security:
- services_token: []
components:
schemas:
Enrich:
required:
- type
- direction
- class
- links
type: object
properties:
type:
type: string
description: Value is "enrich"
direction:
type: string
description: Debit or Credit transaction
class:
type: string
description: Describes the type of transaction, payment, transfer, cash-withdrawal, bank-fee, interest, refund etc.
data:
type: object
description: Container object, containing enrich details.
properties:
merchant:
type: object
properties:
id:
type: string
description: The merchant id.
businessName:
type: string
description: The merchant business name.
website:
type: string
description: The merchant website.
abn:
type: string
description: Provides the Australian Business Number.
phoneNumber:
type: object
description: Provides the ```local``` and ```international``` telephone numbers of the merchant.
properties:
local:
type: string
international:
type: string
category:
type: object
properties:
anzsic:
type: object
properties:
division:
type: object
description: Details the code and title of the merchant ANZSIC division.
properties:
code:
type: string
title:
type: string
subdivision:
type: object
description: Details the code and title of the merchant ANZSIC subdivision.
properties:
code:
type: string
title:
type: string
group:
type: object
description: Details the code and title of the merchant ANZSIC group.
properties:
code:
type: string
title:
type: string
class:
type: object
description: Details the code and title of the merchant ANZSIC class.
properties:
code:
type: string
title:
type: string
subclass:
type: object
properties:
code:
type: string
title:
type: string
location:
type: object
properties:
routeNo:
type: string
description: The street number of the merchant location.
route:
type: string
description: The street name of the merchant location.
postalCode:
type: string
description: The post code of the merchant location.
suburb:
type: string
description: The suburb of the merchant location.
state:
type: string
description: The state of the merchant location.
country:
type: string
description: The country of the merchant location.
formattedAddress:
type: string
description: The full address for the merchant location
geometry:
type: object
description: Contains the lat and lng coordinates of the merchant location.
properties:
lat:
type: string
lng:
type: string
links:
type: object
properties:
self:
type: string
description: Provides a reference link to the original query.
logo-master:
type: string
description: >-
Provides link to master logo. Logos are provided in a variety of formats: .svg, .png, .jpg, jpeg, gif. Where null no merchant logo is available.
logo-thumb:
type: string
description: >-
Provides link to thumb logo (where no thumb available master logo is returned for both). Logos are provided in a variety of formats: .svg, .png, .jpg, jpeg, gif. Where null no merchant logo is available.
BadRequestError:
required:
- correlationId
- data
- type
type: object
properties:
type:
type: string
description: Always "list".
example: list
correlationId:
type: string
description: Unique identifier for this particular occurrence of the problem.
example: ac5ah5i
data:
type: array
description: Error data.
items:
required:
- code
- type
type: object
properties:
type:
type: string
description: Type of the response, always "error"
example: error
title:
type: string
description: Title of the error
example: Parameter not valid.
code:
type: string
description: Application-specific error code, expressed as a string value.
example: parameter-not-valid
enum:
- parameter-not-supplied
- parameter-not-valid
- unsupported-accept
- invalid-content
- institution-not-supported
- invalid-credentials
detail:
type: string
description: >-
Human-readable explanation specific to this occurrence of the
problem.
example: ID value is not valid.
source:
$ref: '#/components/schemas/Source'
ForbiddenAccessError:
required:
- correlationId
- data
- type
type: object
properties:
type:
type: string
description: Always "list".
example: list
correlationId:
type: string
description: Unique identifier for this particular occurrence of the problem.
example: ac5ah5i
data:
type: array
description: Error data.
items:
required:
- code
- source
- type
type: object
properties:
type:
type: string
description: Type of the response, always "error"
example: error
title:
type: string
description: Title of the error
example: Forbidden Access
code:
type: string
description: Application-specific error code, expressed as a string value.
example: forbidden-access
enum:
- forbidden-access
- no-production-access
- access-denied
detail:
type: string
description: >-
Human-readable explanation specific to this occurrence of the
problem.
example: Access to this resource is forbidden.
source:
$ref: '#/components/schemas/Source'
InternalServerError:
required:
- correlationId
- data
- type
type: object
properties:
type:
type: string
description: Always "list".
example: list
correlationId:
type: string
description: Unique identifier for this particular occurrence of the problem.
example: ac5ah5i
data:
type: array
description: Error data.
items:
required:
- code
- type
type: object
properties:
code:
type: string
description: Application-specific error code, expressed as a string value.
example: internal-server-error
enum:
- internal-server-error
detail:
type: string
description: >-
Human-readable explanation specific to this occurrence of the
problem.
example: Internal Server error. Contact support.
title:
type: string
description: Title of the error
example: Internal Server error.
type:
type: string
description: Type of the response, always "error"
example: error
Source:
title: Source
type: object
properties:
parameter:
type: string
description: String indicating which URI query parameter caused the error.
example: id
description: An object containing references to the source of the error.
securitySchemes:
services_token:
type: http
scheme: bearer
bearerFormat: JWT
security:
- services_token: []
x-readme:
explorer-enabled: true
proxy-enabled: true
samples-enabled: true
samples-languages:
- curl
- node
- ruby
- javascript
- python