Skip to main content

Delivery API

The Delivery API provides access to delivery groups, shipping options, and pickup locations during checkout. Use this API to display the buyer's selected delivery method, show shipping or pickup details, and build extensions that render alongside specific delivery options.

The Delivery API is read-only. There are no methods to change the buyer's selected shipping option or pickup location from an extension.

Tip

Not all extension targets implement all APIs. Check the documentation for the extension target you are using to see which APIs are available.

  • Display the selected delivery option: Show the buyer which shipping or delivery method is currently selected.
  • Build shipping option extensions: Render additional information alongside a specific shipping option using the shipping option item target.
  • Show pickup location details: Display information about the buyer's selected pickup location.
Support
Targets (31)

The shopify global object provides delivery data for the current checkout. Access the following properties on shopify to read delivery groups and their selected options. Available to purchase extension targets.

Anchor to deliveryGroups
deliveryGroups
<[]>
required

The delivery groups for this checkout. Each group contains one or more cart lines and the available delivery options (shipping, pickup point, or pickup location) for those items.

Empty until the buyer enters enough address information for Shopify to calculate shipping rates.

Anchor to Shipping option item propertiesShipping option item properties

The shopify global object provides the following additional properties on shopify for extensions registered for the purchase.checkout.shipping-option-item.render-after and purchase.checkout.shipping-option-item.details.render extension targets.

Anchor to isTargetSelected
isTargetSelected
<boolean>
required

Whether the buyer has selected the target shipping option. When true, the target option is the buyer's active choice. When false, the buyer has chosen a different shipping option.

Available only on the corresponding item target. Shipping option item targets expose shipping option properties; pickup location item targets expose pickup location properties.

Anchor to renderMode
renderMode
required

The render mode of this shipping option, indicating how the extension is displayed in the checkout UI.

Anchor to target
target
<>
required

The shipping option that this extension is attached to. Use this to read the option's cost, carrier, delivery estimate, and other details.

Available only on the corresponding item target. Shipping option item targets expose shipping option properties; pickup location item targets expose pickup location properties.

Anchor to Shipping option list propertiesShipping option list properties

The shopify global object provides the following additional properties on shopify for extensions registered for the purchase.checkout.shipping-option-list.render-before and purchase.checkout.shipping-option-list.render-after extension targets.

Anchor to deliverySelectionGroups
deliverySelectionGroups
< [] | undefined >
required

The list of delivery selection groups available to the buyer, which let buyers choose between grouped delivery options. The value is undefined when no selection groups are available.

Anchor to target
target
< | undefined>
required

The delivery group list that this extension is attached to. Use this to access all delivery groups and their options. The value is undefined when there aren't any delivery groups for the given type.

Anchor to Pickup point list propertiesPickup point list properties

The shopify global object provides the following additional properties on shopify for extensions registered for the purchase.checkout.pickup-point-list.render-before and purchase.checkout.pickup-point-list.render-after extension targets.

Anchor to isLocationFormVisible
isLocationFormVisible
<boolean>
required

Reflects which view was active when the extension loaded. When the buyer moves to the next view, the extension restarts with the current value rather than updating in place.

Anchor to Pickup location list propertiesPickup location list properties

The shopify global object provides the following additional properties on shopify for extensions registered for the purchase.checkout.pickup-location-list.render-before and purchase.checkout.pickup-location-list.render-after extension targets.

Anchor to isLocationFormVisible
isLocationFormVisible
<boolean>
required

Whether the location search form is currently visible to the buyer. Use this to conditionally render UI that depends on the buyer actively searching for pickup locations.

Anchor to Pickup location item propertiesPickup location item properties

The shopify global object provides the following additional properties on shopify for extensions registered for the purchase.checkout.pickup-location-option-item.render-after extension target.

Anchor to isTargetSelected
isTargetSelected
<boolean>
required

Whether the buyer has selected the target pickup location. When true, the target location is the buyer's active choice. When false, the buyer has chosen a different pickup location.

Available only on the corresponding item target. Shipping option item targets expose shipping option properties; pickup location item targets expose pickup location properties.

Anchor to target
target
<>
required

The pickup location that this extension is attached to. Use this to read the location's name, address, and other details.

Available only on the corresponding item target. Shipping option item targets expose shipping option properties; pickup location item targets expose pickup location properties.


  • Check API availability for your target: Not all extension targets implement all delivery APIs. Verify which APIs are available for your specific target before accessing them.
  • Handle empty delivery groups: Delivery groups might be empty early in checkout before the buyer enters a shipping address. Always check that the array has items before accessing elements.

Was this page helpful?