Collections
Retrieve a Collection

Retrieve a collection

Fetches one collection belonging to your business.

GET
https://api-prod.useknit.io/api/v1/collections/{id}
Scopecollections:readAuthBearer token

Path parameters

idstringrequired

The collection's id, as returned when it was created.

Request

cURL
curl "https://api-prod.useknit.io/api/v1/collections/9cddd3ad-c2a8-463c-a703-158b900beea8" \
  -H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
  -H "Accept: application/json"

Response

200 OK
{
  "statusCode": 200,
  "message": "Collection fetched successfully",
  "data": {
    "id": "9cddd3ad-c2a8-463c-a703-158b900beea8",
    "network": "MATIC_MAINNET",
    "token": "USDT",
    "address": "0x3761f3504104f4faa8959963a5d8dce89989d45b",
    "tokenAmount": "2500.000000000000000000",
    "tokenAmountRequested": "2500.000000000000000000",
    "tokenAmountReceived": "2500.000000000000000000",
    "tokenToUsd": "1.00000000",
    "feeInUsd": "0.00000000",
    "feeByToken": "0.000000000000000000",
    "fiatExchangeRateToUsd": null,
    "fiatAmountInUsd": null,
    "fiatAmount": null,
    "fiatAmountCurrency": null,
    "status": "SUCCESSFUL",
    "transactionHash": "0xb480ed44a275f042e482a78d9c5b54fcf612441c",
    "transactionBlockNumber": 61234567,
    "numberOfConfirmations": 12,
    "confirmationThreshold": 10,
    "merchantRedirectUrl": "https://example.com/thanks",
    "merchantCallbackUrl": "https://example.com/webhooks/knit",
    "paymentLinkUrl": "https://checkout.collection.useknit.io/9cddd3ad-c2a8-463c-a703-158b900beea8",
    "expiresAt": "2024-08-27T14:02:10.000000Z",
    "createdAt": "2024-08-27T13:32:10.000000Z",
    "updatedAt": "2024-08-27T13:35:44.000000Z"
  },
  "success": true
}

Prefer webhooks over polling this endpoint. If you do poll — for example to reconcile after downtime — back off rather than looping tightly.

Errors

StatusCause
401Missing or invalid token, IP not allow-listed, or missing collections:read
404No collection with that ID belongs to your business