Knit API Documentation
Get Single Collection
{{baseUrl}}/api/collections/:id
Headers
- X-API-KEY: Your API key, which authorizes the request.
- Accept: Set to application/json to receive the response in JSON format.
Path Variables
- id: The unique identifier of the wallet you wish to retrieve information for. This should be replaced with the actual collection ID in your request.
Sample Request
Sample Request
curl --location -g '{{baseUrl}}/api/collections/9cddd3ad-c2a8-463c-a703-158b900beea8' \
--header 'X-API-KEY: {{apiKey}}' \
--header 'Accept: application/json'
Sample Response
Sample Response
{
"success": true,
"message": "Collection fetched successfully",
"status": 200,
"data": {
"id": "9cddd3ad-c2a8-463c-a703-158b900beea8",
"network": "MATIC_MAINNET",
"token": "USDT",
"address": "0x3761f3504104f4faa8959963a5d8dce89989d45b",
"tokenAmount": "2500.000000000000000000",
"tokenToUsd": "1.00000000",
"tokenAmountRequested": "2500.000000000000000000",
"tokenAmountReceived": null,
"feeInUsd": "0.00000000",
"feeByToken": "0.000000000000000000",
"fiatExchangeRateToUsd": null,
"fiatAmountInUsd": null,
"fiatAmount": null,
"fiatAmountCurrency": null,
"status": "PENDING",
"transactionHash": null,
"transactionBlockNumber": null,
"numberOfConfirmations": null,
"confirmationThreshold": 10,
"merchantRedirectUrl": null,
"merchantCallbackUrl": "https://example.com",
"paymentLinkUrl": "https://checkout-dev.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:32:10.000000Z"
}
}