SureshakeDocs
ApiEndpoints

Collection Endpoints

Manage document collections and portfolios.

Collections family manages logical groupings of reports, loan packages, and other financial artifacts.

List Collections

Retrieve a paginated list of collections owned by the current user.

GET/api/v1/collections
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/collections
const response = await fetch('https://api.sureshake.com/api/v1/collections', {
headers: { 'Authorization': `Bearer ${token}` }
});
const { data, meta } = await response.json();
200 OK
{
"data": [
  {
    "id": "8f2349ef-22ab-46ae-a129-2eb4c2570001",
    "name": "Q1 2024 Diligence",
    "description": "Standard diligence collection for Q1 reporting",
    "userId": "user_123",
    "status": "active",
    "version": 1,
    "createdAt": "2024-01-10T10:00:00Z",
    "updatedAt": "2024-01-10T10:00:00Z"
  }
],
"meta": {
  "total": 1,
  "limit": 20,
  "offset": 0,
  "hasMore": false
}
}

Create Collection

Create a new collection to group related documents.

POST/api/v1/collections
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "New Collection", "description": "Diligence folder"}' \
https://api.sureshake.com/api/v1/collections
const response = await fetch('https://api.sureshake.com/api/v1/collections', {
method: 'POST',
headers: {
  'Authorization': `Bearer ${token}`,
  'Content-Type': 'application/json'
},
body: JSON.stringify({
  name: 'New Collection',
  description: 'Diligence folder'
})
});

Get Collection

Retrieve a single collection by its ID.

GET/api/v1/collections/:id
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/collections/8f2349ef...

Update Collection

Update collection metadata.

PATCH/api/v1/collections/:id
curl -X PATCH \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Name"}' \
https://api.sureshake.com/api/v1/collections/8f2349ef...

On this page