forked from vmosoti/oapi-banking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcards.yaml
582 lines (579 loc) · 22.4 KB
/
cards.yaml
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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
openapi: 3.0.1
info:
title: 'Card Products'
version: '1.0.0'
description: 'This specification includes all relevant artefacts for Cards API Specification. In Malaysia, product aggregators have to obtain product information on cards through either web scraping or entering into exclusive arrangement with the financial institutions. Through standardized API, third parties including fintech companies are able to develop solutions which target retail consumers.'
contact:
name: 'BNM Open API Team'
email: 'openapi@bnm.gov.my'
servers:
- url: 'https://api.sample.com'
description: 'Production server URL'
- url: 'https://api.test.sample.com'
description: 'Staging server URL'
paths:
/cards:
get:
tags:
- 'Cards'
summary: 'Retrieve the detail of card products'
description: 'This API endpoint will return all card products based on parameter provided'
operationId: getProducts
security:
- default: [public]
parameters:
- name: card_type
in: query
description: 'Type of card'
schema:
type: string
enum:
- 'all'
- 'charge_card'
- 'credit_card'
- 'debit_card'
- 'prepaid_card'
default: 'credit_card'
responses:
200:
description: 'Successful response'
content:
application/json:
schema:
title: 'Product Response'
type: object
properties:
meta:
type: object
required:
- bic_code
- last_updated
- version
- total_result
properties:
bic_code:
type: string
maxLength: 8
description: '8-characters SWIFT code'
last_updated:
type: string
format: date-time
description: 'Last updated date of product list'
example: '2018-09-14T17:30:12.345+08:00'
version:
type: string
description: 'API version as published https://github.com/BankNegaraMY/oapi-banking'
example: '0.1-dev'
total_result:
type: integer
description: 'Number of products returned'
example: 3
campaign_url:
type: string
maxLength: 500
description: 'Absolute URL to active campaign or promotions'
data:
type: array
items:
type: object
properties:
product_details:
type: object
required:
- name
- description
- product_type
- shariah_compliance
- card_type
- pds_url
- image_type
properties:
name:
type: string
description: 'Product name'
maxLength: 150
example: 'Visa Signature'
description:
type: string
description: 'Product description'
maxLength: 500
example: 'Visa Signature is a Credit Card that provides not just only rewards but with additional privileges'
product_type:
type: string
description: 'Type of product'
enum:
- 'american_express'
- 'jcb'
- 'mastercard'
- 'mydebit'
- 'others'
- 'switch'
- 'unionpay'
- 'visa'
example: 'visa'
sub_product_type:
type: string
enum:
- 'black'
- 'classic'
- 'commercial'
- 'diamond'
- 'electron'
- 'generic'
- 'gold'
- 'infinite'
- 'infinite_privilege'
- 'maestro'
- 'others'
- 'platinum'
- 'reserve'
- 'signature'
- 'world'
- 'world_elite'
description: 'Type of sub-product'
example: 'classic'
shariah_compliance:
type: boolean
description: 'The indicator for Islamic or Conventional card'
example: false
shariah_compliance_remark:
type: string
maxLength: 500
description: 'Approval body for shariah compliance'
card_type:
type: string
enum:
- 'credit_card'
- 'debit_card'
- 'charge_card'
- 'prepaid_card'
description: 'Type of card'
example: 'credit_card'
pds_url:
type: string
format: uri
description: 'URL for product disclosure sheet'
maxLength: 500
image_url:
type: string
format: uri
description: 'Absolute URL to image in SVG format'
maxLength: 500
disclaimer_url:
type: string
format: uri
description: 'Absolute URL for product disclaimer'
maxLength: 500
requirements:
type: object
properties:
requirement_detail:
type: array
items:
type: object
required:
- nationality
- residency
- employment_status
properties:
nationality:
type: string
enum:
- "malaysian"
- "non_malaysian"
- "any"
description: 'Nationality of the applicant'
nationality_remark:
type: string
maxLength: 500
description: 'Remark on nationality'
residency:
type: string
enum:
- 'resident'
- 'non_resident'
- 'any'
description: 'Resident status of the applicant'
account_holder_flag:
type: boolean
description: 'Requirement to have account with the bank'
example: true
applicant:
type: array
items:
type: object
required:
- application_type
properties:
application_type:
type: string
enum:
- 'principal'
- 'supplementary'
- 'any'
description: 'Type of the card application'
example: 'principal'
employment_status:
type: string
enum:
- 'employed'
- 'self_employed'
- 'graduate'
- 'others'
- 'any'
description: 'Employment status of the applicant'
min_age:
type: integer
minimum: 1
maximum: 110
description: 'Minimum age of applicant'
example: 21
max_age:
type: integer
minimum: 1
maximum: 110
description: 'Maximum age of applicant'
example: 65
min_annual_income:
type: integer
description: 'Minimum annual income'
example: 70000
min_annual_income_currency_code:
type: string
maxLength: 3
description: 'ISO-4217 3 characters currency code for minimum annual income'
default: 'MYR'
document:
type: array
items:
type: object
$ref: '#/components/schemas/Document'
product_offerings:
type: object
properties:
product_offering_detail:
type: array
items:
type: object
oneOf:
- $ref: '#/components/schemas/Reward'
- $ref: '#/components/schemas/AirMiles'
- $ref: '#/components/schemas/Feature'
discriminator:
propertyName: category
mapping:
reward_cashback: '#/components/schemas/Reward'
air_miles: '#/components/schemas/AirMiles'
feature_benefit: '#/components/schemas/Feature'
fees_charges:
type: object
properties:
fee_charge_detail:
type: array
items:
type: object
$ref: '#/components/schemas/FeeCharge'
promotions:
type: object
properties:
start_date:
type: string
format: date
description: 'Promotion start date'
example: '2018-06-14'
end_date:
type: string
format: date
description: 'Promotion end date'
example: '2018-07-15'
description:
type: string
maxLength: 500
description: 'Description of promotion'
example: '2018 FIFA World Cup campaign. Swipe to win a Mercedes!'
url:
type: string
format: uri
maxLength: 500
description: 'Absolute URL to access further detail on promotion'
headers:
Strict-Transport-Security:
schema:
type: string
description: 'HTTPS strict transport security header'
default: "max-age=31536000; includeSubDomains; preload"
X-Frame-Options:
schema:
type: string
description: "Prevent this request from being loaded in any iframes"
default: "DENY"
X-Content-Type-Options:
schema:
type: string
description: "Prevent content sniffing where no mimetype is sent"
default: "nosniff"
default:
$ref: '#/components/responses/default'
components:
responses:
default:
description: 'Unexpected error'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
default:
type: oauth2
flows:
clientCredentials:
tokenUrl: /oauth/token
scopes:
public: Read-only access to public data
schemas:
Error:
type: object
properties:
code:
type: integer
enum:
- 400
- 408
- 429
- 500
- 503
description: 'Error code as listed in RFC2616 Status Code Definitions'
message:
type: string
maxLength: 100
Reward:
allOf:
- type: object
required:
- category
- item
properties:
category:
type: string
enum:
- 'reward_cashback'
description: 'Type of offering'
item:
type: string
enum:
- 'bookstore'
- 'cashless_transaction'
- 'cinema'
- 'department_store'
- 'dining'
- 'education'
- 'entertainment'
- 'express_autopay'
- 'gold'
- 'groceries'
- 'highway'
- 'hotel'
- 'installment_plan'
- 'insurance_premium'
- 'local_retail'
- 'membership_day'
- 'mobile_telco'
- 'myeg_services'
- 'online_air_ticket'
- 'online_bill_payment'
- 'online_shopping'
- 'others'
- 'oversea_retail'
- 'petrol'
- 'pharmacy'
- 'retail'
- 'shopping'
- 'touch_n_go'
- 'transport'
- 'travel'
- 'utility_bill'
- 'weekend'
remark:
type: string
maxLength: 500
description: 'Additional notes for the reward'
branding:
type: string
maxLength: 50
description: 'Branding for specific offering'
tnc_url:
type: string
format: uri
maxLength: 500
description: 'Absolute URL to term and conditions for specific offering'
AirMiles:
allOf:
- type: object
required:
- category
- item
properties:
category:
type: string
enum:
- 'air_miles'
description: 'Type of offering'
item:
type: string
enum:
- 'asia_miles'
- 'big_point_aasia'
- 'enrich_mas'
- 'garuda_miles_id'
- 'krisfyler_sg'
- 'malindo_miles_malindoair'
- 'others'
- 'star_alliance'
remark:
type: string
maxLength: 500
description: 'Additional notes for the air miles'
tnc_url:
type: string
format: uri
maxLength: 500
description: 'Absolute URL to term and conditions for specific offering'
Feature:
allOf:
- type: object
required:
- category
- item
properties:
category:
type: string
enum:
- 'feature_benefit'
description: 'Type of offering'
item:
type: string
enum:
- 'airport_speed_pass'
- 'annual_fee_waiver'
- 'auto_bill_payment'
- 'balance_transfer_plan'
- 'cash_advance'
- 'cash_installment_plan'
- 'cash_withdrawal'
- 'charity_fund'
- 'cinema'
- 'concierge_services'
- 'contactless'
- 'dining_privileges'
- 'discount'
- 'easy_payment_plan'
- 'ecommerce_insurance'
- 'emergency_cheque_cashing'
- 'entertainment'
- 'global_assistance'
- 'golf'
- 'groceries'
- 'others'
- 'partnership_discount'
- 'petrol'
- 'plaza_premium_lounge'
- 'retail_insurance'
- 'shopping'
- 'travel'
- 'travel_insurance'
- 'wallet_guard'
branding:
type: string
maxLength: 50
description: 'Branding for specific offering'
remark:
type: string
maxLength: 500
description: 'Additional notes for the feature'
tnc_url:
type: string
format: uri
maxLength: 500
description: 'Absolute URL to term and conditions for specific offering'
FeeCharge:
type: object
required:
- item
properties:
item:
type: string
enum:
- 'actual_monthly_management'
- 'annual'
- 'atm_withdrawal'
- 'card_replacement'
- 'cash_advance'
- 'cash_withdrawal'
- 'early_settlement'
- 'finance_charge_cash_advance'
- 'finance_charge_retail'
- 'fixed_monthly_management'
- 'late_payment'
- 'minimum_monthly_payment'
- 'others'
- 'oversea_transaction'
- 'oversea_transaction_conversion'
- 'sales_draft_retrieval_copy'
- 'service_tax'
- 'starter_pack'
- 'statement_copy'
chargeable:
type: boolean
description: 'Indicator of chargeability'
example: true
amount:
type: number
format: double
description: 'Amount for fee and charge up to two digits decimal'
example: 50.00
amount_currency_code:
type: string
maxLength: 3
description: 'ISO-4217 3 characters currency code for fee and charge amount'
default: 'MYR'
percentage:
type: number
format: double
description: 'Percentage of amount for fee and charge up to two digits decimal'
example: 10.50
remark:
type: string
maxLength: 500
description: 'Additional notes for the fee and charge'
Document:
type: object
required:
- 'item'
properties:
item:
type: string
description: 'Type of document'
enum:
- 'bank_statement'
- 'business_registration_certificate'
- 'commision_statement'
- 'dividend_statement'
- 'employment_confirmation_letter'
- 'epf_statement'
- 'form_24'
- 'form_49'
- 'form_9'
- 'identity_card_passport'
- 'interest_statement'
- 'others'
- 'salary_slip'
- 'tax_receipt'
- 'tax_returns'
- 'travel_visa'
- 'valid_work_permit'
example: 'salary_slip'
remark:
type: string
maxLength: 500
description: 'Additional note for the document'
example: 'To submit latest 3 months salary'