Try asking a question about Knot to the AI assistant or installing the MCP server to get help right from your IDE.
curl --request POST \
--url https://development.knotapi.com/transactions/sync \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 46,
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 5
}
'{
"merchant": {
"id": 4,
"name": "Walmart"
},
"transactions": [
{
"id": "13da3c28-a068-4642-9ce2-b730cfda5f5f",
"external_id": "a9x7bq2lmw5p",
"datetime": "2024-11-10T00:00:00+00:00",
"url": "https://www.example.com/orders/123123123",
"order_status": "COMPLETED",
"payment_methods": [
{
"external_id": "x7q9m2lbw5pazc",
"type": "CARD",
"brand": "VISA",
"last_four": "5690",
"name": "Ada's credit card",
"transaction_amount": "23.20"
},
{
"external_id": "x7q9m2lbw5pazc",
"type": "GIFT_CARD",
"brand": "VISA",
"last_four": "1802",
"name": "",
"transaction_amount": "20.00"
}
],
"price": {
"sub_total": "43.69",
"adjustments": [
{
"type": "TAX",
"label": "NYC local sales tax",
"amount": "3.88"
},
{
"type": "DISCOUNT",
"label": "Summer promo",
"amount": "-4.37"
}
],
"total": "43.20",
"currency": "USD"
},
"products": [
{
"external_id": "10315643",
"name": "Band-Aid Adhesive Bandages Variety Pack",
"url": "https://www.example.com/ip/10315643",
"quantity": 1,
"price": {
"sub_total": "12.56",
"total": "12.56",
"unit_price": "12.56"
},
"eligibility": [
"FSA/HSA"
]
},
{
"external_id": "1031891",
"name": "Dixie Ultra 8-12 Paper Plate, 240-count",
"url": "https://www.example.com/ip/1031891",
"quantity": 1,
"price": {
"sub_total": "8.14",
"total": "8.14",
"unit_price": "8.14"
},
"eligibility": []
},
{
"external_id": "1038973",
"name": "4Pairs Men's Elite Sports Socks Athletic Crew Socks Mid-calf Boys for Football, Basketball, Running Soccer",
"url": "https://www.example.com/ip/1038973",
"quantity": 1,
"price": {
"sub_total": "22.99",
"total": "22.99",
"unit_price": "22.99"
},
"eligibility": []
}
]
}
],
"next_cursor": "<string>",
"limit": 5
}Sync a user’s transactions for a merchant account using cursor-based pagination.
curl --request POST \
--url https://development.knotapi.com/transactions/sync \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 46,
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 5
}
'{
"merchant": {
"id": 4,
"name": "Walmart"
},
"transactions": [
{
"id": "13da3c28-a068-4642-9ce2-b730cfda5f5f",
"external_id": "a9x7bq2lmw5p",
"datetime": "2024-11-10T00:00:00+00:00",
"url": "https://www.example.com/orders/123123123",
"order_status": "COMPLETED",
"payment_methods": [
{
"external_id": "x7q9m2lbw5pazc",
"type": "CARD",
"brand": "VISA",
"last_four": "5690",
"name": "Ada's credit card",
"transaction_amount": "23.20"
},
{
"external_id": "x7q9m2lbw5pazc",
"type": "GIFT_CARD",
"brand": "VISA",
"last_four": "1802",
"name": "",
"transaction_amount": "20.00"
}
],
"price": {
"sub_total": "43.69",
"adjustments": [
{
"type": "TAX",
"label": "NYC local sales tax",
"amount": "3.88"
},
{
"type": "DISCOUNT",
"label": "Summer promo",
"amount": "-4.37"
}
],
"total": "43.20",
"currency": "USD"
},
"products": [
{
"external_id": "10315643",
"name": "Band-Aid Adhesive Bandages Variety Pack",
"url": "https://www.example.com/ip/10315643",
"quantity": 1,
"price": {
"sub_total": "12.56",
"total": "12.56",
"unit_price": "12.56"
},
"eligibility": [
"FSA/HSA"
]
},
{
"external_id": "1031891",
"name": "Dixie Ultra 8-12 Paper Plate, 240-count",
"url": "https://www.example.com/ip/1031891",
"quantity": 1,
"price": {
"sub_total": "8.14",
"total": "8.14",
"unit_price": "8.14"
},
"eligibility": []
},
{
"external_id": "1038973",
"name": "4Pairs Men's Elite Sports Socks Athletic Crew Socks Mid-calf Boys for Football, Basketball, Running Soccer",
"url": "https://www.example.com/ip/1038973",
"quantity": 1,
"price": {
"sub_total": "22.99",
"total": "22.99",
"unit_price": "22.99"
},
"eligibility": []
}
]
}
],
"next_cursor": "<string>",
"limit": 5
}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.
The input parameters required for syncing transactions.
Unique identifier for the merchant.
46
Your unique identifier for the user.
"abc"
Cursor token pointing to the last transaction retrieved. The /transactions/sync endpoint uses cursor-based pagination to track which transactions have already been seen, minimizing data redundancy.
On the first call, the endpoint returns all transactions paginated. In subsequent calls, only new transactions are provided using the next cursor.
"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
Maximum number of transactions to retrieve (min: 1, max: 100).
5
Successful request.
Show child attributes
UUID for the transaction.
"13da3c28-a068-4642-9ce2-b730cfda5f5f"
External identifier for the transaction provided by the merchant.
"a9x7bq2lmw5p"
Timestamp of the transaction in UTC. ISO 8601 format. Note that Knot does not guarantee a specific order in which transactions are returned.
"2024-11-10T00:00:00+00:00"
URL associated with the transaction.
"https://www.example.com/orders/123123123"
Status of the order associated with the transaction.
ORDERED, BILLED, SHIPPED, DELIVERED, RETURNED, REFUNDED, CANCELLED, FAILED, COMPLETED, PICKED_UP, UNRECOGNIZED "COMPLETED"
List of payment methods.
Show child attributes
External identifier for the payment method provided by the merchant.
"x7q9m2lbw5pazc"
Type of the payment method.
CARD, APPLE_PAY, GOOGLE_PAY, AMAZON_PAY, PAYPAL, CASH_APP, VENMO, AFFIRM, KLARNA, GIFT_CARD, CASH, BANK_ACCOUNT, LOYALTY_POINTS, UNRECOGNIZED "CARD"
Brand of the payment method. Includes EBTSNAP.
"VISA"
Last 4 digits of the payment method, if a payment card.
"5690"
Name of the payment method provided by the user.
"Homer's credit card"
Transaction amount associated with the payment method.
"16.23"
Show child attributes
Subtotal price of the transaction.
"12.56"
List of price adjustments.
Show child attributes
Type of adjustment.
DISCOUNT, TAX, TIP, FEE, REFUND, UNRECOGNIZED "TAX"
Label of the adjustment from the merchant.
"NYC local sales tax"
Amount of the adjustment.
"3.67"
Total price of the transaction.
"16.23"
Currency of the price. ISO 4217 format.
"USD"
Show child attributes
External identifier for the product.
"10315643"
Name of the product.
"Great Value Turkey Flavored Stuffing Mix"
URL of the product.
"https://www.example.com/ip/10315643"
Number of units of the product purchased in the transaction.
1
Show child attributes
Subtotal price of the product in the transaction.
"12.56"
Total price of the product in the transaction.
"12.56"
Price of the product per unit.
"12.56"
The eligibility of the product.
["FSA/HSA"]Cursor token for the next page of transactions.
Number of transactions returned based on the limit provided.
5
Was this page helpful?