Skip to content

Delivery options GraphQL

Served by DeliveryOptionsModule on commercetools and DeliveryOptionsModule on medusa.

Each operation has its own page with its arguments, an example and the engines that serve it. The types link to their fields on the delivery options types page.

Operations

OperationDescriptionServed by
cartSetDeliveryPreferenceMutationChoose whether the cart ships complete or split, and the date the buyer asks to receive it on.commercetoolsmedusa
cartSetDeliverySlotMutationChoose when the cart is delivered.commercetoolsmedusa
cartSetPickupPointMutationChoose where the cart is collected.commercetoolsmedusa

Types

TypeDescription
CartSetDeliveryPreferenceErrorUnionError union for setting a delivery preference
CartSetDeliveryPreferenceResponseObjectResponse for setting how and when a cart is delivered
CartSetDeliverySlotErrorUnionError union for choosing a delivery slot
CartSetDeliverySlotResponseObjectResponse for choosing a delivery slot
CartSetPickupPointErrorUnionError union for choosing a pickup point
CartSetPickupPointResponseObjectResponse for choosing a pickup point
CoordinatesObjectA position on earth, in decimal degrees (WGS 84).
CoordinatesInputInput objectA position on earth, in decimal degrees (WGS 84).
DeliveryDateObjectA calendar date on which a cart may be delivered.
DeliveryErrorObjectA recoverable error that occurred while choosing how or when a cart is delivered.
DeliveryErrorCodeTypeEnumError codes for choosing a delivery slot, a pickup point or a delivery preference.
DeliveryEstimateObjectWhen a delivery arrives: one date, or a range when the carrier gives one.
DeliveryPromiseObjectWhat a product page can promise about delivery.
DeliverySlotObjectA time window on a date in which a carrier delivers.
DeliverySplitTypeEnumHow a cart with backordered lines is shipped.
DeliveryUnavailableReasonObjectWhy a delivery date or slot cannot be chosen.
DeliveryUnavailableReasonCodeTypeEnumWhy a delivery date or slot cannot be chosen.
PickupPointObjectA place a shopper collects a parcel from.
PickupPointLocationInputInput objectWhere to search for pickup points.
PickupPointOpeningDateObjectThe hours a pickup point is open on one date.
PickupPointTypeEnumWhat kind of place a pickup point is.
TimeWindowObjectA stretch of time between two instants, given in UTC.

Fields on other types

This domain adds these fields to types that another domain defines.

Cart

FieldTypeDescription
deliveryDates[DeliveryDate!]!The dates the cart can be delivered on, each with its time slots, starting at from (today when absent) and covering the given number of days. Every date in the range is listed, including those with nothing to offer, so a date picker can show them disabled with their reason. Empty while the cart has no shipping address to deliver to.Arguments: from, days
deliverySlotDeliverySlotThe delivery slot chosen for the cart. Null until one is chosen.
pickupPoints[PickupPoint!]!Pickup points the cart can be collected from, nearest first, including those that cannot be chosen. Searched around near, or the shipping address when near is absent; empty when there is neither. carrierKeys narrows the list to those carriers.Arguments: near, carrierKeys, limit
pickupPointPickupPointThe pickup point chosen for the cart. Null until one is chosen.
deliverySplitDeliverySplitType!Whether the cart ships once, when every line is in stock, or ships what is in stock now and the backordered rest later. COMPLETE until chosen.
requestedDeliveryDateDateThe date the buyer asked to receive the delivery on. Null until asked.
earliestCompleteDeliveryDateDateThe first date every line is in stock, which is when a complete delivery can leave at the earliest. Null when nothing is backordered, or when a backordered line has no expected date; the lines say which.

Order

FieldTypeDescription
deliverySlotDeliverySlotThe delivery slot chosen in checkout, as it was when the order was placed. Null when the order is collected from a pickup point or none was chosen.
pickupPointPickupPointThe pickup point chosen in checkout, as it was when the order was placed. Null when the order is delivered or none was chosen.

ProductVariant

FieldTypeDescription
deliveryPromiseDeliveryPromiseWhen this variant arrives if it is ordered now, at a country and optional postal code: the earliest date, the deadline to order for it, the carrier and the price. The same source as the cart's delivery dates, so the product page promises what checkout offers. Null when the delivery provider makes no promises.Arguments: country, postalCode

ShippingMethod

FieldTypeDescription
carrierCarrierWho delivers with this method, for the delivery step to show by name and, through its key, by logo. Null when the delivery provider does not say.
deliveryEstimateDeliveryEstimateWhen an order placed now with this method arrives, if every line is in stock. Null when the delivery provider gives no estimate. A cart with backordered lines arrives no earlier than its earliestCompleteDeliveryDate.