Collections > Get a collection
The GET endpoint retrieves detailed collection information including metadata schema and object counts by using a unique collection name through the /v1/collections/[collection_name] path.
This endpoint allows you to modify certain properties of an existing collection, such as its description or configuration settings. The collection name cannot be changed once it’s created.
PATCH /v1/collections/{collection_name}
Parameter | Type | Required | Description |
---|---|---|---|
collection_name | string | Yes | Name of the collection to update |
The request body should contain a JSON object with the properties you want to update:
Parameter | Type | Required | Description |
---|---|---|---|
description | string | No | New description for the collection |
Example request body:
{ "description": "Updated collection of premium electronics products"}
A successful update returns a 200 OK
status code and a JSON response containing the updated collection:
{ "name": "products", "description": "Updated collection of premium electronics products", "schema": { "name": { "type": "string" }, "price": { "type": "number" }, "categories": { "type": "string[]" } }, "created_at": "2023-08-15T14:32:21Z", "updated_at": "2023-09-05T10:15:42Z"}
Status | Description |
---|---|
404 | Collection not found |
400 | Invalid request format or parameters |
curl -X PATCH https://go.tallyfy.com/api/v1/collections/products \ -H "X-Answers-API-Key: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated collection of premium electronics products" }'
There are several situations where updating a collection is useful:
Collections > Get a collection
Collections > Create a collection
Collections > Get all collections
Collections > Delete a collection