Query items currently in a user's B2B store cart.
CartItem — Returns a single cart item by id
CartItem — Returns a single cart item by idExample Query:
query GetCartItem($id: ID!) {
CartItem(id: $id) {
id
uuid
quantity
type
variant {
id
label
}
}
}CartItems — Returns a list of cart items with sorting and filters
CartItems — Returns a list of cart items with sorting and filtersExample Query:
query CartItems(
$where: QueryCartItemsWhereWhereConditions,
$first: Int,
$page: Int
) {
CartItems(
where: $where,
first: $first,
page: $page
) {
paginatorInfo {
total
}
data {
id
uuid
quantity
type
}
}
}B2bStoreCartItems — Returns a list of cart items for the B2B Store
B2bStoreCartItems — Returns a list of cart items for the B2B StoreExample Query:
query B2bStoreCartItems(
$orderBy: [QueryB2bStoreCartItemsOrderByOrderByClause!],
$first: Int,
$page: Int
) {
B2bStoreCartItems(
orderBy: $orderBy,
first: $first,
page: $page
) {
data {
id
quantity
variant { id label }
}
}
}Available fields
| Field | Type | Description |
|---|---|---|
id | ID | Unique identifier. |
uuid | String | Unique universal identifier. |
user_profile | UserProfile | Associated B2B user profile. |
variant_id | ID | Variant ID. |
variant | Variant | The product variant in the cart. |
component_parent_id | ID | If it's a kit/component, the parent's ID. |
component_parent | Variant | The parent kit or assembly. |
quantity | Float | Quantity added to the cart. |
component_quantity | Float | Quantity if it's a sub-component. |
type | CartItemType | Defines if it's a variant, kit, or component. |
Filters
| Field | Example |
|---|---|
id | { "column": "ID", "operator": "EQ", "value": 10001 } |
uuid | { "column": "UUID", "operator": "EQ", "value": "xxxx-xxxx-xxxx" } |
user_profile_id | { "column": "USER_PROFILE_ID", "operator": "EQ", "value": 200 } |
variant_id | { "column": "VARIANT_ID", "operator": "EQ", "value": 5001 } |
Enums
CartItemType
CartItemType| Value | Description |
|---|---|
variant | Standard product variant. |
kit | Assembly/Kit. |
packaging | Packaging variant. |
component | Sub-item of a kit or assembly. |
