-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-docs.json
1 lines (1 loc) · 10.1 KB
/
api-docs.json
1
{"swagger":"2.0","info":{"description":"Simple Banking API used for MOIS on UHK. Api is derived from AIR bank API: https://www.airbank.cz/novinky-z-airbank/2017/open-api/open-api-banking.html#top","version":"1.0.0","title":"Swagger Banking","termsOfService":"http://swagger.io/terms/","contact":{"email":"[email protected]"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":":::27697","basePath":"/v1","tags":[{"name":"transaction","description":"Banking transactions"},{"name":"payment","description":"Banking payments"}],"schemes":["https","http"],"paths":{"/transaction":{"post":{"tags":["transaction"],"summary":"Add a new transaction","description":"","operationId":"addTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Transaction object that needs to be added","required":true,"schema":{"$ref":"#/definitions/Transaction"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"object","$ref":"#/definitions/Transaction"}},"405":{"description":"Invalid input"}}}},"/transaction/findByDate":{"get":{"tags":["transaction"],"summary":"Finds transactions by date","description":"","operationId":"findTransactionByDate","produces":["application/json"],"parameters":[{"name":"dateFrom","in":"query","description":"Datetime from which to load transactions","required":true,"type":"string","format":"date-time"},{"name":"dateTo","in":"query","description":"Datetime to which to load transactions","required":true,"type":"string","format":"date-time"},{"name":"accountId","in":"query","description":"accountId for transactions","required":true,"type":"number"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Transaction"}}},"400":{"description":"Invalid value"}}}},"/payment":{"post":{"tags":["payment"],"summary":"Add a new payment","description":"","operationId":"addPayment","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Payment object that needs to be added","required":true,"schema":{"$ref":"#/definitions/Payment"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"object","$ref":"#/definitions/Payment"}},"405":{"description":"Invalid input"}}},"put":{"tags":["payment"],"summary":"Update payment","description":"","operationId":"updatePayment","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Payment object that needs to be updated","required":true,"schema":{"$ref":"#/definitions/Payment"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"object","$ref":"#/definitions/Payment"}},"405":{"description":"Invalid input"}}}},"/payment/findByDate":{"get":{"tags":["payment"],"summary":"Finds payment by date","description":"","operationId":"findPaymentByDate","produces":["application/json"],"parameters":[{"name":"dateFrom","in":"query","description":"Datetime from which to load payments","required":true,"type":"string","format":"date-time"},{"name":"dateTo","in":"query","description":"Datetime to which to load payments","required":true,"type":"string","format":"date-time"},{"name":"accountId","in":"query","description":"accountId for transactions","required":true,"type":"number"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Payment"}}},"400":{"description":"Invalid value"}}}}},"definitions":{"Transaction":{"type":"object","properties":{"id":{"type":"string","description":"internal transaction identified","minLength":0},"accountId":{"type":"number","description":"account to that transaction belongs (to which it is accounted)"},"value":{"type":"object","properties":{"amount":{"type":"number","description":"amount of money"},"currency":{"type":"string","description":"currency of money","minLength":0}},"required":["amount","currency"],"description":"amount & currency used for bookkeeping (e.g. amount in account's currency). Can be negative e.g. if something was withdrawn from an account. Original transaction amount and currency will be specified in `additionalInfo` object if applicable"},"partyAccount":{"type":"object","properties":{"prefix":{"type":"string","description":"account number prefix","minLength":0},"accountNumber":{"type":"string","description":"account number. For domestic accounts, this will be specified in national format.","minLength":0},"bankCode":{"type":"string","description":"for domestic accounts, bank code in national format; for foreign accounts, BIC code.","minLength":0}},"required":["accountNumber","bankCode"],"description":"party account number"},"partyDescription":{"type":"string","description":"party description","minLength":0},"direction":{"type":"string","enum":["INCOMING","OUTGOING","BOTH"],"description":"transaction direction"},"transactionType":{"type":"string","enum":["PAYMENT_HOME","PAYMENT_ABROAD","PAYMENT_PERSONAL","PAYMENT_ACCOUNT","STANDING_ORDER","SAVING","DIRECT_DEBIT","DIRECT_DEBIT_SIPO","CARD","CASH","FEE","TAX","INTEREST","INSURANCE","LOAN","MORTGAGE","SAZKA","OTHER","BLOCKING"],"description":"transaction type"},"valueDate":{"type":"string","format":"date-time","description":"transaction value date, e.g. the day transaction \"happened\""},"bookingDate":{"type":"string","format":"date-time","description":"transaction booking date, e.g. the day transaction was bookkeeped"},"userDescription":{"type":"string","description":"user transaction description","minLength":0},"payerMessage":{"type":"string","description":"message for payer. Empty for incoming transacionts.","minLength":0},"payeeMessage":{"type":"string","description":"message for payee (e.g. for client receiving transaction)","minLength":0},"categoryId":{"type":"number","description":"id of category for transaction. More info about category can be retrieved using /openapi/banking/categories resource."},"transactionFee":{"type":"number","description":"fee related to transaction, in account's currency"},"transactionFeeCanceled":{"type":"boolean","description":"set to true if transaction fee is canceled."},"additionalInfoDomestic":{"type":"object","properties":{"constantSymbol":{"type":"string","minLength":0},"variableSymbol":{"type":"string","minLength":0},"specificSymbol":{"type":"string","minLength":0}},"description":"domestic payments additional info (symbols for fomestic payments)"},"additionalInfoForeign":{"type":"object","properties":{"originalValue":{"type":"object","properties":{"amount":{"type":"number","description":"amount of money"},"currency":{"type":"string","description":"currency of money","minLength":0}},"required":["amount","currency"],"description":"amount & currency in which transaction was originated"},"exchangeRate":{"type":"number","description":"exchange rate valid at the time of transfer"}},"description":"foreign payments additional info (original value and exchange rate)"},"additionalInfoCard":{"type":"object","properties":{"mcc":{"type":"string","description":"Merchant Category code","minLength":0},"merchantName":{"type":"string","minLength":0},"cardNumber":{"type":"string","description":"masked card number used for transaction","minLength":0}},"required":["cardNumber"],"description":"card payemnts additional info (card number, mcc and merchant name)"}},"required":["id","accountId","value","direction","transactionType","valueDate","bookingDate"]},"Payment":{"type":"object","properties":{"value":{"type":"object","properties":{"amount":{"type":"number","description":"amount of money"},"currency":{"type":"string","description":"currency of money","minLength":0}},"required":["amount","currency"],"description":"amount & currency of payment order"},"partyAccount":{"type":"object","properties":{"prefix":{"type":"string","description":"account number prefix","minLength":0},"accountNumber":{"type":"string","description":"account number. For domestic accounts, this will be specified in national format.","minLength":0},"bankCode":{"type":"string","description":"for domestic accounts, bank code in national format; for foreign accounts, BIC code.","minLength":0}},"required":["accountNumber","bankCode"],"description":"party account number"},"dueDate":{"type":"string","format":"date-time","description":"payment order due date"},"recuringPayment":{"type":"object","properties":{"firstPayment":{"type":"string","format":"date-time"},"lastPayment":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["WEEK","MONTH","QUARTER","HALF-YEAR","YEAR"]}},"required":["accountNumber","bankCode"],"description":"party account number"},"payeeMessage":{"type":"string","description":"message for payee","minLength":0},"payerMessage":{"type":"string","description":"message for payer","minLength":0},"categoryId":{"type":"number","description":"id of category for payment order. More info about category can be retrieved using /openapi/banking/categories resource."},"additionalInfo":{"type":"object","properties":{"constantSymbol":{"type":"string","minLength":0},"variableSymbol":{"type":"string","minLength":0},"specificSymbol":{"type":"string","minLength":0}},"description":"payment order additional info (symbols)"},"id":{"type":"number","description":"internal domestic payment order identifier"},"accountId":{"type":"number","description":"account to that payment belongs (to which it is accounted)"},"editableByUser":{"type":"boolean","description":"editable flag; true if user can modify payment order"},"realizationStatus":{"type":"string","enum":["RTS_EDITED","RTS_NOT_REALISED","RTS_NOT_FULLY_REALISED","RTS_REALISED","RTS_SUSPENDED","RTS_ENDED","RTS_WAIT_FOR_AUTHORISATION","RTS_FAULTY_PARAMS","RTS_READY_TO_SEND","RTS_SENT","RTS_REFUSED_BY_COUNTERPARTY","RTS_REFUSED_ERROR","RTS_INPROC","RTS_WAITS_FOR_APPROVAL","RTS_PARTLYSIGNED","RTS_SIGNED","RTS_PARTLYEDITED","RTS_CANCELLED","RTS_FOR_EXT_PROCESSING","RTS_WAIT_FOR_CNDPRECEDENT"],"description":"payment order realization status"}},"required":["value","partyAccount","dueDate","id","accountId","editableByUser","realizationStatus"]}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}}