Here at Shopify we're constantly working on improving our API to make life easier for the developers working with our platform. This is the first of an ongoing series of bi-weekly blog posts designed to arm developers with info on the latest updates so that they can make the best apps possible.
In no particular order, here are the updates we've made recently:
Product Image Reordering - You can now specify which order product images should appear in on product pages. Use the 'position' field when creating or updating an image to move it to that position in the list. Here's an example from our API docs.
- Additional Order Statuses - The API now supports filtering orders that are 'refunded' or 'voided' using the existing financial_status field.
- Filter By Published Status - All publishable objects in the API can now be filtered by their published status and date. The new additions include Articles, Pages, Collections (smart and custom), and Products.
Shop Domain Headers - We're replacing the X-Shopify-Shop-Id header on our Webhooks in favor of one containing the shop domain. Look for a new header called X-Shopify-Shop-Domain on your webhooks and be aware that the existing ID header will be deprecated as of October 15th.
- Search By Product Handle - We recently added a new 'handle' filter to our Product API. A product's handle is the url-encoded conversion of the title that appears in the product URL. Using this filter you can fetch products based solely on the URL.