RAF Banka 3 API (0.6.7)

Download OpenAPI specification:

All admin endpoints require an Authorization header: Authorization: Bearer $ACCESS_TOKEN. The API returns JSON.

employees

Retrieve a list of employees

Retrieve a list of employees, optionally filtered by query parameters. Pagination can be added later.

Authorizations:
bearerAuth
query Parameters
email
string

Filter by email

first_name
string

Filter by first name

last_name
string

Filter by last name

position
string

Filter by position

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new employee account

Backend should generate a password reset token and send email to the created user.

Authorizations:
bearerAuth
Request Body schema: application/json
required
first_name
required
string
last_name
required
string
birth_date
string <date>
gender
string
email
required
string <email>
phone
string
address
string
username
required
string
position
string
department
string
active
boolean
permissions
Array of strings

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "birth_date": "2019-08-24",
  • "gender": "string",
  • "email": "user@example.com",
  • "phone": "string",
  • "address": "string",
  • "username": "string",
  • "position": "string",
  • "department": "string",
  • "active": true,
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "first_name": "string",
  • "last_name": "string",
  • "email": "user@example.com",
  • "position": "string",
  • "phone": "string",
  • "active": true,
  • "birth_date": "2001-09-11",
  • "gender": "string",
  • "address": "string",
  • "username": "string",
  • "department": "string",
  • "permissions": [
    ]
}

Get detailed info about an employee

Authorizations:
bearerAuth
path Parameters
employeeId
required
integer <int64>

Employee ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "first_name": "string",
  • "last_name": "string",
  • "email": "user@example.com",
  • "position": "string",
  • "phone": "string",
  • "active": true,
  • "birth_date": "2001-09-11",
  • "gender": "string",
  • "address": "string",
  • "username": "string",
  • "department": "string",
  • "permissions": [
    ]
}

Update an existing employee's info

Update an employee. Some fields are immutable.

Authorizations:
bearerAuth
path Parameters
employeeId
required
integer <int64>

Employee ID

Request Body schema: application/json
required
last_name
string
gender
string
phone
string
address
string
position
string
department
string
active
boolean
permissions
Array of strings

Responses

Request samples

Content type
application/json
{
  • "last_name": "string",
  • "gender": "string",
  • "phone": "string",
  • "address": "string",
  • "position": "string",
  • "department": "string",
  • "active": true,
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "first_name": "string",
  • "last_name": "string",
  • "email": "user@example.com",
  • "position": "string",
  • "phone": "string",
  • "active": true,
  • "birth_date": "2001-09-11",
  • "gender": "string",
  • "address": "string",
  • "username": "string",
  • "department": "string",
  • "permissions": [
    ]
}

auth

Authenticate user and receive tokens

Authenticate user. Response includes access and refresh tokens and permissions for client-side behavior.

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string <email>
password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "refreshToken": "string",
  • "permissions": [
    ]
}

Request password reset link

Authorizations:
bearerAuth
Request Body schema: application/json
required
email
required
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "message": "If that email exists, a reset link was sent."
}

Confirm password reset (set new password)

Set new password and activate employee if not activated. Token must be single-use.

Authorizations:
bearerAuth
Request Body schema: application/json
required
token
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "password": "correct horse battery staple"
}

Response samples

Content type
application/json
{
  • "message": "Password updated"
}

Refresh tokens

Authorizations:
bearerAuth
Request Body schema: application/json
required
refresh_token
required
string

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "refresh_token": "string"
}

Invalidate user's refresh token

Invalidate the user's refresh token. Requires Authorization header.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "message": "Logged out"
}

clients

Retrieve a list of clients

Returns a list of clients, optionally filtered by query parameters.

Authorizations:
bearerAuth
query Parameters
first_name
string

Filter by first name

last_name
string

Filter by last name

email
string

Filter by email

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new client

Authorizations:
bearerAuth
Request Body schema: application/json
required
first_name
required
string
last_name
required
string
date_of_birth
string <date>
gender
string
email
required
string <email>
phone_number
string
address
string
password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "date_of_birth": "2019-08-24",
  • "gender": "string",
  • "email": "user@example.com",
  • "phone_number": "string",
  • "address": "string",
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "valid": true
}

Update an existing client

Authorizations:
bearerAuth
path Parameters
clientId
required
integer <int64>

Client ID

