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 user. E.g. Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2

See the note below on the importance of this field.
platformstringThe platform of the user, in case User-Agent is not available.
Accepted values: android, ios, web

See the note below on the importance of this field.
external_user_idstringYour internal user identifier.
statusstringFilter by status: enrolling, credentials, otp, approval, questions, enrolled, failed, not enrolled

🚧

Note on user_agent and platform

If your implementation lists merchants within your own native app prior to navigating users to the Knot SDK, it is required that you provide the user_agent or platform in your request. This is important so that Knot returns the appropriate merchant list for each platform.

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"
  }
]