Collections > Get all collections
A comprehensive API endpoint that retrieves paginated collections sorted by creation date while providing metadata and support for limit and offset parameters through GET requests to /v1/collections.
Before adding objects to Tallyfy Answers, you must first create a collection. Each collection requires a unique name, and the system will automatically detect the data types of your objects as you index them.
POST /v1/collections
The request body should contain a JSON object with the following properties:
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Unique name for the collection (can include letters, numbers, hyphens, and underscores) |
description | string | No | Optional description explaining the collection’s purpose |
Example request body:
{ "name": "products", "description": "Collection of product information including names, descriptions, and pricing"}
A successful request returns a 201 Created
status code and a JSON response containing:
{ "name": "products", "description": "Collection of product information including names, descriptions, and pricing", "created_at": "2023-08-15T14:32:21Z"}
Status | Description |
---|---|
400 | Invalid request format or collection name |
409 | Collection name already exists |
curl -X POST https://api.tallyfy.com/v1/collections \ -H "X-Answers-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "products", "description": "Collection of product information" }'
Tallyfy Answers automatically detects the following data types when you index objects:
Data Type | Example | Description |
---|---|---|
string | ”Wireless Headphones” | Text values that can be searched and filtered |
list of strings | [“electronics”, “audio”] | Arrays of text values for multi-value fields |
Collections > Get all collections
Collections > Get a collection
Objects > Index a single object