2020-01 release notes
Release date | Date version is no longer supported |
---|---|
January 1, 2020 | January 1, 2021 |
The 2020-01 release contains many of the features we previewed at Unite 2019. The product media, order editing, and fulfillment orders features are now stable and available on merchant stores. You’ll also find new additions to how you can manage smart collections and discount codes.
What's new in 2020-01
The following features were added in version 2020-01 of Shopify’s APIs:
- Manage the various types of media associated with merchants' products using the GraphQL Admin API.
- Edit orders using the GraphQL Admin API.
- Improve your fulfillment workflows with fulfillment orders using the GraphQL Admin API.
- Manage smart collections more effectively using the REST Admin API.
- Create “Spend X Get Y” discount codes using the GraphQL Admin API.
Breaking changes
Anchor link to section titled "Breaking changes"These changes require special attention. If your app uses these API resources, and you don’t adjust your usage of the resources according to the following instructions, then your app might break when you update to this API version.
Collects API
Anchor link to section titled "Collects API"As of verison 2020-01, the Collects REST API only returns collects associated with custom collections, and no longer returns products associated with Smart Collections. To get the products in a smart collection, use the new /admin/api/2020-04/collections/#{collection_id}/products.json
endpoint.
Maximum input array size for GraphQL operations
Anchor link to section titled "Maximum input array size for GraphQL operations"Input arguments that accept an array now have a maximum size of 250. Queries and mutations return an error if an input array exceeds 250 items. This change applies to both the Admin API and the Storefront API.
REST Admin API changes
Anchor link to section titled "REST Admin API changes"Below are all the changes introduced in the 2020-01 version of the REST Admin API.
Collects
Collects API now returns only collects associated with custom collections, and no longer returns products associated with Smart Collections. The following endpoints are affected:
GET /admin/api/2020-01/collects.json
: Now only returns collects associated with custom collections.GET /admin/api/2020-01/collects/count.json
: Now only returns the count of collects associated with custom collections.GET /admin/api/2020-01/collects/{collect_id}.json
: If the IDcollect_id
is related to smart collection, then this endpoint returns a 404 error.
New Collections API
- New API for getting products inside a collection.
GET /admin/api/2020-01/collections/#{collection_id}/products.json
- New API for getting a collection by its ID.
GET /admin/api/2020-01/collections/#{collection_id}.json
Fulfillment orders
You can manage fulfillments with more control using FulfillmentOrder-based fulfillment. To learn more, refer to Managing fulfillments with the FulfillmentOrder resource.
Fulfillment Services
Anchor link to section titled "Fulfillment Services"- Added the
fulfillment_orders_opt_in
property to fulfillment services.
Assigned fulfillment orders
Anchor link to section titled "Assigned fulfillment orders"- Added a new route
GET /admin/api/2020-01/assigned_fulfillment_orders.json?assignment_status=cancellation_requested&location_ids[]=487838322
to retrieve all the fulfillment orders that are assigned to an app at the shop level.
Cancellation requests
Anchor link to section titled "Cancellation requests"- Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request.json
to send a cancellation request to a fulfillment service for a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/accept.json
to accept a cancellation request sent to a fulfillment service for a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/reject.json
to reject a cancellation request sent to a fulfillment service for a fulfillment order.
Fulfillment requests
Anchor link to section titled "Fulfillment requests"- Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/fulfillment_request.json
to send a fulfillment request to a fulfillment service for a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/fulfillment_request/accept.json
to accept a fulfillment request to a fulfillment service for a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/fulfillment_request/reject.json
to reject a fulfillment request to a fulfillment service for a fulfillment order.
Fulfillment orders
Anchor link to section titled "Fulfillment orders"- Added a new route
GET /admin/api/2020-01/orders/#{order_id}/fulfillment_orders.json
to retrieve a list of fulfillment orders for a specific order. - Added a new route
GET /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}.json
to retrieve a specific fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancel.json
to cancel a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/close.json
to close a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/move.json
to move a fulfillment order.
Locations for move
Anchor link to section titled "Locations for move"- Added a new route
GET /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/locations_for_move.json
to retrieve locations that a fulfillment order can potentially move to.
Fulfillments
Anchor link to section titled "Fulfillments"- Added a new route
GET /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/fulfillments.json
to retrieve fulfillments associated with a fulfillment order. - Added a new route
POST /admin/api/2020-01/fulfillments.json
to create a fulfillment for one or many fulfillment orders. - Added a new route
POST /admin/api/2020-01/fulfillments/#{fulfillment_id}/cancel.json
to cancel a fulfillment. - Added a new route
POST /admin/api/2020-01/fulfillments/#{fulfillment_id}/update_tracking.json
to update the tracking information for a fulfillment.
Changes to webhooks
The following changes have been made to the Webhook resource:
New topics
orders/edited
was added as part of the new order editing feature for the GraphQL Admin API.
Track whether inventory items need shipping
- The
requires_shipping
property on the InventoryItem resource can now be updated. This property replaces the deprecatedrequires_shipping
property on the Product Variant resource.
GraphQL Admin API changes
Anchor link to section titled "GraphQL Admin API changes"Below are all the changes introduced in the 2020-01 version of the GraphQL Admin API.
Maximum input array size for GraphQL operations
Input arguments that accept an array have a maximum size of 250. Queries and mutations return an error if an input array exceeds 250 items.
Associate new media types with products
Products now support three types of media: images, 3D models, and videos. Use the GraphQL Admin API to upload media assets and then associate them with a product. To learn more, refer to Working with product media.
Updated types
VIDEO
value was added to enumStagedUploadTargetGenerateUploadResource
MODEL_3D
value was added to enumStagedUploadTargetGenerateUploadResource
IMAGE
value was added to enumStagedUploadTargetGenerateUploadResource
media: [CreateMediaInput!]
argument was added to mutationproductCreate
New fields
fileSize
field was added to input object typeStagedUploadTargetGenerateInput
mediaCount
field was added to object typeProduct
media
field was added to object typeProduct
featuredMedia
field was added to object typeProduct
New types
VideoSource
object was addedVideo
object was addedModel3dSource
object was addedModel3d
object was addedMediaImage
object was addedExternalVideo
was addedStagedUploadInput
input object was addedStagedUploadParameter
object was addedStagedMediaUploadTarget
object was addedUpdateMediaInput
input object was addedCreateMediaInput
input object was addedProductMediaSortKeys
enum was addedMediaStatus
enum was addedMediaPreviewImageStatus
enum was addedMediaPreviewImage
enum was addedMediaErrorCode
enum was addedMediaError
object was addedMediaContentType
was addedMedia
interface was added
New mutations
stagedUploadsCreate
was addedproductUpdateMedia
was addedproductReorderMedia
was addedproductDeleteMedia
was addedproductCreateMedia
was added
Edit existing orders
You can now edit orders to add items, remove items, or update item quantities. To learn more, refer to Editing existing orders.
Updated types
EDIT_ORDERS
was added to enum typeStaffMemberPermission
New types
CalculatedOrder
was addedOrderStagedChangeIncrementItem
was addedOrderStagedChangeDecrementItem
was addedOrderStagedChangeAddVariant
was addedOrderStagedChangeAddCustomItem
was addedOrderStagedChange
was addedCalculatedLineItem
was addedLineItemMutable
was added
New fields
totalOutstandingSet
was added toOrder
refundDiscrepancySet
was added toOrder
originalTotalPriceSet
was added toOrder
lineItemsMutable
was added toOrder
edited
was added toOrder
New mutations
orderEditSetQuantity
was addedorderEditCommit
was addedorderEditBegin
was addedorderEditAddVariant
was addedorderEditAddCustomItem
was added
Grant staff members permission to edit translated content
Staff member permissions include the option to edit translated content.
Updated types
TRANSLATIONS
was added to enumStaffMemberPermission
Manage fulfillments with fulfillment orders
You can manage fulfillments with more control using FulfillmentOrder-based fulfillment. To learn more, refer to Managing fulfillments with the FulfillmentOrder resource.
Updated types
IN_PROGRESS
value was added to the OrderDisplayFulfillmentStatus enum.
New fields
fulfillment_order
was added to QueryRoot.fulfillment_orders
was added to Shop.assigned_fulfillment_orders
was added to Shop.fulfillment_orders
was added to Order.fulfillment_orders
was added to Fulfillment.order
was added to Fulfillment.callback_url
was added to FulfillmentService.fulfillment_orders_opt_in
was added to FulfillmentService.
New types
- FulfillmentTrackingInput input type was added.
- FulfillmentV2Input input type was added.
- FulfillmentOrder object was added.
- FulfillmentOrderAction enum was added.
- FulfillmentOrderAssignedLocation object was added.
- FulfillmentOrderAssignmentStatus enum was added.
- FulfillmentOrderDestination object was added.
- FulfillmentOrderLineItem object was added.
- FulfillmentOrderLineItemInput input type was added.
- FulfillmentOrderLineItemsInput input type was added.
- FulfillmentOrderLocationForMove object was added.
- FulfillmentOrderMerchantRequest object was added.
- FulfillmentOrderMerchantRequestKind enum was added.
- FulfillmentOrderRequestStatus enum was added.
- FulfillmentOrderSupportedAction object was added.
New mutations
- FulfillmentCreateV2 was added.
- FulfillmentTrackingInfoUpdateV2 was added.
- fulfillmentCancel was added.
- FulfillmentOrderSubmitCancellationRequest was added.
- FulfillmentOrderAcceptCancellationRequest was added.
- FulfillmentOrderRejectCancellationRequest was added.
- FulfillmentOrderSubmitFulfillmentRequest was added.
- FulfillmentOrderAcceptFulfillmentRequest was added.
- FulfillmentOrderRejectFulfillmentRequest was added.
- FulfillmentOrderClose was added.
- FulfillmentOrderCancel was added.
- FulfillmentOrderMove was added.
Updated mutations
fulfillment_orders_opt_in
optional argument was added to FulfillmentServiceUpdate.
Minor non-breaking changes
Updated fields and types
SHP
value was added to enumCurrencyCode
GIP
value was added to enumCurrencyCode
FKP
value was added to enumCurrencyCode
New error code for maximum number of discounts created
A better error code is returned when an app tries to create more than 20 million discounts or discount codes.
Updated types
EXCEEDED_MAX
was added to enumPriceRuleErrorCode
Set and query customer locales
The Customer object type now includes a customer's locale.
New fields
locale
was added to input object typeCustomerInput
locale
was added to object typeCustomer
Set minimum purchase amounts for discounts
We added support for required minimum purchase amounts for discounts. When a discount requires a minimum amount, a customer's purchase needs to exceed that value to be eligible for the discount.
Updated types
DiscountPurchaseAmount
was added to union typeDiscountCustomerBuysValue
New types
DiscountPurchaseAmount
was added
New fields
amount
was added toDiscountCustomerBuysValueInput
extraInfo
was added toDiscountUserError
Translate delivery method definitions
Delivery method definitions are now translatable resources. To learn more about delivery method definitions, refer to Manage delivery profiles. To learn more about translating resources, refer to Translating content with the API
Updated types
DELIVERY_METHOD_DEFINITION
was added to enumTranslatableResourceType
Updates to delivery profiles
Updated fields
merchantOwnedOnly
argument was added to fieldQueryRoot.deliveryProfiles
New types
DeliveryProductVariantsCount
object type was added
New fields
productVariantsCountV2
was added to object typeDeliveryProfile
DeliveryProfile.productVariantsCount
was deprecated in favor ofproductVariantsCountV2
Query all available locales
You can query the full list of locales available for a shop to enable. Refer to the example for retrieving a shop's locales.
New types
Locale
object was added
New fields
-
availableLocales
was added toQueryRoot
Storefront API changes
Anchor link to section titled "Storefront API changes"Below are all the changes introduced in the 2020-01 version of the Storefront API.
Maximum input array size for GraphQL operations
Input arguments that accept an array have a maximum size of 250. Queries and mutations return an error if an input array exceeds 250 items.
Minor non-breaking changes
Updated fields and types
SHP
value was added to enumCurrencyCode
GIP
value was added to enumCurrencyCode
FKP
value was added to enumCurrencyCode
Query the unit price of product variants
You can now query unit measurement and price data for product variants to display per-unit prices (for example, $9.99 / 100 ml
).
New types
UnitPriceMeasurementMeasuredUnit
was addedUnitPriceMeasurementMeasuredType
was addedUnitPriceMeasurement
was added
New fields
unitPrice
was added toProductVariant
presentmentUnitPrices
was added toProductVariant
unitPriceMeasurement
was added toProductVariant
Retrieve new media types for products
Products now support three types of media: images, 3D models, and videos. Use the Storefront API to retrieve a product's media and display it on the store's storefront.
Updated types
media
was added to object typeProduct
New types
VideoSource
was addedVideo
was addedModel3dSource
was addedModel3d
was addedMediaImage
was addedExternalVideo
was addedMediaContentType
was addedMedia
was added
Retrieve translated content with the Storefront API
You can now retrieve translated content for select resource properties using the Storefront API. You need to use the Accept-Language HTTP request header when sending queries. Before you can retrieve the content, it needs to be created using the GraphQL Admin API.
To learn more, refer to Support multiple languages on storefronts.
Supported resources
Collection
Metafield
Article
Blog
Page
Product
ProductOption
ProductVariant
ShopPolicy
For a full list of translatable properties, refer to Translatable resources.
Corresponding Buy SDK versions
Anchor link to section titled "Corresponding Buy SDK versions"SDK | Supported Versions |
---|---|
Mobile Buy SDK Android | 4.0.0 |
Mobile Buy SDK iOS | 3.7.0, 3.7.1 |
Unity Buy SDK | 2.0.0 |
JS Buy SDK | 2.9.0, 2.9.1,2.9.1, 2.9.2, 2.9.3 |
Buy Button JS | 2.1.0, 2.1.1, 2.1.2 |