Get Link Details

Get Link Details

Fetches details about a link.

URL

GET
/links/{id}
Request
curl --request GET \
--url https://api.moneykit.com/links/[id] \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};

fetch('https://api.moneykit.com/links/[id]', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests

url = "https://api.moneykit.com/links/[id]"

headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}

response = requests.request("GET", url, headers=headers)

print(response.text)
package main

import (
"fmt"
"net/http"
"io/ioutil"
)

func main() {

url := "https://api.moneykit.com/links/[id]"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)

fmt.Println(res)
fmt.Println(string(body))

}
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.moneykit.com/links/[id]")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

response = http.request(request)
puts response.read_body
import Foundation

let headers = ["Authorization": "Bearer REPLACE_BEARER_TOKEN"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.moneykit.com/links/[id]")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})

dataTask.resume()
Response
{
"link_id": "mk_eqkWN34UEoa2NxyALG8pcV",
"institution_id": "chase",
"institution_name": "Chase",
"institution_avatar": "https://example.com/avatar.png",
"state": "connected",
"error_code": null,
"provider": "akoya",
"link_tags": [
"smoke_test",
"user_type:admin"
],
"webhook": "https://example.com/webhook",
"products": {
"accounts": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
},
"account_numbers": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
},
"identity": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
},
"transactions": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
},
"investments": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
},
"enrichment": {
"refreshed_at": "2023-02-16T09:14:11",
"last_attempted_at": "2023-02-16T09:14:11",
"error_code": "rate_limit",
"error_message": string,
"unavailable": string
}
},
"available_products": [
"account_numbers"
]
}
{
"error_code": "api_error.auth.expired_access_token",
"error_message": "Access token expired",
"documentation_url": string
}
{
"error_code": "link_error.forbidden_action",
"error_message": "Accounts access not permitted",
"documentation_url": string
}
{
"error_code": "link_error.not_found",
"error_message": "Link not found.",
"documentation_url": string
}
{
"error_code": "link_error.deleted",
"error_message": "This link was deleted at some earlier time.",
"documentation_url": string
}
{
"error_code": "link_error.bad_state",
"error_message": string,
"documentation_url": string,
"link_error_code": string
}
{
"error_code": "api_error.rate_limit_exceeded",
"error_message": "Rate limit exceeded",
"documentation_url": string
}

id

: string

required

The unique ID for this link.

example: mk_eqkWN34UEoa2NxyALG8pcV

Responses

200

Link details.

institution_id

: string

The unique ID for the institution this link is connected to.

example: chase

institution_name

: string

The institution name this link is connected to.

example: Chase

institution_avatar

: string

An avatar image for the link's institution.

example: https://example.com/avatar.png

state

: string

The current state of this link. Links that are not yet connected, or which require reconnection, will be in one of the non-connected states. Please note that recently deleted links can be fetched by this function (and will have a state of deleted); however, MoneyKit completely removes deleted links 90 days after deletion, so older deleted links will not be seen after this time.

example: connected

Allowed values:

connecting

awaiting_token_exchange

connected

deleted

error

error_code

: string

The type of error, if the link is in the error state. See Errors for an explanation of error codes.

Allowed values:

system_error

provider_error

institution_error

user_error

auth_expired

no_accounts

user_setup_required

invalid_credentials

user_oauth_denied

user_input_incorrect

incomplete

last_synced_at

: string

deprecated

An ISO-8601 timestamp indicating the last time that the link was updated.

format:

date-time

example: 2023-02-16T09:14:11

provider

: string

The provider that most recently facilitated the creation of this link. Note that MoneyKit may switch providers if necessary to provide continuous access to the institution. Not all providers are automatically available or usable; provider selection is dynamic and depends on many factors.

example: akoya

Allowed values:

moneykit

finicity

plaid

yodlee

mx

akoya

tags

: array

deprecated

use link_tags instead

webhook

: string

The webhook url assigned to this link.

example: https://example.com/webhook

products

: object

The granted products available for this link.

available_products

: array

A list of products that could be added to this link. Products can be added to (and removed from) an existing link by creating a new link-session and supplying the existing_link_id with a new set of products.

Allowed values:

accounts

account_numbers

identity

transactions

investments

enrichment

403

Forbidden by link owner. The user did not give permission to access this data when linking.

error_code

: string

default: "link_error.forbidden_action"

Allowed values:

link_error.forbidden_action

error_message

: string

Error message

example: Accounts access not permitted

documentation_url

: string

404

Link not found.

error_code

: string

default: "link_error.not_found"

Allowed values:

link_error.not_found

error_message

: string

default: "Link not found."

documentation_url

: string

410

Link deleted.

error_code

: string

default: "link_error.deleted"

Allowed values:

link_error.deleted

error_message

: string

default: "This link was deleted at some earlier time."

documentation_url

: string

422

Link error.

error_code

: string

default: "link_error.bad_state"

Allowed values:

link_error.bad_state

error_message

: string

documentation_url

: string

429

Rate limit exceeded.

error_code

: string

default: "api_error.rate_limit_exceeded"

Allowed values:

api_error.rate_limit_exceeded

error_message

: string

Error message

default: "Rate limit exceeded"

documentation_url

: string