Mutations#
Mutations are write operations — use them to create, update, or delete resources. All mutations follow the same structure: a single input argument wraps all mutation fields, and the payload returns the affected resource.
Cart#
createCart#
Create a new empty cart.
No input required.
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addItemsToCart#
Add one or more items to a cart by SKU.
Input: AddItemsToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
items | [CartItemInput!]!▾ | Required | Items to add |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
removeItemsFromCart#
Remove one or more items from a cart.
Input: RemoveItemsFromCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
items | [String!]! | Required | IDs of cart items to remove |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
setItemQuantityForCart#
Update the quantity of a specific item in the cart.
Input: SetItemQuantityForCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
item_id | String! | Required | The ID of the cart item |
quantity | Int! | Required | New quantity |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addCustomerToCart#
Attach a customer (contact) to a cart.
Input: AddCustomerToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
contact_id | String! | Required | The ID of the contact |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addBillingAddressToCart#
Attach a billing address to a cart.
Input: AddBillingAddressToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
address | AddressInput!▾ | Required | The billing address |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addShippingAddressToCart#
Attach a shipping address to a cart. Uses the same AddressInput shape as addBillingAddressToCart.
Input: AddShippingAddressToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
address | AddressInput!▾ | Required | The shipping address |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addShippingMethodToCart#
Select a shipping method for the cart. Available shipping methods can be fetched from cart.options.shipping_methods.
Input: AddShippingMethodToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
shipping_method_id | String! | Required | The ID of the shipping method |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addPaymentMethodToCart#
Select a payment method for the cart. Available payment methods can be fetched from cart.options.payment_methods.
Input: AddPaymentMethodToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
payment_method_id | String! | Required | The ID of the payment method |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addCouponToCart#
Apply a coupon code to the cart.
Input: AddCouponToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
coupon | String! | Required | The coupon code |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
removeCouponFromCart#
Remove an applied coupon from the cart.
Input: RemoveCouponFromCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
coupon | String! | Required | The coupon code to remove |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
setNoteForCart#
Add a customer note to the cart.
Input: SetNoteForCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
note | String! | Required | The note text |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
setReferenceForCart#
Set an external reference on the cart (e.g. your own order reference).
Input: SetReferenceForCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
reference | String! | Required | The reference string |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
confirmCart#
Confirm a cart and convert it to an order. The cart must be valid (cart.checkout.is_valid must be true).
Input: ConfirmCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart to confirm |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
addPhoneNumberToCart#
Add a phone number to a cart.
Input: AddPhoneNumberToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
phone_number | PhoneNumberInput!▾ | Required | Phone number details |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
addPickUpPointToCart#
Set a pickup point for cart delivery.
Input: AddPickUpPointToCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
pick_up_point_id | String! | Required | The ID of the pickup point |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
removeCustomerFromCart#
Remove the customer from a cart.
Input: RemoveCustomerFromCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
setCountryCodeForCart#
Set the country code for the cart (affects VAT/tax calculations).
Input: SetCountryCodeForCartInput!
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | String! | Required | The ID of the cart |
country_code | String! | Required | ISO country code (e.g. NL, DE, US) |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
Order#
createOrder#
Create a new order.
Input: CreateOrderInput!
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | String! | Required | The channel ID to create the order in |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
addItemsToOrder#
Add items to an existing order.
Input: AddItemsToOrderInput!
| Name | Type | Required | Description |
|---|---|---|---|
order_id | String! | Required | The order ID |
items | [OrderItemInput!]!▾ | Required | Items to add |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
addCustomerToOrder#
Assign a customer to an order.
Input: AddCustomerToOrderInput!
| Name | Type | Required | Description |
|---|---|---|---|
order_id | String! | Required | The order ID |
email | String! | Required | Customer email |
given_name | String! | Required | First name |
family_name | String! | Required | Last name |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
addBillingAddressToOrder#
Set billing address on an order.
Input: AddBillingAddressToOrderInput!
| Name | Type | Required | Description |
|---|---|---|---|
order_id | String! | Required | The order ID |
address | AddressInput!▾ | Required | The billing address |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
addShippingAddressToOrder#
Set shipping address on an order.
Input: AddShippingAddressToOrderInput!
| Name | Type | Required | Description |
|---|---|---|---|
order_id | String! | Required | The order ID |
address | AddressInput!▾ | Required | The shipping address |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
cancelOrderItems#
Cancel items on an order.
Input: CancelOrderItemsInput!
| Name | Type | Required | Description |
|---|---|---|---|
item_ids | [String!]! | Required | IDs of the items to cancel |
Returns: Order
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
number | String! | Required | Order number |
total | Money!▾ | Required | Total value |
currency | Currency!▾ | Required | Currency code |
Example#
Organisation#
createOrganisation#
Create a new organisation.
Input: CreateOrganisationInput!
| Name | Type | Required | Description |
|---|---|---|---|
name | String! | Required | Organisation name |
type | OrganisationType!▾ | Required | Organisation type |
| Name | Type | Required | Description |
|---|---|---|---|
organisation | Organisation!▾ | Required | The created organisation |
Example#
updateOrganisation#
Update an existing organisation.
Input: UpdateOrganisationInput!
| Name | Type | Required | Description |
|---|---|---|---|
id | String! | Required | The organisation ID |
name | String | Optional | New name |
| Name | Type | Required | Description |
|---|---|---|---|
organisation | Organisation!▾ | Required | The updated organisation |
Example#
Payment#
executePayment#
Execute a payment for an order.
Input: ExecutePaymentInput!
| Name | Type | Required | Description |
|---|---|---|---|
payment_id | String! | Required | The ID of the payment to execute (obtained from `addPaymentMethodToOrder`) |
| Name | Type | Required | Description |
|---|---|---|---|
payment | Payment▾ | Optional | The payment record |
Example#
createRefund#
Create a refund for an order payment.
Input: CreateRefundInput!
| Name | Type | Required | Description |
|---|---|---|---|
payment_id | String! | Required | The payment ID to refund |
amount | Int! | Required | Amount to refund (in cents) |
| Name | Type | Required | Description |
|---|---|---|---|
payment | Payment▾ | Optional | The refund payment record |
Example#
Customer authentication#
These mutations require a storefront token in the Authorization header.
logInCustomer#
Authenticate a customer with email and password. Returns a short-lived session token.
Input: LogInCustomerInput!
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | Customer's email address |
password | String! | Required | Customer's password |
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | Session token (Bearer) |
expires_at | Int64! | Required | Expiry as Unix milliseconds |
Example#
registerCustomer#
Register a new customer account. Returns a session token on success.
Input: RegisterCustomerInput!
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | Email address |
password | String! | Required | Password |
given_name | String | Optional | First name |
additional_name | String | Optional | Middle name |
family_name | String | Optional | Last name |
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | Session token (Bearer) |
expires_at | Int64! | Required | Expiry as Unix milliseconds |
Example#
requestCustomerPasswordReset#
Send a password reset email to a customer.
Input: RequestCustomerPasswordResetInput!
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | The customer's email address |
| Name | Type | Required | Description |
|---|---|---|---|
is_successful | Boolean! | Required | Whether the reset email was sent |
Example#
resetCustomerPassword#
Reset a customer password using a token received by email.
Input: ResetCustomerPasswordInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The reset token from the email link |
password | String! | Required | The new password |
| Name | Type | Required | Description |
|---|---|---|---|
is_successful | Boolean! | Required | Whether the password was reset |
Example#
requestCustomerVerificationLink#
Send a new verification link to an unverified customer.
Input: RequestCustomerVerificationLinkInput!
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | The customer's email address |
| Name | Type | Required | Description |
|---|---|---|---|
is_successful | Boolean! | Required | Whether the link was sent |
Example#
verifyCustomer#
Verify a customer account using a token received by email.
Input: VerifyCustomerInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The verification token from the email link |
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | Session token (Bearer) |
expires_at | Int64! | Required | Expiry as Unix milliseconds |
Example#
Account#
These mutations require a user token.
updateAccount#
Update the authenticated account's profile.
Input: UpdateAccountInput!
| Name | Type | Required | Description |
|---|---|---|---|
given_name | String | Optional | First name |
additional_name | String | Optional | Middle name |
family_name | String | Optional | Last name |
Returns: Account
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | Email address |
given_name | String! | Required | First name |
additional_name | String! | Required | Middle name |
family_name | String! | Required | Last name |
Example#
reorder#
Reorder a previous order. Adds all items from the referenced order to a new cart.
Input: ReorderInput!
| Name | Type | Required | Description |
|---|---|---|---|
order_id | String! | Required | The ID of the order to reorder |
Returns: Cart
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID of the cart |
number | String! | Required | Cart number |
total | Money!▾ | Required | Total value |
subtotal | Money!▾ | Required | Total before discounts |
Example#
Contact#
createContact#
Create a new contact.
Input: CreateContactInput!
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Required | Email address |
given_name | String | Optional | First name |
additional_name | String | Optional | Middle name |
family_name | String | Optional | Last name |
locale | String | Optional | Locale (e.g. nl_NL) |
Returns: Contact
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
email | String! | Required | Email address |
given_name | String! | Required | First name |
family_name | String | Optional | Last name |
Example#
updateContact#
Update an existing contact.
Input: UpdateContactInput!
| Name | Type | Required | Description |
|---|---|---|---|
id | String! | Required | The ID of the contact |
given_name | String | Optional | First name |
additional_name | String | Optional | Middle name |
family_name | String | Optional | Last name |
locale | String | Optional | Locale |
Returns: Contact
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
email | String! | Required | Email address |
given_name | String! | Required | First name |
family_name | String | Optional | Last name |
Example#
addBillingAddressToContact#
Add a billing address to a contact.
Input: AddBillingAddressToContactInput!
| Name | Type | Required | Description |
|---|---|---|---|
contact_id | String! | Required | The ID of the contact |
address | AddressInput!▾ | Required | The billing address |
Returns: Contact
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
email | String! | Required | Email address |
given_name | String! | Required | First name |
family_name | String | Optional | Last name |
Example#
addShippingAddressToContact#
Add a shipping address to a contact.
Input: AddShippingAddressToContactInput!
| Name | Type | Required | Description |
|---|---|---|---|
contact_id | String! | Required | The ID of the contact |
address | AddressInput!▾ | Required | The shipping address |
Returns: Contact
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Required | The ID |
email | String! | Required | Email address |
given_name | String! | Required | First name |
family_name | String | Optional | Last name |
Example#
Wishlist#
createWishlist#
Create a new wishlist. Returns a token used in subsequent wishlist operations.
Input: CreateWishlistInput!
| Name | Type | Required | Description |
|---|---|---|---|
label | String | Optional | Optional label |
Returns: Wishlist
| Name | Type | Required | Description |
|---|---|---|---|
label | String! | Required | Label |
token | String! | Required | Token identifier |
items | [WishlistItem!]!▾ | Required | Items on the wishlist |
expires_at | DateTime!▾ | Required | Expiration date |
Example#
addItemToWishlist#
Add a product to a wishlist by SKU.
Input: AddItemToWishlistInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The wishlist token |
sku | String! | Required | The SKU to add |
Returns: Wishlist
| Name | Type | Required | Description |
|---|---|---|---|
label | String! | Required | Label |
token | String! | Required | Token identifier |
items | [WishlistItem!]!▾ | Required | Items on the wishlist |
expires_at | DateTime!▾ | Required | Expiration date |
Example#
removeItemFromWishlist#
Remove a product from a wishlist.
Input: RemoveItemFromWishlistInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The wishlist token |
sku | String! | Required | The SKU to remove |
Returns: Wishlist
| Name | Type | Required | Description |
|---|---|---|---|
label | String! | Required | Label |
token | String! | Required | Token identifier |
items | [WishlistItem!]!▾ | Required | Items on the wishlist |
expires_at | DateTime!▾ | Required | Expiration date |
Example#
updateWishlist#
Update the label of a wishlist.
Input: UpdateWishlistInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The wishlist token |
label | String! | Required | New label |
Returns: Wishlist
| Name | Type | Required | Description |
|---|---|---|---|
label | String! | Required | Label |
token | String! | Required | Token identifier |
items | [WishlistItem!]!▾ | Required | Items on the wishlist |
expires_at | DateTime!▾ | Required | Expiration date |
Example#
deleteWishlist#
Delete a wishlist.
Input: DeleteWishlistInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The wishlist token |
Returns: Wishlist
| Name | Type | Required | Description |
|---|---|---|---|
label | String! | Required | Label |
token | String! | Required | Token identifier |
items | [WishlistItem!]!▾ | Required | Items on the wishlist |
expires_at | DateTime!▾ | Required | Expiration date |
Example#
Product viewing history#
createProductViewingHistory#
Create a new product viewing history list. Returns a token used in subsequent calls.
Input: CreateProductViewingHistoryInput!
| Name | Type | Required | Description |
|---|---|---|---|
label | String | Optional | Optional label |
| Name | Type | Required | Description |
|---|---|---|---|
productViewingHistory | ProductViewingHistory!▾ | Required | The created history list |
Example#
addItemToProductViewingHistory#
Record a product view.
Input: AddItemToProductViewingHistoryInput!
| Name | Type | Required | Description |
|---|---|---|---|
token | String! | Required | The viewing history token |
sku | String! | Required | The SKU that was viewed |
| Name | Type | Required | Description |
|---|---|---|---|
productViewingHistory | ProductViewingHistory!▾ | Required | The updated history list |
Example#
Idempotency#
For critical operations (e.g. confirmCart, payment mutations), include an idempotency key to safely retry requests without duplicating the operation: