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
| Field | Type | Description |
|---|---|---|
cart | Cart | The cart with the preference set |
cartErrors | [CartSetDeliveryPreferenceError!] | Error details if the preference could not be set |
CartSetDeliverySlotResponse
Response for choosing a delivery slot
| Field | Type | Description |
|---|---|---|
cart | Cart | The 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
| Field | Type | Description |
|---|---|---|
cart | Cart | The 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).
| Field | Type | Description |
|---|---|---|
latitude | Float! | |
longitude | Float! |
DeliveryDate
A calendar date on which a cart may be delivered.
| Field | Type | Description |
|---|---|---|
date | Date! | The date. |
lowestPrice | Money | The 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. |
unavailableReason | DeliveryUnavailableReason | Why 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.
| Field | Type | Description |
|---|---|---|
message | String! | Developer/debug description of the failure. Not localized and never shown to end users. |
code | DeliveryErrorCodeType! | The error code identifying the failure. |
DeliveryEstimate
When a delivery arrives: one date, or a range when the carrier gives one.
| Field | Type | Description |
|---|---|---|
earliestDeliveryDate | Date! | The earliest date it arrives. |
latestDeliveryDate | Date | The latest date it arrives. Null when it arrives on the earliest date. |
orderBefore | DateTime | The 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.
| Field | Type | Description |
|---|---|---|
deliverable | Boolean! | Whether the variant can be delivered there at all. |
unavailableReason | DeliveryUnavailableReason | Why it cannot be delivered there. Null when it can. |
earliestDeliveryDate | Date | The earliest date it arrives. Null when it cannot be delivered or nobody knows when. |
orderBefore | DateTime | The 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. |
carrier | Carrier | Who delivers on the earliest date. |
price | Money | What delivery costs, before any free-shipping threshold of the cart. |
DeliverySlot
A time window on a date in which a carrier delivers.
| Field | Type | Description |
|---|---|---|
id | ID! | Opaque identifier to choose this slot with cartSetDeliverySlot. |
deliveryDate | Date! | The date of delivery. |
window | TimeWindow! | When on that date the delivery arrives. |
price | Money! | What delivery in this slot costs. |
carrier | Carrier! | Who delivers. |
unavailableReason | DeliveryUnavailableReason | Why this slot cannot be chosen. Null when it can. |
DeliveryUnavailableReason
Why a delivery date or slot cannot be chosen.
| Field | Type | Description |
|---|---|---|
code | DeliveryUnavailableReasonCodeType! | The reason, for the storefront to show in its own words. |
message | String! | Developer/debug description of the reason. Not localized and never shown to end users. |
PickupPoint
A place a shopper collects a parcel from.
| Field | Type | Description |
|---|---|---|
id | ID! | Opaque identifier to choose this point with cartSetPickupPoint. |
name | String! | Name of the place, e.g. the shop it is in. |
carrier | Carrier! | The carrier that delivers to this point. |
type | PickupPointType! | Whether it is a shop or a locker. |
address | Address! | Where the point is. |
coordinates | Coordinates! | Where the point is on a map. |
distanceInMeters | Int | Distance in meters from the searched position. Null when no position was given. |
alwaysOpen | Boolean! | 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. |
earliestPickupAt | DateTime | The 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. |
price | Money! | What collecting from this point costs. |
unavailableReason | DeliveryUnavailableReason | Why this point cannot be chosen. Null when it can. |
PickupPointOpeningDate
The hours a pickup point is open on one date.
| Field | Type | Description |
|---|---|---|
date | Date! | 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.
Input objects
CoordinatesInput
A position on earth, in decimal degrees (WGS 84).
| Field | Type | Description |
|---|---|---|
latitude | Float! | |
longitude | Float! |
PickupPointLocationInput
Where to search for pickup points.
| Field | Type | Description |
|---|---|---|
country | CountryCode! | The country to search in. |
postalCode | String | The postal code to search around. |
coordinates | CoordinatesInput | The 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_FOUND | The slot does not exist, or no longer belongs to this cart's options. |
SLOT_UNAVAILABLE | The slot exists but cannot be chosen any more. Refetch the delivery dates. |
PICKUP_POINT_NOT_FOUND | The pickup point does not exist, or no longer belongs to this cart's options. |
PICKUP_POINT_UNAVAILABLE | The pickup point exists but cannot be chosen. Refetch the pickup points. |
REQUESTED_DATE_UNAVAILABLE | Nothing 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.
COMPLETE | One delivery, once every line is in stock. |
SPLIT | What is in stock now, and the backordered rest when it arrives. |
DeliveryUnavailableReasonCodeType
Why a delivery date or slot cannot be chosen.
NO_DELIVERY_ON_DAY | Nothing is delivered on this day of the week. |
ORDER_DEADLINE_PASSED | Too late to order for this date or slot. |
FULLY_BOOKED | Every slot is taken. |
ADDRESS_NOT_SERVED | The carrier does not deliver to the shipping address. |
CART_NOT_SUPPORTED | Something in the cart cannot go with this carrier, for example an oversized item. |
OUT_OF_STOCK | The item is out of stock and cannot be ordered until it is back. |
OTHER | A reason the provider gives that has no code of its own. See the message. |
PickupPointType
What kind of place a pickup point is.
SHOP | A shop or service desk with staff and opening hours. |
LOCKER | A 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.

