Skip to content

cartSetDeliverySlot

Mutationin Delivery options

Choose when the cart is delivered. Sets the slot and the shipping cost that goes with it; choosing another slot, or a pickup point, replaces it.

Arguments

ArgumentTypeDescription
idID!
versionString
slotIdID!

Returns

CartSetDeliverySlotResponse!

FieldTypeDescription
cartCartThe cart with the slot and its shipping cost set
cartErrors[CartSetDeliverySlotError!]Error details if the slot could not be chosen

Example

mutation CartSetDeliverySlot($id: ID!, $version: String, $slotId: ID!) {
cartSetDeliverySlot(id: $id, version: $version, slotId: $slotId) {
cart {
id
version
createdAt
lastModifiedAt
currency
customerEmail
isGuest
totalQuantity
deliveryRemarks
vatNumber
purchaseOrderNumber
deliverySplit
requestedDeliveryDate
earliestCompleteDeliveryDate
name
defaultName
status
}
cartErrors {
__typename
... on ValidationError {
message
}
... on CartError {
message
code
}
... on DeliveryError {
message
code
}
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved

Used by

The storefront packages that send it, in these GraphQL documents: