GET
/
accounts
/
get
curl --request GET \
  --url https://development.knotapi.com/accounts/get \
  --header 'Authorization: Basic <encoded-value>'
[
{
"merchant": {
"id": 19,
"name": "DoorDash",
"logo": "https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png"
},
"connection": {
"status": "connected"
},
"lifecycle": {
"status": null
},
"last_user_action": {
"attempted_at": null,
"status": null
}
},
{
"merchant": {
"id": 40,
"name": "Instacart",
"logo": "https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png"
},
"connection": {
"status": "connected"
},
"lifecycle": {
"status": null
},
"last_user_action": {
"attempted_at": null,
"status": null
}
},
{
"merchant": {
"id": 12,
"name": "Target",
"logo": "https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png"
},
"connection": {
"status": "disconnected"
},
"lifecycle": {
"status": null
},
"last_user_action": {
"attempted_at": null,
"status": null
}
}
]

This endpoint is used to retrieve an array of merchant accounts a given user currently has linked to Knot.

The endpoint returns an array of merchant accounts for a given user (specified in the request with external_user_id) that are currently linked to Knot. If a user unlinked a merchant account with Unlink Merchant Account, it will not be returned.

You can choose to retrieve all merchant accounts for a user or a single merchant account by passing a specific merchant_id in the request.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password. Use your client_id as the username and your secret as the password value.

Query Parameters

external_user_id
string
required

Your unique identifier for the user.

merchant_id
integer

Unique identifier for a merchant. Used to return a single merchant account object.

Example:

19

type
enum<string>

Task (login attempt) type for which you want to get the status in lifecycle.status.

Available options:
card_switcher,
transaction_link
Example:

"card_switcher"

Response

200
application/json

Successful request. If you pass a merchant_id in the request, the response will be a single object, instead of an array.

The response is of type Array · object[].