Skip to content

Delivery options types

The types the delivery options domain defines, with the fields other domains add to them.

Objects

CartSetDeliveryPreferenceResponse

Response for setting how and when a cart is delivered

FieldTypeDescription
cartCartThe cart with the preference set
cartErrors[CartSetDeliveryPreferenceError!]Error details if the preference could not be set

CartSetDeliverySlotResponse

Response for choosing a delivery slot

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

CartSetPickupPointResponse

Response for choosing a pickup point

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

Coordinates

A position on earth, in decimal degrees (WGS 84).

FieldTypeDescription
latitudeFloat!
longitudeFloat!

DeliveryDate

A calendar date on which a cart may be delivered.

FieldTypeDescription
dateDate!The date.
lowestPriceMoneyThe lowest price among the slots that can be chosen on this date. Null when none can.
slots[DeliverySlot!]!The slots on this date, including those that cannot be chosen.
unavailableReasonDeliveryUnavailableReasonWhy nothing can be delivered on this date. Null when at least one slot can be chosen.

DeliveryError

Implements Error

A recoverable error that occurred while choosing how or when a cart is delivered.

FieldTypeDescription
messageString!Developer/debug description of the failure. Not localized and never shown to end users.
codeDeliveryErrorCodeType!The error code identifying the failure.

DeliveryEstimate

When a delivery arrives: one date, or a range when the carrier gives one.

FieldTypeDescription
earliestDeliveryDateDate!The earliest date it arrives.
latestDeliveryDateDateThe latest date it arrives. Null when it arrives on the earliest date.
orderBeforeDateTimeThe moment an order has to be placed by to arrive on the earliest date. Null when that date does not depend on the time of ordering.

DeliveryPromise

What a product page can promise about delivery.

FieldTypeDescription
deliverableBoolean!Whether the variant can be delivered there at all.
unavailableReasonDeliveryUnavailableReasonWhy it cannot be delivered there. Null when it can.
earliestDeliveryDateDateThe earliest date it arrives. Null when it cannot be delivered or nobody knows when.
orderBeforeDateTimeThe moment an order has to be placed by to arrive on the earliest date. Null when that date does not depend on the time of ordering.
carrierCarrierWho delivers on the earliest date.
priceMoneyWhat delivery costs, before any free-shipping threshold of the cart.

DeliverySlot

A time window on a date in which a carrier delivers.

FieldTypeDescription
idID!Opaque identifier to choose this slot with cartSetDeliverySlot.
deliveryDateDate!The date of delivery.
windowTimeWindow!When on that date the delivery arrives.
priceMoney!What delivery in this slot costs.
carrierCarrier!Who delivers.
unavailableReasonDeliveryUnavailableReasonWhy this slot cannot be chosen. Null when it can.

DeliveryUnavailableReason

Why a delivery date or slot cannot be chosen.

FieldTypeDescription
codeDeliveryUnavailableReasonCodeType!The reason, for the storefront to show in its own words.
messageString!Developer/debug description of the reason. Not localized and never shown to end users.

PickupPoint

A place a shopper collects a parcel from.

FieldTypeDescription
idID!Opaque identifier to choose this point with cartSetPickupPoint.
nameString!Name of the place, e.g. the shop it is in.
carrierCarrier!The carrier that delivers to this point.
typePickupPointType!Whether it is a shop or a locker.
addressAddress!Where the point is.
coordinatesCoordinates!Where the point is on a map.
distanceInMetersIntDistance in meters from the searched position. Null when no position was given.
alwaysOpenBoolean!Whether the point is open around the clock.
openingHoursToday[TimeWindow!]!When the point is open today. Empty when it is closed today or always open.
earliestPickupAtDateTimeThe earliest moment the parcel can be collected if ordered now.
openingHours[PickupPointOpeningDate!]!When the point is open on each of the seven days from the date of earliestPickupAt, the days a parcel waits there to be collected. A day it is closed is listed with no windows. Empty when the point is always open.
priceMoney!What collecting from this point costs.
unavailableReasonDeliveryUnavailableReasonWhy this point cannot be chosen. Null when it can.

PickupPointOpeningDate

The hours a pickup point is open on one date.

FieldTypeDescription
dateDate!The date.
windows[TimeWindow!]!When the point is open on that date. Empty when it is closed.

TimeWindow

A stretch of time between two instants, given in UTC. Show them in the time zone of the place they apply to, such as the delivery address.

FieldTypeDescription
fromDateTime!Start of the window.
untilDateTime!End of the window.

Input objects

CoordinatesInput

A position on earth, in decimal degrees (WGS 84).

FieldTypeDescription
latitudeFloat!
longitudeFloat!

PickupPointLocationInput

Where to search for pickup points.

FieldTypeDescription
countryCountryCode!The country to search in.
postalCodeStringThe postal code to search around.
coordinatesCoordinatesInputThe position to search around, which also gives each point its distance.

Enums

DeliveryErrorCodeType

Error codes for choosing a delivery slot, a pickup point or a delivery preference.

SLOT_NOT_FOUNDThe slot does not exist, or no longer belongs to this cart's options.
SLOT_UNAVAILABLEThe slot exists but cannot be chosen any more. Refetch the delivery dates.
PICKUP_POINT_NOT_FOUNDThe pickup point does not exist, or no longer belongs to this cart's options.
PICKUP_POINT_UNAVAILABLEThe pickup point exists but cannot be chosen. Refetch the pickup points.
REQUESTED_DATE_UNAVAILABLENothing can be delivered on the requested date, or a complete delivery cannot be ready by then. Refetch the delivery dates.

DeliverySplitType

How a cart with backordered lines is shipped.

COMPLETEOne delivery, once every line is in stock.
SPLITWhat is in stock now, and the backordered rest when it arrives.

DeliveryUnavailableReasonCodeType

Why a delivery date or slot cannot be chosen.

NO_DELIVERY_ON_DAYNothing is delivered on this day of the week.
ORDER_DEADLINE_PASSEDToo late to order for this date or slot.
FULLY_BOOKEDEvery slot is taken.
ADDRESS_NOT_SERVEDThe carrier does not deliver to the shipping address.
CART_NOT_SUPPORTEDSomething in the cart cannot go with this carrier, for example an oversized item.
OUT_OF_STOCKThe item is out of stock and cannot be ordered until it is back.
OTHERA reason the provider gives that has no code of its own. See the message.

PickupPointType

What kind of place a pickup point is.

SHOPA shop or service desk with staff and opening hours.
LOCKERA parcel locker.

Unions

CartSetDeliveryPreferenceError

Error union for setting a delivery preference

One of ValidationError, CartError or DeliveryError.

CartSetDeliverySlotError

Error union for choosing a delivery slot

One of ValidationError, CartError or DeliveryError.

CartSetPickupPointError

Error union for choosing a pickup point

One of ValidationError, CartError or DeliveryError.