Air Bank OpenAPI - Public

API Endpoint

This is documentation of the Public services of Air Bank OpenAPI.

Access to this API can be granted only to entities holding a PSD2 license issued by the Czech National Bank or other relevant regulatory body.

Versions

Version num. Link Valid from Valid to
0 documentation 6.4.2017

There are some rules that are valid throughout whole API.

Naming conventions

  • we use camelCase for all object and property names

  • we use plural in resource names

Paging

  • some resources (stated in documentation) that return collection of objects support pagination.

  • on request:

    • query parameter limit specifies maximum number of objects in returned collection
    • query parameter after specifies last object retrieved in previous request. Its value is usually id of last object retrieved in previous call, but this will be stated in documentation. Parameter after is used when traversing collection forwards.
    • query parameter before specifies first object retrieved in previous request (analogy to after parameter), and is used when traversing collection backwards.
    • if before and after are omitted, beginning of collection is returned, using specified sort order
    • items in collection are always sorted accoridng to attribute which could be passed in after/before parameters. Even if you specify different sorting order, this attribute will be last sorting criterion; if you do not specify sorting order, result collection will be sorted according to this attribute.
  • on response:

    • pagingInfo object is returned as part of response body with following attributes:
      • nextPage - request to retrieve next page. Either nextPage or previousPage is returned, depending whether you specify after or before parameter. If you specify neither before nor after parameter, these attributes will be omitted from response.
      • prevPage - request to retrieve previous page (see nextPage attribute description above).
      • itemsPerPage - number of items per page

Example request:

curl -X GET https://api.airbank.cz/openapi/banking/v1/transactions?sort=category&limit=10&after=15

Example response pagingInfo:

"pagingInfo": {
    "nextPage": "transactions?sort=category&limit=10&after=25"
    "itemsPerPage": 10,
}

Sorting

  • some resources (stated in documentation) suppors result sorting. You can specify sorting attributes and order using sort request parameter. For ascending order, specify just attribute name; for descending order, add unary - in front of attribute name. You can specify multiple attributes for sorting, separated by comma.

  • each resource that supports sorting specifies list of attributes that can be used for sorting.

Examples:

  • /openapi/public/fxrates?sort=currencyCode - get list of FX rates sorted by attribute currencyCode

  • /openapi/public/branches?sort=-name - get list of branches, sorted by attribute name in descending order

  • /openapi/banking/accounts?sort=accountType,-accountCurrency,accountName - get list of accounts, sorted by type (ascending), then by currency descending and then by account name (ascending)

Filtering

Some resources (stated in documentation) supports results filtering. Such resources have list of filters specified together with possible operations and possible values.

You can specify filtering by passing filter attribute. General pattern to specify filter is:

<filterName>|<operator>|<values>

  • filterName - filter name from documentation

  • operator - operator, specified in resource documentation

  • values - one or more values for filter. Multiple values are separated by comma

Multiple filters can be specified on each request, separated by semi-colon. They are joined by “AND”, so each result item must satisfy all conditions.

Filtering examples

  • get a list of incoming transactions
GET /openapi/banking/transactions?filter=direction|eq|INCOMING
  • get a list of transactions with category in (1, 5, 10)
