Merchant
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 Name | Type | Description |
---|---|---|
type | required, string | The type of merchant to search for. This should be set to card_switcher . |
search | string | The name of the merchant to search for. |
user_agent | string | The 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. |
platform | string | The 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_id | string | Your internal user identifier. |
status | string | Filter by status: enrolling, credentials, otp, approval, questions, enrolled, failed, not enrolled |
Note on
user_agent
andplatform
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
orplatform
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 Name | Type | Description |
---|---|---|
id | int | The unique ID of the merchant. |
name | string | The name of the merchant. |
logo | string | The logo displayed for the merchant. |
status* | string | Possible 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 Name | Type | Description |
---|---|---|
session_id | required, string | Your Knot session ID. |
Response example (1 connected merchant)
[
{
"id": 44,
"name": "Amazon",
"logo": "https://storage.googleapis.com/knot-api/merchants/8pflGg1roAFAbdEl03zpl2dlYh54ZTmtq3yQ5NdO.png",
"status": "enrolled"
}
]
Updated about 2 months ago