Mutations

addBundleProductsToCart

Add one or more bundle products to the specified cart. We recommend using addProductsToCart instead.

Response: AddBundleProductsToCartOutput

Arguments

Name
Description
input - AddBundleProductsToCartInput
An input object that defines which bundle products to add to the cart.

Example

Query
mutation addBundleProductsToCart($input: AddBundleProductsToCartInput) {
  addBundleProductsToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": AddBundleProductsToCartInput}
Response
{"data": {"addBundleProductsToCart": {"cart": Cart}}}

addConfigurableProductsToCart

Add one or more configurable products to the specified cart. We recommend using addProductsToCart instead.

Response: AddConfigurableProductsToCartOutput

Arguments

Name
Description
input - AddConfigurableProductsToCartInput
An input object that defines which configurable products to add to the cart.

Example

Query
mutation addConfigurableProductsToCart($input: AddConfigurableProductsToCartInput) {
  addConfigurableProductsToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": AddConfigurableProductsToCartInput}
Response
{
  "data": {
    "addConfigurableProductsToCart": {"cart": Cart}
  }
}

addDownloadableProductsToCart

Add one or more downloadable products to the specified cart. We recommend using addProductsToCart instead.

Response: AddDownloadableProductsToCartOutput

Arguments

Name
Description
input - AddDownloadableProductsToCartInput
An input object that defines which downloadable products to add to the cart.

Example

Query
mutation addDownloadableProductsToCart($input: AddDownloadableProductsToCartInput) {
  addDownloadableProductsToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": AddDownloadableProductsToCartInput}
Response
{
  "data": {
    "addDownloadableProductsToCart": {"cart": Cart}
  }
}

addGiftRegistryRegistrants

Add registrants to the specified gift registry.

Response: AddGiftRegistryRegistrantsOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
registrants - [AddGiftRegistryRegistrantInput!]!
An array registrants to add.

Example

Query
mutation addGiftRegistryRegistrants(
  $giftRegistryUid: ID!,
  $registrants: [AddGiftRegistryRegistrantInput!]!
) {
  addGiftRegistryRegistrants(
    giftRegistryUid: $giftRegistryUid,
    registrants: $registrants
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{
  "giftRegistryUid": "4",
  "registrants": [AddGiftRegistryRegistrantInput]
}
Response
{
  "data": {
    "addGiftRegistryRegistrants": {
      "gift_registry": GiftRegistry
    }
  }
}

addProductsToCart

Add any type of product to the cart.

Response: AddProductsToCartOutput

Arguments

Name
Description
cartId - String!
The cart ID of the shopper.
cartItems - [CartItemInput!]!
An array that defines the products to add to the cart.

Example

Query
mutation addProductsToCart(
  $cartId: String!,
  $cartItems: [CartItemInput!]!
) {
  addProductsToCart(
    cartId: $cartId,
    cartItems: $cartItems
  ) {
    cart {
      ...CartFragment
    }
    user_errors {
      ...CartUserInputErrorFragment
    }
  }
}
Variables
{
  "cartId": "abc123",
  "cartItems": [CartItemInput]
}
Response
{
  "data": {
    "addProductsToCart": {
      "cart": Cart,
      "user_errors": [CartUserInputError]
    }
  }
}

addProductsToCompareList

Add products to the specified compare list.

Response: CompareList

Arguments

Name
Description
input - AddProductsToCompareListInput
An input object that defines which products to add to an existing compare list.

Example

Query
mutation addProductsToCompareList($input: AddProductsToCompareListInput) {
  addProductsToCompareList(input: $input) {
    attributes {
      ...ComparableAttributeFragment
    }
    item_count
    items {
      ...ComparableItemFragment
    }
    uid
  }
}
Variables
{"input": AddProductsToCompareListInput}
Response
{
  "data": {
    "addProductsToCompareList": {
      "attributes": [ComparableAttribute],
      "item_count": 123,
      "items": [ComparableItem],
      "uid": 4
    }
  }
}

addProductsToRequisitionList

Add items to the specified requisition list.

Response: AddProductsToRequisitionListOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.
requisitionListItems - [RequisitionListItemsInput!]!
An array of products to be added to the requisition list.

Example

Query
mutation addProductsToRequisitionList(
  $requisitionListUid: ID!,
  $requisitionListItems: [RequisitionListItemsInput!]!
) {
  addProductsToRequisitionList(
    requisitionListUid: $requisitionListUid,
    requisitionListItems: $requisitionListItems
  ) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "requisitionListUid": 4,
  "requisitionListItems": [RequisitionListItemsInput]
}
Response
{
  "data": {
    "addProductsToRequisitionList": {
      "requisition_list": RequisitionList
    }
  }
}

addProductsToWishlist

Add one or more products to the specified wish list. This mutation supports all product types.

Response: AddProductsToWishlistOutput

Arguments

Name
Description
wishlistId - ID!
The ID of a wish list.
wishlistItems - [WishlistItemInput!]!
An array of products to add to the wish list.

Example

Query
mutation addProductsToWishlist(
  $wishlistId: ID!,
  $wishlistItems: [WishlistItemInput!]!
) {
  addProductsToWishlist(
    wishlistId: $wishlistId,
    wishlistItems: $wishlistItems
  ) {
    user_errors {
      ...WishListUserInputErrorFragment
    }
    wishlist {
      ...WishlistFragment
    }
  }
}
Variables
{
  "wishlistId": "4",
  "wishlistItems": [WishlistItemInput]
}
Response
{
  "data": {
    "addProductsToWishlist": {
      "user_errors": [WishListUserInputError],
      "wishlist": Wishlist
    }
  }
}

addPurchaseOrderComment

Add a comment to an existing purchase order.

Response: AddPurchaseOrderCommentOutput

Arguments

Name
Description
input - AddPurchaseOrderCommentInput!

Example

Query
mutation addPurchaseOrderComment($input: AddPurchaseOrderCommentInput!) {
  addPurchaseOrderComment(input: $input) {
    comment {
      ...PurchaseOrderCommentFragment
    }
  }
}
Variables
{"input": AddPurchaseOrderCommentInput}
Response
{
  "data": {
    "addPurchaseOrderComment": {
      "comment": PurchaseOrderComment
    }
  }
}

addPurchaseOrderItemsToCart

Add purchase order items to the shopping cart.

Response: AddProductsToCartOutput

Arguments

Name
Description
input - AddPurchaseOrderItemsToCartInput!

Example

Query
mutation addPurchaseOrderItemsToCart($input: AddPurchaseOrderItemsToCartInput!) {
  addPurchaseOrderItemsToCart(input: $input) {
    cart {
      ...CartFragment
    }
    user_errors {
      ...CartUserInputErrorFragment
    }
  }
}
Variables
{"input": AddPurchaseOrderItemsToCartInput}
Response
{
  "data": {
    "addPurchaseOrderItemsToCart": {
      "cart": Cart,
      "user_errors": [CartUserInputError]
    }
  }
}

addRequisitionListItemsToCart

Add items in the requisition list to the customer's cart.

Response: AddRequisitionListItemsToCartOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.
requisitionListItemUids - [ID!]
An array of UIDs presenting products to be added to the cart. If no UIDs are specified, all items in the requisition list will be added to the cart.

Example

Query
mutation addRequisitionListItemsToCart(
  $requisitionListUid: ID!,
  $requisitionListItemUids: [ID!]
) {
  addRequisitionListItemsToCart(
    requisitionListUid: $requisitionListUid,
    requisitionListItemUids: $requisitionListItemUids
  ) {
    add_requisition_list_items_to_cart_user_errors {
      ...AddRequisitionListItemToCartUserErrorFragment
    }
    cart {
      ...CartFragment
    }
    status
  }
}
Variables
{
  "requisitionListUid": "4",
  "requisitionListItemUids": ["4"]
}
Response
{
  "data": {
    "addRequisitionListItemsToCart": {
      "add_requisition_list_items_to_cart_user_errors": [
        AddRequisitionListItemToCartUserError
      ],
      "cart": Cart,
      "status": true
    }
  }
}

addReturnComment

Add a comment to an existing return.

Response: AddReturnCommentOutput

Arguments

Name
Description
input - AddReturnCommentInput!
An input object that defines a return comment.

Example

Query
mutation addReturnComment($input: AddReturnCommentInput!) {
  addReturnComment(input: $input) {
    return {
      ...ReturnFragment
    }
  }
}
Variables
{"input": AddReturnCommentInput}
Response
{"data": {"addReturnComment": {"return": Return}}}

addReturnTracking

Add tracking information to the return.

Response: AddReturnTrackingOutput

Arguments

Name
Description
input - AddReturnTrackingInput!
An input object that defines tracking information.

Example

Query
mutation addReturnTracking($input: AddReturnTrackingInput!) {
  addReturnTracking(input: $input) {
    return {
      ...ReturnFragment
    }
    return_shipping_tracking {
      ...ReturnShippingTrackingFragment
    }
  }
}
Variables
{"input": AddReturnTrackingInput}
Response
{
  "data": {
    "addReturnTracking": {
      "return": Return,
      "return_shipping_tracking": ReturnShippingTracking
    }
  }
}

addSimpleProductsToCart

Add one or more simple products to the specified cart. We recommend using addProductsToCart instead.

Response: AddSimpleProductsToCartOutput

Arguments

Name
Description
input - AddSimpleProductsToCartInput
An input object that defines which simple products to add to the cart.

Example

Query
mutation addSimpleProductsToCart($input: AddSimpleProductsToCartInput) {
  addSimpleProductsToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": AddSimpleProductsToCartInput}
Response
{"data": {"addSimpleProductsToCart": {"cart": Cart}}}

addVirtualProductsToCart

Add one or more virtual products to the specified cart. We recommend using addProductsToCart instead.

Response: AddVirtualProductsToCartOutput

Arguments

Name
Description
input - AddVirtualProductsToCartInput
An input object that defines which virtual products to add to the cart.

Example

Query
mutation addVirtualProductsToCart($input: AddVirtualProductsToCartInput) {
  addVirtualProductsToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": AddVirtualProductsToCartInput}
Response
{"data": {"addVirtualProductsToCart": {"cart": Cart}}}

addWishlistItemsToCart

Add items in the specified wishlist to the customer's cart.

Response: AddWishlistItemsToCartOutput

Arguments

Name
Description
wishlistId - ID!
The unique ID of the wish list
wishlistItemIds - [ID!]
An array of IDs representing products to be added to the cart. If no IDs are specified, all items in the wishlist will be added to the cart

Example

Query
mutation addWishlistItemsToCart(
  $wishlistId: ID!,
  $wishlistItemIds: [ID!]
) {
  addWishlistItemsToCart(
    wishlistId: $wishlistId,
    wishlistItemIds: $wishlistItemIds
  ) {
    add_wishlist_items_to_cart_user_errors {
      ...WishlistCartUserInputErrorFragment
    }
    status
    wishlist {
      ...WishlistFragment
    }
  }
}
Variables
{"wishlistId": 4, "wishlistItemIds": [4]}
Response
{
  "data": {
    "addWishlistItemsToCart": {
      "add_wishlist_items_to_cart_user_errors": [
        WishlistCartUserInputError
      ],
      "status": true,
      "wishlist": Wishlist
    }
  }
}

applyCouponToCart

Apply a pre-defined coupon code to the specified cart.

Response: ApplyCouponToCartOutput

Arguments

Name
Description
input - ApplyCouponToCartInput
An input object that defines the coupon code to apply to the cart.

Example

Query
mutation applyCouponToCart($input: ApplyCouponToCartInput) {
  applyCouponToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": ApplyCouponToCartInput}
Response
{"data": {"applyCouponToCart": {"cart": Cart}}}

applyGiftCardToCart

Apply a pre-defined gift card code to the specified cart.

Response: ApplyGiftCardToCartOutput

Arguments

Name
Description
input - ApplyGiftCardToCartInput
An input object that specifies the gift card code and cart.

Example

Query
mutation applyGiftCardToCart($input: ApplyGiftCardToCartInput) {
  applyGiftCardToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": ApplyGiftCardToCartInput}
Response
{"data": {"applyGiftCardToCart": {"cart": Cart}}}

applyRewardPointsToCart

Apply all available points, up to the cart total. Partial redemption is not available.

Response: ApplyRewardPointsToCartOutput

Arguments

Name
Description
cartId - ID!

Example

Query
mutation applyRewardPointsToCart($cartId: ID!) {
  applyRewardPointsToCart(cartId: $cartId) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"cartId": 4}
Response
{"data": {"applyRewardPointsToCart": {"cart": Cart}}}

applyStoreCreditToCart

Apply store credit to the specified cart.

Response: ApplyStoreCreditToCartOutput

Arguments

Name
Description
input - ApplyStoreCreditToCartInput!
An input object that specifies the cart ID.

Example

Query
mutation applyStoreCreditToCart($input: ApplyStoreCreditToCartInput!) {
  applyStoreCreditToCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": ApplyStoreCreditToCartInput}
Response
{"data": {"applyStoreCreditToCart": {"cart": Cart}}}

approvePurchaseOrders

Approve purchase orders.

Response: PurchaseOrdersActionOutput

Arguments

Name
Description
input - PurchaseOrdersActionInput!

Example

Query
mutation approvePurchaseOrders($input: PurchaseOrdersActionInput!) {
  approvePurchaseOrders(input: $input) {
    errors {
      ...PurchaseOrderActionErrorFragment
    }
    purchase_orders {
      ...PurchaseOrderFragment
    }
  }
}
Variables
{"input": PurchaseOrdersActionInput}
Response
{
  "data": {
    "approvePurchaseOrders": {
      "errors": [PurchaseOrderActionError],
      "purchase_orders": [PurchaseOrder]
    }
  }
}

assignCompareListToCustomer

Assign the specified compare list to the logged in customer.

Response: AssignCompareListToCustomerOutput

Arguments

Name
Description
uid - ID!
The unique ID of the compare list to be assigned.

Example

Query
mutation assignCompareListToCustomer($uid: ID!) {
  assignCompareListToCustomer(uid: $uid) {
    compare_list {
      ...CompareListFragment
    }
    result
  }
}
Variables
{"uid": "4"}
Response
{
  "data": {
    "assignCompareListToCustomer": {
      "compare_list": CompareList,
      "result": false
    }
  }
}

assignCustomerToGuestCart

Assign a logged-in customer to the specified guest shopping cart.

Response: Cart!

Arguments

Name
Description
cart_id - String!

Example

Query
mutation assignCustomerToGuestCart($cart_id: String!) {
  assignCustomerToGuestCart(cart_id: $cart_id) {
    applied_coupon {
      ...AppliedCouponFragment
    }
    applied_coupons {
      ...AppliedCouponFragment
    }
    applied_gift_cards {
      ...AppliedGiftCardFragment
    }
    applied_reward_points {
      ...RewardPointsAmountFragment
    }
    applied_store_credit {
      ...AppliedStoreCreditFragment
    }
    available_gift_wrappings {
      ...GiftWrappingFragment
    }
    available_payment_methods {
      ...AvailablePaymentMethodFragment
    }
    billing_address {
      ...BillingCartAddressFragment
    }
    email
    gift_message {
      ...GiftMessageFragment
    }
    gift_receipt_included
    gift_wrapping {
      ...GiftWrappingFragment
    }
    id
    is_virtual
    items {
      ...CartItemInterfaceFragment
    }
    prices {
      ...CartPricesFragment
    }
    printed_card_included
    selected_payment_method {
      ...SelectedPaymentMethodFragment
    }
    shipping_addresses {
      ...ShippingCartAddressFragment
    }
    total_quantity
  }
}
Variables
{"cart_id": "xyz789"}
Response
{
  "data": {
    "assignCustomerToGuestCart": {
      "applied_coupon": AppliedCoupon,
      "applied_coupons": [AppliedCoupon],
      "applied_gift_cards": [AppliedGiftCard],
      "applied_reward_points": RewardPointsAmount,
      "applied_store_credit": AppliedStoreCredit,
      "available_gift_wrappings": [GiftWrapping],
      "available_payment_methods": [
        AvailablePaymentMethod
      ],
      "billing_address": BillingCartAddress,
      "email": "xyz789",
      "gift_message": GiftMessage,
      "gift_receipt_included": false,
      "gift_wrapping": GiftWrapping,
      "id": 4,
      "is_virtual": true,
      "items": [CartItemInterface],
      "prices": CartPrices,
      "printed_card_included": true,
      "selected_payment_method": SelectedPaymentMethod,
      "shipping_addresses": [ShippingCartAddress],
      "total_quantity": 987.65
    }
  }
}

cancelPurchaseOrders

Cancel purchase orders.

Response: PurchaseOrdersActionOutput

Arguments

Name
Description
input - PurchaseOrdersActionInput!

Example

Query
mutation cancelPurchaseOrders($input: PurchaseOrdersActionInput!) {
  cancelPurchaseOrders(input: $input) {
    errors {
      ...PurchaseOrderActionErrorFragment
    }
    purchase_orders {
      ...PurchaseOrderFragment
    }
  }
}
Variables
{"input": PurchaseOrdersActionInput}
Response
{
  "data": {
    "cancelPurchaseOrders": {
      "errors": [PurchaseOrderActionError],
      "purchase_orders": [PurchaseOrder]
    }
  }
}

changeCustomerPassword

Change the password for the logged-in customer.

Response: Customer

Arguments

Name
Description
currentPassword - String!
The customer's original password.
newPassword - String!
The customer's updated password.

Example

Query
mutation changeCustomerPassword(
  $currentPassword: String!,
  $newPassword: String!
) {
  changeCustomerPassword(
    currentPassword: $currentPassword,
    newPassword: $newPassword
  ) {
    addresses {
      ...CustomerAddressFragment
    }
    allow_remote_shopping_assistance
    compare_list {
      ...CompareListFragment
    }
    created_at
    date_of_birth
    default_billing
    default_shipping
    dob
    email
    firstname
    gender
    gift_registries {
      ...GiftRegistryFragment
    }
    gift_registry {
      ...GiftRegistryFragment
    }
    group_id
    id
    is_subscribed
    job_title
    lastname
    middlename
    orders {
      ...CustomerOrdersFragment
    }
    prefix
    purchase_order {
      ...PurchaseOrderFragment
    }
    purchase_order_approval_rule {
      ...PurchaseOrderApprovalRuleFragment
    }
    purchase_order_approval_rule_metadata {
      ...PurchaseOrderApprovalRuleMetadataFragment
    }
    purchase_order_approval_rules {
      ...PurchaseOrderApprovalRulesFragment
    }
    purchase_orders {
      ...PurchaseOrdersFragment
    }
    purchase_orders_enabled
    requisition_lists {
      ...RequisitionListsFragment
    }
    return {
      ...ReturnFragment
    }
    returns {
      ...ReturnsFragment
    }
    reviews {
      ...ProductReviewsFragment
    }
    reward_points {
      ...RewardPointsFragment
    }
    role {
      ...CompanyRoleFragment
    }
    status
    store_credit {
      ...CustomerStoreCreditFragment
    }
    structure_id
    suffix
    taxvat
    team {
      ...CompanyTeamFragment
    }
    telephone
    wishlist {
      ...WishlistFragment
    }
    wishlist_v2 {
      ...WishlistFragment
    }
    wishlists {
      ...WishlistFragment
    }
  }
}
Variables
{
  "currentPassword": "xyz789",
  "newPassword": "abc123"
}
Response
{
  "data": {
    "changeCustomerPassword": {
      "addresses": [CustomerAddress],
      "allow_remote_shopping_assistance": true,
      "compare_list": CompareList,
      "created_at": "xyz789",
      "date_of_birth": "abc123",
      "default_billing": "abc123",
      "default_shipping": "xyz789",
      "dob": "abc123",
      "email": "xyz789",
      "firstname": "xyz789",
      "gender": 123,
      "gift_registries": [GiftRegistry],
      "gift_registry": GiftRegistry,
      "group_id": 987,
      "id": 123,
      "is_subscribed": false,
      "job_title": "xyz789",
      "lastname": "abc123",
      "middlename": "abc123",
      "orders": CustomerOrders,
      "prefix": "xyz789",
      "purchase_order": PurchaseOrder,
      "purchase_order_approval_rule": PurchaseOrderApprovalRule,
      "purchase_order_approval_rule_metadata": PurchaseOrderApprovalRuleMetadata,
      "purchase_order_approval_rules": PurchaseOrderApprovalRules,
      "purchase_orders": PurchaseOrders,
      "purchase_orders_enabled": true,
      "requisition_lists": RequisitionLists,
      "return": Return,
      "returns": Returns,
      "reviews": ProductReviews,
      "reward_points": RewardPoints,
      "role": CompanyRole,
      "status": "ACTIVE",
      "store_credit": CustomerStoreCredit,
      "structure_id": "4",
      "suffix": "abc123",
      "taxvat": "xyz789",
      "team": CompanyTeam,
      "telephone": "xyz789",
      "wishlist": Wishlist,
      "wishlist_v2": Wishlist,
      "wishlists": [Wishlist]
    }
  }
}

clearCustomerCart

Remove all items from the specified cart.

Response: ClearCustomerCartOutput

Arguments

Name
Description
cartUid - String!
The masked ID of the cart.

Example

Query
mutation clearCustomerCart($cartUid: String!) {
  clearCustomerCart(cartUid: $cartUid) {
    cart {
      ...CartFragment
    }
    status
  }
}
Variables
{"cartUid": "xyz789"}
Response
{
  "data": {
    "clearCustomerCart": {"cart": Cart, "status": true}
  }
}

closeNegotiableQuotes

Mark a negotiable quote as closed. The negotiable quote is still visible on the storefront.

Response: CloseNegotiableQuotesOutput

Arguments

Name
Description
input - CloseNegotiableQuotesInput!
An input object that closes a negotiable quote.

Example

Query
mutation closeNegotiableQuotes($input: CloseNegotiableQuotesInput!) {
  closeNegotiableQuotes(input: $input) {
    closed_quotes {
      ...NegotiableQuoteFragment
    }
    negotiable_quotes {
      ...NegotiableQuotesOutputFragment
    }
    operation_results {
      ... on NegotiableQuoteUidOperationSuccess {
        ...NegotiableQuoteUidOperationSuccessFragment
      }
      ... on CloseNegotiableQuoteOperationFailure {
        ...CloseNegotiableQuoteOperationFailureFragment
      }
    }
    result_status
  }
}
Variables
{"input": CloseNegotiableQuotesInput}
Response
{
  "data": {
    "closeNegotiableQuotes": {
      "closed_quotes": [NegotiableQuote],
      "negotiable_quotes": NegotiableQuotesOutput,
      "operation_results": [
        NegotiableQuoteUidOperationSuccess
      ],
      "result_status": "SUCCESS"
    }
  }
}

copyItemsBetweenRequisitionLists

Copy items from one requisition list to another.

Response: CopyItemsFromRequisitionListsOutput

Arguments

Name
Description
sourceRequisitionListUid - ID!
The unique ID of the source requisition list.
destinationRequisitionListUid - ID
The unique ID of the destination requisition list. If null, a new requisition list will be created.
requisitionListItem - CopyItemsBetweenRequisitionListsInput
The list of products to copy.

Example

Query
mutation copyItemsBetweenRequisitionLists(
  $sourceRequisitionListUid: ID!,
  $destinationRequisitionListUid: ID,
  $requisitionListItem: CopyItemsBetweenRequisitionListsInput
) {
  copyItemsBetweenRequisitionLists(
    sourceRequisitionListUid: $sourceRequisitionListUid,
    destinationRequisitionListUid: $destinationRequisitionListUid,
    requisitionListItem: $requisitionListItem
  ) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "sourceRequisitionListUid": 4,
  "destinationRequisitionListUid": 4,
  "requisitionListItem": CopyItemsBetweenRequisitionListsInput
}
Response
{
  "data": {
    "copyItemsBetweenRequisitionLists": {
      "requisition_list": RequisitionList
    }
  }
}

copyProductsBetweenWishlists

Copy products from one wish list to another. The original wish list is unchanged.

Response: CopyProductsBetweenWishlistsOutput

Arguments

Name
Description
sourceWishlistUid - ID!
The ID of the original wish list.
destinationWishlistUid - ID!
The ID of the target wish list.
wishlistItems - [WishlistItemCopyInput!]!
An array of items to copy.

Example

Query
mutation copyProductsBetweenWishlists(
  $sourceWishlistUid: ID!,
  $destinationWishlistUid: ID!,
  $wishlistItems: [WishlistItemCopyInput!]!
) {
  copyProductsBetweenWishlists(
    sourceWishlistUid: $sourceWishlistUid,
    destinationWishlistUid: $destinationWishlistUid,
    wishlistItems: $wishlistItems
  ) {
    destination_wishlist {
      ...WishlistFragment
    }
    source_wishlist {
      ...WishlistFragment
    }
    user_errors {
      ...WishListUserInputErrorFragment
    }
  }
}
Variables
{
  "sourceWishlistUid": "4",
  "destinationWishlistUid": 4,
  "wishlistItems": [WishlistItemCopyInput]
}
Response
{
  "data": {
    "copyProductsBetweenWishlists": {
      "destination_wishlist": Wishlist,
      "source_wishlist": Wishlist,
      "user_errors": [WishListUserInputError]
    }
  }
}

createBraintreeClientToken

Creates Client Token for Braintree Javascript SDK initialization.

Response: String!

Example

Query
mutation createBraintreeClientToken {
  createBraintreeClientToken
}
Response
{
  "data": {
    "createBraintreeClientToken": "abc123"
  }
}

createCompany

Create a company at the request of either a customer or a guest.

Response: CreateCompanyOutput

Arguments

Name
Description
input - CompanyCreateInput!

Example

Query
mutation createCompany($input: CompanyCreateInput!) {
  createCompany(input: $input) {
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": CompanyCreateInput}
Response
{"data": {"createCompany": {"company": Company}}}

createCompanyRole

Create a new company role.

Response: CreateCompanyRoleOutput

Arguments

Name
Description
input - CompanyRoleCreateInput!

Example

Query
mutation createCompanyRole($input: CompanyRoleCreateInput!) {
  createCompanyRole(input: $input) {
    role {
      ...CompanyRoleFragment
    }
  }
}
Variables
{"input": CompanyRoleCreateInput}
Response
{"data": {"createCompanyRole": {"role": CompanyRole}}}

createCompanyTeam

Create a new team for the authenticated customer's company.

Response: CreateCompanyTeamOutput

Arguments

Name
Description
input - CompanyTeamCreateInput!

Example

Query
mutation createCompanyTeam($input: CompanyTeamCreateInput!) {
  createCompanyTeam(input: $input) {
    team {
      ...CompanyTeamFragment
    }
  }
}
Variables
{"input": CompanyTeamCreateInput}
Response
{"data": {"createCompanyTeam": {"team": CompanyTeam}}}

createCompanyUser

Create a new company user at the request of an existing customer.

Response: CreateCompanyUserOutput

Arguments

Name
Description
input - CompanyUserCreateInput!

Example

Query
mutation createCompanyUser($input: CompanyUserCreateInput!) {
  createCompanyUser(input: $input) {
    user {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CompanyUserCreateInput}
Response
{"data": {"createCompanyUser": {"user": Customer}}}

createCompareList

Create a new compare list. The compare list is saved for logged in customers.

Response: CompareList

Arguments

Name
Description
input - CreateCompareListInput

Example

Query
mutation createCompareList($input: CreateCompareListInput) {
  createCompareList(input: $input) {
    attributes {
      ...ComparableAttributeFragment
    }
    item_count
    items {
      ...ComparableItemFragment
    }
    uid
  }
}
Variables
{"input": CreateCompareListInput}
Response
{
  "data": {
    "createCompareList": {
      "attributes": [ComparableAttribute],
      "item_count": 123,
      "items": [ComparableItem],
      "uid": 4
    }
  }
}

createCustomer

Use createCustomerV2 instead.

Response: CustomerOutput

Arguments

Name
Description
input - CustomerInput!
An input object that defines the customer to be created.

Example

Query
mutation createCustomer($input: CustomerInput!) {
  createCustomer(input: $input) {
    customer {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CustomerInput}
Response
{"data": {"createCustomer": {"customer": Customer}}}

createCustomerAddress

Create a billing or shipping address for a customer or guest.

Response: CustomerAddress

Arguments

Name
Description
input - CustomerAddressInput!

Example

Query
mutation createCustomerAddress($input: CustomerAddressInput!) {
  createCustomerAddress(input: $input) {
    city
    company
    country_code
    country_id
    custom_attributes {
      ...CustomerAddressAttributeFragment
    }
    customer_id
    default_billing
    default_shipping
    extension_attributes {
      ...CustomerAddressAttributeFragment
    }
    fax
    firstname
    id
    lastname
    middlename
    postcode
    prefix
    region {
      ...CustomerAddressRegionFragment
    }
    region_id
    street
    suffix
    telephone
    vat_id
  }
}
Variables
{"input": CustomerAddressInput}
Response
{
  "data": {
    "createCustomerAddress": {
      "city": "abc123",
      "company": "abc123",
      "country_code": "AF",
      "country_id": "xyz789",
      "custom_attributes": [CustomerAddressAttribute],
      "customer_id": 123,
      "default_billing": true,
      "default_shipping": false,
      "extension_attributes": [CustomerAddressAttribute],
      "fax": "xyz789",
      "firstname": "xyz789",
      "id": 123,
      "lastname": "abc123",
      "middlename": "xyz789",
      "postcode": "abc123",
      "prefix": "xyz789",
      "region": CustomerAddressRegion,
      "region_id": 987,
      "street": ["abc123"],
      "suffix": "xyz789",
      "telephone": "xyz789",
      "vat_id": "abc123"
    }
  }
}

createCustomerV2

Create a customer account.

Response: CustomerOutput

Arguments

Name
Description
input - CustomerCreateInput!
An input object that defines the customer to be created.

Example

Query
mutation createCustomerV2($input: CustomerCreateInput!) {
  createCustomerV2(input: $input) {
    customer {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CustomerCreateInput}
Response
{"data": {"createCustomerV2": {"customer": Customer}}}

createEmptyCart

Create an empty shopping cart for a guest or logged in user

Response: String

Arguments

Name
Description
input - createEmptyCartInput
An optional input object that assigns the specified ID to the cart.

Example

Query
mutation createEmptyCart($input: createEmptyCartInput) {
  createEmptyCart(input: $input)
}
Variables
{"input": createEmptyCartInput}
Response
{"data": {"createEmptyCart": "xyz789"}}

createGiftRegistry

Create a gift registry on behalf of the customer.

Response: CreateGiftRegistryOutput

Arguments

Name
Description
giftRegistry - CreateGiftRegistryInput!
An input object that defines a new gift registry.

Example

Query
mutation createGiftRegistry($giftRegistry: CreateGiftRegistryInput!) {
  createGiftRegistry(giftRegistry: $giftRegistry) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{"giftRegistry": CreateGiftRegistryInput}
Response
{
  "data": {
    "createGiftRegistry": {"gift_registry": GiftRegistry}
  }
}

createPayflowProToken

Initiate a transaction and receive a token. Use this mutation for Payflow Pro and Payments Pro payment methods

Response: CreatePayflowProTokenOutput

Arguments

Name
Description
input - PayflowProTokenInput!
An input object that defines the requirements to fetch payment token information.

Example

Query
mutation createPayflowProToken($input: PayflowProTokenInput!) {
  createPayflowProToken(input: $input) {
    response_message
    result
    result_code
    secure_token
    secure_token_id
  }
}
Variables
{"input": PayflowProTokenInput}
Response
{
  "data": {
    "createPayflowProToken": {
      "response_message": "abc123",
      "result": 123,
      "result_code": 123,
      "secure_token": "xyz789",
      "secure_token_id": "xyz789"
    }
  }
}

createPaypalExpressToken

Initiate an Express Checkout transaction and receive a token. Use this mutation for Express Checkout and Payments Standard payment methods.

Response: PaypalExpressTokenOutput

Arguments

Name
Description
input - PaypalExpressTokenInput!
An input object that defines the requirements to receive a payment token.

Example

Query
mutation createPaypalExpressToken($input: PaypalExpressTokenInput!) {
  createPaypalExpressToken(input: $input) {
    paypal_urls {
      ...PaypalExpressUrlListFragment
    }
    token
  }
}
Variables
{"input": PaypalExpressTokenInput}
Response
{
  "data": {
    "createPaypalExpressToken": {
      "paypal_urls": PaypalExpressUrlList,
      "token": "abc123"
    }
  }
}

createProductReview

Create a product review for the specified product.

Response: CreateProductReviewOutput!

Arguments

Name
Description
input - CreateProductReviewInput!
An input object that contains the details necessary to create a product review.

Example

Query
mutation createProductReview($input: CreateProductReviewInput!) {
  createProductReview(input: $input) {
    review {
      ...ProductReviewFragment
    }
  }
}
Variables
{"input": CreateProductReviewInput}
Response
{
  "data": {
    "createProductReview": {"review": ProductReview}
  }
}

createPurchaseOrderApprovalRule

Create a purchase order approval rule.

Response: PurchaseOrderApprovalRule

Arguments

Name
Description
input - PurchaseOrderApprovalRuleInput!

Example

Query
mutation createPurchaseOrderApprovalRule($input: PurchaseOrderApprovalRuleInput!) {
  createPurchaseOrderApprovalRule(input: $input) {
    applies_to_roles {
      ...CompanyRoleFragment
    }
    approver_roles {
      ...CompanyRoleFragment
    }
    condition {
      ...PurchaseOrderApprovalRuleConditionInterfaceFragment
    }
    created_at
    created_by
    description
    name
    status
    uid
    updated_at
  }
}
Variables
{"input": PurchaseOrderApprovalRuleInput}
Response
{
  "data": {
    "createPurchaseOrderApprovalRule": {
      "applies_to_roles": [CompanyRole],
      "approver_roles": [CompanyRole],
      "condition": PurchaseOrderApprovalRuleConditionInterface,
      "created_at": "abc123",
      "created_by": "abc123",
      "description": "abc123",
      "name": "xyz789",
      "status": "ENABLED",
      "uid": 4,
      "updated_at": "xyz789"
    }
  }
}

createRequisitionList

Create an empty requisition list.

Response: CreateRequisitionListOutput

Arguments

Name
Description
input - CreateRequisitionListInput

Example

Query
mutation createRequisitionList($input: CreateRequisitionListInput) {
  createRequisitionList(input: $input) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{"input": CreateRequisitionListInput}
Response
{
  "data": {
    "createRequisitionList": {
      "requisition_list": RequisitionList
    }
  }
}

createWishlist

Create a new wish list.

Response: CreateWishlistOutput

Arguments

Name
Description
input - CreateWishlistInput!
An input object that defines a new wish list.

Example

Query
mutation createWishlist($input: CreateWishlistInput!) {
  createWishlist(input: $input) {
    wishlist {
      ...WishlistFragment
    }
  }
}
Variables
{"input": CreateWishlistInput}
Response
{"data": {"createWishlist": {"wishlist": Wishlist}}}

deleteCompanyRole

Delete the specified company role.

Response: DeleteCompanyRoleOutput

Arguments

Name
Description
id - ID!

Example

Query
mutation deleteCompanyRole($id: ID!) {
  deleteCompanyRole(id: $id) {
    success
  }
}
Variables
{"id": "4"}
Response
{"data": {"deleteCompanyRole": {"success": true}}}

deleteCompanyTeam

Delete the specified company team.

Response: DeleteCompanyTeamOutput

Arguments

Name
Description
id - ID!

Example

Query
mutation deleteCompanyTeam($id: ID!) {
  deleteCompanyTeam(id: $id) {
    success
  }
}
Variables
{"id": 4}
Response
{"data": {"deleteCompanyTeam": {"success": false}}}

deleteCompanyUser

Delete the specified company user.

Response: DeleteCompanyUserOutput

Arguments

Name
Description
id - ID!

Example

Query
mutation deleteCompanyUser($id: ID!) {
  deleteCompanyUser(id: $id) {
    success
  }
}
Variables
{"id": 4}
Response
{"data": {"deleteCompanyUser": {"success": false}}}

deleteCompareList

Delete the specified compare list.

Response: DeleteCompareListOutput

Arguments

Name
Description
uid - ID!
The unique ID of the compare list to be deleted.

Example

Query
mutation deleteCompareList($uid: ID!) {
  deleteCompareList(uid: $uid) {
    result
  }
}
Variables
{"uid": 4}
Response
{"data": {"deleteCompareList": {"result": false}}}

deleteCustomer

Delete customer account

Response: Boolean

Example

Query
mutation deleteCustomer {
  deleteCustomer
}
Response
{"data": {"deleteCustomer": true}}

deleteCustomerAddress

Delete the billing or shipping address of a customer.

Response: Boolean

Arguments

Name
Description
id - Int!
The ID of the customer address to be deleted.

Example

Query
mutation deleteCustomerAddress($id: Int!) {
  deleteCustomerAddress(id: $id)
}
Variables
{"id": 987}
Response
{"data": {"deleteCustomerAddress": true}}

deleteNegotiableQuotes

Delete a negotiable quote. The negotiable quote will not be displayed on the storefront.

Response: DeleteNegotiableQuotesOutput

Arguments

Name
Description
input - DeleteNegotiableQuotesInput!
An input object that deletes a negotiable quote.

Example

Query
mutation deleteNegotiableQuotes($input: DeleteNegotiableQuotesInput!) {
  deleteNegotiableQuotes(input: $input) {
    negotiable_quotes {
      ...NegotiableQuotesOutputFragment
    }
    operation_results {
      ... on NegotiableQuoteUidOperationSuccess {
        ...NegotiableQuoteUidOperationSuccessFragment
      }
      ... on DeleteNegotiableQuoteOperationFailure {
        ...DeleteNegotiableQuoteOperationFailureFragment
      }
    }
    result_status
  }
}
Variables
{"input": DeleteNegotiableQuotesInput}
Response
{
  "data": {
    "deleteNegotiableQuotes": {
      "negotiable_quotes": NegotiableQuotesOutput,
      "operation_results": [
        NegotiableQuoteUidOperationSuccess
      ],
      "result_status": "SUCCESS"
    }
  }
}

deletePaymentToken

Delete a customer's payment token.

Response: DeletePaymentTokenOutput

Arguments

Name
Description
public_hash - String!
The reusable payment token securely stored in the vault.

Example

Query
mutation deletePaymentToken($public_hash: String!) {
  deletePaymentToken(public_hash: $public_hash) {
    customerPaymentTokens {
      ...CustomerPaymentTokensFragment
    }
    result
  }
}
Variables
{"public_hash": "abc123"}
Response
{
  "data": {
    "deletePaymentToken": {
      "customerPaymentTokens": CustomerPaymentTokens,
      "result": true
    }
  }
}

deletePurchaseOrderApprovalRule

Delete existing purchase order approval rules.

Response: DeletePurchaseOrderApprovalRuleOutput

Arguments

Name
Description
input - DeletePurchaseOrderApprovalRuleInput!

Example

Query
mutation deletePurchaseOrderApprovalRule($input: DeletePurchaseOrderApprovalRuleInput!) {
  deletePurchaseOrderApprovalRule(input: $input) {
    errors {
      ...DeletePurchaseOrderApprovalRuleErrorFragment
    }
  }
}
Variables
{"input": DeletePurchaseOrderApprovalRuleInput}
Response
{
  "data": {
    "deletePurchaseOrderApprovalRule": {
      "errors": [DeletePurchaseOrderApprovalRuleError]
    }
  }
}

deleteRequisitionList

Delete a requisition list.

Response: DeleteRequisitionListOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.

Example

Query
mutation deleteRequisitionList($requisitionListUid: ID!) {
  deleteRequisitionList(requisitionListUid: $requisitionListUid) {
    requisition_lists {
      ...RequisitionListsFragment
    }
    status
  }
}
Variables
{"requisitionListUid": "4"}
Response
{
  "data": {
    "deleteRequisitionList": {
      "requisition_lists": RequisitionLists,
      "status": false
    }
  }
}

deleteRequisitionListItems

Delete items from a requisition list.

Response: DeleteRequisitionListItemsOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.
requisitionListItemUids - [ID!]!
An array of UIDs representing products to be removed from the requisition list.

Example

Query
mutation deleteRequisitionListItems(
  $requisitionListUid: ID!,
  $requisitionListItemUids: [ID!]!
) {
  deleteRequisitionListItems(
    requisitionListUid: $requisitionListUid,
    requisitionListItemUids: $requisitionListItemUids
  ) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "requisitionListUid": "4",
  "requisitionListItemUids": ["4"]
}
Response
{
  "data": {
    "deleteRequisitionListItems": {
      "requisition_list": RequisitionList
    }
  }
}

deleteWishlist

Delete the specified wish list. You cannot delete the customer's default (first) wish list.

Response: DeleteWishlistOutput

Arguments

Name
Description
wishlistId - ID!
The ID of the wish list to delete.

Example

Query
mutation deleteWishlist($wishlistId: ID!) {
  deleteWishlist(wishlistId: $wishlistId) {
    status
    wishlists {
      ...WishlistFragment
    }
  }
}
Variables
{"wishlistId": 4}
Response
{
  "data": {
    "deleteWishlist": {
      "status": true,
      "wishlists": [Wishlist]
    }
  }
}

generateCustomerToken

Generate a token for specified customer.

Response: CustomerToken

Arguments

Name
Description
email - String!
The customer's email address.
password - String!
The customer's password.

Example

Query
mutation generateCustomerToken(
  $email: String!,
  $password: String!
) {
  generateCustomerToken(
    email: $email,
    password: $password
  ) {
    token
  }
}
Variables
{
  "email": "xyz789",
  "password": "xyz789"
}
Response
{
  "data": {
    "generateCustomerToken": {
      "token": "abc123"
    }
  }
}

generateCustomerTokenAsAdmin

Request a customer token so that an administrator can perform remote shopping assistance.

Response: GenerateCustomerTokenAsAdminOutput

Arguments

Name
Description
input - GenerateCustomerTokenAsAdminInput!
An input object that defines the customer email address.

Example

Query
mutation generateCustomerTokenAsAdmin($input: GenerateCustomerTokenAsAdminInput!) {
  generateCustomerTokenAsAdmin(input: $input) {
    customer_token
  }
}
Variables
{"input": GenerateCustomerTokenAsAdminInput}
Response
{
  "data": {
    "generateCustomerTokenAsAdmin": {
      "customer_token": "abc123"
    }
  }
}

handlePayflowProResponse

Handle a payment response and save the payment in Quote. Use this mutation for Payflow Pro and Payments Pro payment methods.

Response: PayflowProResponseOutput

Arguments

Name
Description
input - PayflowProResponseInput!
An input object that includes the payload returned by PayPal and the cart ID.

Example

Query
mutation handlePayflowProResponse($input: PayflowProResponseInput!) {
  handlePayflowProResponse(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": PayflowProResponseInput}
Response
{"data": {"handlePayflowProResponse": {"cart": Cart}}}

mergeCarts

Transfer the contents of a guest cart into the cart of a logged-in customer.

Response: Cart!

Arguments

Name
Description
source_cart_id - String!
The guest's cart ID before they login.
destination_cart_id - String
The cart ID after the guest logs in.

Example

Query
mutation mergeCarts(
  $source_cart_id: String!,
  $destination_cart_id: String
) {
  mergeCarts(
    source_cart_id: $source_cart_id,
    destination_cart_id: $destination_cart_id
  ) {
    applied_coupon {
      ...AppliedCouponFragment
    }
    applied_coupons {
      ...AppliedCouponFragment
    }
    applied_gift_cards {
      ...AppliedGiftCardFragment
    }
    applied_reward_points {
      ...RewardPointsAmountFragment
    }
    applied_store_credit {
      ...AppliedStoreCreditFragment
    }
    available_gift_wrappings {
      ...GiftWrappingFragment
    }
    available_payment_methods {
      ...AvailablePaymentMethodFragment
    }
    billing_address {
      ...BillingCartAddressFragment
    }
    email
    gift_message {
      ...GiftMessageFragment
    }
    gift_receipt_included
    gift_wrapping {
      ...GiftWrappingFragment
    }
    id
    is_virtual
    items {
      ...CartItemInterfaceFragment
    }
    prices {
      ...CartPricesFragment
    }
    printed_card_included
    selected_payment_method {
      ...SelectedPaymentMethodFragment
    }
    shipping_addresses {
      ...ShippingCartAddressFragment
    }
    total_quantity
  }
}
Variables
{
  "source_cart_id": "xyz789",
  "destination_cart_id": "abc123"
}
Response
{
  "data": {
    "mergeCarts": {
      "applied_coupon": AppliedCoupon,
      "applied_coupons": [AppliedCoupon],
      "applied_gift_cards": [AppliedGiftCard],
      "applied_reward_points": RewardPointsAmount,
      "applied_store_credit": AppliedStoreCredit,
      "available_gift_wrappings": [GiftWrapping],
      "available_payment_methods": [
        AvailablePaymentMethod
      ],
      "billing_address": BillingCartAddress,
      "email": "xyz789",
      "gift_message": GiftMessage,
      "gift_receipt_included": false,
      "gift_wrapping": GiftWrapping,
      "id": 4,
      "is_virtual": true,
      "items": [CartItemInterface],
      "prices": CartPrices,
      "printed_card_included": false,
      "selected_payment_method": SelectedPaymentMethod,
      "shipping_addresses": [ShippingCartAddress],
      "total_quantity": 987.65
    }
  }
}

moveCartItemsToGiftRegistry

Move all items from the cart to a gift registry.

Response: MoveCartItemsToGiftRegistryOutput

Arguments

Name
Description
cartUid - ID!
The unique ID of the cart containing items to be moved to a gift registry.
giftRegistryUid - ID!
The unique ID of the target gift registry.

Example

Query
mutation moveCartItemsToGiftRegistry(
  $cartUid: ID!,
  $giftRegistryUid: ID!
) {
  moveCartItemsToGiftRegistry(
    cartUid: $cartUid,
    giftRegistryUid: $giftRegistryUid
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
    status
    user_errors {
      ...GiftRegistryItemsUserErrorFragment
    }
  }
}
Variables
{"cartUid": 4, "giftRegistryUid": "4"}
Response
{
  "data": {
    "moveCartItemsToGiftRegistry": {
      "gift_registry": GiftRegistry,
      "status": true,
      "user_errors": [GiftRegistryItemsUserError]
    }
  }
}

moveItemsBetweenRequisitionLists

Move Items from one requisition list to another.

Response: MoveItemsBetweenRequisitionListsOutput

Arguments

Name
Description
sourceRequisitionListUid - ID!
The unique ID of the source requisition list.
destinationRequisitionListUid - ID
The unique ID of the destination requisition list. If null, a new requisition list will be created.
requisitionListItem - MoveItemsBetweenRequisitionListsInput
The list of products to move.

Example

Query
mutation moveItemsBetweenRequisitionLists(
  $sourceRequisitionListUid: ID!,
  $destinationRequisitionListUid: ID,
  $requisitionListItem: MoveItemsBetweenRequisitionListsInput
) {
  moveItemsBetweenRequisitionLists(
    sourceRequisitionListUid: $sourceRequisitionListUid,
    destinationRequisitionListUid: $destinationRequisitionListUid,
    requisitionListItem: $requisitionListItem
  ) {
    destination_requisition_list {
      ...RequisitionListFragment
    }
    source_requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "sourceRequisitionListUid": 4,
  "destinationRequisitionListUid": "4",
  "requisitionListItem": MoveItemsBetweenRequisitionListsInput
}
Response
{
  "data": {
    "moveItemsBetweenRequisitionLists": {
      "destination_requisition_list": RequisitionList,
      "source_requisition_list": RequisitionList
    }
  }
}

moveProductsBetweenWishlists

Move products from one wish list to another.

Response: MoveProductsBetweenWishlistsOutput

Arguments

Name
Description
sourceWishlistUid - ID!
The ID of the original wish list.
destinationWishlistUid - ID!
The ID of the target wish list.
wishlistItems - [WishlistItemMoveInput!]!
An array of items to move.

Example

Query
mutation moveProductsBetweenWishlists(
  $sourceWishlistUid: ID!,
  $destinationWishlistUid: ID!,
  $wishlistItems: [WishlistItemMoveInput!]!
) {
  moveProductsBetweenWishlists(
    sourceWishlistUid: $sourceWishlistUid,
    destinationWishlistUid: $destinationWishlistUid,
    wishlistItems: $wishlistItems
  ) {
    destination_wishlist {
      ...WishlistFragment
    }
    source_wishlist {
      ...WishlistFragment
    }
    user_errors {
      ...WishListUserInputErrorFragment
    }
  }
}
Variables
{
  "sourceWishlistUid": "4",
  "destinationWishlistUid": "4",
  "wishlistItems": [WishlistItemMoveInput]
}
Response
{
  "data": {
    "moveProductsBetweenWishlists": {
      "destination_wishlist": Wishlist,
      "source_wishlist": Wishlist,
      "user_errors": [WishListUserInputError]
    }
  }
}

placeNegotiableQuoteOrder

Convert a negotiable quote into an order.

Response: PlaceNegotiableQuoteOrderOutput

Arguments

Name
Description
input - PlaceNegotiableQuoteOrderInput!
An input object that specifies the negotiable quote.

Example

Query
mutation placeNegotiableQuoteOrder($input: PlaceNegotiableQuoteOrderInput!) {
  placeNegotiableQuoteOrder(input: $input) {
    order {
      ...OrderFragment
    }
  }
}
Variables
{"input": PlaceNegotiableQuoteOrderInput}
Response
{"data": {"placeNegotiableQuoteOrder": {"order": Order}}}

placeOrder

Convert the quote into an order.

Response: PlaceOrderOutput

Arguments

Name
Description
input - PlaceOrderInput
An input object that defines the shopper's cart ID.

Example

Query
mutation placeOrder($input: PlaceOrderInput) {
  placeOrder(input: $input) {
    order {
      ...OrderFragment
    }
  }
}
Variables
{"input": PlaceOrderInput}
Response
{"data": {"placeOrder": {"order": Order}}}

placeOrderForPurchaseOrder

Convert the purchase order into an order.

Response: PlaceOrderForPurchaseOrderOutput

Arguments

Name
Description
input - PlaceOrderForPurchaseOrderInput!

Example

Query
mutation placeOrderForPurchaseOrder($input: PlaceOrderForPurchaseOrderInput!) {
  placeOrderForPurchaseOrder(input: $input) {
    order {
      ...CustomerOrderFragment
    }
  }
}
Variables
{"input": PlaceOrderForPurchaseOrderInput}
Response
{
  "data": {
    "placeOrderForPurchaseOrder": {"order": CustomerOrder}
  }
}

placePurchaseOrder

Place a purchase order.

Response: PlacePurchaseOrderOutput

Arguments

Name
Description
input - PlacePurchaseOrderInput!

Example

Query
mutation placePurchaseOrder($input: PlacePurchaseOrderInput!) {
  placePurchaseOrder(input: $input) {
    purchase_order {
      ...PurchaseOrderFragment
    }
  }
}
Variables
{"input": PlacePurchaseOrderInput}
Response
{
  "data": {
    "placePurchaseOrder": {
      "purchase_order": PurchaseOrder
    }
  }
}

redeemGiftCardBalanceAsStoreCredit

Redeem a gift card for store credit.

Response: GiftCardAccount

Arguments

Name
Description
input - GiftCardAccountInput!
An input object that specifies the gift card code to redeem.

Example

Query
mutation redeemGiftCardBalanceAsStoreCredit($input: GiftCardAccountInput!) {
  redeemGiftCardBalanceAsStoreCredit(input: $input) {
    balance {
      ...MoneyFragment
    }
    code
    expiration_date
  }
}
Variables
{"input": GiftCardAccountInput}
Response
{
  "data": {
    "redeemGiftCardBalanceAsStoreCredit": {
      "balance": Money,
      "code": "abc123",
      "expiration_date": "abc123"
    }
  }
}

rejectPurchaseOrders

Reject purchase orders.

Response: PurchaseOrdersActionOutput

Arguments

Name
Description
input - PurchaseOrdersActionInput!

Example

Query
mutation rejectPurchaseOrders($input: PurchaseOrdersActionInput!) {
  rejectPurchaseOrders(input: $input) {
    errors {
      ...PurchaseOrderActionErrorFragment
    }
    purchase_orders {
      ...PurchaseOrderFragment
    }
  }
}
Variables
{"input": PurchaseOrdersActionInput}
Response
{
  "data": {
    "rejectPurchaseOrders": {
      "errors": [PurchaseOrderActionError],
      "purchase_orders": [PurchaseOrder]
    }
  }
}

removeCouponFromCart

Remove a previously-applied coupon from the cart. The cart must contain at least one item in order to remove the coupon.

Response: RemoveCouponFromCartOutput

Arguments

Name
Description
input - RemoveCouponFromCartInput
An input object that defines which coupon code to remove from the cart.

Example

Query
mutation removeCouponFromCart($input: RemoveCouponFromCartInput) {
  removeCouponFromCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": RemoveCouponFromCartInput}
Response
{"data": {"removeCouponFromCart": {"cart": Cart}}}

removeGiftCardFromCart

Removes a gift card from the cart.

Response: RemoveGiftCardFromCartOutput

Arguments

Name
Description
input - RemoveGiftCardFromCartInput
An input object that specifies which gift card code to remove from the cart.

Example

Query
mutation removeGiftCardFromCart($input: RemoveGiftCardFromCartInput) {
  removeGiftCardFromCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": RemoveGiftCardFromCartInput}
Response
{"data": {"removeGiftCardFromCart": {"cart": Cart}}}

removeGiftRegistry

Delete the specified gift registry.

Response: RemoveGiftRegistryOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry to delete.

Example

Query
mutation removeGiftRegistry($giftRegistryUid: ID!) {
  removeGiftRegistry(giftRegistryUid: $giftRegistryUid) {
    success
  }
}
Variables
{"giftRegistryUid": 4}
Response
{"data": {"removeGiftRegistry": {"success": true}}}

removeGiftRegistryItems

Delete the specified items from a gift registry.

Response: RemoveGiftRegistryItemsOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
itemsUid - [ID!]!
An array of item IDs to remove from the gift registry.

Example

Query
mutation removeGiftRegistryItems(
  $giftRegistryUid: ID!,
  $itemsUid: [ID!]!
) {
  removeGiftRegistryItems(
    giftRegistryUid: $giftRegistryUid,
    itemsUid: $itemsUid
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{"giftRegistryUid": 4, "itemsUid": ["4"]}
Response
{
  "data": {
    "removeGiftRegistryItems": {
      "gift_registry": GiftRegistry
    }
  }
}

removeGiftRegistryRegistrants

Removes registrants from a gift registry.

Response: RemoveGiftRegistryRegistrantsOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
registrantsUid - [ID!]!
An array of registrant IDs to remove.

Example

Query
mutation removeGiftRegistryRegistrants(
  $giftRegistryUid: ID!,
  $registrantsUid: [ID!]!
) {
  removeGiftRegistryRegistrants(
    giftRegistryUid: $giftRegistryUid,
    registrantsUid: $registrantsUid
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{
  "giftRegistryUid": "4",
  "registrantsUid": ["4"]
}
Response
{
  "data": {
    "removeGiftRegistryRegistrants": {
      "gift_registry": GiftRegistry
    }
  }
}

removeItemFromCart

Delete the entire quantity of a specified item from the cart. If you remove all items from the cart, the cart continues to exist.

Response: RemoveItemFromCartOutput

Arguments

Name
Description
input - RemoveItemFromCartInput
An input object that defines which products to remove from the cart.

Example

Query
mutation removeItemFromCart($input: RemoveItemFromCartInput) {
  removeItemFromCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": RemoveItemFromCartInput}
Response
{"data": {"removeItemFromCart": {"cart": Cart}}}

removeNegotiableQuoteItems

Remove one or more products from a negotiable quote.

Response: RemoveNegotiableQuoteItemsOutput

Arguments

Name
Description
input - RemoveNegotiableQuoteItemsInput!
An input object that removes one or more items from a negotiable quote.

Example

Query
mutation removeNegotiableQuoteItems($input: RemoveNegotiableQuoteItemsInput!) {
  removeNegotiableQuoteItems(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": RemoveNegotiableQuoteItemsInput}
Response
{
  "data": {
    "removeNegotiableQuoteItems": {
      "quote": NegotiableQuote
    }
  }
}

removeProductsFromCompareList

Remove products from the specified compare list.

Response: CompareList

Arguments

Name
Description
input - RemoveProductsFromCompareListInput
An input object that defines which products to remove from a compare list.

Example

Query
mutation removeProductsFromCompareList($input: RemoveProductsFromCompareListInput) {
  removeProductsFromCompareList(input: $input) {
    attributes {
      ...ComparableAttributeFragment
    }
    item_count
    items {
      ...ComparableItemFragment
    }
    uid
  }
}
Variables
{"input": RemoveProductsFromCompareListInput}
Response
{
  "data": {
    "removeProductsFromCompareList": {
      "attributes": [ComparableAttribute],
      "item_count": 987,
      "items": [ComparableItem],
      "uid": "4"
    }
  }
}

removeProductsFromWishlist

Remove one or more products from the specified wish list.

Response: RemoveProductsFromWishlistOutput

Arguments

Name
Description
wishlistId - ID!
The ID of a wish list.
wishlistItemsIds - [ID!]!
An array of item IDs representing products to be removed.

Example

Query
mutation removeProductsFromWishlist(
  $wishlistId: ID!,
  $wishlistItemsIds: [ID!]!
) {
  removeProductsFromWishlist(
    wishlistId: $wishlistId,
    wishlistItemsIds: $wishlistItemsIds
  ) {
    user_errors {
      ...WishListUserInputErrorFragment
    }
    wishlist {
      ...WishlistFragment
    }
  }
}
Variables
{"wishlistId": 4, "wishlistItemsIds": ["4"]}
Response
{
  "data": {
    "removeProductsFromWishlist": {
      "user_errors": [WishListUserInputError],
      "wishlist": Wishlist
    }
  }
}

removeReturnTracking

Remove a tracked shipment from a return.

Response: RemoveReturnTrackingOutput

Arguments

Name
Description
input - RemoveReturnTrackingInput!
An input object that removes tracking information.

Example

Query
mutation removeReturnTracking($input: RemoveReturnTrackingInput!) {
  removeReturnTracking(input: $input) {
    return {
      ...ReturnFragment
    }
  }
}
Variables
{"input": RemoveReturnTrackingInput}
Response
{"data": {"removeReturnTracking": {"return": Return}}}

removeRewardPointsFromCart

Cancel the application of reward points to the cart.

Response: RemoveRewardPointsFromCartOutput

Arguments

Name
Description
cartId - ID!

Example

Query
mutation removeRewardPointsFromCart($cartId: ID!) {
  removeRewardPointsFromCart(cartId: $cartId) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"cartId": "4"}
Response
{"data": {"removeRewardPointsFromCart": {"cart": Cart}}}

removeStoreCreditFromCart

Remove store credit that has been applied to the specified cart.

Response: RemoveStoreCreditFromCartOutput

Arguments

Name
Description
input - RemoveStoreCreditFromCartInput!
An input object that specifies the cart ID.

Example

Query
mutation removeStoreCreditFromCart($input: RemoveStoreCreditFromCartInput!) {
  removeStoreCreditFromCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": RemoveStoreCreditFromCartInput}
Response
{"data": {"removeStoreCreditFromCart": {"cart": Cart}}}

reorderItems

Add all products from a customer's previous order to the cart.

Response: ReorderItemsOutput

Arguments

Name
Description
orderNumber - String!

Example

Query
mutation reorderItems($orderNumber: String!) {
  reorderItems(orderNumber: $orderNumber) {
    cart {
      ...CartFragment
    }
    userInputErrors {
      ...CheckoutUserInputErrorFragment
    }
  }
}
Variables
{"orderNumber": "xyz789"}
Response
{
  "data": {
    "reorderItems": {
      "cart": Cart,
      "userInputErrors": [CheckoutUserInputError]
    }
  }
}

requestNegotiableQuote

Request a new negotiable quote on behalf of the buyer.

Response: RequestNegotiableQuoteOutput

Arguments

Name
Description
input - RequestNegotiableQuoteInput!
An input object that contains a request to initiate a negotiable quote.

Example

Query
mutation requestNegotiableQuote($input: RequestNegotiableQuoteInput!) {
  requestNegotiableQuote(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": RequestNegotiableQuoteInput}
Response
{
  "data": {
    "requestNegotiableQuote": {"quote": NegotiableQuote}
  }
}

requestPasswordResetEmail

Request an email with a reset password token for the registered customer identified by the specified email.

Response: Boolean

Arguments

Name
Description
email - String!
The customer's email address.

Example

Query
mutation requestPasswordResetEmail($email: String!) {
  requestPasswordResetEmail(email: $email)
}
Variables
{"email": "xyz789"}
Response
{"data": {"requestPasswordResetEmail": true}}

requestReturn

Initiates a buyer's request to return items for replacement or refund.

Response: RequestReturnOutput

Arguments

Name
Description
input - RequestReturnInput!
An input object that contains the fields needed to start a return request.

Example

Query
mutation requestReturn($input: RequestReturnInput!) {
  requestReturn(input: $input) {
    return {
      ...ReturnFragment
    }
    returns {
      ...ReturnsFragment
    }
  }
}
Variables
{"input": RequestReturnInput}
Response
{
  "data": {
    "requestReturn": {
      "return": Return,
      "returns": Returns
    }
  }
}

resetPassword

Reset a customer's password using the reset password token that the customer received in an email after requesting it using requestPasswordResetEmail.

Response: Boolean

Arguments

Name
Description
email - String!
The customer's email address.
resetPasswordToken - String!
A runtime token generated by the `requestPasswordResetEmail` mutation.
newPassword - String!
The customer's new password.

Example

Query
mutation resetPassword(
  $email: String!,
  $resetPasswordToken: String!,
  $newPassword: String!
) {
  resetPassword(
    email: $email,
    resetPasswordToken: $resetPasswordToken,
    newPassword: $newPassword
  )
}
Variables
{
  "email": "xyz789",
  "resetPasswordToken": "xyz789",
  "newPassword": "xyz789"
}
Response
{"data": {"resetPassword": true}}

revokeCustomerToken

Revoke the customer token.

Response: RevokeCustomerTokenOutput

Example

Query
mutation revokeCustomerToken {
  revokeCustomerToken {
    result
  }
}
Response
{"data": {"revokeCustomerToken": {"result": true}}}

sendEmailToFriend

Send a message on behalf of a customer to the specified email addresses.

Response: SendEmailToFriendOutput

Arguments

Name
Description
input - SendEmailToFriendInput
An input object that defines sender, recipients, and product.

Example

Query
mutation sendEmailToFriend($input: SendEmailToFriendInput) {
  sendEmailToFriend(input: $input) {
    recipients {
      ...SendEmailToFriendRecipientFragment
    }
    sender {
      ...SendEmailToFriendSenderFragment
    }
  }
}
Variables
{"input": SendEmailToFriendInput}
Response
{
  "data": {
    "sendEmailToFriend": {
      "recipients": [SendEmailToFriendRecipient],
      "sender": SendEmailToFriendSender
    }
  }
}

sendNegotiableQuoteForReview

Send the negotiable quote to the seller for review.

Response: SendNegotiableQuoteForReviewOutput

Arguments

Name
Description
input - SendNegotiableQuoteForReviewInput!
An input object that sends a request for the merchant to review a negotiable quote.

Example

Query
mutation sendNegotiableQuoteForReview($input: SendNegotiableQuoteForReviewInput!) {
  sendNegotiableQuoteForReview(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": SendNegotiableQuoteForReviewInput}
Response
{
  "data": {
    "sendNegotiableQuoteForReview": {
      "quote": NegotiableQuote
    }
  }
}

setBillingAddressOnCart

Set the billing address on a specific cart.

Response: SetBillingAddressOnCartOutput

Arguments

Name
Description
input - SetBillingAddressOnCartInput
An input object that defines the billing address to be assigned to the cart.

Example

Query
mutation setBillingAddressOnCart($input: SetBillingAddressOnCartInput) {
  setBillingAddressOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetBillingAddressOnCartInput}
Response
{"data": {"setBillingAddressOnCart": {"cart": Cart}}}

setGiftOptionsOnCart

Set gift options, including gift messages, gift wrapping, gift receipts, and printed cards.

Response: SetGiftOptionsOnCartOutput

Arguments

Name
Description
input - SetGiftOptionsOnCartInput
An input object that defines the selected gift options.

Example

Query
mutation setGiftOptionsOnCart($input: SetGiftOptionsOnCartInput) {
  setGiftOptionsOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetGiftOptionsOnCartInput}
Response
{"data": {"setGiftOptionsOnCart": {"cart": Cart}}}

setGuestEmailOnCart

Assign the email address of a guest to the cart.

Response: SetGuestEmailOnCartOutput

Arguments

Name
Description
input - SetGuestEmailOnCartInput
An input object that defines a guest email address.

Example

Query
mutation setGuestEmailOnCart($input: SetGuestEmailOnCartInput) {
  setGuestEmailOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetGuestEmailOnCartInput}
Response
{"data": {"setGuestEmailOnCart": {"cart": Cart}}}

setNegotiableQuoteBillingAddress

Assign a billing address to a negotiable quote.

Response: SetNegotiableQuoteBillingAddressOutput

Arguments

Name
Description
input - SetNegotiableQuoteBillingAddressInput!
An input object that defines the billing address to be assigned to a negotiable quote.

Example

Query
mutation setNegotiableQuoteBillingAddress($input: SetNegotiableQuoteBillingAddressInput!) {
  setNegotiableQuoteBillingAddress(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": SetNegotiableQuoteBillingAddressInput}
Response
{
  "data": {
    "setNegotiableQuoteBillingAddress": {
      "quote": NegotiableQuote
    }
  }
}

setNegotiableQuotePaymentMethod

Set the payment method on a negotiable quote.

Response: SetNegotiableQuotePaymentMethodOutput

Arguments

Name
Description
input - SetNegotiableQuotePaymentMethodInput!
An input object that defines the payment method for the specified negotiable quote.

Example

Query
mutation setNegotiableQuotePaymentMethod($input: SetNegotiableQuotePaymentMethodInput!) {
  setNegotiableQuotePaymentMethod(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": SetNegotiableQuotePaymentMethodInput}
Response
{
  "data": {
    "setNegotiableQuotePaymentMethod": {
      "quote": NegotiableQuote
    }
  }
}

setNegotiableQuoteShippingAddress

Assign a previously-defined address as the shipping address for a negotiable quote.

Response: SetNegotiableQuoteShippingAddressOutput

Arguments

Name
Description
input - SetNegotiableQuoteShippingAddressInput!
An input object that defines the shipping address to be assigned to a negotiable quote.

Example

Query
mutation setNegotiableQuoteShippingAddress($input: SetNegotiableQuoteShippingAddressInput!) {
  setNegotiableQuoteShippingAddress(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": SetNegotiableQuoteShippingAddressInput}
Response
{
  "data": {
    "setNegotiableQuoteShippingAddress": {
      "quote": NegotiableQuote
    }
  }
}

setNegotiableQuoteShippingMethods

Assign the shipping methods on the negotiable quote.

Response: SetNegotiableQuoteShippingMethodsOutput

Arguments

Name
Description
input - SetNegotiableQuoteShippingMethodsInput!
An input object that defines the shipping methods to be assigned to a negotiable quote.

Example

Query
mutation setNegotiableQuoteShippingMethods($input: SetNegotiableQuoteShippingMethodsInput!) {
  setNegotiableQuoteShippingMethods(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": SetNegotiableQuoteShippingMethodsInput}
Response
{
  "data": {
    "setNegotiableQuoteShippingMethods": {
      "quote": NegotiableQuote
    }
  }
}

setPaymentMethodAndPlaceOrder

Deprecated

Should use setPaymentMethodOnCart and placeOrder mutations in single request.

Set the cart payment method and convert the cart into an order.

Response: PlaceOrderOutput

Arguments

Name
Description
input - SetPaymentMethodAndPlaceOrderInput

Example

Query
mutation setPaymentMethodAndPlaceOrder($input: SetPaymentMethodAndPlaceOrderInput) {
  setPaymentMethodAndPlaceOrder(input: $input) {
    order {
      ...OrderFragment
    }
  }
}
Variables
{"input": SetPaymentMethodAndPlaceOrderInput}
Response
{
  "data": {
    "setPaymentMethodAndPlaceOrder": {"order": Order}
  }
}

setPaymentMethodOnCart

Apply a payment method to the cart.

Response: SetPaymentMethodOnCartOutput

Arguments

Name
Description
input - SetPaymentMethodOnCartInput
An input object that defines which payment method to apply to the cart.

Example

Query
mutation setPaymentMethodOnCart($input: SetPaymentMethodOnCartInput) {
  setPaymentMethodOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetPaymentMethodOnCartInput}
Response
{"data": {"setPaymentMethodOnCart": {"cart": Cart}}}

setShippingAddressesOnCart

Set one or more shipping addresses on a specific cart.

Response: SetShippingAddressesOnCartOutput

Arguments

Name
Description
input - SetShippingAddressesOnCartInput
An input object that defines one or more shipping addresses to be assigned to the cart.

Example

Query
mutation setShippingAddressesOnCart($input: SetShippingAddressesOnCartInput) {
  setShippingAddressesOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetShippingAddressesOnCartInput}
Response
{"data": {"setShippingAddressesOnCart": {"cart": Cart}}}

setShippingMethodsOnCart

Set one or more delivery methods on a cart.

Response: SetShippingMethodsOnCartOutput

Arguments

Name
Description
input - SetShippingMethodsOnCartInput
An input object that applies one or more shipping methods to the cart.

Example

Query
mutation setShippingMethodsOnCart($input: SetShippingMethodsOnCartInput) {
  setShippingMethodsOnCart(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": SetShippingMethodsOnCartInput}
Response
{"data": {"setShippingMethodsOnCart": {"cart": Cart}}}

shareGiftRegistry

Send an email about the gift registry to a list of invitees.

Response: ShareGiftRegistryOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
sender - ShareGiftRegistrySenderInput!
The sender's email address and gift message.
invitees - [ShareGiftRegistryInviteeInput!]!
An array containing invitee names and email addresses.

Example

Query
mutation shareGiftRegistry(
  $giftRegistryUid: ID!,
  $sender: ShareGiftRegistrySenderInput!,
  $invitees: [ShareGiftRegistryInviteeInput!]!
) {
  shareGiftRegistry(
    giftRegistryUid: $giftRegistryUid,
    sender: $sender,
    invitees: $invitees
  ) {
    is_shared
  }
}
Variables
{
  "giftRegistryUid": 4,
  "sender": ShareGiftRegistrySenderInput,
  "invitees": [ShareGiftRegistryInviteeInput]
}
Response
{"data": {"shareGiftRegistry": {"is_shared": false}}}

subscribeEmailToNewsletter

Subscribe the specified email to the store's newsletter.

Response: SubscribeEmailToNewsletterOutput

Arguments

Name
Description
email - String!
The email address that will receive the store's newsletter.

Example

Query
mutation subscribeEmailToNewsletter($email: String!) {
  subscribeEmailToNewsletter(email: $email) {
    status
  }
}
Variables
{"email": "abc123"}
Response
{"data": {"subscribeEmailToNewsletter": {"status": "NOT_ACTIVE"}}}

updateCartItems

Modify items in the cart.

Response: UpdateCartItemsOutput

Arguments

Name
Description
input - UpdateCartItemsInput
An input object that defines products to be updated.

Example

Query
mutation updateCartItems($input: UpdateCartItemsInput) {
  updateCartItems(input: $input) {
    cart {
      ...CartFragment
    }
  }
}
Variables
{"input": UpdateCartItemsInput}
Response
{"data": {"updateCartItems": {"cart": Cart}}}

updateCompany

Update company information.

Response: UpdateCompanyOutput

Arguments

Name
Description
input - CompanyUpdateInput!

Example

Query
mutation updateCompany($input: CompanyUpdateInput!) {
  updateCompany(input: $input) {
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": CompanyUpdateInput}
Response
{"data": {"updateCompany": {"company": Company}}}

updateCompanyRole

Update company role information.

Response: UpdateCompanyRoleOutput

Arguments

Name
Description
input - CompanyRoleUpdateInput!

Example

Query
mutation updateCompanyRole($input: CompanyRoleUpdateInput!) {
  updateCompanyRole(input: $input) {
    role {
      ...CompanyRoleFragment
    }
  }
}
Variables
{"input": CompanyRoleUpdateInput}
Response
{"data": {"updateCompanyRole": {"role": CompanyRole}}}

updateCompanyStructure

Change the parent node of a company team.

Response: UpdateCompanyStructureOutput

Arguments

Name
Description
input - CompanyStructureUpdateInput!

Example

Query
mutation updateCompanyStructure($input: CompanyStructureUpdateInput!) {
  updateCompanyStructure(input: $input) {
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": CompanyStructureUpdateInput}
Response
{"data": {"updateCompanyStructure": {"company": Company}}}

updateCompanyTeam

Update company team data.

Response: UpdateCompanyTeamOutput

Arguments

Name
Description
input - CompanyTeamUpdateInput!

Example

Query
mutation updateCompanyTeam($input: CompanyTeamUpdateInput!) {
  updateCompanyTeam(input: $input) {
    team {
      ...CompanyTeamFragment
    }
  }
}
Variables
{"input": CompanyTeamUpdateInput}
Response
{"data": {"updateCompanyTeam": {"team": CompanyTeam}}}

updateCompanyUser

Update an existing company user.

Response: UpdateCompanyUserOutput

Arguments

Name
Description
input - CompanyUserUpdateInput!

Example

Query
mutation updateCompanyUser($input: CompanyUserUpdateInput!) {
  updateCompanyUser(input: $input) {
    user {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CompanyUserUpdateInput}
Response
{"data": {"updateCompanyUser": {"user": Customer}}}

updateCustomer

Use updateCustomerV2 instead.

Response: CustomerOutput

Arguments

Name
Description
input - CustomerInput!
An input object that defines the customer characteristics to update.

Example

Query
mutation updateCustomer($input: CustomerInput!) {
  updateCustomer(input: $input) {
    customer {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CustomerInput}
Response
{"data": {"updateCustomer": {"customer": Customer}}}

updateCustomerAddress

Update the billing or shipping address of a customer or guest.

Response: CustomerAddress

Arguments

Name
Description
id - Int!
The ID assigned to the customer address.
input - CustomerAddressInput
An input object that contains changes to the customer address.

Example

Query
mutation updateCustomerAddress(
  $id: Int!,
  $input: CustomerAddressInput
) {
  updateCustomerAddress(
    id: $id,
    input: $input
  ) {
    city
    company
    country_code
    country_id
    custom_attributes {
      ...CustomerAddressAttributeFragment
    }
    customer_id
    default_billing
    default_shipping
    extension_attributes {
      ...CustomerAddressAttributeFragment
    }
    fax
    firstname
    id
    lastname
    middlename
    postcode
    prefix
    region {
      ...CustomerAddressRegionFragment
    }
    region_id
    street
    suffix
    telephone
    vat_id
  }
}
Variables
{"id": 123, "input": CustomerAddressInput}
Response
{
  "data": {
    "updateCustomerAddress": {
      "city": "xyz789",
      "company": "xyz789",
      "country_code": "AF",
      "country_id": "xyz789",
      "custom_attributes": [CustomerAddressAttribute],
      "customer_id": 987,
      "default_billing": true,
      "default_shipping": false,
      "extension_attributes": [CustomerAddressAttribute],
      "fax": "xyz789",
      "firstname": "abc123",
      "id": 123,
      "lastname": "xyz789",
      "middlename": "xyz789",
      "postcode": "xyz789",
      "prefix": "abc123",
      "region": CustomerAddressRegion,
      "region_id": 123,
      "street": ["abc123"],
      "suffix": "xyz789",
      "telephone": "abc123",
      "vat_id": "abc123"
    }
  }
}

updateCustomerEmail

Change the email address for the logged-in customer.

Response: CustomerOutput

Arguments

Name
Description
email - String!
The customer's email address.
password - String!
The customer's password.

Example

Query
mutation updateCustomerEmail(
  $email: String!,
  $password: String!
) {
  updateCustomerEmail(
    email: $email,
    password: $password
  ) {
    customer {
      ...CustomerFragment
    }
  }
}
Variables
{
  "email": "xyz789",
  "password": "abc123"
}
Response
{"data": {"updateCustomerEmail": {"customer": Customer}}}

updateCustomerV2

Update the customer's personal information.

Response: CustomerOutput

Arguments

Name
Description
input - CustomerUpdateInput!
An input object that defines the customer characteristics to update.

Example

Query
mutation updateCustomerV2($input: CustomerUpdateInput!) {
  updateCustomerV2(input: $input) {
    customer {
      ...CustomerFragment
    }
  }
}
Variables
{"input": CustomerUpdateInput}
Response
{"data": {"updateCustomerV2": {"customer": Customer}}}

updateGiftRegistry

Update the specified gift registry.

Response: UpdateGiftRegistryOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of an existing gift registry.
giftRegistry - UpdateGiftRegistryInput!
An input object that defines which fields to update.

Example

Query
mutation updateGiftRegistry(
  $giftRegistryUid: ID!,
  $giftRegistry: UpdateGiftRegistryInput!
) {
  updateGiftRegistry(
    giftRegistryUid: $giftRegistryUid,
    giftRegistry: $giftRegistry
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{
  "giftRegistryUid": 4,
  "giftRegistry": UpdateGiftRegistryInput
}
Response
{
  "data": {
    "updateGiftRegistry": {"gift_registry": GiftRegistry}
  }
}

updateGiftRegistryItems

Update the specified items in the gift registry.

Response: UpdateGiftRegistryItemsOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
items - [UpdateGiftRegistryItemInput!]!
An array of items to be updated.

Example

Query
mutation updateGiftRegistryItems(
  $giftRegistryUid: ID!,
  $items: [UpdateGiftRegistryItemInput!]!
) {
  updateGiftRegistryItems(
    giftRegistryUid: $giftRegistryUid,
    items: $items
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{
  "giftRegistryUid": "4",
  "items": [UpdateGiftRegistryItemInput]
}
Response
{
  "data": {
    "updateGiftRegistryItems": {
      "gift_registry": GiftRegistry
    }
  }
}

updateGiftRegistryRegistrants

Modify the properties of one or more gift registry registrants.

Response: UpdateGiftRegistryRegistrantsOutput

Arguments

Name
Description
giftRegistryUid - ID!
The unique ID of the gift registry.
registrants - [UpdateGiftRegistryRegistrantInput!]!
An array of registrants to update.

Example

Query
mutation updateGiftRegistryRegistrants(
  $giftRegistryUid: ID!,
  $registrants: [UpdateGiftRegistryRegistrantInput!]!
) {
  updateGiftRegistryRegistrants(
    giftRegistryUid: $giftRegistryUid,
    registrants: $registrants
  ) {
    gift_registry {
      ...GiftRegistryFragment
    }
  }
}
Variables
{
  "giftRegistryUid": 4,
  "registrants": [UpdateGiftRegistryRegistrantInput]
}
Response
{
  "data": {
    "updateGiftRegistryRegistrants": {
      "gift_registry": GiftRegistry
    }
  }
}

updateNegotiableQuoteQuantities

Change the quantity of one or more items in an existing negotiable quote.

Response: UpdateNegotiableQuoteItemsQuantityOutput

Arguments

Name
Description
input - UpdateNegotiableQuoteQuantitiesInput!
An input object that changes the quantity of one or more items in a negotiable quote.

Example

Query
mutation updateNegotiableQuoteQuantities($input: UpdateNegotiableQuoteQuantitiesInput!) {
  updateNegotiableQuoteQuantities(input: $input) {
    quote {
      ...NegotiableQuoteFragment
    }
  }
}
Variables
{"input": UpdateNegotiableQuoteQuantitiesInput}
Response
{
  "data": {
    "updateNegotiableQuoteQuantities": {
      "quote": NegotiableQuote
    }
  }
}

updateProductsInWishlist

Update one or more products in the specified wish list.

Response: UpdateProductsInWishlistOutput

Arguments

Name
Description
wishlistId - ID!
The ID of a wish list.
wishlistItems - [WishlistItemUpdateInput!]!
An array of items to be updated.

Example

Query
mutation updateProductsInWishlist(
  $wishlistId: ID!,
  $wishlistItems: [WishlistItemUpdateInput!]!
) {
  updateProductsInWishlist(
    wishlistId: $wishlistId,
    wishlistItems: $wishlistItems
  ) {
    user_errors {
      ...WishListUserInputErrorFragment
    }
    wishlist {
      ...WishlistFragment
    }
  }
}
Variables
{
  "wishlistId": "4",
  "wishlistItems": [WishlistItemUpdateInput]
}
Response
{
  "data": {
    "updateProductsInWishlist": {
      "user_errors": [WishListUserInputError],
      "wishlist": Wishlist
    }
  }
}

updatePurchaseOrderApprovalRule

Update existing purchase order approval rules.

Response: PurchaseOrderApprovalRule

Arguments

Name
Description
input - UpdatePurchaseOrderApprovalRuleInput!

Example

Query
mutation updatePurchaseOrderApprovalRule($input: UpdatePurchaseOrderApprovalRuleInput!) {
  updatePurchaseOrderApprovalRule(input: $input) {
    applies_to_roles {
      ...CompanyRoleFragment
    }
    approver_roles {
      ...CompanyRoleFragment
    }
    condition {
      ...PurchaseOrderApprovalRuleConditionInterfaceFragment
    }
    created_at
    created_by
    description
    name
    status
    uid
    updated_at
  }
}
Variables
{"input": UpdatePurchaseOrderApprovalRuleInput}
Response
{
  "data": {
    "updatePurchaseOrderApprovalRule": {
      "applies_to_roles": [CompanyRole],
      "approver_roles": [CompanyRole],
      "condition": PurchaseOrderApprovalRuleConditionInterface,
      "created_at": "abc123",
      "created_by": "abc123",
      "description": "xyz789",
      "name": "xyz789",
      "status": "ENABLED",
      "uid": 4,
      "updated_at": "xyz789"
    }
  }
}

updateRequisitionList

Rename a requisition list and change its description.

Response: UpdateRequisitionListOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.
input - UpdateRequisitionListInput

Example

Query
mutation updateRequisitionList(
  $requisitionListUid: ID!,
  $input: UpdateRequisitionListInput
) {
  updateRequisitionList(
    requisitionListUid: $requisitionListUid,
    input: $input
  ) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "requisitionListUid": 4,
  "input": UpdateRequisitionListInput
}
Response
{
  "data": {
    "updateRequisitionList": {
      "requisition_list": RequisitionList
    }
  }
}

updateRequisitionListItems

Update items in a requisition list.

Response: UpdateRequisitionListItemsOutput

Arguments

Name
Description
requisitionListUid - ID!
The unique ID of the requisition list.
requisitionListItems - [UpdateRequisitionListItemsInput!]!
Items to be updated in the requisition list.

Example

Query
mutation updateRequisitionListItems(
  $requisitionListUid: ID!,
  $requisitionListItems: [UpdateRequisitionListItemsInput!]!
) {
  updateRequisitionListItems(
    requisitionListUid: $requisitionListUid,
    requisitionListItems: $requisitionListItems
  ) {
    requisition_list {
      ...RequisitionListFragment
    }
  }
}
Variables
{
  "requisitionListUid": 4,
  "requisitionListItems": [
    UpdateRequisitionListItemsInput
  ]
}
Response
{
  "data": {
    "updateRequisitionListItems": {
      "requisition_list": RequisitionList
    }
  }
}

updateWishlist

Change the name and visibility of the specified wish list.

Response: UpdateWishlistOutput

Arguments

Name
Description
wishlistId - ID!
The ID of the wish list to update.
name - String
The name assigned to the wish list.
visibility - WishlistVisibilityEnum
Indicates the visibility of the wish list.

Example

Query
mutation updateWishlist(
  $wishlistId: ID!,
  $name: String,
  $visibility: WishlistVisibilityEnum
) {
  updateWishlist(
    wishlistId: $wishlistId,
    name: $name,
    visibility: $visibility
  ) {
    name
    uid
    visibility
  }
}
Variables
{
  "wishlistId": 4,
  "name": "abc123",
  "visibility": "PUBLIC"
}
Response
{
  "data": {
    "updateWishlist": {
      "name": "abc123",
      "uid": "4",
      "visibility": "PUBLIC"
    }
  }
}

validatePurchaseOrders

Validate purchase orders.

Response: ValidatePurchaseOrdersOutput

Arguments

Name
Description
input - ValidatePurchaseOrdersInput!

Example

Query
mutation validatePurchaseOrders($input: ValidatePurchaseOrdersInput!) {
  validatePurchaseOrders(input: $input) {
    errors {
      ...ValidatePurchaseOrderErrorFragment
    }
    purchase_orders {
      ...PurchaseOrderFragment
    }
  }
}
Variables
{"input": ValidatePurchaseOrdersInput}
Response
{
  "data": {
    "validatePurchaseOrders": {
      "errors": [ValidatePurchaseOrderError],
      "purchase_orders": [PurchaseOrder]
    }
  }
}