API Reference

Get user

The /user/{external_user_id} endpoint returns the linked merchant IDs and pending merchant IDs. You can use this endpoint to track the user progress on the merchants available on your client.

Endpoint

GET https://development.knotapi.com/user/{external_user_id}?unique=true

Request fields

Field NameTypeDescription
external_user_idrequired, stringYour internal user identifier.
uniquebooleanDetermine if the result should contain unique merchant IDs. Default: true
curl -X GET 'https://development.knotapi.com/user/12345' \
  -u 'bd271e95-14e6-47ab-9f4f-225898f69183:cf819749c0574616ba93b5935b8cf108' \
  -H 'Knot-Version: 2.0'

Response example

{
    "linkedMerchants": [
        34,
        8
    ],
    "pendingMerchants": [
        16,
        44,
        10
    ]
}

Delete user

The /user/delete endpoint allows you to delete the user data and anything related. This is useful for GDPR deletion requests.

Endpoint

POST https://development.knotapi.com/user/delete

Request fields

Field NameTypeDescription
external_user_idrequired, stringYour internal user identifier.
curl -X POST 'https://development.knotapi.com/user/delete' \
  -u 'bd271e95-14e6-47ab-9f4f-225898f69183:cf819749c0574616ba93b5935b8cf108' \
  -H 'Content-Type: application/json' \
  -H 'Knot-Version: 2.0' \
  -d '{
    "external_user_id": "3dcbb19a-b2f1-4a7b-8792-d76027b627b3"
  }'
  

Response example

{
    "message": "Success"
}