diff --git a/src/pages/config.md b/src/pages/config.md index 9ee938678..dbff60d6e 100644 --- a/src/pages/config.md +++ b/src/pages/config.md @@ -161,6 +161,7 @@ - [Login as Customer](/rest/saas-integrations/login-as-customer/index.md) - [Order management](/rest/saas-integrations/order-management/index.md) - [S3 uploads](/rest/saas-integrations/s3-uploads/index.md) + - [System configuration](/rest/saas-integrations/system-config/index.md) - [Introduction](/graphql/index.md) - [Usage](/graphql/usage/index.md) - [Authorization](/graphql/usage/authorization-tokens.md) @@ -229,6 +230,7 @@ - [removeItemFromCart](/graphql/schema/cart/mutations/remove-item.md) - [removeRewardPointsFromCart](/graphql/schema/cart/mutations/remove-reward-points.md) - [removeStoreCreditFromCart](/graphql/schema/cart/mutations/remove-store-credit.md) + - [selectFreeGiftForCart](/graphql/schema/cart/mutations/select-free-gift.md) - [setBillingAddressOnCart](/graphql/schema/cart/mutations/set-billing-address.md) - [setGiftOptionsOnCart](/graphql/schema/cart/mutations/set-gift-options.md) - [setGuestEmailOnCart](/graphql/schema/cart/mutations/set-guest-email.md) @@ -383,6 +385,7 @@ - [products](/graphql/schema/products/queries/products.md) - [productReviewRatingsMetadata](/graphql/schema/products/queries/product-review-ratings-metadata.md) - [route](/graphql/schema/products/queries/route.md) + - [sourceAvailability](/graphql/schema/products/queries/source-availability.md) - [urlResolver](/graphql/schema/products/queries/url-resolver.md) - [Mutations](/graphql/schema/products/mutations/index.md) - [addProductsToCompareList](/graphql/schema/products/mutations/add-products-to-compare-list.md) diff --git a/src/pages/graphql/schema/b2b/company/mutations/assign-child-company.md b/src/pages/graphql/schema/b2b/company/mutations/assign-child-company.md index eb0ec8c1a..fd265283c 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/assign-child-company.md +++ b/src/pages/graphql/schema/b2b/company/mutations/assign-child-company.md @@ -23,9 +23,9 @@ The `assignChildCompany` mutation allows company administrators to assign a chil } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`assignChildCompany`](/reference/graphql/saas/mutations.md#assignchildcompany) reference provides detailed information about the types and fields defined in this mutation.) +## Reference + +The [`assignChildCompany`](/reference/graphql/saas/mutations.md#assignchildcompany) reference provides detailed information about the types and fields defined in this mutation. ## Example usage diff --git a/src/pages/graphql/schema/b2b/company/mutations/create-address.md b/src/pages/graphql/schema/b2b/company/mutations/create-address.md index 8efe43916..3a066c1e7 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/create-address.md +++ b/src/pages/graphql/schema/b2b/company/mutations/create-address.md @@ -27,6 +27,10 @@ mutation { } ``` +## Reference + +The [`createCompanyAddress`](/reference/graphql/saas/mutations.md#createcompanyaddress) reference provides detailed information about the types and fields defined in this mutation. + ## Example usage ### Create a company address (type: billing) diff --git a/src/pages/graphql/schema/b2b/company/mutations/delete-address.md b/src/pages/graphql/schema/b2b/company/mutations/delete-address.md index eac6d1dd1..f25eae710 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/delete-address.md +++ b/src/pages/graphql/schema/b2b/company/mutations/delete-address.md @@ -27,6 +27,10 @@ mutation { } ``` +## Reference + +The [`deleteCompanyAddress`](/reference/graphql/saas/mutations.md#deletecompanyaddress) reference provides detailed information about the types and fields defined in this mutation. + ## Example usage ### Delete a company address diff --git a/src/pages/graphql/schema/b2b/company/mutations/set-default-address.md b/src/pages/graphql/schema/b2b/company/mutations/set-default-address.md index 069431a46..324313f7d 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/set-default-address.md +++ b/src/pages/graphql/schema/b2b/company/mutations/set-default-address.md @@ -27,6 +27,10 @@ mutation { } ``` +## Reference + +The [`setDefaultCompanyAddress`](/reference/graphql/saas/mutations.md#setdefaultcompanyaddress) reference provides detailed information about the types and fields defined in this mutation. + ## Example usage ### Set a company address as default (BILLING/SHIPPING) diff --git a/src/pages/graphql/schema/b2b/company/mutations/unassign-child-company.md b/src/pages/graphql/schema/b2b/company/mutations/unassign-child-company.md index c114182bb..bd573c1ce 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/unassign-child-company.md +++ b/src/pages/graphql/schema/b2b/company/mutations/unassign-child-company.md @@ -23,9 +23,9 @@ The `unassignChildCompany` mutation allows company administrators to unassign a } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`unassignChildCompany`](/reference/graphql/saas/mutations.md#unassignchildcompany) reference provides detailed information about the types and fields defined in this mutation.) +## Reference + +The [`unassignChildCompany`](/reference/graphql/saas/mutations.md#unassignchildcompany) reference provides detailed information about the types and fields defined in this mutation. ## Example usage diff --git a/src/pages/graphql/schema/b2b/company/mutations/update-address.md b/src/pages/graphql/schema/b2b/company/mutations/update-address.md index e512a43b0..dd557258b 100644 --- a/src/pages/graphql/schema/b2b/company/mutations/update-address.md +++ b/src/pages/graphql/schema/b2b/company/mutations/update-address.md @@ -28,6 +28,10 @@ mutation { } ``` +## Reference + +The [`updateCompanyAddress`](/reference/graphql/saas/mutations.md#updatecompanyaddress) reference provides detailed information about the types and fields defined in this mutation. + ## Example usage ### Update a company address diff --git a/src/pages/graphql/schema/b2b/requisition-list/mutations/import-shared-requisition-list.md b/src/pages/graphql/schema/b2b/requisition-list/mutations/import-shared-requisition-list.md index 4f90c6bd8..6d2cffac6 100644 --- a/src/pages/graphql/schema/b2b/requisition-list/mutations/import-shared-requisition-list.md +++ b/src/pages/graphql/schema/b2b/requisition-list/mutations/import-shared-requisition-list.md @@ -23,9 +23,9 @@ The `importSharedRequisitionList` mutation allows recipients within the same com } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`importSharedRequisitionList`](/reference/graphql/saas/mutations.md#importsharedrequisitionlist) reference provides detailed information about the types and fields defined in this mutation.) +## Reference + +The [`importSharedRequisitionList`](/reference/graphql/saas/mutations.md#importsharedrequisitionlist) reference provides detailed information about the types and fields defined in this mutation. ## Example usage diff --git a/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-email.md b/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-email.md index 549029383..f8e15d631 100644 --- a/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-email.md +++ b/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-email.md @@ -23,9 +23,9 @@ The `shareRequisitionListByEmail` mutation enables B2B customers to share a requ } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`shareRequisitionListByEmail`](/reference/graphql/saas/mutations.md#sharerequisitionlistbyemail) reference provides detailed information about the types and fields defined in this mutation.) +## Reference + +The [`shareRequisitionListByEmail`](/reference/graphql/saas/mutations.md#sharerequisitionlistbyemail) reference provides detailed information about the types and fields defined in this mutation. ## Example usage diff --git a/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-token.md b/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-token.md index c608f929c..ecbcefe9f 100644 --- a/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-token.md +++ b/src/pages/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-token.md @@ -23,9 +23,9 @@ The `shareRequisitionListByToken` mutation enables B2B customers to share a requ } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`shareRequisitionListByToken`](/reference/graphql/saas/mutations.md#sharerequisitionlistbytoken) reference provides detailed information about the types and fields defined in this mutation.) +## Reference + +The [`shareRequisitionListByToken`](/reference/graphql/saas/mutations.md#sharerequisitionlistbytoken) reference provides detailed information about the types and fields defined in this mutation. ## Example usage diff --git a/src/pages/graphql/schema/b2b/requisition-list/queries/shared-requisition-list.md b/src/pages/graphql/schema/b2b/requisition-list/queries/shared-requisition-list.md index e7354fdb1..0d405d777 100644 --- a/src/pages/graphql/schema/b2b/requisition-list/queries/shared-requisition-list.md +++ b/src/pages/graphql/schema/b2b/requisition-list/queries/shared-requisition-list.md @@ -23,9 +23,9 @@ The `sharedRequisitionList` query uses a token to retrieve a shared requisition } ``` -[//]: # (## Reference) -[//]: # () -[//]: # (The [`sharedRequisitionList`](/reference/graphql/saas/index.md#sharedrequisitionlist) reference provides detailed information about the types and fields defined in this query.) +## Reference + +The [`sharedRequisitionList`](/reference/graphql/saas/index.md#sharedrequisitionlist) reference provides detailed information about the types and fields defined in this query. ## Example usage diff --git a/src/pages/graphql/schema/cart/mutations/index.md b/src/pages/graphql/schema/cart/mutations/index.md index 6188c0ad0..b6666d698 100644 --- a/src/pages/graphql/schema/cart/mutations/index.md +++ b/src/pages/graphql/schema/cart/mutations/index.md @@ -23,6 +23,7 @@ The cart mutations allow you to perform the following operations: * [`clearCart`](clear-cart.md) * [`addVirtualProductsToCart`](add-virtual-products.md) * [`removeItemFromCart`](remove-item.md) + * [`selectFreeGiftForCart`](select-free-gift.md) * [`setGiftOptionsOnCart`](set-gift-options.md) * [`updateCartItems`](update-items.md) diff --git a/src/pages/graphql/schema/cart/mutations/select-free-gift.md b/src/pages/graphql/schema/cart/mutations/select-free-gift.md new file mode 100644 index 000000000..8d9763652 --- /dev/null +++ b/src/pages/graphql/schema/cart/mutations/select-free-gift.md @@ -0,0 +1,298 @@ +--- +title: selectFreeGiftForCart mutation +description: The selectFreeGiftForCart mutation defines the product that a shopper has selected as a free gift. +--- + +# selectFreeGiftForCart mutation + + + +The `selectFreeGiftForCart` mutation defines the product that a shopper has selected as a free gift. This mutation is applicable only when a Free Gift cart price rule has been applied to the cart and the rule requires the shopper to choose a gift SKU before placing the order. + +Some Free Gift rules add a gift to the cart automatically. Other rules offer multiple SKUs, or a product with configurable or bundle options, and require the shopper to make a selection. Use the following [`Cart`](../queries/cart.md) fields to determine whether a selection is needed and which products are eligible: + +* `has_available_free_gifts` is `true` when at least one applied Free Gift rule is still waiting for the shopper to select a SKU. +* `available_free_gifts` lists each rule that requires a selection, along with its `rule_id`, `gift_qty`, `available_skus`, and the corresponding `products`. + +After the shopper selects a gift, the mutation adds the product to the cart as a free-gift line item. Line items added by a Free Gift rule return `true` for the `is_free_gift` field on the [`CartItemInterface`](../interfaces/index.md). After the order is placed, the corresponding order item returns the rule label in the `free_gift_label` field on the `OrderItemInterface`. + +## Syntax + +`mutation: {selectFreeGiftForCart(input: SelectFreeGiftForCartInput!): SelectFreeGiftForCartOutput}` + +## Reference + +The [`selectFreeGiftForCart`](/reference/graphql/saas/index.md#selectfreegiftforcart) reference provides detailed information about the types and fields defined in this mutation. + +\