Overview

Spectre API aims to make requesting financial information from various providers as simple as a cURL. The API allows you to perform several important procedures, such as:

  • Securely import bank data from multiple countries;
  • Import data from online payment systems (Payoneer, PayPal, Yandex Money, etc.);
  • Automatically synchronize accounts and transactions on a daily basis;
  • Automatically categorize financial transactions;
  • Keep a well-organized and up-to-date list of currency rates.

If you have any questions regarding what can be done with Spectre API, feel free to contact us.

Integrations

The Salt Edge platform is incredibly easy to integrate with. We’ve built the Salt Edge Connect interface so your application could start importing your users’ financial data in a matter of minutes.

However, if you think your application could benefit more from native look and feel, you can always contact us and we can discuss what would be the best solution for your app.

Formats

We use JSON for all the requests and responses, including the errors.

Glossary

Most of the API revolves around several important concepts:

  • Client - an application consuming Spectre API;
  • Customer - a customer of the client who is consuming Spectre API;
  • Provider - a bank or an online payments system;
  • Login - the central entity of the API, representing a connection between a customer’s bank and Salt Edge;
  • Attempt - an attempt which is created when user connects his financial institution;
  • Account - one of the accounts associated with a login. It can be a credit card account, a savings account, one of the online accounts, etc;
  • Transaction - a single financial transaction made within an account;
  • Category - one of the 79 categories assigned to a transaction.

Following the guides

You can start with Authentication and follow the links in the sidebar. If you have any questions, contact us anytime using our contact form.

Before going LIVE

In order to have the SaltEdge accounts transferred to LIVE mode the following steps should be followed:

  • Please provide SaltEdge representative with app’s test account to verify Spectre API integration;
  • Be sure to provide signature in accordance with the instructions;
  • If your application is running on mobile devices, desktops, tablets, which are under user’s control, please use app authentication;
  • Your application should be working correctly with all of the fake banks;
  • Your application should not create any duplicated customers (i.e. connecting the same provider with the same credentials, for the same user, using different customer entities);
  • The end user should be able to create, reconnect, refresh and delete logins;
  • After deleting a user from your system, you should send a delete request;
  • Your application should handle correctly the refresh_timeout in provider entity;
  • Your application should handle correctly the LoginDuplicated error;
  • Your application should show the instructions for providers;
  • Your application should not allow usage of disabled providers;
  • Your application should use the duplicate route for a better user experience;
  • The Multi-factor authentication must be enabled for your account and all your Client users;
  • In order to avoid legal issues with end-users and data providers, the client should ensure that end-users read and agree to End User License Terms.

After all of the verifications have been made by a SaltEdge representative, the account will be transferred to LIVE mode.

Know Your Customer

Account holder info

This feature allows the client to fetch essential information about customers from their bank accounts to be further used with the purpose of KYC verification. Make sure to contact our support team to enable holder info for your client account.

Upon enabling the feature you will receive a holder_info field inside provider object. This field will provide information on the account holder details that can be fetched from the queried provider.

Login attribute holder_info returns the information fetched from customer’s account with the particular provider.

Depending on the provider, the following attributes might be returned in the holder_info:

  • names - returns the name(s) on the customer’s account with the provider, e.g. ["John Doe"];
  • emails - returns email(s) registered within customer’s account with the provider, e.g. ["john.doe@example.com", "johndoe@gmail.com"];
  • phone_numbers - returns the phone number(s) registered in the customer’s account with the provider, e.g. ["+16135550175", "+40981233422"];
  • addresses - returns the address(es) on the customer’s account with the provider, e.g.

For some providers extra fields, e.g. Social Security Number or Cadastro de Pessoas Físicas, can also be returned.

Holder info can be fetched independently or along with other login information, e.g. accounts and transactions.

In order to test the holder_info attribute, you can connect the fakebank_simple_xf fake provider.

Sample response (as provider attribute)

"holder_info": ["names", "emails"]

Sample response (as login attribute)

{
  "holder_info": {
    "names": ["John Doe"],
    "emails": ["john.doe@example.com"]
    "addresses": [
      {
        "city": "Cupertino",
        "state": "CA",
        "street": "1 Infinite Loop",
        "country_code": "US",
        "post_code": "95014"
      }
    ]
  }
}

Salt Edge Connect

You can easily test Connect from your Dashboard page by pressing Create Connection button.

After your application has received a token for connecting or reconnecting a login, you can redirect your user to the Salt Edge Connect URL. There, they will see a screen that lets them pick a country and a provider.

Your user will also be asked to input their credentials and, if needed, any of the interactive credentials.

For example, a user picked Italy as the country and the American Express as the provider. This is what they will see:

To start the fetching process, they will have to press “Connect”. Afterwards, they will be informed about their connection progress.

After the fetching is done, the user will be redirected back to your application.

Embeding connect in your appication

When you request for a connect token, you can pass an optional argument javascript_callback_type. This argument enables one of the following notification methods:

Salt Edge Connect will send any of these callbacks only in case when javascript_callback_type was specified in the token request.

Iframe injection

When not using the SDKs, your app is responsible for capturing the URLs, if you wish to be notified about the connect process.

The inserted URL has a custom scheme and host. The scheme of the URL is saltbridge and the host is connect. Here’s an example of such a URL:

saltbridge://connect/{"data":{"login_id":"997674448","stage":"fetching","secret":"Oqws977brjJUfXbEnGqHNsIRl8PytSL60T7JIsRBCZM", "custom_fields":{"key":"value"}}}

The URL will be URLEncoded (percent-encoded), the URL above is not URLEncoded to preserve it’s readability.

Once your app has captured the inserted URL, it has to serialize the JSON-encoded URL path following the scheme and the host. Here’s another example, this time of a duplicated login callback:

saltbridge://connect/{"data":{"duplicated_login_id":"994317674","stage":"error","custom_fields":{"key":"value"}}}

Once your app has decoded the URL path, it can start performing several actions like accounts listing or error handling.

External object

On Windows Store app platform you can use event handler for ScriptNotify event of WebView. Your code should handle window.external.notify(args) call, ScriptNotify will fire and you’ll get the args in Value property of NotifyEventArgs parameter.

Remember to add https://saltedge.com and https://*.saltedge.com to Content URIs in Package.appxmanifest.

External Notify Example

protected override void OnNavigatedTo(NavigationEventArgs e) {
  browser.ScriptNotify += browser_ScriptNotify;
}

private void browser_ScriptNotify(object sender, NotifyEventArgs e) {
  var serializedLogin = e.Value;
}

serializedLogin

{
  "data": {
    "login_id":"997674448",
    "stage":"fetching",
    "secret":"Oqws977brjJUfXbEnGqHNsIRl8PytSL60T7JIsRBCZM",
    "custom_fields": {
      "key":"value"
    }
  }
}

Post message

If you access the connect page wrapped in an iframe, you can use Window.postMessage which performs cross-origin communication

Post Message Example

window.addEventListener("message", function(event) {
    console.log(JSON.parse(event.data))
  }
)

serializedLogin

{
  "data": {
    "login_id":"997674448",
    "stage":"fetching",
    "secret":"Oqws977brjJUfXbEnGqHNsIRl8PytSL60T7JIsRBCZM",
    "custom_fields": {
      "key":"value"
    }
  }
}

External notify

On Windows Store app platform you can use event handler for ScriptNotify event of WebView. Your code should handle window.external.notify(args) call, ScriptNotify will fire and you’ll get the args in Value property of NotifyEventArgs parameter.

Remember to add https://saltedge.com and https://*.saltedge.com to Content URIs in Package.appxmanifest.

External Notify Example

protected override void OnNavigatedTo(NavigationEventArgs e) {
  browser.ScriptNotify += browser_ScriptNotify;
}

private void browser_ScriptNotify(object sender, NotifyEventArgs e) {
  var serializedLogin = e.Value;
}

serializedLogin

{
  "data": {
    "login_id":"997674448",
    "stage":"fetching",
    "secret":"Oqws977brjJUfXbEnGqHNsIRl8PytSL60T7JIsRBCZM",
    "custom_fields": {
      "key":"value"
    }
  }
}

API Connect

If you do not wish to connect logins using Salt Edge Connect, you can perform all the login actions using our API.

In order to connect a new login, you should use the logins create route described in the API reference. After connecting the login, your application will receive the corresponding callbacks so you can fetch your newly created login.

If the login you wish to connect is an interactive one, you will receive the interactive callback specified in your app’s profile, which means that you have to use the interactive route and follow the instructions specified in the API reference.

Refreshing data

If the login had an error while connecting, and it had an InvalidCredentials error during the fetching process, you should reconnect the login and send the correct credentials in your request body.

When the login is connected correctly, and you received all the accounts and transactions details, you can refresh the login anytime, and keep the login data up-to-date.

Note

API Connect requires high security standards for data handling on client’s side. This integration method is only available for the certified and/or selected partners. For more information, feel free to contact us.

Callbacks

The most important parts of Spectre API (e.g. Login management) are asynchronous. Applications can poll Spectre API in order to retrieve the updated information.

Every Web application has to provide a set of valid URLs which we will use to notify about the fetching progress. Other applications can poll Spectre API in order to retrieve the updated information.

There are several common points about the request we send to the callback URLs provided by the client:

  • The Content-Type header is application/json;
  • There is a Signature header that identifies the request was signed by Spectre API;
  • The request method is always POST;
  • The JSON object sent will always have a data field;
  • The meta field will display the version of the callbacks API.

You can set the callback URLs for your application by accessing your callbacks page.

Due to security reasons, the callbacks can be sent to ports 80/HTTP (in test and pending modes) and 443/HTTPS (in test, pending and live modes) only!

Signature

In order the client to identify that the request is coming from Spectre API, there is a Signature header in the request.

Signature - base64 encoded SHA1 signature of the string represented in the form callback_url|post_body - 2 parameters concatenated with a vertical bar |, signed with the Spectre API’s private key, which corresponds to the following public key:

  -----BEGIN PUBLIC KEY-----
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq/191bAXPj7Rm+rmmjF4
  RzX3Xrtj/tUg+h3Yik1MnFQWkmrwRiW0mnUqSWbbcPdQL/s3XReyyaaxePbSfLep
  KOMx/HllnimwgJFqA2Tqix+Yxobab7bV8K/QoM2fkH57i38IfL7MZX5bInqczysN
  u2NQ6cydxAe7zolfMgtHkN4cUVYOsNm7tWK0OJgM+VHYvzNDFnbrkLRcf5LD2jh2
  4E9rSvQfpqckabz2F3TYu1v5Ybf2RXIxehW0zEEMGvLZMOvO9fYW+H8GHjj9GyRJ
  pSw2GjKx51YN3FsN45YI/ElnEitjgCZmq8CuZvUItXooKqNsfAp0smChBC2YIJ1n
  4wIDAQAB
  -----END PUBLIC KEY-----

An example of the string that is to be used to generate the signature looks as follows:

https://www.client.com/api/callbacks/success|{"data":{"login_id":1234,"customer_id":4321,"custom_fields":{}},"meta":{"version":"3","time":"2017-01-03T13:00:28Z"}}

The pseudocode that we use to generate the signature looks like this:

base64(sha1_signature(private_key, "callback_url|post_body")))

Requests cycle

To avoid unnecessary requests, performance issues and fetching all data, use the following diagramm:

Success

We send a callback to your application’s success URL whenever any manually triggered operation has caused a change in the data we store for a particular login.

For instance, after you’ve redirected your user to the Connect page and they have selected their provider, filled in the credentials and pressed Connect, we’ll send you a success callback. This callback will contain the customer identifier and the ID of the newly created login. Afterwards, your application will be able to use the show login route and query the information about this login. You could also fetch the login’s accounts and query the accounts (if any exist at the moment we sent the callback).

Whenever we have more information about the login, we will send another success callback.

A success callback marks a change in the data and you can generally expect from one to three success callbacks with the same payload within several minutes. We recommend that your application fetch the full login data, along with the accounts and transactions at each callback, as some information might change during the fetching process.

For instance, when your user has created a login using Salt Edge Connect, we will send the following success callback:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445,
    "custom_fields": { "key": "value" }
  },
  "meta": {
    "version": "3",
    "time": "2019-02-19T15:31:05.335Z"
  }
}

You can now use the show login route and obtain the provider, country and some other attributes of the new login.

Failure

Sometimes we fail to fetch the information from the provider’s page. It might happen because the interactive data was not sent by the user, the credentials are wrong or we could not perform one of the steps of the fetching process. In this case, you will receive a fail callback, containing a JSON similar to the following:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445,
    "custom_fields": { "key": "value" },
    "error_class": "InvalidCredentials",
    "error_message": "Invalid credentials."
  },
  "meta": {
    "version": "3",
    "time": "2019-02-19T15:31:05.337Z"
  }
}

After you get this callback, you need to request the login to check for its updates. Please note that even if there’s an error, we still store the login.

If you would like to delete the erroneous login, you can use the remove login route. In case of an InvalidCredentials error, we recommend you to use a Reconnect.

In order to avoid login duplication errors, when you request the login after a fail callback, we recommend you remove the login in case the login’s last_fail_error_class is InvalidCredentials and the login has no accounts.

Additional callbacks

There are three additional callbacks that your app needs to implement in order to use the API-only version of Spectre.

Notify

Since you issue a create request to create a Login, Salt Edge can inform you about the progress the new login is going through using a Notify callback.

Your app can expect the notify callback several times, depending on the type of the login, but you can use this information to inform your user about what’s happening with their connection.

The possible stages sent in a notify callback are as follows:

  • start - the fetching process has just begun;
  • connect - connecting to the data source;
  • interactive - waiting for the interactive credentials;
  • fetch_holder_info - fetching the information about account holder;
  • fetch_accounts - fetching the accounts;
  • fetch_recent - fetching the data for a recent period (several months);
  • fetch_full - fetching the data for a longer period;
  • disconnect - disconnecting from the data source;
  • finish - wrapping up the fetching process.

Note that for some of the logins, you might not receive all the stages.

Here’s an example callback sent to the /notify route of your app:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445,
    "custom_fields": { "key": "value" },
    "stage": "start"
  },
  "meta": {
    "version": "3",
    "time": "2019-02-18T15:31:05Z"
  }
}

Interactive

Some of the providers require an additional step before signing in, asking users to input an SMS, Token, solve a CAPTCHA, etc.

Whenever we encounter that the login requires an interactive step, we will send the interactive callback to the interactive route set in your app’s profile. Your app should prompt the user for the interactive credentials and send them to the interactive route.

We also send a snippet of HTML so that it would be easier for your app to display the CAPTCHA or image to the user. If the provider requires filling a CAPTCHA, the img tag in the HTML will contain the image URL.

During this process, the login’s stage will be set to interactive.

The interactive callback should contain the values of the interactive_credentials field from the corresponding provider.

Here’s an example callback sent to your app’s /interactive route:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445,
    "custom_fields": { "key": "value" },
    "stage": "interactive",
    "html": "<div id='interactive'><img src='https://docs.saltedge.com/assets/images/saltedge_captcha.png' width='10' height='10' alt='some description' title='some description'></div>",
    "session_expires_at": "2019-02-18T16:31:05Z",
    "interactive_fields_names": ["image"]
  },
  "meta": {
    "version": "3",
    "time": "2019-02-18T15:31:05Z"
  }
}

Destroy

Whenever a login gets removed, we will send a callback to your application’s destroy URL, if such exists.

Here’s an example callback sent to your app’s /destroy route:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445
  },
  "meta": {
    "version": "3",
    "time": "2013-05-17T14:29:35Z"
  }
}

Service

Whenever the login had issues in the past and a change was made in login’s provider codebase, your application will receive a callback telling that a refresh is needed in order to update login’s data.

The possible reasons sent in a service callback are as follows:

  • fixed - a fix was made;
  • updated - an update was made;

Here’s an example callback sent to the /service route of your app:

{
  "data": {
    "login_id": 123,
    "customer_id": 34445,
    "custom_fields": { "key": "value" },
    "reason": "updated"
  },
  "meta": {
    "version": "3",
    "time": "2019-02-18T15:31:05Z"
  }
}

Errors

The API can return multiple errors for any operation, each having its meaning and usage.

Error attributes

error_class
string

the class of the error, one of the listed below

error_message
string

a message describing the error

request
object

the body of the request that caused the error

Error codes

[400] Bad Request
[404] Not Found
[406] Not Acceptable
[409] Duplicated

Sample response

{
  "error_class": "LoginNotFound",
  "error_message": "Login with id: '987' was not found.",
  "request": {
    "login_id": 987
  }
}

Errors list

AccountNotFound

An account with the sent account_id could not be found

ActionNotAllowed

The client has no access to the required route

AllAccountsExcluded

You have excluded all the accounts from the login fetching process

AttemptNotFound

An attempt with such id does not exist

BatchSizeLimitExceeded

More than 100 objects were sent in the request (100 is the limit)

CategorizationLimitReached

One client can categorize at most 1000 transactions per day

ClientDisabled

The client has been disabled. You can find out more about the disabled status on Disabled guides page

ClientIdNotProvided

The Client-id was not provided in request headers

ClientNotFound

The Client-id and Client-secret fields do not coincide

ClientPending

The client is pending approval. You can find out more about the pending status on Pending guides page

ClientRestricted

The client is in the Restricted state. You can find out more about the restricted status on Restricted guides page

ConnectionFailed

Some network errors appear while fetching data

ConnectionLost

Internet connection was lost in the process

CountryNotFound

Sending a country_code that is not present in our system

CustomerNotFound

A customer with such customer_id could not be found

CredentialsNotMatch

New login credentials do not match old ones on reconnect

CustomFieldsSizeTooBig

The custom_fields object has more than 1 KB

CustomFieldsFormatInvalid

The custom_fields field is not of type object

DateFormatInvalid

We have received an invalid Date format

DateOutOfRange

Sending a date value that does not fit in admissible range

DuplicatedCustomer

The customer you are trying to create already exists

EmailInvalid

The email is invalid

ExecutionTimeout

The whole fetching process took too long to execute

ExpiresAtInvalid

The Expires-at header is invalid, or is set to more than 1 hour from now in UTC

FetchingTimeout

One of the steps of the fetching process took too long to execute

FetchTypeNotAllowed

The value of fetch_type parameter is not allowed

FileError

There were errors while uploading and processing files

FileNotProvided

Provider with the file mode was chosen, but no file was uploaded before creating or reconnecting a login

FileNotSaved

File was not saved because of an error

HolderInfoNotSupported

Fetching holder info for this provider is not supported

IdentifierInvalid

Invalid identifier sent for identifying the customer

InteractiveAdapterTimeout

The interactive step of the fetching process took too long to execute

InteractiveTimeout

It took too long to respond to the interactive question

InternalServerError

An internal error has occured

InvalidCredentials

The customer tried to connect/reconnect a login with invalid credentials

InvalidEncoding

Invalid JSON encoded values

InvalidFromDate

Invalid from_date value, whether out of range or wrong date format

InvalidInteractiveCredentials

Interactive credentials that were sent are wrong

InvalidToDate

Invalid to_date value, whether out of range or wrong date format

JsonParseError

We have received some other request format instead of JSON, or the body could not be parsed

LoginAlreadyProcessing

The login is already being processed

LoginCannotBeRefreshed

Login cannot be refreshed right now

LoginDisabled

The customer tried to connect, reconnect or fetch a login, but it appears to be disabled

LoginDuplicated

The client tried to create a login that already exists

LoginFetchingStopped

Login fetching had stopped because of fetching timeout or login was deleted during fetch process

LoginLimitReached

The client tried to create more logins than possible for a client which is in Test or Pending status

LoginNotFound

We could not find a login with the requested login_id

MissingExpiresAt

The Expires-at field is missing in the headers

MissingSignature

The Signature field is missing in the headers

ProviderAccessNotGranted

The customer denied access to his data from the provider’s page

ProviderDisabled

The accessed provider is disabled

ProviderError

There’s an error on the provider’s side which obstructs us from obtaining the data for the login

ProviderInactive

The accessed provider is inactive at the moment

ProviderNotFound

Sending a provider_code that is not present in our system

ProviderNotInteractive

The login’s provider has no interactive step

ProviderUnavailable

The provider is temporary unavailable

PublicKeyNotProvided

The client did not provide the public key in his account information

RateLimitExceeded

Too many logins are being processed at the same time from one application

RequestExpired

The request has expired, took longer than mentioned in the Expires-at header

ReturnURLInvalid

The return_to URL is invalid

ReturnURLTooLong

The return_to URL exceeds 2040 characters

RouteNotFound

The action you are trying to access deos not exist

SecretNotProvided

The App-secret or Service-secret was not provided in request headers

SignatureNotMatch

The Signature header does not match with the correct one

TooManyRequests

Too many requests have occured for connecting/reconnecting a login from one IP address in a small period of time

TransactionNotFound

A transaction with the sent transaction_id could not be found

ValueOutOfRange

Sending a value (e.g. id) which exceeds integer limit

WrongClientToken

We have received a wrong combination of customer_id, client_id and login_id

WrongProviderMode

We do not support the received provider_mode

WrongRequestFormat

The JSON request is incorrectly formed

Client

A Client is the entity that will be consuming our API.

Client attributes

settings

general client settings

email
string email of the client
success_url
string success callback URL
fail_url
string fail callback URL
notify_url
string notify callback URL
destroy_url
string destroy callback URL
interactive_url
string interactive callback URL
info

client info

status
string possible values: pending, disabled, test, live, restricted
signed_up_at
datetime time when the client signed up
activated_at
datetime time when the client became live
last_request_sent_at
datetime time when last request was sent
last_callback_received_at
datetime time when last callback was received
customers

data about all the client’s customers

total
integer the total number of customers
logins

data about all of the client’s logins

total
integer number of registered logins
active
integer number of active logins, will be shown if active logins exist
inactive
integer number of inactive logins, will be shown if inactive logins exist
disabled
integer number of disabled logins, will be shown if disabled logins exist

Sample Object

{
  "data": {
    "settings": {
      "email": "john@smith.com",
      "success_url": "https://api.saltedge.com/se_api/success",
      "fail_url": "https://api.saltedge.com/se_api/failure",
      "notify_url": "https://api.saltedge.com/se_api/notify",
      "destroy_url": "https://api.saltedge.com/se_api/destroy",
      "interactive_url": "https://api.saltedge.com/se_api/interactive"
    },
    "info": {
      "status": "test",
      "signed_up_at": "2019-02-17T15:31:05Z",
      "activated_at": "2019-02-16T15:31:05Z",
      "last_request_sent_at": "2019-02-18T15:31:05Z",
      "last_callback_received_at": "2019-02-19T10:31:05Z"
    },
    "customers": {
      "total": 78
    },
    "logins": {
      "total": 123,
      "active": 100,
      "inactive": 20,
      "disabled": 3
    }
  }
}

Client info

This endpoint is available only for apps using api keys of type service. For more information please see authentication guide.

You can query the information about a client. Available only for web applications, no such route exists for mobile ones.

Response

The response is a client object wrapped in a data attribute.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/client/info

Countries

The country is represented just as a string. We’re using ISO 3166-1 alpha-2 country codes. Thus, all the country codes will have exactly two uppercase letters. There are two special cases:

  • “Other”, encoded as XO
  • “Fake”, encoded as XF

Note that the Fake country is only available for clients in Test and Pending statuses.

Listing countries

Returns a list of countries supported by Spectre API.

Parameters

include_fake_providers
boolean, optional

whether you wish to fetch the fake countries, defaults to false

Response

name
string

name of the country

code
string

country code as dated in ISO 3166-1 alpha-2

refresh_start_time
integer

local country time when logins will be automatically refreshed. Possible values: 0 to 23

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/countries

Sample Response

{
  "data": [
    {
      "code": "CZ",
      "name": "Czech Republic",
      "refresh_start_time": 2
    },
    {
      "code": "IL",
      "name": "Israel",
      refresh_start_time: 2
    },
    {
      "code": "MD",
      "name": "Moldova",
      "refresh_start_time": 2
    },
    {
      "code": "RO",
      "name": "Romania",
      "refresh_start_time": 2
    },
    {
      "code": "RU",
      "name": "Russia",
      "refresh_start_time": 2
    },
    {
      "code": "UA",
      "name": "Ukraine",
      "refresh_start_time": 2
    },
    {
      "code": "XF",
      "name": "Fake",
      "refresh_start_time": 2
    },
    {
      "code": "XO",
      "name": "Other",
      "refresh_start_time": 2
    },
    ...
  ]
}

Providers

A provider is a source of financial data. We recommend you update all of the provider’s fields at least daily.

Attributes

id
integer

provider’s id

code
string

provider’s code

name
string

provider’s name

mode
string

possible values are: oauth, web, api, file

status
string

possible values are: active, inactive, disabled

automatic_fetch
boolean

whether the provider’s logins can be automatically fetched

customer_notified_on_sign_in
boolean

whether the provider will notify the customer on log in attempt

interactive
boolean

whether the provider requires interactive input

instruction
string

instructions on how to connect the bank, in English

home_url
string

the url of the main page of the provider

login_url
string

point of entrance to provider’s login web interface

forum_url
string

the url for the Salt Edge Forum page, dedicated to the provider

country_code
string

code of the provider’s country

refresh_timeout
integer

amount of time (in minutes) after which the provider’s logins are allowed to be refreshed

holder_info
array

contains information on the account holder details that can be fetched from this provider

created_at
datetime
updated_at
datetime

Sample object

{
  "id": 123,
  "code": "fakebank_simple_xf",
  "name": "Fake Bank",
  "mode": "web",
  "status": "active",
  "automatic_fetch": true,
  "customer_notified_on_sign_in": false,
  "interactive": false,
  "instruction": "Please fill in all the fields.",
  "home_url": "http://example.com",
  "login_url": "http://example.com/login",
  "forum_url": "https://forum.saltedge.com/themes/xf/forums/fake/all",
  "country_code": "XF",
  "refresh_timeout": 60,
  "holder_info": ["names", "emails", "phone_numbers"],
  "created_at": "2019-02-09T15:31:05Z",
  "updated_at": "2019-02-14T15:31:05Z"
}

Provider show

Provider show allows you to inspect the single provider in order to give your users a proper interface to input their credentials. The response will have an array of required_fields and interactive_fields, which are explained in more detail in the create section of this reference.

Parameters

provider_code
string

provider’s code

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/providers/fakebank_simple_xf

Sample response

{
  "data": {
    "id": 123,
    "automatic_fetch": true,
    "customer_notified_on_sign_in": false,
    "code": "fakebank_simple_xf",
    "country_code": "XF",
    "created_at": "2014-02-07T12:56:54Z",
    "forum_url": "https://forum.banksalt.com/themes/xf/forums/fakebank_simple_xf/all",
    "home_url": "http://example.com",
    "instruction": "Fill in all the fields",
    "interactive": false,
    "login_url": "http://example.com/login",
    "mode": "web",
    "name": "Fake Bank Simple",
    "refresh_timeout": 60,
    "holder_info": ["names", "emails", "phone_numbers"],
    "required_fields": [
      {
        "english_name": "Login",
        "localized_name": "Login",
        "name": "login",
        "nature": "text",
        "optional": false,
        "position": 1
      },
      {
        "english_name": "Password",
        "localized_name": "Password",
        "name": "password",
        "nature": "password",
        "optional": false,
        "position": 2
      }
    ],
    "status": "active",
    "updated_at": "2014-06-06T13:34:35Z"
  }
}

Listing providers

Returns all the providers we operate with. If a provider becomes disabled, it is not included in the list. You can read more about the next_id field, in the pagination section of the reference.

Parameters

from_id
integer, optional

the id of the record starting the next page, defaults to null

from_date
date, optional

filtering providers created or updated starting from this date, defaults to null

country_code
string, optional

filtering providers by country, defaults to null

mode
string, optional

filtering providers by mode, possible values are: oauth, web, api, file

include_fake_providers
boolean, optional

whether you wish to fetch the fake providers, defaults to false

include_provider_fields
boolean, optional

whether you wish to include all provider fields in the provider objects, defaults to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/providers

Sample Response

{
  "data": [
    {
      "id": 123,
      "code": "fakebank_image_xf",
      "name": "Fake Bank with Image",
      "mode": "web",
      "status": "active",
      "automatic_fetch": false,
      "customer_notified_on_sign_in": true,
      "interactive": true,
      "instruction": "Please fill in all the fields.",
      "home_url": "http://example.com",
      "login_url": "http://example.com/login",
      "forum_url": "http://forum.banksalt.com/themes/xf/forums/fakebank_image_xf/all",
      "country_code": "XF",
      "refresh_timeout": 60,
      "holder_info": ["names", "emails", "phone_numbers"],
      "created_at": "2019-02-09T15:31:05Z",
      "updated_at": "2019-02-14T15:31:05Z"
    }
  ],
  "meta": {
    "next_id": null,
    "next_page": null
  }
}

Provider fields

There are several types of fields as marked by their nature attribute:

nature
string

possible values are: text, password, select, file

name
string

the field’s name that should be used as a key in the credentials object

english_name
string

the field’s name in US English

localized_name
string

the name of the field in the provider’s main language

position
integer

field’s position in the public user interface

optional
boolean

whether the input for this field is required by the provider

field_options
object

only for the select field type. Contains the options for the select

Example object

  {
    "nature":         "text",
    "name":           "login",
    "english_name":   "Username",
    "localized_name": "Utilizator",
    "optional":       false,
    "position":       1
  }

Provider field options

Some providers ask their users to select a secret word or an answer to a question as a security measure.

In this case, the provider will contain a field of select type. The field will contain an array of field_options objects, which describe the possible choices for the user.

name
string

the name of the field option

english_name
string

the option’s name in US English

localized_name
string

the name of the field in the provider’s main language

option_value
string

the value of the option that needs to be passed as credentials

selected
boolean

whether the choice is selected by default

Example object

  {
    "name":           "home",
    "english_name":   "Home",
    "localized_name": "Casa",
    "option_value":   "home",
    "selected":       true
  }

Fake Providers

In order to help with testing, we provide a fake country (having the country code XF) and a set of fake providers. If your application is in the Test or Pending status, the Connect page will let you select the fake country and its providers.

The API supplies a number of fake providers:

  • fakebank_simple_xf - requires a username and password;
  • fakebank_select_xf - has a dropdown list with some options for the user to choose from;
  • fakebank_image_xf - the user needs to solve a CAPTCHA for authentication;
  • fakebank_interactive_xf - asks for a fake SMS code;
  • fakebank_two_step_interactive_xf - asks for interactive data twice during the fetching process;
  • fakebank_semi_interactive_xf - occasionally requires an SMS code;
  • fakebank_with_optional_fields_xf - similar to fakebank_interactive_xf, but with some of the interactive fields marked as optional;
  • fakebank_api_with_fields_xf - similar to fakebank_simple_xf, used for ensuring API providers availability;
  • fakebank_oauth_xf - asks for authorization;
  • fakebank_oauth_with_pending_xf - similar to fakebank_oauth_xf, returns pending transactions;
  • fakebank_oauth_with_n_transactions_xf - similar to fakebank_oauth_xf, returns more than 1000 transactions;
  • fakebank_with_updates_xf - generates up to 4 transactions on every connect, refresh, reconnect with random amounts and modes;
  • fake_demobank_xf - generates multiple accounts with different currencies, and different account natures;
  • fakebank_with_token_xf - requires a username and a fake token;
  • fakebank_with_error_xf - allows you to test the appearing errors when connecting a new provider;
  • fakebank_oauth_with_pending_and_available_balance_xf - similar to fakebank_oauth_with_pending_xf, having accounts, which have different values for balance and available_balance;
  • fakebank_with_possible_duplicates_xf - each attempt generates a transactions with same made_on, amount, currency_code but different description. On second attempt and later it marks those transaction with extra[:possible_duplicate] flag;
  • fakebank_with_rememberable_credentials_xf - remembers all the answers to secret questions and doesn’t ask them in the interactive stage if they were introduced correctly on previous attempts.
  • fakebank_with_file_csv_xf - extracts transactions from a csv file. You can download the sample here.

The Fake Bank with Error allows to select which error you would like to test. The choices are as follows:

  • No Erorrs - works the same as fakebank_simple_xf;
  • No Errors with Partial Data - returns accounts and transactions, where partial flag is set to true;
  • ExecutionTimeout - no accounts and transactions, raises the ExecutionTimeout error;
  • FetchingTimeout - no accounts and transactions, raises the FetchingTimeout error;
  • ProviderUnavailable - no accounts and transactions, raises the ProviderUnavailable error;
  • ProviderError - no accounts and transactions, raises error with a generic message An error has occurred. Please report this error..

We also supply fake providers to test your Client Provider Keys with:

  • fake_client_xf - requires a username and password (embedded);
  • fake_oauth_client_xf - asks for authorization (OAuth redirect);
  • fake_interactive_client_xf - asks for a fake SMS code in addition to username and password (embedded).

Check the provider’s instructions in the Connect page for the appropriate credentials. You can use these providers in order to test the codes, the format of the transactions, errors, etc.

Customers

A customer represents a single end-user of the Spectre API. The customer uses the API to create Logins, i.e. bank connections, that are further used to aggregate the customer’s financial data.

Here’s a diagram that illustrates the Customer and its associated concepts:

You need to store the id returned from the response in your application, which is necessary when creating logins. We give you the following customer API actions so that the customer will be successfully identified within Salt Edge.

Create customer

Creates a customer, returning the customer object.

Parameters

identifier
string, required

a unique identifier of the new customer

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"identifier\": \"12rv1212f1efxchsdhbgv\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/customers/

Sample Response

{
  "data": {
    "id":         18892,
    "identifier": "12rv1212f1efxchsdhbgv",
    "secret":     "AtQX6Q8vRyMrPjUVtW7J_O1n06qYQ25bvUJ8CIC80-8"
  }
}

Show customer

This endpoint is available only for apps using api keys of type service. For more information please see authentication guide.

Returns the customer object.

Parameters

id
integer, required

the id of the customer

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/customers/18892

Sample Response

{
  "data": {
    "id":         18892,
    "identifier": "12rv1212f1efxchsdhbgv",
    "secret":     "AtQX6Q8vRyMrPjUVtW7J_O1n06qYQ25bvUJ8CIC80-8"
  }
}

List customers

This endpoint is available only for apps using api keys of type service. For more information please see authentication guide.

List all of your app’s customers. This route is available only for web applications, not mobile ones.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/customers

Sample Response

{
  "data": [
    {
      "id":         123,
      "identifier": "unique_customer_identifier",
      "secret":     "AtQX6Q8vRyMrPjUVtW7J_O1n06qYQ25bvUJ8CIC80-8"
    },
    {
      "id":         124,
      "identifier": "unique_customer_identifier_2",
      "secret":     "Ct124tk12j0129i10-1j2k124kgk1lgqvUJ8CIC80-8"
    }
  ],
  "meta": {
    "next_id": 125,
    "next_page": "/api/v3/customers?from_id=125"
  }
}

Remove customer

This endpoint is available only for apps using api keys of type service. For more information please see authentication guide.

Deletes a customer, returning the customer object. This route is available only for web applications.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X DELETE \
        https://www.saltedge.com/api/v3/customers/124

Sample Response

{
  "data": {
    "deleted": true,
    "id":      11215151
  }
}

Tokens

We use tokens to identify clients who will use Salt Edge Connect. With a token, you will be able to let your users connect, reconnect or refresh a login. Note that the token will expire in 60 seconds if you do not access Salt Edge Connect. After the token has been used to redirect the user to Salt Edge Connect, the user will have 10 minutes to fill in the necessary data. Afterwards, the user’s session will expire.

Before acquiring a token, you should be sure that the user exists in the system, or you should create one.

If your status is Pending, you will receive a ClientPending error when connecting any login not from the fake providers.

You can read more about tokens in the Tokens guides page.

Create

Allows you to create a token, which will be used to access Salt Edge Connect for login creation. You will receive a connect_url field, which allows you to enter directly to Salt Edge Connect with your newly generated token.

Parameters

customer_id
integer, required

the ID of the customer received from customer create

allowed_countries
array of strings, optional

the list of countries that will be accessible in Salt Edge Connect, defaults to null. Example: ['US', 'DE']

provider_code
string, optional

the code of the desired provider, defaults to null

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the Salt Edge Connect page in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

return_to
string, optional

the URL the user will be redirected to, defaults to client’s home URL

return_login_id
boolean, optional

whether to append login_id to return_to URL. Defaults to false

provider_modes
array of strings, optional

restrict the list of the providers to only the ones that have the mode included in the array.

Possible values inside the array are: oauth, web, api, file, defaults to the array containing all possible modes

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

javascript_callback_type
string, optional

allows you to specify what kind of callback type you are expecting. Possible values: iframe, external_saltbridge, external_notify, post_message. Defaults to null, which means that you will not receive any callbacks.

include_fake_providers
boolean, optional

being live, the customer will not be able to create fake provider logins. This flag allows it; if sent as true the customer will have the possibility to create any available fake provider logins. Defaults to false

lost_connection_notify
boolean, optional

being sent as true, enables you to receive a javascript callback whenever the internet connection is lost during the fetching process. The type of the callback depends on the javascript_callback_type you specified. Defaults to false. It has the following payload: {data: {error_class: 'ConnectionLost', error_message: 'Internet connection was lost.'}}

show_consent_confirmation
boolean, optional

if sent as true, upon submitting the form, the user will be asked to give his consent to Salt Edge Inc. in order for the data requested via the fetch_type flag to be fetched. Default value: false.

credentials_strategy
string, optional

the strategy of storing customers credentials. Possible values: store, do_not_store, ask. Default value: store.
Note: If the value is ask, on the Connect page customer will be able to choose whether to save or not his credentials on SaltEdge side

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"customer_id\": 5122311, \
                \"fetch_type\": \"recent\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/tokens/create

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "connect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

Reconnect

Allows you to create a token, which will be used to access Salt Edge Connect to reconnect a login. You will receive a connect_url field, which allows you to enter directly to Salt Edge Connect with your newly generated token.

Parameters

login_id
integer, required

the ID of the login you wish to reconnect

locale
string, optional

the language of the Salt Edge Connect page in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

return_to
string, optional

URL the user will be redirected to, defaults to client’s home URL

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

return_login_id
boolean, optional

shows whether to append login_id to return_to URL. Defaults to false

provider_modes
array of strings, optional

restrict the list of the providers to only the ones that have the mode included in the array.

Possible values inside the array are: oauth, web, api, file, defaults to the array containing all possible modes

javascript_callback_type
string, optional

allows you to specify what kind of callback type are you expecting. Possible values: iframe, external_saltbridge, external_notify, post_message. Defaults to null, which means that you will not receive any callbacks.

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

include_fake_providers
boolean, optional

shows whether it would be possible to reconnect a fake provider or not in live mode. Defaults to false

lost_connection_notify
boolean, optional

being sent as true, enables you to receive a javascript callback whenever the internet connection is lost during the fetching process. The type of the callback depends on the javascript_callback_type you specified. Defaults to false. It has the following payload: {data: {error_class: 'ConnectionLost', error_message: 'Internet connection was lost.'}}

show_consent_confirmation
boolean, optional

if sent as true, upon submitting the form, the user will be asked to give his consent to Salt Edge Inc. in order for the data requested via the fetch_type flag to be fetched. Default value: false.
Note: If you are sending this flag as true for all the ‘Create’ token requests, there is no need to send it in the ‘Reconnect’ token requests.

credentials_strategy
string, optional

the strategy of storing customers credentials. Possible values: store, do_not_store, ask. Default value: store.
Note: If the value is ask, on the Connect page customer will be able to choose whether to save or not his credentials on SaltEdge side

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"login_id\": \"123\", \
                \"fetch_type\": \"recent\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/tokens/reconnect

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "connect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

Refresh

Allows you to create a token, which will be used to access Salt Edge Connect to refresh a login. You will receive a connect_url field, which allows you to enter directly to Salt Edge Connect with your newly generated token.

Parameters

login_id
integer, required

the ID of the login you wish to reconnect

locale
string, optional

the language of the Salt Edge Connect page in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

return_to
string, optional

URL the user will be redirected to, defaults to client’s home URL

return_login_id
boolean, optional

shows whether to append login_id to return_to URL. Defaults to false

provider_modes
array of strings, optional

restrict the list of the providers to only the ones that have the mode included in the array.

Possible values inside the array are: oauth, web, api, file, defaults to the array containing all possible modes

javascript_callback_type
string, optional

allows you to specify what kind of callback type are you expecting. Possible values: iframe, external_saltbridge, external_notify, post_message. Defaults to null, which means that you will not receive any callbacks.

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

lost_connection_notify
boolean, optional

being sent as true, enables you to receive a javascript callback whenever the internet connection is lost during the fetching process. The type of the callback depends on the javascript_callback_type you specified. Defaults to false. It has the following payload: {data: {error_class: 'ConnectionLost', error_message: 'Internet connection was lost.'}}

show_consent_confirmation
boolean, optional

if sent as true, upon submitting the form, the user will be asked to give his consent to Salt Edge Inc. in order for the data requested via the fetch_type flag to be fetched. Default value: false.
Note: If you are sending this flag as true for all the ‘Create’ token requests, there is no need to send it in the ‘Reconnect’ token requests.

include_fake_providers
boolean, optional

shows whether it would be possible to refresh a fake provider or not in live mode. Defaults to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"login_id\": \"123\", \
                \"fetch_type\": \"recent\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/tokens/refresh

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "connect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

OAuth Providers

Spectre API also allows your app to import data from a list of OAuth-supporting providers. The OAuth workflow, in this case, is reduced to a couple of HTTP calls and redirects.

Connecting OAuth providers logins is done via the same mechanism as when connecting a usual login - using tokens for connecting, reconnecting or refreshing. The response will contain a redirect_url and your app has to redirect the user to that URL.

The redirect_url points to a page where the user can provide Salt Edge access to their financial data, making it available for your app. After the user has approved Salt Edge in the OAuth provider’s interface, they will be redirected to the return_to page.

Create

Used to create a login for an OAuth provider. After receiving the response, the customer will be redirected to return_to URL.

Note that mobile clients receive a login_secret parameter in the return_to URL if the login was successfully connected and a error_message parameter. Also, return_to is optional for web clients.

Parameters

country_code
string, required

the code of the country

provider_code
string, required

the code of the provider

customer_id
integer, required

the ID of the customer received from customer create

return_to
string, required

the address your user will be redirected to after they grant or deny the access

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

return_login_id
boolean, optional

whether to append login_id to return_to URL. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

include_fake_providers
boolean, optional

being live, the customer will not be able to create fake providers. This flag allows it, if sent as true the customer will have the possibility to create any fake provider available. Defaults to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"country_code\": \"XF\", \
                \"provider_code\": \"fakebank_oauth_xf\", \
                \"customer_id\": 5125125, \
                \"fetch_type\": \"recent\", \
                \"return_to\": \"http://example.com/\", \
                \"return_login_id\": false \
              } \
            }" \
        https://www.saltedge.com/api/v3/oauth_providers/create

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "redirect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

Reconnect

Used to reconnect a login for an OAuth provider. After receiving the response, the customer will be redirected to the return_to URL.

Note that mobile clients receive a login_secret parameter in the return_to URL and a error_message parameter if the login failed to connect for some reason. Also, return_to is optional for web clients.

Parameters

login_id
integer, required

the ID of the login that is to be reconnected

return_to
string, required

the address your user will be redirected to after they grant or deny access

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

return_login_id
boolean, optional

shows whether to append login_id to return_to URL. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

include_fake_providers
boolean, optional

shows whether it would be possible to reconnect a fake provider or not in live mode. Defaults to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"login_id\": 123, \
                \"return_to\": \"http://example.com/\", \
                \"fetch_type\": \"recent\", \
                \"return_login_id\": false \
              } \
            }" \
        https://www.saltedge.com/api/v3/oauth_providers/reconnect

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "redirect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

Refresh

Used to refresh a login for an OAuth provider. After receiving the response, the customer will be redirected to return_to URL.

Note that mobile clients receive a login_secret parameter in the return_to URL and a error_message parameter if the login failed to connect for some reason. Also, return_to is optional for web clients.

Parameters

login_id
integer, required

the ID of the login that is to be reconnected

return_to
string, required

the address your user will be redirected to after they grant or deny access

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

custom_fields
object, optional

a JSON object, which will be sent back on any of your callbacks

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

return_login_id
boolean, optional

shows whether to append login_id to return_to URL. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

include_fake_providers
boolean, optional

shows whether it would be possible to refresh a fake provider or not in live mode. Defaults to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"login_id\": 123, \
                \"return_to\": \"http://example.com/\", \
                \"fetch_type\": \"recent\", \
                \"return_login_id\": false \
              } \
            }" \
        https://www.saltedge.com/api/v3/oauth_providers/refresh

Sample response

{
  "data": {
    "token": "GENERATED_TOKEN",
    "expires_at": "2019-02-19T16:31:05Z",
    "redirect_url": "https://www.saltedge.com/connect?token=GENERATED_TOKEN"
  }
}

Logins

A login represents a set of credentials required to access the accounts and transactions through a specific provider.

Within Spectre, a login can have one of the following statuses:

  • active - the current set of credentials is valid and allows us to properly fetch the data;
  • inactive - an error appeared while fetching the login. An inactive login cannot be refreshed;
  • disabled - in case of non-compliance with our Terms of Service, we can contact the application’s owner and disable the login.
A Login represents a permanent connection of a specific customer to a bank. A single end-user represents a single customer in Spectre. When creating a login you should make sure the customer already exists to avoid creating a new customers with the same login. Also, we don’t recommend creating multiple connections for the same customer with the same online banking access credentials.

Attributes

id
integer
provider_id
integer

the ID of the Provider the login belongs to

provider_code
string

the code of the Provider the login belongs to

provider_name
string

the name of the Provider the login belongs to

daily_refresh
boolean

whether the login will be refreshed daily

customer_id
integer

customer’s ID

created_at
datetime
updated_at
datetime
last_success_at
datetime

time when the login was successfully fetched

status
string

possible values are: active, inactive, disabled

country_code
string

code of the country the provider belongs to

next_refresh_possible_at
datetime

when the next refresh will be available. May contain null value if login has automatic_fetch set as false, or is already processing

store_credentials
boolean

whether the credentials were stored on our side

last_attempt
object, attempt object

last attempt of this login

holder_info
object, holder object

contains the account holder information

show_consent_confirmation
boolean

whether any consent was given for this login

consent_types
array of strings

the information that was given consent for. Possible values: holder_information, account_information, transaction_information

consent_given_at
datetime

time when the consent was given

Sample object

{
  "country_code": "XF",
  "created_at": "2019-02-18T15:31:05Z",
  "customer_id": 905,
  "daily_refresh": false,
  "id": 1227,
  "show_consent_confirmation": true,
  "consent_types": ["account_information"],
  "consent_given_at": "2019-02-19T14:51:05Z",
  "last_attempt": {
    "api_mode": "service",
    "api_version": "3",
    "automatic_fetch": true,
    "daily_refresh": false,
    "categorize": true,
    "created_at": "2019-02-19T14:51:05Z",
    "custom_fields": {},
    "device_type": "desktop",
    "remote_ip": "93.184.216.34",
    "exclude_accounts": [],
    "fail_at": null,
    "fail_error_class": null,
    "fail_message": null,
    "fetch_type": "recent",
    "finished": true,
    "finished_recent": true,
    "from_date": null,
    "id": 425036,
    "interactive": false,
    "locale": "en",
    "partial": false,
    "store_credentials": true,
    "success_at": "2019-02-19T14:51:05Z",
    "to_date": null,
    "updated_at": "2019-02-19T14:51:05Z",
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_stage": {
      "created_at": "2019-02-19T14:51:05Z",
      "id": 2691802,
      "interactive_fields_names": null,
      "interactive_html": null,
      "name": "finish",
      "updated_at": "2019-02-19T14:51:05Z"
    }
  },
  "holder_info": {
    "names": ["John Doe"],
    "emails": ["john.doe@example.com", "johndoe@gmail.com"],
    "phone_numbers": ["+40981233422"],
    "addresses": [
      {
        "city": "Cupertino",
        "state": "CA",
        "street": "1 Infinite Loop",
        "country_code": "US",
        "post_code": "95014"
      }
    ]
  },
  "last_success_at": "2019-02-19T14:51:05Z",
  "next_refresh_possible_at": "2019-02-19T16:31:05Z",
  "provider_id": 1234,
  "provider_code": "fakebank_simple_xf",
  "provider_name": "Fakebank Simple",
  "status": "active",
  "store_credentials": true,
  "updated_at": "2019-02-19T14:51:05Z"
}

Holder Info

You can query essential information about the account holder. Make sure to request this feature to be enabled for your client account.

names
array

account holder name(s)

emails
array

account holder email(s)

phone_numbers
array

account holder phone number(s)

addresses
array of objects

account holder address(es)

Extra

Depending on provider, additional information on account holder might be available.

  • ssn - Social Security Number shortened (last 4 digits)
  • cpf - Cadastro de Pessoas Físicas (present in Brazil)

Sample Object

{
  "names": ["John Doe"],
  "emails": ["john.doe@example.com", "johndoe@gmail.com"],
  "phone_numbers": ["+40981233422"],
  "addresses": [
    {
      "city": "Cupertino",
      "state": "CA",
      "street": "1 Infinite Loop",
      "country_code": "US",
      "post_code": "95014"
    }
  ]
}

Listing logins

This endpoint is available only for apps using api keys of type service. For more information please see authentication guide.

Returns all the logins accessible to your application. The logins are sorted in ascending order of their ID, so the newest logins will come last. We recommend you fetch the whole list of logins to check whether any of the properties have changed. You can read more about next_id field, in the pagination section of the reference.

Parameters

from_id
integer, optional

the id of the record starting the next page

customer_id
integer, optional

the id of the customer, allows to fetch logins only for a certain customer

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/logins

Sample Response

{ "data":
  [
    {
      "country_code": "XF",
      "created_at": "2019-02-18T15:31:05Z",
      "customer_id": 905,
      "daily_refresh": false,
      "id": 1227,
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_attempt": {
          "api_mode": "service",
          "api_version": "3",
          "automatic_fetch": true,
          "daily_refresh": false,
          "categorize": true,
          "created_at": "2019-02-19T14:51:05Z",
          "custom_fields": {},
          "device_type": "desktop",
          "remote_ip": "93.184.216.34",
          "exclude_accounts": [],
          "fail_at": null,
          "fail_error_class": null,
          "fail_message": null,
          "fetch_type": "recent",
          "finished": true,
          "finished_recent": true,
          "from_date": null,
          "id": 425036,
          "interactive": false,
          "locale": "en",
          "partial": false,
          "store_credentials": true,
          "success_at": "2019-02-19T14:51:05Z",
          "to_date": null,
          "updated_at": "2019-02-19T14:51:05Z",
          "show_consent_confirmation": true,
          "consent_types": ["account_information"],
          "consent_given_at": "2019-02-19T14:51:05Z",
          "last_stage": {
            "created_at": "2019-02-19T14:51:05Z",
            "id": 2691802,
            "interactive_fields_names": null,
            "interactive_html": null,
            "name": "finish",
            "updated_at": "2019-02-19T14:51:05Z"
          }
      },
      "holder_info": {
        "names": ["John Doe"],
        "emails": ["john.doe@example.com", "johndoe@gmail.com"],
        "phone_numbers": ["+40981233422"],
        "addresses": [
          {
            "city": "Cupertino",
            "state": "CA",
            "street": "1 Infinite Loop",
            "country_code": "US",
            "post_code": "95014"
          }
        ]
      },
      "last_success_at": "2019-02-19T14:51:05Z",
      "next_refresh_possible_at": "2019-02-19T16:31:05Z",
      "provider_id": 1234,
      "provider_code": "fakebank_simple_xf",
      "provider_name": "Fakebank Simple",
      "status": "active",
      "store_credentials": true,
      "updated_at": "2019-02-19T14:51:05Z"
    }
  ],
  "meta" : {
    "next_id": 1228,
    "next_page": "/api/v3/logins?from_id=1228"
  }
}

Login show

Returns a single login object.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/logins/1227

Sample Response

{
  "data": {
    "country_code": "MD",
    "created_at": "2014-10-24T20:09:02Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": true,
      "daily_refresh": false,
      "categorize": true,
      "created_at": "2016-02-02T16:14:53Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": true,
      "finished_recent": true,
      "from_date": null,
      "id": 425036,
      "interactive": false,
      "locale": "en",
      "partial": false,
      "store_credentials": true,
      "success_at": "2016-02-02T16:16:19Z",
      "to_date": null,
      "updated_at": "2016-02-02T16:16:19Z",
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_stage": {
        "created_at": "2016-02-02T16:16:19Z",
        "id": 2691802,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2016-02-02T16:16:19Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2016-02-02T16:16:19Z",
    "next_refresh_possible_at": "2016-02-02T17:16:19Z",
    "provider_id": 1234,
    "provider_code": "moldindconbank_wb_md",
    "provider_name": "Moldindconbank Web Banking",
    "status": "active",
    "store_credentials": true,
    "updated_at": "2016-02-04T09:41:23Z"
  }
}

Creating logins

When not using Salt Edge Connect, your app will have to pass the user’s values of provider’s fields within the payload.

The credentials object should be modeled after the provider’s fields. For instance, if the provider’s required fields contain a field with the value of name equal to username, the credential object should contain a username attribute with the value being the actual username.

For example, here’s a provider:

{
  "data": {
    "code": "bigbank_us",
    "required_fields": [
      {
        "english_name": "Pass Code",
        "localized_name": "Pass Code",
        "name": "code",
        "nature": "text",
        "position": 1
      }
    ]
  }
}

The user should be prompted to input their Pass Code. If they input their Pass Code (in this case, the user has input “hunter2”), your app should send the following data in the credentials object:

{
  "code": "hunter2"
}

Here’s another example that includes a select:

{
  "data": {
    "code": "anotherbank_us",
    "required_fields": [
      {
        "english_name": "Password",
        "localized_name": "Password",
        "name": "password",
        "nature": "password",
        "position": 1
      },
      {
        "nature":         "select",
        "name":           "image",
        "english_name":   "Image",
        "localized_name": "Imagine",
        "position":       2,
        "optional":       false,
        "field_options": [
          {
            "name":           "1",
            "english_name":   "Home",
            "localized_name": "Casa",
            "option_value":   "home",
            "selected":       false
          },
          {
            "name":           "2",
            "english_name":   "Car",
            "localized_name": "Automobil",
            "option_value":   "car",
            "selected":       false
          }
        ]
      }
    ]
  }
}

In this case, your app should prompt the user to input their Password and offer them a select with the options of “Casa” and “Automobil” (the localized_name or english_name values, depending on your service). The credentials should contain the name of the select field (in this case image) as the key and the user’s selected option_value as its value. Let’s say the user has input hunter2 as their password and has chosen “Automobil” from the select.

The credentials object should look like this:

{
  "password": "hunter2",
  "image": "car"
}

Please refer to the example on the right for more info.

Parameters

customer_id
integer, required

the ID of the customer

country_code
string, required

the country code of the desired provider

provider_code
string, required

the code of the desired provider

credentials
object, required

the credentials required to access the data

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

include_fake_providers
boolean, optional

being live, the customer will not be able to create fake providers. This flag allows it, if sent as true the customer will have the possibility to create any fake provider available. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

store_credentials
boolean, optional

this flag allows not to store credentials on SaltEdge side. Default value: true.
Note: The usage of this flag is not available for file providers. In order to update the login, reconnect is required. It will not be possible to use refresh option if store_credentials is set to false

file_url
string, optional

URL of a file. Is used when creating a login for a provider with file mode

Response

A complete Login object.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"customer_id\": 905, \
                \"country_code\": \"XF\", \
                \"provider_code\": \"fakebank_simple_xf\", \
                \"fetch_type\": \"recent\", \
                \"credentials\": { \
                  \"login\": \"username\", \
                  \"password\": \"secret\" \
                } \
              } \
            }" \
        https://www.saltedge.com/api/v3/logins

Sample request (with file providers)

curl -v -include \
        -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -F "file=@file.ofx" \
        -F "data[provider_code]=ofx_xo" \
        -F "data[country_code]=XO" \
        -F "data[customer_id]=995" \
        https://www.saltedge.com/api/v3/logins

Sample request (with file providers, using file_url)

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": { \
                \"customer_id\": 905, \
                \"country_code\": \"XO\", \
                \"provider_code\": \"mint_csv_xo\", \
                \"fetch_type\": \"recent\", \
                \"file_url\": \"http://spatialkeydocs.s3.amazonaws.com/FL_insurance_sample.csv\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/logins

Sample response

