On this page
collectionProducts
query · in the family Reading your records
What it does
What a collection actually contains right now — the evaluated product list (pins plus rule matches).
THE MEMBERSHIP EVALUATION: a collection's products = its pins UNION (predicate matches MINUS exclusions), gated to ACTIVE products of ACTIVE styles, ordered per sortMode (newest | price-asc | price-desc | manual-pins-first). A static collection reads as its ACTIVE members' surviving products by ordinal (all pinned). A STAGED (inactive) collection EVALUATES — previewing is what staging is for; a doomed one reads as an empty list. Requires authentication; the collection is tenant-scoped server-side.
What happens
Reads only.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:collectionProducts
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
collectionId | ID ID! | yes | No further notes. |
Returns
CollectionProductHit [CollectionProductHit!]! — One evaluated collection hit: the surviving Product + whether an ACTIVE CollectionMember record backs it (a pin on dynamic collections; every static hit is member-backed).
Example request
query ExampleCollectionProducts($collectionId: ID!) {
collectionProducts(collectionId: $collectionId) {
pinned
}
}
Variables:
{
"collectionId": "01900000-0000-7000-8000-8d2b0a040000"
}
Example response
{
"data": {
"collectionProducts": [
{
"pinned": true
}
]
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)