Request Body schema: application/json
required
first_name
string
last_name
string
date_of_birth
string <date>
gender
string
email
string <email>
phone_number
string
address
string

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "date_of_birth": "2019-08-24",
  • "gender": "string",
  • "email": "user@example.com",
  • "phone_number": "string",
  • "address": "string"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "first_name": "Petar",
  • "last_name": "Petrovic",
  • "date_of_birth": "2001-09-11",
  • "gender": "M",
  • "email": "petar.petrovic@raf.rs",
  • "phone_number": "+381601234567",
  • "address": "Knez Mihailova 1, Beograd"
}

accounts

List accounts

Clients see their own active accounts. Employees see all accounts and can filter by owner name or account number.

Authorizations:
bearerAuth
query Parameters
first_name
string
last_name
string
account_number
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new account

Used by employees to create a checking (tekući) or foreign currency (devizni) account. Optional automatic card creation.

Authorizations:
bearerAuth
Request Body schema: application/json
required
client_id
required
integer <int64>

ID of the owner (Client)

account_type
required
string
Enum: "TEKUCI" "DEVIZNI"
subtype
required
string

(fizicko lice: standardni, stedni, penzionerski, za mlade, za studente i nezaposlene; pravno: DOO, AD, fondacija)

currency
required
string

RSD for checking, or [EUR, CHF, USD, ...] for FX

initial_balance
required
number <double>

Initial deposit field is mandatory. This may be subject to change, the spec is cringe

daily_limit
number
Default: 0
monthly_limit
number
Default: 0
create_card
boolean

Checkbox to automatically create a card

object (BusinessInfo)

Responses

Request samples

Content type
application/json
{
  • "client_id": 0,
  • "account_type": "TEKUCI",
  • "subtype": "string",
  • "currency": "RSD",
  • "initial_balance": 0.1,
  • "daily_limit": 0,
  • "monthly_limit": 0,
  • "create_card": true,
  • "business_info": {
    }
}

Response samples

Content type
application/json
{
  • "account_number": "265000000000123456",
  • "account_name": "Devizni racun 1",
  • "owner_id": 123,
  • "balance": 180000,
  • "available_balance": 178000,
  • "employee_id": 1,
  • "creation_date": "2019-08-24T14:15:22Z",
  • "expiration_date": "2019-08-24T14:15:22Z",
  • "currency": "EUR",
  • "status": "Aktivan",
  • "account_type": "Poslovni",
  • "daily_limit": 5000,
  • "monthly_limit": 20000,
  • "daily_spending": 3200,
  • "monthly_spending": 12500
}

Get account details

Authorizations:
bearerAuth
path Parameters
accountNumber
required
string

Bank account number (18 digits)

Responses

Response samples

Content type
application/json
{
  • "account_number": "265000000000123456",
  • "account_name": "Devizni racun 1",
  • "owner_id": 123,
  • "balance": 180000,
  • "available_balance": 178000,
  • "employee_id": 1,
  • "creation_date": "2019-08-24T14:15:22Z",
  • "expiration_date": "2019-08-24T14:15:22Z",
  • "currency": "EUR",
  • "status": "Aktivan",
  • "account_type": "Poslovni",
  • "daily_limit": 5000,
  • "monthly_limit": 20000,
  • "daily_spending": 3200,
  • "monthly_spending": 12500
}

Change account name

Authorizations:
bearerAuth
path Parameters
accountNumber
required
string

Bank account number (18 digits)

Request Body schema: application/json
required
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "(error message)"
}

Change daily/monthly account limits

Requires client verification to execute.

Authorizations:
bearerAuth
path Parameters
accountNumber
required
string

Bank account number (18 digits)

Request Body schema: application/json
required
daily_limit
number
monthly_limit
number

Responses

Request samples

Content type
application/json
{
  • "daily_limit": 0,
  • "monthly_limit": 0
}

transactions

View payments and transfers

Allows filtering by account, date, amount, and status.

Authorizations:
bearerAuth
query Parameters
account_number
string
date
string <date>
amount
number
status
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Initiate a new payment

Transfer funds to another client's account.

Authorizations:
bearerAuth
Request Body schema: application/json
required
sender_account
required
string
recipient_account
required
string
recipient_name
required
string
amount
required
number
payment_code
required
string
reference_number
string
purpose
string

Responses

Request samples

Content type
application/json
{
  • "sender_account": "string",
  • "recipient_account": "string",
  • "recipient_name": "string",
  • "amount": 0,
  • "payment_code": "string",
  • "reference_number": "string",
  • "purpose": "string"
}

Response samples

