Skip to main content
object

The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start.

Anchor to cartAttributesUpdatecartAttributesUpdate
CartAttributesUpdatePayload

Updates the attributes on a cart.

Arguments

[AttributeInput!]!
required

An array of key-value pairs that contains additional information about the cart.

The input must not contain more than 250 values.

ID!
required

The ID of the cart.


Anchor to cartBuyerIdentityUpdatecartBuyerIdentityUpdate
CartBuyerIdentityUpdatePayload

Updates customer information associated with a cart. Buyer identity is used to determine international pricing and should match the customer's shipping address.

Arguments

ID!
required

The ID of the cart.

CartBuyerIdentityInput!
required

The customer associated with the cart. Used to determine international pricing. Buyer identity should match the customer's shipping address.


CartCreatePayload

Creates a new cart.

Arguments

CartInput

The fields used to create a cart.


Anchor to cartDeliveryAddressesAddcartDeliveryAddressesAdd
CartDeliveryAddressesAddPayload

Adds delivery addresses to the cart.

Arguments

ID!
required

The ID of the cart.

[CartSelectableAddressInput!]!
required

A list of delivery addresses to add to the cart.

The input must not contain more than 250 values.


Anchor to cartDeliveryAddressesRemovecartDeliveryAddressesRemove
CartDeliveryAddressesRemovePayload

Removes delivery addresses from the cart.

Arguments

ID!
required

The ID of the cart.

[ID!]!
required

A list of delivery addresses by handle to remove from the cart.

The input must not contain more than 250 values.


Anchor to cartDeliveryAddressesReplacecartDeliveryAddressesReplace
CartDeliveryAddressesReplacePayload

Replaces delivery addresses on the cart.

Arguments

ID!
required

The ID of the cart.

[CartSelectableAddressInput!]!
required

A list of delivery addresses to replace on the cart.

The input must not contain more than 250 values.


Anchor to cartDeliveryAddressesUpdatecartDeliveryAddressesUpdate
CartDeliveryAddressesUpdatePayload

Updates one or more delivery addresses on a cart.

Arguments

ID!
required

The ID of the cart.

[CartSelectableAddressUpdateInput!]!
required

The delivery addresses to update.

The input must not contain more than 250 values.


Anchor to cartDiscountCodesUpdatecartDiscountCodesUpdate
CartDiscountCodesUpdatePayload

Updates the discount codes applied to the cart.

Arguments

ID!
required

The ID of the cart.

[String!]!
required

The case-insensitive discount codes that the customer added at checkout.

The input must not contain more than 250 values.


Anchor to cartGiftCardCodesAddcartGiftCardCodesAdd
CartGiftCardCodesAddPayload

Adds gift card codes to the cart without replacing existing ones.

Arguments

ID!
required

The ID of the cart.

[String!]!
required

The case-insensitive gift card codes to add.

The input must not contain more than 250 values.


Anchor to cartGiftCardCodesRemovecartGiftCardCodesRemove
CartGiftCardCodesRemovePayload

Removes the gift card codes applied to the cart.

Arguments

ID!
required

The ID of the cart.

[ID!]!
required

The gift cards to remove.

The input must not contain more than 250 values.


Anchor to cartGiftCardCodesUpdatecartGiftCardCodesUpdate
CartGiftCardCodesUpdatePayload

Updates the gift card codes applied to the cart.

Arguments

ID!
required

The ID of the cart.

[String!]!
required

The case-insensitive gift card codes.

The input must not contain more than 250 values.


CartLinesAddPayload

Adds a merchandise line to the cart.

Arguments

ID!
required

The ID of the cart.

[CartLineInput!]!
required

A list of merchandise lines to add to the cart.

The input must not contain more than 250 values.


CartLinesRemovePayload

Removes one or more merchandise lines from the cart.

Arguments

ID!
required

The ID of the cart.

[ID!]!
required

The merchandise line IDs to remove.

The input must not contain more than 250 values.


CartLinesUpdatePayload

Updates one or more merchandise lines on a cart.

Arguments

ID!
required

The ID of the cart.

[CartLineUpdateInput!]!
required

The merchandise lines to update.

The input must not contain more than 250 values.


CartMetafieldDeletePayload

Deletes a cart metafield.

Arguments

CartMetafieldDeleteInput!
required

The input fields used to delete a cart metafield.


CartMetafieldsSetPayload

Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not.

Allows a maximum of 25 cart metafields to be set at a time.

Arguments

[CartMetafieldsSetInput!]!
required

The list of Cart metafield values to set. Maximum of 25.

The input must not contain more than 250 values.


CartNoteUpdatePayload

Updates the note on the cart.

Arguments

ID!
required

The ID of the cart.

String!
required

The note on the cart.


Anchor to cartSelectedDeliveryOptionsUpdatecartSelectedDeliveryOptionsUpdate
CartSelectedDeliveryOptionsUpdatePayload

Update the selected delivery options for a delivery group.

Arguments

ID!
required

The ID of the cart.

