Update a collection
Amends a collection that has not yet been paid. Send only the fields you want to change.
Updating does not extend the 30-minute expiry and does not issue a new address. Once a payment has been detected, create a new collection instead of amending this one.
Path parameters
The collection's id.
Body
Every field is optional; omitted fields are left unchanged.
A network that is active for collections.
A token that is active for collections on that network.
Must be greater than zero.
Must be greater than zero.
Must be a publicly reachable http:// or https:// URL.
Must be a valid http:// or https:// URL, or null to clear it.
Request
curl -X PUT "https://api-prod.useknit.io/api/v1/collections/9cddd3ad-c2a8-463c-a703-158b900beea8" \
-H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tokenAmount": 3000,
"merchantRedirectUrl": "https://example.com/checkout/complete"
}'Response
{
"statusCode": 200,
"message": "Collection updated successfully",
"data": {
"id": "9cddd3ad-c2a8-463c-a703-158b900beea8",
"network": "MATIC_MAINNET",
"token": "USDT",
"tokenAmount": "3000.000000000000000000",
"status": "PENDING",
"merchantRedirectUrl": "https://example.com/checkout/complete",
"updatedAt": "2024-08-27T13:41:02.000000Z"
},
"success": true
}Errors
| Status | Cause |
|---|---|
401 | Missing or invalid token, IP not allow-listed, or missing collections:write |
404 | No collection with that ID belongs to your business |
400 | A supplied field failed validation |