Mutations

Mutations

addItemToOrder

Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument ‘customFields’ will be available.

  • addItemToOrder(productVariantId: ID!, quantity: Int!): Order

addPaymentToOrder

adjustOrderLine

Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument ‘customFields’ will be available.

  • adjustOrderLine(orderLineId: ID!, quantity: Int): Order

applyCouponCode

Applies the given coupon code to the active Order

createCustomerAddress

Create a new Customer Address

deleteCustomerAddress

Delete an existing Address

login

logout

refreshCustomerVerification

Regenerate and send a verification token for a new Customer registration. Only applicable if authOptions.requireVerification is set to true.

registerCustomerAccount

Register a Customer account with the given credentials

removeCouponCode

Removes the given coupon code from the active Order

removeOrderLine

  • removeOrderLine(orderLineId: ID!): Order

requestPasswordReset

Requests a password reset email to be sent

requestUpdateCustomerEmailAddress

Request to update the emailAddress of the active Customer. If authOptions.requireVerification is enabled (as is the default), then the identifierChangeToken will be assigned to the current User and a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email that verification token to the Customer, which is then used to verify the change of email address.

resetPassword

Resets a Customer’s password based on the provided token

setCustomerForOrder

setOrderShippingAddress

setOrderShippingMethod

  • setOrderShippingMethod(shippingMethodId: ID!): Order

transitionOrderToState

updateCustomer

Update an existing Customer

updateCustomerAddress

Update an existing Address

updateCustomerEmailAddress

Confirm the update of the emailAddress with the provided token, which has been generated by the requestUpdateCustomerEmailAddress mutation.

updateCustomerPassword

Update the password of the active Customer

verifyCustomerAccount

Verify a Customer email address with the token sent to that address. Only applicable if authOptions.requireVerification is set to true.