CreateCartItems
CreateCartItemsAdds one or multiple new items to the B2B store cart.
Parameters:
Example Query:
mutation CreateCartItems(
$input: CartItemsInput!,
$currency: String!,
$price_level_id: Int!,
$location_ids: [Int!]!,
$exchange_rate: Float!
) {
CreateCartItems(
input: $input,
currency: $currency,
price_level_id: $price_level_id,
location_ids: $location_ids,
exchange_rate: $exchange_rate
) {
id
variant { id }
quantity
}
}UpdateCartItems
UpdateCartItemsUpdates quantities or variants in the existing cart.
Parameters:
Example Query:
mutation UpdateCartItems($input: CartItemsInput!, $currency: String!, $price_level_id: Int!, $location_ids: [Int!]!, $exchange_rate: Float!) {
UpdateCartItems(input: $input, currency: $currency, price_level_id: $price_level_id, location_ids: $location_ids, exchange_rate: $exchange_rate) {
id
quantity
}
}DeleteCartItem
DeleteCartItemDeletes a specific item from the cart.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the cart item. |
ClearCartItems
ClearCartItemsClears all items from the active B2B store cart.
Parameters:
| Parameter | Type | Description |
|---|---|---|
profile_id | ID | ID of the specific B2B user profile to clear the cart for (optional). |
Input Data Types
CartItemInput
CartItemInput| Field | Type | Description |
|---|---|---|
id | ID | ID of the existing cart item. |
uuid | String | External frontend UUID if needed. |
variant | VariantInput | Contains variant ID. |
component_parent | VariantInput | If adding a component of a kit. |
quantity | Float | Main quantity requested. |
component_quantity | Float | Subelement's requested quantity. |
type | CartItemType | Identifies variant, kit, or component. |
CartItemsInput
CartItemsInput| Field | Type | Description |
|---|---|---|
data | [CartItemInput] | Array of cart items inputs. |
Enums
CartItemType
CartItemType| Value | Description |
|---|---|
variant | Standard product variant. |
kit | Assembly/Kit. |
packaging | Packaging variant. |
component | Sub-item of a kit or assembly. |