GET /openapi/banking/transactions?filter=category|in|1,5,10
  • get a list of transactions with valueDate in (2016-02-10, 2016-04-28>
GET /openapi/banking/transactions?filter=valueDate|gt|2016-02-10;valueDate|lteq|2016-04-28

List of operators

operator meaning
lt less than
lteq less than or equals
eq equals
gteq greater than or equals
gt greater than
in value in list

API calls limits

When limit is reached, you receive HTTP error 429. To inform you about limits we use following headers:

  • X-Rate-Limit-Limit - The number of allowed requests in the current period

  • X-Rate-Limit-Remaining - The number of remaining requests in the current period

  • X-Rate-Limit-Reset - The number of seconds left in the current period

Bandwith usage reducing

Fields attribute

  • for all GET resources, you can use optional fields query parameter to limit objects’ attributes returned in response

  • fields parameter contains comma-separated list of attributes, that will be present in response; if omitted, all objects’ attributes will be returned

  • you can specify only top-level attributes in fields parameter. This means that when response is an object, you can only specify top-level attributes. When response is an array of objects, only top-level attributes of those objects can be specified.

  • if you specify non-existent attribute or atttribute that is not in first level, you will receive HTTP status 400 Bad Request

  • fields parameter has no effect on resources that returns plain value or array of plain values.

Examples:

  • /openapi/public/branches?fields=id,name,location - only get list of branches with id, name and location attributes

GZIP compression

  • we support GZIP compression of responses. Client must specify header Accept-Encoding: gzip in request in order to use the compression.

Versioning

We use API version in URL (e.g. https://api.airbank.cz/openapi/banking/v1/accounts). Minor changes (see below) that don’t break backwards compatibility do NOT increase API version, e.g. they may happen without prior notice and your application should be ready to handle them.

Minor changes include:

  • adding new resource

  • adding new optional header/URL parameter or optional body attribute to request

  • adding new attribute to response body

  • adding new error codes and messages, provided that error structure is the same

Language

We use English.

Response encoding

Unless stated otherwise, all responses are sent as Content-Type: application/json;charset=UTF-8

HTTP status codes

We use following status codes throughout the API, except for OAuth flow when response codes are prescribed in RFC

  • 200 OK - request was successful

  • 201 Created - request was successfull and resource was created

  • 204 No content - we accepted your request but there is nothing to return (e.g. response is empty)

  • 400 Bad Request - syntax error, e.g. request is missing required parameters/attributes or parameter values are of incorrect type

  • 401 Unauthorized - your API key is wrong or user not authorized (not logged in)

  • 403 Forbidden - access denied (e.g. user / application is not allowed to use the resource)

  • 404 Not Found - resource could not be found

  • 405 Method Not Allowed - specified method is not allowed for resource

  • 422 Unprocessable Entity - validation (semantic) errors. Request is well-formed, but cannot be processed (e.g. payment due date is in past). Errors are specified in response body (see below)

  • 429 Too Many Requests - you exceeded the rate limit (see API usage limits below)

  • 500 Internal Server Error - something went wrong on our side

  • 503 Service Unavailable - there is planned service outage (TODO: should specify response headers with more details on service outage)

API usage limits

Our API has usage limits, meaning number of API calls that your application can perform during specified time period. On each call, your app wil receive currently set limits and remaining quotas in following headers:

X-RateLimit-Limit-[API_NAME]-Minute: 10 - currently set limit of API calls

X-RateLimit-Remaining-[API_NAME]-Minute: 9 - remaining limit of API calls in given time period

If you exceed limits set for your application, you will receive HTTP status 429 with empty body.

Error handling

Besides HTTP status codes, which are the main indication if something goes wrong, we also use errors object to report more details about errors.

Errors object example:

{
    ...

    errors: [
        {
            "code": "ERR_100,
            "message": "Invalid contract number",
            "severity": "ERROR",
            "attribute": "partyAccount.accountNumber",          // optional
            "ticketId": "UAT1:AMS:20160516-091658.450:45e4" // optional
        },
        {
            "code": 352,
            "message": "Insufficiend funds for payment order realization",
            "severity": "WARN"
        },
        {
            "code": 523,
            "message": "This order will trigger currency exchange operation",
            "severity": "INFO"
        }
    ]
}

Error object attributes

attribute name description
code unique error code
message human readable error description (non-localized)
severity error severity (see below)
attribute json path of request attribute that caused the error (optional)
ticketId internal ticket ID, used for error backtracking

There are 3 levels of error severity:

  • ERROR - critical error, execution cannot continue.

  • WARN - non-critical error, execution can continue but further user interaction is advisable (for request to proceed, you MUST specify this error code in override request attribute).

  • INFO - information only, execution can continue without user interaction.

Most important error codes

  • OBJECT_NOT_FOUND - Cannot find required object

  • OBJECT_IN_WRONG_STATE - Cannot perform requested operation in current objects’ state (e.g. withdrawal code cannot be resend because it is inactive, or payment order cannot be edited)

  • INVALID_REQUEST - There are syntax errors in request (missing required parameter, wrong attribute value etc.)

  • FILTER_ERROR - There is an error in filter specification

  • SORT_ERROR - There is an error in sorting specification

  • GENERAL_ERROR - Unspecified (usually unexpected) error; use ticketId attribute to report it.

Formats

  • date and time uses ISO 8601 formatting, e.g.:

    • date is represented as YYYY-mm-dd. Timezone is added when necessary.
    • time is represented as Thh:mm:ss. Timezone is added when necessary.
    • day of week is represented as number 1…7, with 1 being Monday
    • week no. 1 is the week with the year’s first Thursday in it
  • phone numbers uses international format starting with ‘+’ and including country code

  • numbers format number format is defined by JSON standard, e.g. decimals are separated by .

Security

To use public API services like list of branches, you need a valid API key. There is no need for users of your application to log in, or even have any agreement with us.

API key and Client ID & Secret

OAuth2 client_id, client_secret and api_key for accessing protected services can be created by calling the /oauth2/register endpoint.

Notice: API key from /oauth2/register intended for using for calling some services with oauth2 (not for public sevices (/openapi/public/*).

Obtaining API key (for public services only)

You can get API Key in Developers portal for accessing public services (e.g. services that are not bound to current user).

Important: Keep your production API keys safe, as it will identify your application, counts to resource usage limits etc.

Using API key (for public services only)

API key is a 30 character string, that must be passed on each API call in header field called apikey. Example:

curl -H "apikey: 62eb165c070a41d5c1b58d9d3d725ca1" https://api.airbank.cz/openapi/public/branches
  • if you fail to specify apikey, you will receive 401 Unauthorized error and following response body:
{"message":"No API Key found in headers, body or querystring"}
  • if you provide invalid apikey, you will receive 403 Forbidden error and following response body:
{"message":"Invalid authentication credentials"}

Public APIs

This set of APIs doesn’t require user authentication. It does require that you have valid API key though.

Branch detail

GET /openapi/public/v1/branches/own/6b1fdfc70d1164358e26dbb64172ec73
RequestsExisting BranchNon-existing Branch
This response has no content.
Responses200
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "id": "6b1fdfc70d1164358e26dbb64172ec73",
  "name": "nazev",
  "address": {
    "streetAddress": "Legerova 12",
    "city": "Prague",
    "zip": "110 00"
  },
  "phones": [
    "+420 223 112 456",
    "+420 223 112 457"
  ],
  "location": {
    "longitude": 15.6259,
    "latitude": 49.8023
  },
  "openingHours": {
    "isNonstop": false,
    "days": [
      {
        "dayOfWeek": 1,
        "opening": "T10:00:00",
        "closing": "T18:00:00"
      }
    ]
  },
  "services": [
    "CHILDREN"
  ],
  "pictures": [
    "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img1.jpg",
    "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img2.jpg",
    "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img3.jpg"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "branch name"
    },
    "address": {
      "type": "object",
      "properties": {
        "streetAddress": {
          "type": "string",
          "description": "street and number"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      },
      "required": [
        "streetAddress",
        "city",
        "zip"
      ],
      "description": "branch address"
    },
    "phones": {
      "type": "array"
    },
    "location": {
      "type": "object",
      "properties": {
        "longitude": {
          "type": "number"
        },
        "latitude": {
          "type": "number"
        }
      },
      "required": [
        "longitude",
        "latitude"
      ]
    },
    "openingHours": {
      "type": "object",
      "properties": {
        "isNonstop": {
          "type": "boolean",
          "description": "if set to true, days property is omitted"
        },
        "days": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dayOfWeek": {
                "type": "number",
                "description": "day of week for which is opening hours defined"
              },
              "opening": {
                "type": "string"
              },
              "closing": {
                "type": "string"
              }
            },
            "required": [
              "dayOfWeek",
              "opening",
              "closing"
            ]
          },
          "description": "different opening hours for different days. Multiple values can be defined for same day (e.g. for lunch break, there will be two values)"
        }
      },
      "required": [
        "isNonstop"
      ],
      "description": "branch opening hours"
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "CHILDREN",
          "ANIMALS",
          "ATM",
          "DRINK",
          "FOOD"
        ]
      },
      "description": "services provided on branch"
    },
    "pictures": {
      "type": "array"
    }
  },
  "required": [
    "id",
    "name",
    "address",
    "phones",
    "services"
  ]
}
This response has no content.
Responses404

Branch with given ID is not found.

Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "errors": [
    {
      "code": "ERR_1000_SOME_ERROR_CODE",
      "message": "Some error/validation message description",
      "severity": "ERROR",
      "attribute": "accountId",
      "ticketId": "UAT1:AMS:20160516-091658.450:45e4"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "unique internal error code"
          },
          "message": {
            "type": "string",
            "description": "human readable error description (non-localized)"
          },
          "severity": {
            "type": "string",
            "enum": [
              "ERROR",
              "WARN",
              "INFO"
            ]
          },
          "attribute": {
            "type": "string",
            "description": "json path of request attribute that caused the error (if applicable)"
          },
          "ticketId": {
            "type": "string",
            "description": "internal ticket ID, used for error backtracking"
          }
        },
        "required": [
          "code",
          "message",
          "severity"
        ]
      }
    }
  },
  "required": [
    "errors"
  ]
}

Get branch details
GET/openapi/public/v1/branches/own/{id}

Get single branch details

URI Parameters
HideShow
id
string (required) Example: 6b1fdfc70d1164358e26dbb64172ec73

ID of required branch


Branches

GET /openapi/public/v1/branches/own
Requestsexample 1
This response has no content.
Responses200
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "data": [
    {
      "id": "6b1fdfc70d1164358e26dbb64172ec73",
      "name": "nazev",
      "address": {
        "streetAddress": "Legerova 12",
        "city": "Prague",
        "zip": "110 00"
      },
      "phones": [
        "+420 223 112 456",
        "+420 223 112 457"
      ],
      "location": {
        "longitude": 15.6259,
        "latitude": 49.8023
      },
      "openingHours": {
        "isNonstop": false,
        "days": [
          {
            "dayOfWeek": 1,
            "opening": "T10:00:00",
            "closing": "T18:00:00"
          }
        ]
      },
      "services": [
        "CHILDREN"
      ],
      "pictures": [
        "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img1.jpg",
        "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img2.jpg",
        "http://www.airbank.cz/cs/kdenasnajdete/nasepobocky/praha/prahaskolskavodickova/galerie/img3.jpg"
      ]
    }
  ],
  "pagingInfo": {
    "itemsPerPage": 10,
    "nextPage": "transactions?sort=category&limit=10&after=25",
    "prevPage": "transactions?sort=category&limit=10&before=25"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "branch name"
          },
          "address": {
            "type": "object",
            "properties": {
              "streetAddress": {
                "type": "string",
                "description": "street and number"
              },
              "city": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              }
            },
            "required": [
              "streetAddress",
              "city",
              "zip"
            ],
            "description": "branch address"
          },
          "phones": {
            "type": "array"
          },
          "location": {
            "type": "object",
            "properties": {
              "longitude": {
                "type": "number"
              },
              "latitude": {
                "type": "number"
              }
            },
            "required": [
              "longitude",
              "latitude"
            ]
          },
          "openingHours": {
            "type": "object",
            "properties": {
              "isNonstop": {
                "type": "boolean",
                "description": "if set to true, days property is omitted"
              },
              "days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "dayOfWeek": {
                      "type": "number",
                      "description": "day of week for which is opening hours defined"
                    },
                    "opening": {
                      "type": "string"
                    },
                    "closing": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "dayOfWeek",
                    "opening",
                    "closing"
                  ]
                },
                "description": "different opening hours for different days. Multiple values can be defined for same day (e.g. for lunch break, there will be two values)"
              }
            },
            "required": [
              "isNonstop"
            ],
            "description": "branch opening hours"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CHILDREN",
                "ANIMALS",
                "ATM",
                "DRINK",
                "FOOD"
              ]
            },
            "description": "services provided on branch"
          },
          "pictures": {
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "address",
          "phones",
          "services"
        ]
      }
    },
    "pagingInfo": {
      "type": "object",
      "properties": {
        "itemsPerPage": {
          "type": "number",
          "description": "number of items per page"
        },
        "nextPage": {
          "type": "string",
          "description": "request to retrieve next page. Either nextPage or previousPage is returned, depending whether you specify after or before parameter (or none, if you retrieve whole collection)."
        },
        "prevPage": {
          "type": "string",
          "description": "request to retrieve previous page."
        }
      },
      "required": [
        "itemsPerPage"
      ]
    }
  },
  "required": [
    "data"
  ]
}

Get list of branches
GET/openapi/public/v1/branches/own

Resource for getting own branches informations.

feature supported by resource
paging yes
sorting no
filtering no

This resource supports paging. As a value to before and after parameters, use id attribute.

User stories

“As mobile app developer, I want my app to display list of nearest branches so that user can choose one to visit.”

“As developer, I want to get list of branches, so that I can display them on map.”


ATM detail

GET /openapi/public/v1/atms/own/71F10305B20F4CCAD1A016E3B3BA112F
RequestsExisting ATMNon-existing ATM
This response has no content.
Responses200
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "id": "7FB4F5327C71AB95DBBADF8C944BC171",
  "address": {
    "streetAddress": "Legerova 12",
    "city": "Prague",
    "zip": "110 00"
  },
  "location": {
    "longitude": 15.6259,
    "latitude": 49.8023
  },
  "openingHoursWithdrawal": {
    "isNonstop": false,
    "days": [
      {
        "dayOfWeek": 1,
        "opening": "T10:00:00",
        "closing": "T18:00:00"
      }
    ]
  },
  "openingHoursDeposit": {
    "isNonstop": false,
    "days": [
      {
        "dayOfWeek": 1,
        "opening": "T10:00:00",
        "closing": "T18:00:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "address": {
      "type": "object",
      "properties": {
        "streetAddress": {
          "type": "string",
          "description": "street and number"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      },
      "required": [
        "streetAddress",
        "city",
        "zip"
      ],
      "description": "ATM address"
    },
    "location": {
      "type": "object",
      "properties": {
        "longitude": {
          "type": "number"
        },
        "latitude": {
          "type": "number"
        }
      },
      "required": [
        "longitude",
        "latitude"
      ]
    },
    "openingHoursWithdrawal": {
      "type": "object",
      "properties": {
        "isNonstop": {
          "type": "boolean",
          "description": "if set to true, days property is omitted"
        },
        "days": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dayOfWeek": {
                "type": "number",
                "description": "day of week for which is opening hours defined"
              },
              "opening": {
                "type": "string"
              },
              "closing": {
                "type": "string"
              }
            },
            "required": [
              "dayOfWeek",
              "opening",
              "closing"
            ]
          },
          "description": "different opening hours for different days. Multiple values can be defined for same day (e.g. for lunch break, there will be two values)"
        }
      },
      "required": [
        "isNonstop"
      ],
      "description": "ATM opening hours for money withdrawal"
    },
    "openingHoursDeposit": {
      "type": "object",
      "properties": {
        "isNonstop": {
          "type": "boolean",
          "description": "if set to true, days property is omitted"
        },
        "days": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dayOfWeek": {
                "type": "number",
                "description": "day of week for which is opening hours defined"
              },
              "opening": {
                "type": "string"
              },
              "closing": {
                "type": "string"
              }
            },
            "required": [
              "dayOfWeek",
              "opening",
              "closing"
            ]
          },
          "description": "different opening hours for different days. Multiple values can be defined for same day (e.g. for lunch break, there will be two values)"
        }
      },
      "required": [
        "isNonstop"
      ],
      "description": "ATM opening hours for money deposit"
    }
  },
  "required": [
    "id",
    "address",
    "location",
    "openingHoursWithdrawal"
  ]
}
This response has no content.
Responses404

ATM with gived ID is not found.

Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "errors": [
    {
      "code": "ERR_1000_SOME_ERROR_CODE",
      "message": "Some error/validation message description",
      "severity": "ERROR",
      "attribute": "accountId",
      "ticketId": "UAT1:AMS:20160516-091658.450:45e4"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "unique internal error code"
          },
          "message": {
            "type": "string",
            "description": "human readable error description (non-localized)"
          },
          "severity": {
            "type": "string",
            "enum": [
              "ERROR",
              "WARN",
              "INFO"
            ]
          },
          "attribute": {
            "type": "string",
            "description": "json path of request attribute that caused the error (if applicable)"
          },
          "ticketId": {
            "type": "string",
            "description": "internal ticket ID, used for error backtracking"
          }
        },
        "required": [
          "code",
          "message",
          "severity"
        ]
      }
    }
  },
  "required": [
    "errors"
  ]
}

Get ATM details
GET/openapi/public/v1/atms/own/{id}

Get single ATM details.

URI Parameters
HideShow
id
string (required) Example: 71F10305B20F4CCAD1A016E3B3BA112F

ID of requested ATM


ATMs

GET /openapi/public/v1/atms/own
Requestsexample 1
This response has no content.
Responses200
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "data": [
    {
      "id": "7FB4F5327C71AB95DBBADF8C944BC171",
      "address": {
        "streetAddress": "Legerova 12",
        "city": "Prague",
        "zip": "110 00"
      },
      "location": {
        "longitude": 15.6259,
        "latitude": 49.8023
      },
      "openingHoursWithdrawal": {
        "isNonstop": false,
        "days": [
          {
            "dayOfWeek": 1,
            "opening": "T10:00:00",
            "closing": "T18:00:00"
          }
        ]
      },
      "openingHoursDeposit": {
        "isNonstop": false,
        "days": [
          {
            "dayOfWeek": 1,
            "opening": "T10:00:00",
            "closing": "T18:00:00"
          }
        ]
      }
    }
  ],
  "pagingInfo": {
    "itemsPerPage": 10,
    "nextPage": "transactions?sort=category&limit=10&after=25",
    "prevPage": "transactions?sort=category&limit=10&before=25"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    },
    "pagingInfo": {
      "type": "object",
      "properties": {
        "itemsPerPage": {
          "type": "number",
          "description": "number of items per page"
        },
        "nextPage": {
          "type": "string",
          "description": "request to retrieve next page. Either nextPage or previousPage is returned, depending whether you specify after or before parameter (or none, if you retrieve whole collection)."
        },
        "prevPage": {
          "type": "string",
          "description": "request to retrieve previous page."
        }
      },
      "required": [
        "itemsPerPage"
      ]
    }
  },
  "required": [
    "data"
  ]
}

Get list of ATMs
GET/openapi/public/v1/atms/own

Resource for getting own ATMs informations. Only bank own ATMs informations are available.

Multiple ATMs at the same location are represented by single item. Opening hours for deposit and withdrawal may differ, as ATM used for deposits might be inside branch that is locked outside business hours.

feature supported by resource
paging yes
sorting no
filtering no

This resource supports paging. As a value to before and after parameters, use id attribute.

User stories

“As mobile app developer, I want my app to display list of nearest ATMs so that user can choose one to visit.”

“As developer, I want to get list of ATMs, so that I can display them on map.”


Foreign exchange rates

GET /openapi/public/v1/fxrates
Responses200
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "data": [
    {
      "currencyCode": "EUR",
      "lot": 1,
      "cash": {
        "buy": 31.2,
        "sell": 31.5,
        "mid": 31.35
      },
      "nonCash": {
        "buy": 31.25,
        "sell": 31.5,
        "mid": 31.33
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "currencyCode": {
            "type": "string",
            "description": "currency code according to ISO 4217"
          },
          "lot": {
            "type": "number"
          },
          "cash": {
            "type": "object",
            "properties": {
              "buy": {
                "type": "number",
                "description": "bank buys"
              },
              "sell": {
                "type": "number",
                "description": "bank sells"
              },
              "mid": {
                "type": "number",
                "description": "middle"
              }
            },
            "required": [
              "mid"
            ],
            "description": "rates for cash transactions"
          },
          "nonCash": {
            "type": "object",
            "properties": {
              "buy": {
                "type": "number",
                "description": "bank buys"
              },
              "sell": {
                "type": "number",
                "description": "bank sells"
              },
              "mid": {
                "type": "number",
                "description": "middle"
              }
            },
            "required": [
              "mid"
            ],
            "description": "rates for non-cash transactions"
          }
        },
        "required": [
          "currencyCode",
          "lot",
          "nonCash"
        ]
      }
    }
  },
  "required": [
    "data"
  ]
}

Get FX rates
GET/openapi/public/v1/fxrates

Get foreign exchange rates related to user home currency.

feature supported by resource
paging no
sorting no
filtering no

User stories

“As developer, I want to get information about FX rates, so that I can display them to user.”

“As mobile developer, I want to get information about FX rates, so that I can recalculate expenses to users’ home currency.”


Generated by aglio on 15 Sep 2023