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.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Reading your records — Looking up and listing the records of your organization.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:collectionProducts
What happens
Reads only.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
collectionId | ID ID! | yes |
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-66cfa8b10000"
}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. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)