Shopify API Version Update: July 2024 Version Main Features
The general update of the Shopify API in July 2024 introduces a large number of new functions and optimizations, focused on the developed aspects of the functioning of the platform and its underlying defenses. This substantial update is aimed at making developers and merchants more proficient enabling them to get more enhanced tools and features to push their e-commerce to the next level. In this blog post, we will explore in detail the prominent update with the aim of giving you an understanding of changes and further steps on how to take advantage of the update.
Let's seamlessly connect your store to powerful tools and platforms and accelerate sales like never before!Shopify Integration Service
Overview of the Update
To keep up with the demanding environment of e-commerce, there is consistent innovation in Shopify. This commitment to continuous enhancement is evident in the API update in July 2024 that introduced new and improved changes to several aspects of API. From more robust APIs to better security features, this update makes sure that Shopify is still on par for delivering digital commerce on the web.
If you haven’t clearly understood what Shopify API is and how it works, please refer to Mastering the Shopify API: 2024 Updated
Key Features and Enhancements
1. Admin API
One of the major focuses of this update is expanding the functionality of the Admin API when it comes to managing orders, promotions, exchanges/returns and enhancing the overall customer experience.
- Applying Discounts to Draft Orders
- Add `discountCodes` field to apply codes to draft orders
- Use `acceptAutomaticDiscounts` to control if automatic discounts apply
- View platform discount details with `platformDiscounts` field
- Processing Exchanges/Returns
- Add `exchangeLineItems` to `returnCreate` mutation for exchanges
- Include discounts, fees using `ExchangeLineItemAppliedDiscountInput`
- Remove lines from return using `returnLineItemRemoveFromReturn` mutation
- Preview return financials with `returnCalculate` query
- Improved Fulfillment Handling
- Identify `PICKUP_POINT` deliveries using `DeliveryMethodType` enum
- Access fulfillment orders from new `QueryRoot.assignedFulfillmentOrders` query
- Enhancing Product Data
- `PRODUCTS_CREATE/UPDATE` webhooks include product media
- Connect files like videos with `fileUpdate` mutation’s `referencesToAdd`
- `Query/set` metafields on selling plans with metafields field
- Customizing Checkout UI
- Configure the visibility of dividers using the divided field on `CheckoutBrandingInput`
- Market/Location Management
- Promote non-primary market with `promoteMarketToPrimary` mutation
- Get the retail location of the order from `Order.retailLocation` field
- Mobile App Integration
- New `MobilePlatformApplication` type for app `credentials/links`
- Payment Processing
- Query Shopify Payments balance transactions, fees, order details
- Capture auths multiple times with `finalCapture` field (Shopify Plus)
2. Storefront API Enhancements
The Storefront API, which powers the customer-facing storefront experiences, received a couple of key enhancements in this release focused on cart functionality.
Managing Gift Cards on Carts
Prior to this update, there was no built-in way to apply gift cards to a customer’s cart in the Storefront API. This limitation has now been addressed with the addition of two new functionalities:
- Adding Gift Card Codes When Creating a Cart: When creating a new cart, you can now optionally provide a list of gift card codes using the `giftCardCodes` field on the `CartInput` object. This allows immediately associating one or more gift cards when the cart is first created.
- Updating Gift Card Codes on an Existing Cart: For carts that have already been created, a new `cartGiftCardCodesUpdate` mutation has been added. This lets you add, remove, or replace the gift card codes applied to the cart after the fact.
To check which gift cards have been successfully applied, you can use the new `appliedGiftCards` field on the Cart object to retrieve the list.
Assigning a Billing Address to a Cart
Another enhancement is the ability to associate a billing address with a cart using the new `cartBillingAddressUpdate` mutation. This allows setting the billing address for the order upfront, separate from the shipping address.
Previously, the billing address could only be captured during checkout itself. But now merchants can optionally accept this information earlier in the customer’s journey when adding items to their cart.
These additions give merchants more flexibility in how gift cards and billing details are handled on the storefront, prior to initiating checkout. Shopify hopes these capabilities will enable the creation of smoother, more integrated shopping experiences for customers.
Read more: Mastering the Shopify Billing API: A Comprehensive Guide
3. Shopify Function APIs
The July 2024 release includes a few enhancements to Shopify’s Function APIs that provide more control over payment methods and order routing.
Payment Customization API
For merchants on the Shopify Plus plan, the Payment Customization API now allows hiding specific accelerated checkout payment methods from different placements in the checkout flow.
The hide operation can take an optional placements argument to target whether the payment method should be hidden from:
- The accelerated checkout `buttons/options`
- The main payment selection page
- Both placements
This gives Plus merchants more granular control over which payment methods are surfaced in different parts of the checkout experience.
For example, a merchant could choose to hide certain payment methods just from the accelerated options, but still allow them on the main payment selection screen if needed.
Order Routing Location Rule API
When utilizing distributed inventory locations, the Order Routing Location Rule API provides recommendations on which locations should fulfill different parts of an order.
In this release, the `FulfillmentGroup` object returned by this API has a new lines field. This contains details about the specific cart line items that are included in each `fulfillment group/location` recommendation.
Having access to the cart line item details allows building richer integrations and deeper analysis when dynamically routing different components of an order across multiple locations.
Overall, these Function API updates give merchants more control over curating the payment methods displayed during checkout as well as securing better transparency into the order routing process.
4. Product Enhancements
This release includes several improvements related to product data and media capabilities:
Product Webhooks Include Media Data
- The `PRODUCTS_CREATE` and `PRODUCTS_UPDATE` webhooks have been updated to include media data associated with the product. Previously, these webhooks only contained basic product information.
- Now when a new product is created or an existing one is updated, the webhook payload will also include details about any images, videos, 3D models or other media files that have been uploaded and associated with that product.
- This allows apps and integrations that subscribe to these webhooks to easily stay synced with the latest product media changes happening in the merchant’s Shopify store.
Connect Media Files to Products
- To complement the webhook updates, merchants and apps can now directly connect media files like 3D models and external videos to products using the new referencesToAdd field on the fileUpdate mutation.
- This enables building experiences and product pages that incorporate immersive 3D model visualizations or video overviews directly associated with products.
Product Feed Variant Image Improvements
- For product feeds sent through the `PRODUCT_FEEDS_INCREMENTAL_SYNC` and `PRODUCT_FEEDS_FULL_SYNC` webhooks, the variant image data has been improved.
- Previously, if no distinct image was set for a variant, the feed would default to using the first image from the parent product.
- Now, the variant image field will only return an image if one has been explicitly assigned to that specific variant. This helps ensure variants are accurately represented in product feeds.
5. Security and Compliance Updates
A major security enhancement in this release is aimed at preventing overselling for merchants who offer subscription products and services. Overselling can happen when charges go through for subscription orders, but there isn’t enough inventory to actually fulfill those orders.
To avoid this, the following changes were made:
- Inventory Checking for Subscription Billing
- When processing a recurring subscription billing attempt to charge a customer
- Shopify will now verify if there is enough inventory to fulfill the subscribed items
- If an inventory is too low, the billing attempt will fail with a new `INSUFFICIENT_INVENTORY` error
- This stops merchants from accidentally charging and overselling items they can’t fulfill
- Proper Payment Setup Requirement
- A `MISSING_CUSTOMER_PAYMENT_METHOD` error can also occur
- If trying to finalize a subscription draft order without associated payment details
- Ensuring payment is properly set up before processing the subscription order
Previously, subscriptions could be processed and charged without these inventory and payment checks in place. But now Shopify is preventing overselling scenarios by:
- Checking inventory levels against subscription quantities
- Requiring customer payment to be configured correctly
These checks provide important safeguards for subscription merchants to keep inventory tracking accurate and avoid fulfillment issues that can impact customer satisfaction on recurring orders.
Deprecations
While the July 2024 Shopify API update brings exciting new features and enhancements, developers should be aware of a few deprecations and breaking changes that might impact existing integrations:
- InventoryAdjustQuantity Mutation (Admin API): This mutation has been deprecated in favor of the new `InventoryBulkAdjustQuantityAtLocation` mutation, which allows for more efficient bulk adjustments of inventory quantities at specific locations.
- Image Connections on Product Variants (Storefront API): The `images` connection on `ProductVariant` objects in the Storefront API now requires the use of the `first` argument to limit the number of images returned. This change helps optimize performance and reduce unnecessary data transfer.
- Deprecated Fields: Several fields across different resources have been deprecated. These fields will continue to function in the July 2024 version but are scheduled for removal in future updates. It’s recommended to update your code to avoid using these fields to ensure compatibility with future API versions. Refer to the official Shopify API release notes for a detailed list of deprecated fields.
Practical Applications and Tips
The July 2024 Shopify API update opens up a range of possibilities for enhancing your Shopify store and creating more powerful integrations. Here are some practical applications and tips to make the most of the new features:
Streamlined Inventory Management
- Bulk Inventory Updates: Leverage the new `InventoryBulkAdjustQuantityAtLocation` mutation to efficiently manage inventory levels across multiple locations, saving time and reducing errors.
- Real-time Inventory Tracking: Implement the `InventoryItemUpdate` mutation to display real-time stock levels on your storefront, improving transparency and customer satisfaction.
Enhanced Shopping Experience
- 3D Product Visualization: Integrate 3D models into your product pages to provide immersive product views, helping customers make informed purchasing decisions.
- Video-Enhanced Descriptions: Showcase product features and benefits with external videos on your product pages, increasing engagement and driving conversions.
- Gift Card Integration: Offer seamless gift card purchase and redemption experiences through the API, boosting sales and customer loyalty.
Efficient Payments Management
- Shopify Payments Insights: Utilize the new Shopify Payments balance transaction types to gain deeper insights into your store’s financial performance, streamline reporting, and reconcile payments more effectively.
- Shopify Functions for Automation: Explore the new Shopify Functions APIs to automate payment-related tasks, such as custom payment gateways, dynamic pricing rules, and more.
Improved Mobile App Experiences
- Streamlined Logins: Take advantage of the `MobilePlatformApplication` type to enable shared web credentials and app links, simplifying the login process and improving user experience for your mobile app users.
Future Outlook
The July 2024 Shopify API update sets the stage for exciting advancements in the Shopify ecosystem. As Shopify continues to evolve its platform, we can anticipate several trends and developments in the future:
- Expanded API Capabilities: Shopify will likely continue to expand its API offerings, providing developers with even more tools and flexibility to create innovative solutions for merchants. This could include deeper integrations with third-party platforms, more robust data analysis capabilities, and enhanced features for customizing the storefront experience.
- Focus on Headless Commerce: Headless commerce, which decouples the frontend presentation layer from the backend commerce functionality, is gaining traction. Shopify’s ongoing API enhancements will likely cater to this trend, enabling developers to build highly customized and flexible storefronts using their preferred technologies.
- AI and Automation: Artificial intelligence (AI) and automation are poised to play a significant role in the future of e-commerce. Shopify may incorporate AI-powered features into its APIs, enabling merchants to leverage machine learning for product recommendations, personalized shopping experiences, and intelligent inventory management.
- Enhanced Developer Experience: Shopify is committed to improving the developer experience by providing comprehensive documentation, robust developer tools, and active community support. We can expect further improvements in this area, making it easier for developers to build, test, and deploy Shopify apps and integrations.
- Continued Focus on Security: As cybersecurity threats continue to evolve, Shopify will likely prioritize security enhancements in its APIs. This may include stronger authentication mechanisms, stricter data privacy measures, and proactive threat detection capabilities.
By staying abreast of Shopify’s API updates and keeping an eye on emerging trends, developers can ensure they are well-positioned to leverage the full potential of Shopify’s platform and create innovative solutions that drive business growth for merchants.
Conclusion
The July 2024 Shopify API version update introduces a comprehensive set of enhancements designed to improve platform functionality, performance, and security. By staying informed and taking proactive measures, developers and merchants can leverage these updates to optimize their e-commerce operations and deliver exceptional customer experiences.
For detailed information on all changes, refer to the Shopify API documentation and the Hydrogen July 2024 release notes.
& Maintenance Services
Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.
Get StartedNew Posts
Discover Shopify App Store – A Comprehensive Handbook 2024
Top 10+ Shopify Store Name Generators: Ultimate Review Guide
Should I Hire A Shopify Expert? Reasons, How-tos
People also searched for
- shopify api version update
- 2.3.x, 2.4.x
Stay in the know
Get special offers on the latest news from Mageplaza.
Earn $10 in reward now!