Dynamic AIS Specific Documentation
Overview
Dynamic Account Information Services (AIS) Sandbox API consists of listed endpoints. These endpoints can be used to manage your own test accounts and transactions in the sandbox. These endpoints are sandbox only and can be used to add and manage your own test data for sandbox testing.
Dynamic AIS sandbox API endpoints
The Dynamic AIS sandbox API has three endpoints:
Endpoint | Supported HTTP Methods | Description |
---|---|---|
/accounts | POST | Create account |
/accounts/users | GET | Get all users |
/accounts/users/<USER_ID> | DEL | Remove user |
/accounts/<ACCOUNT_ID> | DELETE | Delete account |
/accounts/<ACCOUNT_ID>/transactions | POST | Create transaction |
/accounts/<ACCOUNT_ID>/users/adduser | PATCH | Add user to account |
/accounts/<ACCOUNT_ID>/users/removeuser | PATCH | Remove user from account |
The create account endpoint can be used to create your own account test data in the sandbox. Please note that created data is not guaranteed to be kept forever and is purged regularly. The delete account endpoint can be used to delete an account that you have created in the sandbox. The create transaction endpoint can be used to add transactions to an account that you have created in the sandbox. You can as well create user and add him to an account using add user to account or get all users listed using dedicated endpoint. In addition you can remove user or remove user from account.
Sandbox API examples
Here you can find examples how to use the Dynamic AIS Sandbox API endpoints.
Note that in all of the example cURL commands you must change the
X-IBM-Client-Id
,X-IBM-Client-Secret
andAuthorization: Bearer
header values to the correct ones.
You can find the Client ID, and Client Secret from your app console and the Bearer is generated when you log in.
Remember to replace the <ACCOUNT-ID>
URL parameter by correct values in the cURL examples below.
cURL examples
Example: create account (sandbox only)
The following cURL command can be used to create the account list after correct Application ID, Client Secret and Access Token are substituted into it:
This endpoint URL has the following form:
<API_URL>/business/v4/accounts
This endpoint supports POST HTTP method.
The following cURL can be used to create account for this endpoint:
curl -X POST \
<API_URL>/business/v4/accounts/ \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-ibm-client-id: <CLIENT_ID>' \
-H 'x-ibm-client-secret: <CLIENT_SECRET>' \
-d '{
"country": "FI",
"account_numbers": [
{
"value": "FI7511345523141234",
"_type": "IBAN"
}
],
"currency": "EUR",
"account_name": "Account owner name",
"product": "PERSONKONTO",
"account_type": "Current",
"available_balance": "22491.10",
"booked_balance": "22491.10",
"value_dated_balance": "32491.10",
"status": "OPEN"
}'
It is important to set valid country
and account_numbers
parameters. They should be relevant to current access token acquired via the Access Authorization flow. For example if the access token is a Norway token then
country
should be set to “NO” and account_numbers
should contain valid Norway BBAN(_type
= BBAN_NO) and IBAN.
Example error response:
{
"_type": "ExternalErrorResponse",
"group_header": {
"message_identification": "QLjxy1T2psk",
"creation_date_time": "2019-03-07T09:03:51.936Z",
"http_code": 400
},
"error": {
"_type": "ExternalError",
"http_code": 400,
"request": {
"_type": "ExternalRequestEcho",
"message_identifier": "QLjxy1T2psk",
"url": "/business/v4/accounts/"
},
"failures": [
{
"code": "error.validation",
"description": "Invalid accountNumbers. It should contains number with type: BBAN_NO",
"path": "accountNumbers"
},
{
"code": "error.validation",
"description": "Invalid IBAN",
"path": "accountNumber.value"
}
]
}
}
For success response, HTTP status 201 and Location
header will be returned. In the above example, Location
will be: /business/v4/accounts/FI7511345523141234-EUR
Example: delete account (sandbox only)
The following cURL command can be used to delete the account list after correct Application ID, AccountID, Client Secret, and Access Token are substituted into it. You can find <ACCOUNT_ID>' in the response for the account create call, in the "account_number": "value" field. Here is an example for the
<ACCOUNT_ID>` = “FI1350001520000081”.
This endpoint URL has the following form:
<API_URL>/business/v4/accounts/<ACCOUNT_ID>
The following cURL can be used to delete account for this endpoint:
curl -X DELETE \
<API_URL>/business/v4/accounts/FI7511345523141234-EUR \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-H 'x-ibm-client-id: <CLIENT_ID>' \
-H 'x-ibm-client-secret: <CLIENT_SECRET>'
For success response, HTTP status 204 will be returned.
Example: create transaction (sandbox only)
The following cURL command can be used to create transactions for the account <ACCOUNT_ID>
, after correct Application ID, AccountID, Client Secret, and Access Token are substituted into it. You can find <ACCOUNT_ID>' in the response for the account create call, in the "account_number": "value" field. Here is an example for the
<ACCOUNT_ID>` = “FI1350001520000081”.
The endpoint URL has the following form:
<API_URL>/business/v4/accounts/<ACCOUNT-ID>/transactions'
This endpoint supports POST HTTP method. The following cURL can be used to create transaction for this endpoint:
curl -X POST \
<API_URL>/business/v4/accounts/FI7511345523141234-EUR/transactions \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-H 'content-type: application/json' \
-H 'x-ibm-client-id: <CLIENT_ID>' \
-H 'x-ibm-client-secret: <CLIENT_SECRET>' \
-d '{
"amount": 623.27,
"counterparty_name": "Counterparty name",
"currency": "EUR",
"message": "Message text",
"narrative": "Narrative text",
"original_currency": "EUR",
"status": "reserved",
"type_description": "Type description"
}'
For success response, HTTP status 201 will be returned.