Content type
application/json
{
  • "from_account": "102-39443942389",
  • "to_account": "102-394438340549",
  • "initial_amount": 1,
  • "final_amount": 1,
  • "fee": 0,
  • "currency": "EUR",
  • "payment_code": "289",
  • "reference_number": "117.6926",
  • "purpose": "Opis svrhe plaćanja",
  • "status": "Realizovano",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Transfer funds between own accounts

Transfer funds between two accounts owned by the same client. Direct if same currency, utilizes exchange rates and fees if currencies differ.

Authorizations:
bearerAuth
Request Body schema: application/json
required
from_account
required
string
to_account
required
string
amount
required
number
description
string

Responses

Request samples

Content type
application/json
{
  • "from_account": "string",
  • "to_account": "string",
  • "amount": 0,
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "from_account": "102-39443942389",
  • "to_account": "102-394438340549",
  • "initial_amount": 1,
  • "final_amount": 1,
  • "fee": 0,
  • "currency": "EUR",
  • "payment_code": "289",
  • "reference_number": "117.6926",
  • "purpose": "Opis svrhe plaćanja",
  • "status": "Realizovano",
  • "timestamp": "2019-08-24T14:15:22Z"
}

recipients

List all payment recipients

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new payment recipient

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string
account_number
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "account_number": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "account_number": "string"
}

Edit a payment recipient

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Recipient ID

Request Body schema: application/json
required
name
required
string
account_number
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "account_number": "string"
}

Delete a payment recipient

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Recipient ID

Responses

cards

View all cards

Clients view their own cards. Employees access cards based on linked accounts.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Request a new card

Request a new card. Backend sends an email to the client and creates a new card when the client accepts.

Authorizations:
bearerAuth
Request Body schema: application/json
required
account_number
required
string
card_type
required
string
card_brand
required
string

Responses

Request samples

Content type
application/json
{
  • "account_number": "string",
  • "card_type": "Debit",
  • "card_brand": "Debit"
}

Response samples

Content type
application/json
{
  • "message": "Request accepted, please click the link in the email you've just received."
}

Block a card

Authorizations:
bearerAuth
path Parameters
cardNumber
required
string

Card number (16 digits)

Responses

loans

List loans

Clients view their loans. Employees view all loans and can filter by type, account, and status.

Authorizations:
bearerAuth
query Parameters
loan_type
string
account_number
string
status
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get detailed view of a loan

Authorizations:
bearerAuth
path Parameters
loanNumber
required
string

Loan Number

Responses

Response samples

Content type
application/json
{
  • "loan_number": "17629",
  • "loan_type": "Gotovinski",
  • "account_number": "string",
  • "loan_amount": 296304.55,
  • "repayment_period": 86,
  • "nominal_rate": 10.24,
  • "effective_rate": 0,
  • "agreement_date": "2019-08-24",
  • "maturity_date": "2019-08-24",
  • "next_installment_amount": 6177.99,
  • "next_installment_date": "2019-08-24",
  • "remaining_debt": 55341.66,
  • "currency": "RSD",
  • "status": "Odobren"
}

View all loan requests

Employee portal to view pending requests sorted by submission date.

Authorizations:
bearerAuth
query Parameters
loan_type
string
account_number
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Submit a loan request

Authorizations:
bearerAuth
Request Body schema: application/json
required
account_number
required
string

Account where funds will be deposited

loan_type
required
string
Enum: "GOTOVINSKI" "STAMBENI" "AUTO" "REFINANSIRAJUCI" "STUDENTSKI"
amount
required
number
repayment_period
required
integer

Period otplate; months

currency
required
string
purpose
required
string

Svrha kredita

salary
required
number

Iznos plate klijenta

employment_status
required
string

Status zaposlenja (npr. ZAPOSLEN, NEZAPOSLEN, PENZIONER)

employment_period
required
string

Vreme provedeno u radnom odnosu

phone_number
required
string

Kontakt telefon

interest_rate_type
required
string
Enum: "FIKSNA" "VARIJABILNA"

Tip kamatne stope

Responses

Request samples

Content type
application/json
{
  • "account_number": "string",
  • "loan_type": "GOTOVINSKI",
  • "amount": 0,
  • "repayment_period": 0,
  • "currency": "string",
  • "purpose": "string",
  • "salary": 0,
  • "employment_status": "string",
  • "employment_period": "string",
  • "phone_number": "string",
  • "interest_rate_type": "FIKSNA"
}

Approve a loan request

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Loan request ID

Responses

Reject a loan request

Authorizations:
bearerAuth
path Parameters
id
required
integer <int64>

Loan request ID

Responses

exchange

Get current exchange rates

Get buy, sell, and middle rates for all supported currencies relative to RSD.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]