{
  "data": {
    "country_code": "XF",
    "created_at": "2019-02-18T15:31:05Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": false,
    "consent_types": null,
    "consent_given_at": null,
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": true,
      "daily_refresh": false,
      "categorize": true,
      "created_at": "2019-02-19T14:51:05Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": true,
      "finished_recent": true,
      "from_date": null,
      "id": 425036,
      "interactive": false,
      "locale": "en",
      "partial": false,
      "store_credentials": true,
      "success_at": "2019-02-19T14:51:05Z",
      "to_date": null,
      "updated_at": "2019-02-19T14:51:05Z",
      "show_consent_confirmation": false,
      "consent_types": null,
      "consent_given_at": null,
      "last_stage": {
        "created_at": "2019-02-19T14:51:05Z",
        "id": 2691802,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2019-02-19T14:51:05Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2019-02-19T14:51:05Z",
    "next_refresh_possible_at": "2019-02-19T16:31:05Z",
    "provider_id": 1234,
    "provider_code": "fakebank_simple_xf",
    "provider_name": "Fakebank Simple",
    "status": "active",
    "store_credentials": true,
    "updated_at": "2019-02-19T14:51:05Z"
  }
}

Login reconnect

In order to Reconnect a login, your app needs to send just a credentials object and the login’s id.

Parameters

credentials
object, required

the the credentials required to access the data

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

include_fake_providers
boolean, optional

shows whether it would be possible to reconnect a fake provider or not in live mode. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

store_credentials
boolean, optional

this flag allows not to store credentials on SaltEdge side. Default value: true.
Note: The usage of this flag is not available for file providers. In order to update the login, reconnect is required. It will not be possible to use refresh option if store_credentials is set to false

file_url
string, optional

URL of a file. Is used when creating a login for a provider with mode file

Response

A complete Login object.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        -d "{ \
              \"data\": { \
                \"credentials\": { \
                  \"login\": \"username\", \
                  \"password\": \"secret\" \
                } \
              } \
            }" \
        https://www.saltedge.com/api/v3/logins/1227/reconnect

Sample request (with file providers)

curl -v -include \
        -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -F "file=@file.ofx" \
        https://www.saltedge.com/api/v3/logins/1227/reconnect

Sample response

{
  "data": {
    "country_code": "XF",
    "created_at": "2019-02-18T15:31:05Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": true,
      "daily_refresh": true,
      "categorize": true,
      "created_at": "2019-02-19T14:51:05Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": true,
      "finished_recent": true,
      "from_date": null,
      "id": 425036,
      "interactive": false,
      "locale": "en",
      "partial": false,
      "store_credentials": true,
      "success_at": "2019-02-19T14:51:05Z",
      "to_date": null,
      "updated_at": "2019-02-19T14:51:05Z",
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_stage": {
        "created_at": "2019-02-19T14:51:05Z",
        "id": 2691802,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2019-02-19T14:51:05Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2019-02-19T14:51:05Z",
    "next_refresh_possible_at": "2019-02-19T16:31:05Z",
    "provider_id": 1234,
    "provider_code": "fakebank_simple_xf",
    "provider_name": "Fakebank Simple",
    "status": "active",
    "store_credentials": true,
    "updated_at": "2019-02-19T14:51:05Z"
  }
}

Logins interactive

If the currently fetching login requires any interactive credentials for fetching, Salt Edge will send the Interactive callback.

Upon receiving the interactive callback, your app should ask the user for the interactive credentials and send them to the /interactive route for the login. After that, the fetching process will continue as usual.

Please note that in some cases (e.g. when fetching Fake Bank with SMS logins), on interactive stage provider may not require any interactive fields (see interactive_fields_names), thus you should send an empty object in the credentials field:

{
  "data": {
    "credentials": {}
  }
}

Parameters

credentials
object, required

the credentials object based on the provider’s interactive fields

Response

A complete Login object.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        -d "{ \
              \"data\": { \
                \"credentials\": { \
                  \"sms\": \"AB123\" \
                } \
              } \
            }" \
        https://www.saltedge.com/api/v3/logins/1227/interactive

Sample response

{
  "data": {
    "country_code": "XF",
    "created_at": "2019-02-18T15:31:05Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": false,
      "daily_refresh": false,
      "categorize": true,
      "created_at": "2019-02-19T14:51:05Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": false,
      "finished_recent": false,
      "from_date": null,
      "id": 425036,
      "interactive": true,
      "locale": "en",
      "partial": true,
      "store_credentials": true,
      "success_at": "2019-02-19T14:51:05Z",
      "to_date": null,
      "updated_at": "2019-02-19T14:51:05Z",
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_stage": {
        "created_at": "2019-02-19T14:51:05Z",
        "id": 2691802,
        "interactive_fields_names": ["sms"],
        "interactive_html": "<input type="text" name="sms" placeholder="Sms">",
        "name": "interactive",
        "updated_at": "2019-02-19T14:51:05Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2019-02-19T14:51:05Z",
    "next_refresh_possible_at": "2019-02-19T16:31:05Z",
    "provider_id": 1234,
    "provider_code": "fakebank_interactive_xf",
    "provider_name": "Fake Bank with SMS",
    "status": "active",
    "updated_at": "2019-02-19T14:51:05Z"
  }
}

Login refresh

Lets you trigger a refetch of the data associated with a specific Login. Note that you can refresh a login once in every 60 minutes. If the response is successful, it will contain the next_refresh_possible_at value and you can expect the usual callbacks of the fetching workflow.

Parameters

daily_refresh
boolean, optional

whether the login should be automatically refreshed by Salt Edge

fetch_type
string, optional

fetching mode, possible values: recent, accounts, custom. Default value: recent

from_date
date, optional

date from which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidFromDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.
Spectre API will use the most optimal value for this field if it wasn’t specified in the request.

to_date
date, optional

date until which you want to fetch data for your login.
Note: The usage of this parameter is only available when fetch_type parameter is set to custom, otherwise InvalidToDate error will be returned. The allowed values for this parameter must be within exactly 2 months ago and tomorrow.

locale
string, optional

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

exclude_accounts
array, optional

array of account IDs which will not be fetched. Defaults to empty array

include_fake_providers
boolean, optional

shows whether it would be possible to refresh a fake provider or not in live mode. Defaults to false

categorize
boolean, optional

the flag allows you to specify whether the transactions of this login should be categorized or not. Defaults to true

store_credentials
boolean, optional

this flag allows not to store credentials on SaltEdge side. Default value: true.
Note: The usage of this flag is not available for file providers. In order to update the login, reconnect is required. It will not be possible to use refresh option if store_credentials is set to false

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        -d "{ \
              \"data\": { \
                \"fetch_type\": \"recent\" \
              } \
            }" \
        https://www.saltedge.com/api/v3/logins/1227/refresh

Sample Response

{
  "data": {
    "country_code": "MD",
    "created_at": "2014-10-24T20:09:02Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
        "api_mode": "service",
        "api_version": "3",
        "automatic_fetch": true,
        "daily_refresh": true,
        "categorize": true,
        "created_at": "2016-02-02T16:14:53Z",
        "custom_fields": {},
        "device_type": "desktop",
        "remote_ip": "93.184.216.34",
        "exclude_accounts": [],
        "fail_at": null,
        "fail_error_class": null,
        "fail_message": null,
        "fetch_type": "recent",
        "finished": true,
        "finished_recent": true,
        "from_date": null,
        "id": 425036,
        "interactive": false,
        "locale": "en",
        "partial": false,
        "store_credentials": true,
        "success_at": "2016-02-02T16:16:19Z",
        "to_date": null,
        "updated_at": "2016-02-02T16:16:19Z",
        "show_consent_confirmation": true,
        "consent_types": ["account_information"],
        "consent_given_at": "2019-02-19T14:51:05Z",
        "last_stage": {
          "created_at": "2016-02-02T16:16:19Z",
          "id": 2691802,
          "interactive_fields_names": null,
          "interactive_html": null,
          "name": "finish",
          "updated_at": "2016-02-02T16:16:19Z"
        }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2016-02-02T16:16:19Z",
    "next_refresh_possible_at": "2016-02-02T17:16:19Z",
    "provider_id": 1234,
    "provider_code": "moldindconbank_wb_md",
    "provider_name": "Moldindconbank Web Banking",
    "status": "active",
    "store_credentials": true,
    "updated_at": "2016-02-04T09:41:23Z"
  }
}

Login remove

Removes a login from our system. All the associated accounts and transactions to that login will be destroyed as well. Salt Edge will send a destroy callback to your web application.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X DELETE \
        https://www.saltedge.com/api/v3/logins/1227

Sample Response

{
  "data": {
    "id": 1227,
    "removed": true
  }
}

Login inactivate

Marks a login from the system as inactive. In order to activate the login, you have to perform a successful reconnect.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        https://www.saltedge.com/api/v3/logins/1227/inactivate

Sample Response

{
  "data": {
    "country_code": "MD",
    "created_at": "2014-10-24T20:09:02Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": true,
      "daily_refresh": false,
      "categorize": true,
      "created_at": "2016-02-02T16:14:53Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": true,
      "finished_recent": true,
      "from_date": null,
      "id": 425036,
      "interactive": false,
      "locale": "en",
      "partial": false,
      "store_credentials": true,
      "success_at": "2016-02-02T16:16:19Z",
      "to_date": null,
      "updated_at": "2016-02-02T16:16:19Z",
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_stage": {
        "created_at": "2016-02-02T16:16:19Z",
        "id": 2691802,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2016-02-02T16:16:19Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2016-02-02T16:16:19Z",
    "next_refresh_possible_at": "2016-02-02T17:16:19Z",
    "provider_id": 1234,
    "provider_code": "moldindconbank_wb_md",
    "provider_name": "Moldindconbank Web Banking",
    "status": "inactive",
    "store_credentials": true,
    "updated_at": "2016-02-04T09:41:23Z"
  }
}

Destroy credentials

Destroys credentials of the login.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        https://www.saltedge.com/api/v3/logins/1227/destroy_credentials

Sample Response

{
  "data": {
    "country_code": "MD",
    "created_at": "2014-10-24T20:09:02Z",
    "customer_id": 905,
    "daily_refresh": false,
    "id": 1227,
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "last_attempt": {
      "api_mode": "service",
      "api_version": "3",
      "automatic_fetch": true,
      "daily_refresh": false,
      "categorize": true,
      "created_at": "2016-02-02T16:14:53Z",
      "custom_fields": {},
      "device_type": "desktop",
      "remote_ip": "93.184.216.34",
      "exclude_accounts": [],
      "fail_at": null,
      "fail_error_class": null,
      "fail_message": null,
      "fetch_type": "recent",
      "finished": true,
      "finished_recent": true,
      "from_date": null,
      "id": 425036,
      "interactive": false,
      "locale": "en",
      "partial": false,
      "store_credentials": true,
      "success_at": "2016-02-02T16:16:19Z",
      "to_date": null,
      "updated_at": "2016-02-02T16:16:19Z",
      "show_consent_confirmation": true,
      "consent_types": ["account_information"],
      "consent_given_at": "2019-02-19T14:51:05Z",
      "last_stage": {
        "created_at": "2016-02-02T16:16:19Z",
        "id": 2691802,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2016-02-02T16:16:19Z"
      }
    },
    "holder_info": {
      "names": ["John Doe"],
      "emails": ["john.doe@example.com", "johndoe@gmail.com"],
      "phone_numbers": ["+40981233422"],
      "addresses": [
        {
          "city": "Cupertino",
          "state": "CA",
          "street": "1 Infinite Loop",
          "country_code": "US",
          "post_code": "95014"
        }
      ]
    },
    "last_success_at": "2016-02-02T16:16:19Z",
    "next_refresh_possible_at": null,
    "provider_id": 1234,
    "provider_code": "moldindconbank_wb_md",
    "provider_name": "Moldindconbank Web Banking",
    "status": "inactive",
    "store_credentials": false,
    "updated_at": "2016-02-04T09:41:23Z"
  }
}

Attempts

The attempt resource represents a detailed description of a particular login connection attempt. They are meant to provide you with more information about the established connections for further usage in technical and statistical purposes.

Attributes

api_mode
string

the API mode of the customer that queried the API. Possible values: app, service

api_version
string

the API version in which the attempt was created

automatic_fetch
boolean

whether the login related to the attempt can be automatically fetched

daily_refresh
boolean

latest assigned value for daily_refresh in login

categorize
boolean

whether the transactions belonging to the attempt’s login have been categorized

created_at
datetime

when the attempt was created

custom_fields
object

the custom fields that had been sent when creating login/token/oauth_provider

device_type
string

the type of the device that created the attempt. Possible values: desktop, tablet, mobile

remote_ip
string

the ip of the device that created the attempt

exclude_accounts
array of integers

the IDs of accounts that do not need to be refreshed

fail_at
datetime

when the attempt failed to finish

fail_error_class
string

class of error that triggered the fail for attempt

fail_message
string

message that describes the error class

fetch_type
string

type of fetch when attempt ended. Possible values: full, recent, accounts, custom

finished
boolean

whether the login had finished fetching

finished_recent
boolean

whether the login had finished data for recent range (2 months)

from_date
date

date from which the data had been fetched

id
integer
interactive
boolean

whether the login related to the attempt is interactive

locale
string

the language of the provider error messages in the ISO 639-1 format. Possible values are: bg, cz, de, en, es, he, hu, it, nl, pl, pt-BR, ro, ru, sk, tr, uk, zh, defaults to en

partial
boolean

whether the login was partially fetched

store_credentials
boolean

whether the credentials were stored on our side

success_at
datetime

when the attempt succeeded and finished

to_date
date

date until which the data has been fetched

updated_at
datetime

when last attempt update occured

show_consent_confirmation
boolean

whether any consent was given for this login

consent_types
array of strings

the information that was given consent for. Possible values: holder_information, account_information, transaction_information

consent_given_at
datetime

time when the consent was given

stages
array of stage objects

information about stages through which the login has passed

Note that the values of the interactive and automatic_fetch are subject to change, since the customer can activate or deactivate the interactive requirements separately with their bank.

Sample object

{
  "api_mode": "service",
  "api_version": "3",
  "automatic_fetch": true,
  "categorize": true,
  "created_at": "2019-02-19T13:31:05Z",
  "custom_fields": {},
  "daily_refresh": false,
  "device_type": "desktop",
  "remote_ip": "93.184.216.34",
  "exclude_accounts": [],
  "fail_at": null,
  "fail_error_class": null,
  "fail_message": null,
  "fetch_type": "recent",
  "finished": true,
  "finished_recent": true,
  "from_date": null,
  "id": 337518,
  "interactive": false,
  "partial": false,
  "store_credentials": true,
  "success_at": "2019-02-19T14:31:05Z",
  "to_date": null,
  "updated_at": "2019-02-19T14:31:05Z",
  "show_consent_confirmation": true,
  "consent_types": ["account_information"],
  "consent_given_at": "2019-02-19T14:51:05Z",
  "last_stage": {
    "created_at": "2019-02-19T14:31:05Z",
    "id": 2094640,
    "interactive_fields_name": null,
    "interactive_html": null,
    "name": "finish",
    "updated_at": "2019-02-19T14:31:05Z"
  }
}

Stages

The following represents the objects you get in the stages field of the attempt object.

created_at
datetime

when the stage was created

id
integer
interactive_fields_names
array of strings

the interactive fields that are currently required by the provider of the login. Appears only for interactive logins

interactive_html
string

HTML code that shows the current interactive state of the login. Appears only for interactive logins

name
string

the name of the stage. Possible values: start, connect, interactive, fetch_holder_info, fetch_accounts, fetch_recent, fetch_full, disconnect, finish

updated_at
datetime

when the stage was last updated

Listing attempts

Returns a paginated list of all attempts for a certain login.

Parameters

login_id
integer

the ID of the login whose attempts are to be fetched

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/attempts?login_id=47872

Sample response

{
  "data": {
    [
      {
        "api_mode": "service",
        "api_version": "3",
        "automatic_fetch": true,
        "categorize": true,
        "created_at": "2019-02-19T13:31:05Z",
        "custom_fields": {},
        "device_type": "desktop",
        "daily_refresh": false,
        "remote_ip": "93.184.216.34",
        "exclude_accounts": [],
        "fail_at": null,
        "fail_error_class": null,
        "fail_message": null,
        "fetch_type": "recent",
        "finished": true,
        "finished_recent": true,
        "from_date": null,
        "id": 337518,
        "interactive": false,
        "locale": "en",
        "partial": false,
        "store_credentials": true,
        "success_at": "2019-02-19T14:31:05Z",
        "to_date": null,
        "updated_at": "2019-02-19T14:31:05Z",
        "show_consent_confirmation": true,
        "consent_types": ["account_information"],
        "consent_given_at": "2019-02-19T14:51:05Z",
        "last_stage": {
          "created_at": "2019-02-19T14:31:05Z",
          "id": 2094640,
          "interactive_fields_name": null,
          "interactive_html": null,
          "name": "finish",
          "updated_at": "2019-02-19T14:31:05Z"
        }
      }
    ]
  },
  "meta": {
    "next_id": 337520,
    "next_page": "/api/v3/attempts?from_id=337520&login_id=47872"
  }
}

Attempts show

Returns a single attempt object.

Parameters

login_id
integer

the ID of the login whose attempts are to be fetched

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/attempts/340?login_id=47872

Sample response

{
  "data": {
    "api_mode": "service",
    "api_version": "3",
    "automatic_fetch": true,
    "daily_refresh": false,
    "categorize": true,
    "created_at": "2019-02-19T13:31:05Z",
    "custom_fields": {},
    "device_type": "desktop",
    "remote_ip": "93.184.216.34",
    "exclude_accounts": [],
    "fail_at": null,
    "fail_error_class": null,
    "fail_message": null,
    "fetch_type": "recent",
    "finished": true,
    "finished_recent": true,
    "from_date": null,
    "id": 340,
    "interactive": false,
    "locale": "en",
    "partial": false,
    "store_credentials": true,
    "success_at": "2019-02-19T14:31:05Z",
    "to_date": null,
    "updated_at": "2019-02-19T14:31:05Z",
    "show_consent_confirmation": true,
    "consent_types": ["account_information"],
    "consent_given_at": "2019-02-19T14:51:05Z",
    "stages": [
      {
        "created_at": "2019-02-19T13:31:05Z",
        "id": 17676,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "start",
        "updated_at": "2019-02-19T13:31:05Z"
      },
      {
        "created_at": "2019-02-19T13:41:05Z",
        "id": 17677,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "connect",
        "updated_at": "2019-02-19T13:41:05Z"
      },
      {
        "created_at": "2019-02-19T14:31:05Z",
        "id": 17681,
        "interactive_fields_names": null,
        "interactive_html": null,
        "name": "finish",
        "updated_at": "2019-02-19T14:31:05Z"
      }
    ]
  }
}

Accounts

Any login can have one or more accounts. The accounts are bound to a currency so that all the transactions within a single account are in the same currency.

Sometimes, the provider allows the user to have several currencies grouped under the same account. For example, if a user holds a debit card that supports 3 currencies, the corresponding login will have 3 accounts, each with one of the debit card’s currencies.

Attributes

id
integer
name
string

the unique name of the account

nature
string

the type of the account. Possible values are: account, bonus, card, checking, credit, credit_card, debit_card, ewallet, insurance, investment, loan, mortgage, savings. Note that for credit_card nature, the balance represents the sum of all negative transactions, the positive ones do not count

balance
decimal

the account’s current balance

currency_code
string

one of the possible values for currency codes. Max 3 letters

extra
object, extra object

extra data associated with the account

login_id
integer

the id of the login the account belongs to

created_at
datetime
updated_at
datetime

Sample Object

{
    "id": 223,
    "name": "Fake account 2",
    "nature": "account",
    "balance": 2012.7,
    "currency_code": "USD",
    "extra": {
        "cards": [
            "1234....5678",
            "*8765"
        ],
        "transactions_count": {
          "posted": 22,
          "pending": 1
        }
    },
    "login_id": 123,
    "created_at": "2019-02-19T13:31:05Z",
    "updated_at": "2019-02-19T13:31:05Z"
}

Listing accounts

You can see the list of accounts of a login. The accounts are sorted in ascending order of their ID, so the newest accounts will come last. You can read more about next_id field, in the pagination section of the reference.

Parameters

from_id
integer, optional

the id from which the next page of accounts starts

login_id
integer, optional

the ID of the login containing the accounts

customer_id
integer, optional

the ID of the customer containing the accounts.
Note: Will be ignored if login_id is present.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/accounts

Sample Response

{
    "data": [
        {
          "id": 142,
          "name": "Fake account 1",
          "nature": "card",
          "balance": 2007.2,
          "currency_code": "EUR",
          "extra": {
            "client_name": "Fake name"
          },
          "login_id": 123,
          "created_at": "2019-02-19T12:31:05Z",
          "updated_at": "2019-02-19T12:31:05Z"
        },
        {
          "id": 143,
          "name": "Fake account 2",
          "nature": "account",
          "balance": 2012.7,
          "currency_code": "USD",
          "extra": {
            "cards": [
              "1234....5678",
              "*8765"
            ],
            "transactions_count": {
              "posted": 22,
              "pending": 1
            }
          },
          "login_id": 123,
          "created_at": "2019-02-19T13:31:05Z",
          "updated_at": "2019-02-19T13:31:05Z"
        }
    ],
    "meta" : {
      "next_id": 144,
      "next_page": "/api/v3/accounts?from_id=144"
    }
}

Nature

An account can be of one of the several types, as described by the nature field:

  • account
  • bonus
  • card
  • checking
  • credit
  • credit_card
  • debit_card
  • ewallet
  • insurance
  • investment
  • loan
  • mortgage
  • savings

Although these values do not affect neither the account’s behavior, nor its properties, they might provide some additional information to the end user.

Extra

The following represents the object you get in the extra field of the account object. Note: You may or may not have all of the fields listed below.

total_payment_amount
decimal

total payment amount for loans or credits

statement_cut_date
date

date when current statement becomes previous one

next_payment_amount
decimal

next payment amount for loans or credits

next_payment_date
date

next payment date for loans or credits

assets
array of strings

array of crypto codes and their amounts assigned to investment account

sort_code
string

routing number(US)/BSB code(Australia)/sort code(UK)

account_name
string

changeable name of the account

status
string

is the account active or inactive

client_name
string

account client owner

iban
string

account IBAN number

swift
string

account SWIFT code

card_type
string

type of the card account. Possible values are: american_express, china_unionpay, diners_club, jcb, maestro, master_card, uatp and visa

account_number
string

internal bank account number

blocked_amount
decimal

the amount currently blocked in account’s currency

available_amount
decimal

available amount in account’s currency

credit_limit
decimal

credit limit in account’s currency

interest_rate
decimal

interest rate of the account as percentage value

expiry_date
date

card expiry date

open_date
date

card open date

current_time
datetime

time of provider statement generation (applicable to banks)

current_date
date

date of provider statement generation (applicable to banks)

cards
array of strings

list of masked card numbers

units
decimal

amount of units owned (used with unit_price, available for investment accounts nature only)

unit_price
decimal

price per unit (used with units, available for investment accounts nature only)

transactions_count
object

number of transactions, separated by posted and pending. e.g. {'posted': 12, 'pending': 0}

closing_balance
decimal

account balance at the end of a accounting period

opening_balance
decimal

account balance that is brought forward from the end of one accounting period to the beginning of a new accounting period

Transactions

A transaction represents a movement of funds. Any transaction can represent a monetary transfer, withdrawal, income or expense interchange. Transactions are retained in a login’s accounts, and are imported from one of the providers.

Category

Sepctre API uses an algorithm for automatic categorization of transactions. Thus, when importing a login, all the transactions corresponding to the login will be assigned to one of the categories. We also expose an API route for your applications to improve the categorization process based on your user’s behaviors.

Duplication

Although we import most of the data from the providers thoroughly checking the transactions for duplicates, the providers might change the format of some data, causing us to return transactions that have different data, but are duplicates to your end users. You can use the Duplicate action in order to let us know about a duplicate so that we can take immediate action.

Attributes

id
integer
mode
string

possible values are: normal, fee, transfer

status
string

possible values are: posted, pending

made_on
date

the date when the transaction was made

amount
decimal

transaction’s amount

currency_code
string

transaction’s currency code

description
text

transaction’s description

category
string

transaction’s category

duplicated
boolean

whether the transaction is duplicated or not

extra
object, extra object

extra data associated with the transaction

account_id
integer

the id of the account the transaction belongs to

created_at
datetime
updated_at
datetime

Sample object

{
    "id": 987,
    "duplicated": false,
    "mode": "normal",
    "status": "posted",
    "made_on": "2013-05-03",
    "amount": -200.0,
    "currency_code": "USD",
    "description": "Money spent on company advertising",
    "category": "advertising",
    "extra": {
      "posting_date": "2013-05-07",
      "time": "23:56:12",
      "original_amount": -3974.60,
      "original_currency_code": "CZK"
    },
    "account_id": 100,
    "created_at": "2019-02-17T15:31:06Z",
    "updated_at": "2019-02-18T15:31:06Z"
}

List transactions

You can see the list of transactions of an account. You can read more about the next_id field in the pagination section of the reference.

Parameters

account_id
integer, optional

the id of the account

login_id
integer, optional

the id of the login

from_id
integer, optional

the id from which the next page of transactions starts

All of the optional parameters for transactions list can be combined in any possible manner.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/transactions

Sample response

{
  "data": [
    {
      "id": 987,
      "duplicated": false,
      "mode": "normal",
      "status": "posted",
      "made_on": "2013-05-03",
      "amount": -200.0,
      "currency_code": "USD",
      "description": "test transaction",
      "category": "advertising",
      "extra": {
        "posting_date": "2013-05-07",
        "time": "23:56:12",
        "original_amount": -3974.60,
        "original_currency_code": "CZK"
      },
      "account_id": 100,
      "created_at": "2019-02-17T15:31:06Z",
      "updated_at": "2019-02-18T15:31:06Z"
    },
    {
      "id": 988,
      "duplicated": false,
      "mode": "normal",
      "status": "posted",
      "made_on": "2013-05-03",
      "amount": 50.0,
      "currency_code": "USD",
      "description": "business expense",
      "category": "business_services",
      "extra": {
        "posting_date": "2013-05-06",
        "time": "12:16:25",
        "original_amount": 993.90,
        "original_currency_code": "CZK"
      },
      "account_id": 100,
      "created_at": "2019-02-17T15:31:06Z",
      "updated_at": "2019-02-18T15:31:06Z"
    }
  ],
  "meta" : {
    "next_id": 990,
    "next_page": "/api/v3/transactions/?login_id=124&account_id=225&from_id=990"
  }
}

Pending

You can use this route to obtain the currently pending transactions for an account. Note that although the pending transactions have the same structure as the regular transactions, they behave differently.

The provider may delete the pending transactions and modify some of its attributes. Thus, every time a login is refreshed, the existing pending transactions will be replaced by the currently pending transactions.

This means that your app should not rely on the pending transactions having an ID, since they might be replaced with similar transactions having a different ID. We also recommend your app to remove the account’s pending transactions every time you fetch the transactions.

Parameters

account_id
integer, optional

the id of the account

login_id
integer, optional

the id of the login

from_id
integer, optional

the id from which the next page of transactions starts

As with the list route, you can combine the parameters.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/transactions/pending

Sample response

{
  "data": [
    {
      "id": 987,
      "duplicated": false,
      "mode": "normal",
      "status": "pending",
      "made_on": "2013-05-03",
      "amount": -200.0,
      "currency_code": "USD",
      "description": "ads expense",
      "category": "advertising",
      "extra": {
        "posting_date": "2013-05-07",
        "time": "23:56:12",
        "original_amount": -3974.60,
        "original_currency_code": "CZK"
      },
      "account_id": 100,
      "created_at": "2019-02-17T15:31:06Z",
      "updated_at": "2019-02-18T15:31:06Z"
    }
  ],
  "meta" : {
    "next_id": 990,
    "next_page": "/api/v3/transactions/pending?login_id=124&account_id=225&from_id=990"
  }
}

Duplicate

Mark a list of transactions as duplicated.

Request body

The request body is an array of objects wrapped in the data field. Each object has a transaction_id field which represents a transaction id.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        -d "{ \
              \"data\": [ \
                { \
                  \"transaction_id\": 123 \
                }, \
                { \
                  \"transaction_id\": 345 \
                } \
              ] \
            }" \
        https://www.saltedge.com/api/v3/transactions/duplicate

Sample response

{
  "data": {
    "duplicated": true
  }
}

Unduplicate

Remove duplicated flag from a list of transactions.

Request body

As with /transactions/duplicate, the request body is an array of objects wrapped in the data field. Each object has a transaction_id field which represents a transaction id.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X PUT \
        -d "{ \
              \"data\": [ \
                { \
                  \"transaction_id\": 123 \
                }, \
                { \
                  \"transaction_id\": 345 \
                } \
              ] \
            }" \
        https://www.saltedge.com/api/v3/transactions/unduplicate

Sample Response

{
  "data": {
    "unduplicated": true
  }
}

Extra

The following represents the object you get in the extra field of the transaction object. Note: You may or may not have all of the fields listed below.

id
string

possible transaction ID

record_number
string

bank record number

information
text

information about the transaction

time
time

time when the transaction was made

posting_date
date

date when the transaction appears in statement

posting_time
string

time in HH:MM:SS format, representing time when the transaction appears in statement

convert
boolean

whether the transaction amount was converted using exchange rates or not

transfer_account_name
string

name of the linked account

account_number
string

number of the account the transaction belongs to

original_amount
decimal

native amount of the transaction in transaction’s currency (comes with original_currency_code)

original_currency_code
string

native currency of the transaction (comes with original_amount)

asset_code
string

asset common used abbreviation (Ex.: BTC - Bitcoin, XAU - Gold etc.)

asset_amount
decimal

original transaction amount in asset units

original_category
string

the original category of the transaction

original_subcategory
string

the original subcategory of the transaction

customer_category_code
string

the category (present in categories list) that was categorized by the rules created by the customer

customer_category_name
string

the category (not present in categories list) that was categorized by the rules created by the customer

possible_duplicate
boolean

is set to true if current transaction duplicates amount, made_on and currency_code of any transaction parsed in previous attempt

tags
array of strings

the original tags of the transaction

mcc
string

the transaction’s Merchant Category Code

payee
string

to whom money is paid

payee_information
string

additional payee information

payer
string

who paid the money

payer_information
string

additional payer information

type
string

transaction type

check_number
string

payee’s transaction check number

units
decimal

amount of units owned (used with unit_price, available for investment accounts nature only)

additional
text

additional information (recommended to use in concatenation with original description, if present)

unit_price
decimal

price per unit (used with units, available for investment accounts nature only)

account_balance_snapshot
decimal

balance of the transaction’s amount at the moment the transaction was imported

categorization_confidence
float

value from 0 to 1, the probability that the current category is the correct one

variable_code
string

identifies the tax subject to the tax office, used for domestic payemnts (transfers)

specific_code
string

additional identification information for cashless domestic payments (transfers)

constant_code
string

payment reference for cashless domestic payments (transfers)

closing_balance
decimal

account balance after transaction

opening_balance
decimal

account balance before transaction

Categories

The categories are represented as strings. They are structured as parent and child categories, which can be identified by the tree structure sent in the Listing categories request.

This arrangement is represented as a reference. You can change it as you wish.

Listing categories

You can get the list of all the categories that we support.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/categories

Sample Response

{
   "data": {
      "auto_and_transport": [
         "car_rental",
         "gas_and_fuel",
         "parking",
         "public_transportation",
         "service_and_parts",
         "taxi"
      ],
      "bills_and_utilities": [
         "internet",
         "phone",
         "television",
         "utilities"
      ],
      "business_services": [
         "advertising",
         "office_supplies",
         "shipping"
      ],
      "education": [
         "books_and_supplies",
         "student_loan",
         "tuition"
      ],
      "entertainment": [
         "amusement",
         "arts",
         "games",
         "movies_and_music",
         "newspapers_and_magazines"
      ],
      "fees_and_charges": [
         "provider_fee",
         "loans",
         "service_fee",
         "taxes"
      ],
      "food_and_dining": [
         "alcohol_and_bars",
         "cafes_and_restaurants",
         "groceries"
      ],
      "gifts_and_donations": [
         "charity",
         "gifts"
      ],
      "health_and_fitness": [
         "doctor",
         "personal_care",
         "pharmacy",
         "sports",
         "wellness"
      ],
      "home": [
         "home_improvement",
         "home_services",
         "home_supplies",
         "mortgage_and_rent"
      ],
      "income": [
         "bonus",
         "investment_income",
         "paycheck"
      ],
      "insurance": [
         "car_insurance",
         "health_insurance",
         "life_insurance",
         "property_insurance"
      ],
      "kids": [
         "allowance",
         "babysitter_and_daycare",
         "baby_supplies",
         "child_support",
         "kids_activities",
         "toys"
      ],
      "pets": [
         "pet_food_and_supplies",
         "pet_grooming",
         "veterinary"
      ],
      "shopping": [
         "clothing",
         "electronics_and_software",
         "sporting_goods"
      ],
      "transfer": [],
      "travel": [
         "hotel",
         "transportation",
         "vacation"
      ],
      "uncategorized": []
   }
}

Learn category

You can change the category of some transactions, thus improving the categorization accuracy.

Post body

transaction_id
required

the id of the transaction

category_code
required

the new category code of the transaction

Possible Errors

URL

https://www.saltedge.com/api/v3/categories/learn

Method

POST

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X POST \
        -d "{ \
              \"data\": [ \
                { \
                  \"transaction_id\": 123, \
                  \"category_code\": \"paycheck\" \
                }, \
                { \
                  \"transaction_id\": 124, \
                  \"category_code\": \"car_rental\" \
                } \
              ] \
            }" \
        https://www.saltedge.com/api/v3/categories/learn

Sample Response

{
  "data": {
    "learned": true
  }
}

Currencies

The currency is represented just as a string. We use ISO 4217 currency codes. Thus, all the currency codes will have exactly three uppercase letters. If certain currencies no longer exist, we will still support them for the transactions held in those currencies. Example:

  • Zambian Kwacha ZMK (old currency code)
  • Zambian Kwacha ZMW (new currency code)

both of them are supported.

Listing currencies

You can get the list of all the currencies that we support.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/currencies

Sample Response

{
  "data":
    [
      {
        "code": "AED",
        "name": "United Arab Emirates dirham"
      },
      {
        "code": "AFN",
        "name": "Afghan afghani"
      },
      {
        "code": "ALL",
        "name": "Albanian lek"
       },
      {
        "code": "AMD",
        "name": "Armenian dram"
      },
      {
        "code": "ANG",
        "name": "Netherlands Antillean guilder"
      },
      {
        "code": "AOA",
        "name": "Angolan kwanza"
      },
      {
        "code": "ARS",
        "name": "Argentine peso"
      },
      {
        "code": "AUD",
        "name": "Australian dollar"
      },
      {
        "code": "AWG",
        "name": "Aruban florin"
      },
    ...
    ]
}

Assets

Some of our providers support investment accounts. Such accounts may have an extra assets key which contains an array of assets. Each asset consists of:

  • code - asset common used abbreviation (Ex.: BTC - Bitcoin, XAU - Gold etc.)
  • amount - total amount of owned assets

balance for these investment accounts is a sum of all assets amounts converted to selected currency.

Sample Object

{
    "id": 223,
    "name": "bittrex trading",
    "nature": "investment",
    "balance": 4084.7,
    "currency_code": "USD",
    "extra": {
        "assets": [
          { "code": "BTC",  "amount": 0.25555165 },
          { "code": "ETH",  "amount": 12.456 },
          { "code": "USDT", "amount": 3054.57935489 },
          { "code": "XLM",  "amount": 0.0 }
        ],
        "transactions_count": {
          "posted": 22,
          "pending": 1
        }
    },
    "login_id": 123,
    "created_at": "2019-02-19T13:31:06Z",
    "updated_at": "2019-02-19T13:31:06Z"
}

Listing assets

You can get the list of all the assets that we support.

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/assets

Sample Response

{
  "data": [
    {
        "code": "BSD",
        "name": "BitSend"
    },
    {
        "code": "BSTY",
        "name": "GlobalBoost- Y"
    },
    {
        "code": "BTA",
        "name": "Bata"
    },
    {
        "code": "BTC",
        "name": "Bitcoin"
    },
    {
        "code": "BTCD",
        "name": "BitcoinDark"
    },
    {
        "code": "BTS",
        "name": "BitShares"
    }
    ...
  ]
}

Rates

A rate is an index of any currency value in relation to the USD currency. All rates are updated daily.

Attributes

currency_code
string

the code of the currency

rate
decimal

the ratio of the currency in relation to the USD currency

fail
boolean

the field which shows if we have an up-to-date rate for the currency. If the flag is true, it means that the rate has been taken from the previous available date

issued_on
date

the date the rate has been issued on

Sample object

{
    "currency_code": "EUR",
    "rate": 1.37,
    "issued_on": "2014-02-12",
    "fail": false
}

Listing rates

You can get the list of all the currency rates that we support. You will receive the currency rates starting March 21, 2014. If any older date is requested, you will still receive the rates starting March 21, 2014.

Parameters

date
optional

date for which currency rates will be retrieved

Possible Errors

Authentication

Sample request

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/rates?date=2014-03-21

Sample Response

{
  "data": [
    {
      "currency_code": "ZMK",
      "rate": 0.0001926968,
      "fail": false
    },
    {
      "currency_code": "ZWL",
      "rate": 0.0031021699,
      "fail": false
    },
    {
      "currency_code": "ZMW",
      "rate": 0.1589825119,
      "fail": false
    },
    {
      "currency_code": "AED",
      "rate": 0.2722570106,
      "fail": false
    }
    ...
  ],
  "meta" : {
    "issued_on": "2014-03-21"
  }
}