API Reference

Get merchants

To retrieve all merchants or search for merchants, call the /merchant/list endpoint.

Endpoint

POST https://development.knotapi.com/merchant/list

Request fields

Field NameTypeDescription
typerequired, stringThe type of merchant to search for. This should be set to card_switcher.
searchstringThe name of the merchant to search for.
user_agentstringThe User-Agent of the final user. This field is required if you will show the list of merchants in your application.
external_user_idstringYour internal user identifier.

Response example

If the search is successful, the endpoint will return a JSON object containing a list of matching merchants. The list will include the following information for each merchant:

Field NameTypeDescription
idintThe unique ID of the merchant.
namestringThe name of the merchant.
logostringThe logo displayed for the merchant.
status*stringPossible values: enrolling, credentials, otp, approval, questions, enrolled, failed, not enrolled
[
  {
    "id": 44,
    "name": "Amazon",
    "logo": "https://storage.googleapis.com/knot-api/merchants/8pflGg1roAFAbdEl03zpl2dlYh54ZTmtq3yQ5NdO.png",
    "status": "enrolled"
  },
  {
    "id": 19,
    "name": "DoorDash",
    "logo": "https://storage.googleapis.com/knot-api/merchants/E9gq4bxyuVTQipt5ek0xRZsMW4dO1K8pos9ZKLrd.png",
    "status": "failed"
  },
  {
    "id": 41,
    "name": "Gopuff",
    "logo": "https://storage.googleapis.com/knot-api/merchants/IjcYPqgKO60f1WtE2z42T1db8EwoeyNKudplzRUT.png",
    "status": "not enrolled"
  }
]
[
  {
    "id": 44,
    "name": "Amazon",
    "logo": "https://storage.googleapis.com/knot-api/merchants/8pflGg1roAFAbdEl03zpl2dlYh54ZTmtq3yQ5NdO.png"
  },
  {
    "id": 19,
    "name": "DoorDash",
    "logo": "https://storage.googleapis.com/knot-api/merchants/E9gq4bxyuVTQipt5ek0xRZsMW4dO1K8pos9ZKLrd.png"
  },
  {
    "id": 41,
    "name": "Gopuff",
    "logo": "https://storage.googleapis.com/knot-api/merchants/IjcYPqgKO60f1WtE2z42T1db8EwoeyNKudplzRUT.png"
  }
]

Get connected merchants (Public)

To retrieve all merchants connected to the user, call the /merchant/connected?session={session_id} endpoint.

Endpoint

POST https://development.knotapi.com/merchant/connected?session_id=4f7d1df6-2841-4b51-9ed7-9c7e372885c4

Request fields

Field NameTypeDescription
session_idrequired, stringYour Knot session ID.

Response example (1 connected merchant)

[
  {
    "id": 44,
    "name": "Amazon",
    "logo": "https://storage.googleapis.com/knot-api/merchants/8pflGg1roAFAbdEl03zpl2dlYh54ZTmtq3yQ5NdO.png",
    "status": "enrolled"
  }
]