Manage delivery profiles
You can use delivery profiles to manage advanced shipping information in Shopify. Shops that use delivery profiles gain the ability to create shipping rates per product variant and location.
This guide shows you how to manage delivery profiles for deferred purchase options.
RequirementsAnchor link to section titled "Requirements"
- Your app can make authenticated requests to the GraphQL Admin API.
Your app has the following access scopes:
For more information on requesting access scopes when your app is installed, refer to Getting started with OAuth.
You've completed the Create and manage deferred purchase options guide.
Step 1: Create delivery profilesAnchor link to section titled "Step 1: Create delivery profiles"
A delivery profile is a set of shipping rates scoped to a set of products or variants that can be shipped from selected locations to zones. You can associate the
DeliveryProfile with the
SellingPlanGroup object to do the following tasks:
- Set free shipping for all orders with deferred purchase options
- Restrict shipping to specific countries
- Set a flat shipping rate by country for all orders with deferred purchase options
Set free shippingAnchor link to section titled "Set free shipping"
You can set free shipping for all orders with a deferred purchase option. The following example uses the
deliveryProfileCreate mutation to set free shipping.
Restrict shipping to specific countriesAnchor link to section titled "Restrict shipping to specific countries"
You can restrict deferred purchase option shipping to specific countries regardless of which delivery zones you have configured in the Shopify admin. The following example restricts shipping to North America (Canada, United States, Mexico):
Set a flat shipping rate by countryAnchor link to section titled "Set a flat shipping rate by country"
You can set a flat shipping rate by delivery zone for all orders with deferred purchase options. The following example defines free shipping to Canada and defines a $15.00 flat shipping rate for the rest of the world:
Step 2: Retrieve delivery profilesAnchor link to section titled "Step 2: Retrieve delivery profiles"
You can use the
deliveryProfiles query to retrieve a list of delivery profiles.
The following query returns a delivery profile with its ID, name, and default setting. Product variants stay in the default profile until they are added to another delivery profile. The example response indicates that the default profile is returned.
Step 3: Update delivery profilesAnchor link to section titled "Step 3: Update delivery profiles"
You can use the
deliveryProfileUpdate mutation to update existing delivery profiles. The following example adds the United States delivery zone:
Step 4: Remove a delivery profile (optional)Anchor link to section titled "Step 4: Remove a delivery profile (optional)"
You can asynchronously remove a delivery profile by using the
deliveryProfileRemove mutation, and passing in the ID of the delivery profile that you want to remove. The response returns a job ID that you can use to check on the job status and determine whether the operation is complete:
true, then the removal of the delivery profile has completed.
false, then removal of the delivery profile is still in progress.
- Learn how to set up required access scopes and pages for your deferred purchase option app.