Anchor to selectedDeliveryOptionsselectedDeliveryOptions
[CartSelectedDeliveryOptionInput!]!
required

The selected delivery options.

The input must not contain more than 250 values.


Anchor to customerAccessTokenCreatecustomerAccessTokenCreate
CustomerAccessTokenCreatePayload

Creates a customer access token. The customer access token is required to modify the customer object in any way.

Arguments

CustomerAccessTokenCreateInput!
required

The fields used to create a customer access token.


Anchor to customerAccessTokenCreateWithMultipasscustomerAccessTokenCreateWithMultipass
CustomerAccessTokenCreateWithMultipassPayload

Creates a customer access token using a multipass token instead of email and password. A customer record is created if the customer doesn't exist. If a customer record already exists but the record is disabled, then the customer record is enabled.

Arguments

String!
required

A valid multipass token to be authenticated.


Anchor to customerAccessTokenDeletecustomerAccessTokenDelete
CustomerAccessTokenDeletePayload

Permanently destroys a customer access token.

Arguments

String!
required

The access token used to identify the customer.


Anchor to customerAccessTokenRenewcustomerAccessTokenRenew
CustomerAccessTokenRenewPayload

Renews a customer access token.

Access token renewal must happen before a token expires. If a token has already expired, a new one should be created instead via customerAccessTokenCreate.

Arguments

String!
required

The access token used to identify the customer.


CustomerActivatePayload

Activates a customer.

Arguments

ID!
required

Specifies the customer to activate.

CustomerActivateInput!
required

The fields used to activate a customer.


Anchor to customerActivateByUrlcustomerActivateByUrl
CustomerActivateByUrlPayload

Activates a customer with the activation url received from customerCreate.

Arguments

URL!
required

The customer activation URL.

String!
required

A new password set during activation.


Anchor to customerAddressCreatecustomerAddressCreate
CustomerAddressCreatePayload

Creates a new address for a customer.

Arguments

String!
required

The access token used to identify the customer.

MailingAddressInput!
required

The customer mailing address to create.


Anchor to customerAddressDeletecustomerAddressDelete
CustomerAddressDeletePayload

Permanently deletes the address of an existing customer.

Arguments

ID!
required

Specifies the address to delete.

String!
required

The access token used to identify the customer.


Anchor to customerAddressUpdatecustomerAddressUpdate
CustomerAddressUpdatePayload

Updates the address of an existing customer.

Arguments

String!
required

The access token used to identify the customer.

ID!
required

Specifies the customer address to update.

MailingAddressInput!
required

The customer’s mailing address.


CustomerCreatePayload

Creates a new customer.

Arguments

CustomerCreateInput!
required

The fields used to create a new customer.


Anchor to customerDefaultAddressUpdatecustomerDefaultAddressUpdate
CustomerDefaultAddressUpdatePayload

Updates the default address of an existing customer.

Arguments

String!
required

The access token used to identify the customer.

ID!
required

ID of the address to set as the new default for the customer.


CustomerRecoverPayload

Sends a reset password email to the customer. The reset password email contains a reset password URL and token that you can pass to the customerResetByUrl or customerReset mutation to reset the customer password.

This mutation is throttled by IP. With private access, you can provide a Shopify-Storefront-Buyer-IP instead of the request IP. The header is case-sensitive and must be sent as Shopify-Storefront-Buyer-IP.

Make sure that the value provided to Shopify-Storefront-Buyer-IP is trusted. Unthrottled access to this mutation presents a security risk.

Arguments

String!
required

The email address of the customer to recover.


CustomerResetPayload

"Resets a customer’s password with the token received from a reset password email. You can send a reset password email with the customerRecover mutation."

Arguments

ID!
required

Specifies the customer to reset.

CustomerResetInput!
required

The fields used to reset a customer’s password.


CustomerResetByUrlPayload

"Resets a customer’s password with the reset password URL received from a reset password email. You can send a reset password email with the customerRecover mutation."

Arguments

URL!
required

The customer's reset password url.

String!
required

New password that will be set as part of the reset password process.


CustomerUpdatePayload

Updates an existing customer.

Arguments

String!
required

The access token used to identify the customer.

CustomerUpdateInput!
required

The customer object input.


Anchor to shopPayPaymentRequestSessionCreateshopPayPaymentRequestSessionCreate
ShopPayPaymentRequestSessionCreatePayload

Create a new Shop Pay payment request session.

Arguments

String!
required

A unique identifier for the payment request session.

ShopPayPaymentRequestInput!
required

A payment request object.


Anchor to shopPayPaymentRequestSessionSubmitshopPayPaymentRequestSessionSubmit
ShopPayPaymentRequestSessionSubmitPayload

Submits a Shop Pay payment request session.

Arguments

String!
required

A token representing a payment session request.

ShopPayPaymentRequestInput!
required

The final payment request object.

String!
required

The idempotency key is used to guarantee an idempotent result.

String

The order name to be used for the order created from the payment request.



Was this section helpful?