This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of collections given the provided paging, filtering, and sorting. Up to 100 collections can be returned per request.
The default sort
is id
in ASC
.
For a detailed list of supported operations, see Collections: Supported Filters and Sorting. To learn how to query collections, see API Query Language.
Query options.
Whether to include the collection's page URL and relative path in the response. Default: false
List of collections.
Paging metadata.
curl -X POST \
'https://www.wixapis.com/portfolio/v1/collections/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"query": {
"filter": {
"title": {
"$contains": "Collection"
}
},
"sort": [
{
"fieldName": "created_date",
"order": "ASC"
}
],
"cursorPaging": {
"limit": 10
}
},
"includePageUrl": true
}'
{
"collections": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"revision": 1,
"title": "Collection Title 1",
"description": "Description of collection 1.",
"slug": "collection-title-1",
"coverImage": {
"imageInfo": {
"id": "8c074c67-2926-4518-92ef-c79d7810b3a4"
}
},
"hidden": false,
"sortOrder": 1.0,
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z",
"url": {
"relative": "/collections/collection-title-1",
"url": "https://example.com/collections/collection-title-1"
}
},
{
"id": "223e4567-e89b-12d3-a456-426614174000",
"revision": 1,
"title": "Collection Title 2",
"description": "Description of collection 2.",
"slug": "collection-title-2",
"coverImage": {
"imageInfo": {
"id": "42460836-02b9-4640-8d47-2d9fe9aba7e4"
}
},
"hidden": true,
"sortOrder": 2.0,
"createdDate": "2024-07-31T12:10:00Z",
"updatedDate": "2024-07-31T12:10:00Z",
"url": {
"relative": "/collections/collection-title-2",
"url": "https://example.com/collections/collection-title-2"
}
}
],
"metadata": {
"count": 2,
"offset": 0,
"total": 2,
"tooManyToCount": false,
"cursors": {
"next": "next_cursor",
"prev": "prev_cursor"
}
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.