⚠️ Deprecated: Use inventoryItems instead
collectionData Query
Description
Retrieves paginated items from a collection segment.
query collectionData(
$segment: JSON!
$page: Int
$limit: Int
$sort: String
$order: Int
$randomise: Boolean
) {
collectionData(
segment: $segment
page: $page
limit: $limit
sort: $sort
order: $order
randomise: $randomise
) {
pagination {
limit
count
page
pages
hasMore
}
items {
_id
id
type
incId
uniqueId
oldId
created
modified
isForbiddenForSale
handle
path
uri
wants
bitly
}
}
}
Variables
{
"segment": {},
"page": 1,
"limit": 20,
"sort": "sort",
"order": 42,
"randomise": true
}
Response
{
"collectionData": {
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
},
"items": [
{
"_id": "faa8f2d649ad9e284f594b08",
"id": 1.23,
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1746362753141,
"modified": 1737835992278,
"isForbiddenForSale": true,
"handle": "example",
"path": "/release/1763553751/release-artist-release-name",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"wants": 42,
"bitly": "example"
}
]
}
}
Arguments
| Name | Type | Description |
|---|---|---|
segment | JSON! | JSON object specifying the segment criteria |
page | Int | Page number to retrieve |
limit | Int | Number of items per page. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit. |
sort | String | Field name to sort items by |
order | Int | Sort order: 1 for ascending, -1 for descending |
randomise | Boolean | Whether to randomize the item order |