2021-10 release notes
Release date | Date version is no longer supported |
---|---|
October 1, 2021 | October 1, 2022 |
The 2021-10 version of Shopify's APIs includes significant improvements to the Storefront API, including a new Cart API and the ability to fetch specific resources by ID. This version also includes bulk operation webhooks, manual fulfillment holds for pre-orders, and SMS marketing consent endpoints to represent a customer’s willingness to receive SMS marketing communications.
What’s new in 2021-10
The following features were added in version 2021-10 of Shopify's APIs:
- You can now interact directly with carts using the Storefront API. The Cart API allows you to get all the contextual information about an upcoming order without the need to create a checkout until the customer is ready to pay.
- New fields were added to the Storefront API QueryRoot object to fetch individual resources directly. You can query blogs, collections, pages, and products by ID or a handle.
- The Bulk Operations API now includes the
bulk_operations/finish
webhook. You can subscribe to this webhook to be notified when a bulk operation has completed, failed, or been cancelled. - The Fulfillment Orders API now supports apps placing fulfillment holds on items for backorders or pre-orders before the item is available for fulfillment.
- API clients can now use the Customer API to retrieve, add, and update customers' consent to receive marketing materials by SMS.
- You can now use metafield definitions to create additional validation constraints for metafields. You can also use standard metafield definitions, which have specific meanings for common use cases and help merchants manage their data.
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.
Removed full permission on User resource
Anchor link to section titled "Removed full permission on User resource"In API version 2021-07, the permissions
property in the REST User resource returned the complete list of explicit permissions that a user with the full
permission had access to, including the full
permission.
As of API version 2021-10, only the complete list of explicit permissions that a user with the full
permission has access to is returned in the permissions
property. The full
permission value is excluded from the response.
GraphQL Admin API changes
Anchor link to section titled "GraphQL Admin API changes"Below are all the changes currently introduced in the 2021-10 version of the GraphQL Admin API.
App added to orders
Use the GraphQL Admin API find out what application created an order.
New field
orderApp
field was added toOrder
object
New type
orderApp
object was added
Bulk operations
Use the GraphQL Admin API to query the type of the bulk operation. You can also subscribe to the bulk_operations/finish
webhook topic to be notified when a bulk operation has completed, failed, or been cancelled.
The bulkProductResourceFeedbackCreate
mutation allows you to create up to 50 feedback entries on a product resource in a single API request. You can also query for product resource feedback with the productResourceFeedback
field.
New field
type
field was added toBulkOperation
objectproductResourceFeedback
field was added to objectQueryRoot
New types
bulkProductResourceFeedbackCreate
mutation was addedProductResourceFeedbackInput
input object was addedProductResourceFeedback
object was addedResourceFeedbackState
enum was added
New topics
BULK_OPERATIONS_FINISH
value was added to enumWebhookSubscriptionTopic
Channel apps: onboarding merchants
Use the GraphQL Admin API to query whether a shop is approved for onboarding to channel apps. Use this query to accelerate the onboarding process for verified merchants.
New types
MerchantApprovalSignals
object type was added
New fields
verifiedByShopify
field was addedidentityVerified
field was added
Contextual pricing for products
Use the GraphQL Admin API to return the price a customer will pay for a product given a particular context, such as the customer's country. Using contextual pricing, you can query the Product
object for a price range, or the ProductVariant
object for a price, based on the specified context.
New field
contextualPricing
field was added toProduct
andProductVariant
objects
New types
ProductContextualPricing
object was addedProductVariantContextualPricing
object was addedContextualPricingContext
input object was added
Customer credit cards
Use the GraphQL Admin API to query the source (for example, Apple Pay) and the last four digits of a customer's credit card.
New fields
source
field was added toCustomerCreditCard
objectvirtualLastDigits
field was added toCustomerCreditCard
object
Fulfillment orders: location address
Use the GraphQL Admin API to query the address of the location where an order was fulfilled.
New types
FulfillmentOriginAddressInput
input object was addedoriginAddress
field was added toFulfillmentV2Input
input objectoriginAddress
field was added toFulfillment
objectoriginAddress
field was added tofulfillmentCreate
mutation
Manual fulfillment holds
Use the GraphQL Admin API to manually create a fulfillment hold when an order isn't ready for fulfillment immediately. For example, you could create a fulfillment hold if one of the items is backordered, or if an item was preordered before the item's release date.
New values
release_hold
value was added toFulfillmentOrderAction
enumhold
value was added toFulfillmentOrderAction
enum
New mutations
FulfillmentOrderHold
mutation was addedFulfillmentOrderReleaseHold
mutation was added
New types
FulfillmentHold
object type was addedFulfillmentHoldReason
enum was added
New fields
fulfillment_holds
field was added toFulfillmentOrder
object
Metafield definitions
Use the GraphQL Admin API to create and manage metafield definitions, which add validation constraints for metafields. You can also use standard metafield definitions, which have specific meanings for common use cases and help merchants manage their data.
New mutations
MetafieldDefinitionCreate
mutation was addedMetafieldDefinitionDelete
mutation was addedMetafieldDefinitionPin
mutation was addedMetafieldDefinitionUnpin
mutation was addedMetafieldDefinitionUpdate
mutation was addedMetafieldsSet
mutation was addedStandardMetafieldDefinitionEnable
mutation was added
New types
MetafieldDefinition
object was addedMetafieldDefinitionType
object was addedMetafieldDefinitionValidation
object was addedMetafieldDefinitionSupportedValidation
object was addedStandardMetafieldDefinitionTemplate
object was addedMetafieldDefinitionInput
input object was addedMetafieldDefinitionDeleteInput
input object was addedMetafieldDefinitionUpdateInput
input object was addedMetafieldDefinitionValidationInput
input object was addedMetafieldDefinitionPinnedStatus
enum was addedMetafieldDefinitionValidationStatus
enum was addedMetafieldValidationStatus
enum was addedHasMetafieldDefinitions
interface was addedMetafieldReference
union was addedMetafieldDefinitionSortKeys
sort keys type was added
New fields
definition
field was added toMetafield
objectreference
field was added toMetafield
objectowner
field was added toMetafield
object
Payment methods
As of API version 2021-10, you need to implement the new CustomerShopPayAgreement instrument associated with subscription contracts paid using Shop Pay. Use the CustomerShopPayAgreement object and CustomerPaymentInstrument union to store Shop Pay agreements in Shopify that can be used by subscription contracts.
Use the customerPaymentMethodGetUpdateUrl
mutation to return a URL that allows a customer to update a specific payment method.
New types
CustomerShopPayAgreement
object was addedCustomerShopPayAgreement
object was added as a possible type onCustomerPaymentInstrument
union
New mutation
customerPaymentMethodGetUpdateUrl
mutation was added
Payment terms
Use the GraphQL Admin API to set and track payment terms as part of an order or draft order. Payment terms represent the terms and conditions (for example, payment methods and payment schedules) under which a payment should be processed.
New types
PaymentTerms
object was addedPaymentSchedule
object was addedPaymentTermsTemplate
object was addedPaymentTermsType
enum was added
New mutations
paymentTermsCreate
mutation was addedpaymentTermsUpdate
mutation was addedpaymentTermsDelete
mutation was added
New fields
paymentTermsTemplates
field was added toQueryRoot
objectpaymentTerms
field was added toOrder
objectpaymentTerms
field was added toDraftOrder
objectpaymentTerms
field was added toDraftOrder
input object
New values
PAYMENT_TERMS_CREATE
value was added to enumWebhookSubscriptionTopic
PAYMENT_TERMS_UPDATE
value was added to enumWebhookSubscriptionTopic
PAYMENT_TERMS_DELETE
value was added to enumWebhookSubscriptionTopic
Post-purchase: app identifier
Use the GraphQL Admin API to find out whether your app is the post-purchase app in use. For example, you might want to let merchants know that your app isn't the one they have selected and prompt them to select your app on the checkout post-purchase page.
New field
isPostPurchaseAppInUse
field was added toApp
object
Post-purchase: subscriptions
Use the GraphQL Admin API to query the SellingPlanGroup and select the appropriate selling plans in a post-purchase subscription offer using the SellingPlanID.
New connection
sellingPlanGroups
was added to objectProduct
andProductVariant
Shopify Payments: refund transactions
Use the GraphQL Admin API to query Shopify Payments information related to an order refund. For example, you can retrieve the Acquirer Reference Number (ARN) that's generated for Visa or Mastercard refund transactions.
New type
ShopifyPaymentsRefundSet
object was added
New field
refundSet
field was added toShopifyPaymentsTransactionSet
object
SMS consent
Use the GraphQL Admin API to retrieve, add, and update a customer's consent to receive marketing material by SMS. You can also subscribe to the CUSTOMERS_MARKETING_CONSENT_UPDATE
topic to get notified when a customer updates their SMS marketing consent.
New types
CustomerSmsMarketingConsentInput
object type was addedCustomerSmsMarketingConsentUpdateInput
input object was addedCustomerConsentCollectedFrom
object was addedCustomerSmsMarketingConsentErrorCode
enum was addedCustomerSmsMarketingConsentState
enum was addedCustomerSmsMarketingConsentUpdatePayload
object was addedCustomerSmsMarketingState
enum was added
New mutations
CustomerSMSMarketingConsentUpdate
mutation was added
New fields
smsMarketingConsent
was added toCustomerInput
mutationsmsMarketingConsent
was added toCustomer
object
New errors
CustomerSmsMarketingConsentError
error was added
New values
CUSTOMERS_MARKETING_CONSENT_UPDATE
value was added to enumWebhookSubscriptionTopic
Subscriptions
Subscribe to the SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED
webhook topic to get notified when a financial institution challenges the subscription billing attempt charge as per 3D Secure. You can also subscribe to SELLING_PLAN_GROUPS
webhook topics to get notified when a selling plan group is created, updated, or deleted.
For detailed information about required scopes and payloads, refer to subscriptions-related webhooks and selling plans-related webhooks.
New topics
SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED
value was added to enumWebhookSubscriptionTopic
SELLING_PLAN_GROUPS_CREATE
value was added to enumWebhookSubscriptionTopic
SELLING_PLAN_GROUPS_UPDATE
value was added to enumWebhookSubscriptionTopic
SELLING_PLAN_GROUPS_DELETE
value was added to enumWebhookSubscriptionTopic
Translatable resources types added to the Translation API
Use the GraphQL Admin API to create and retrieve translated content for Shopify resources. You can now retrieve the translations for an online store menu title and the body of a packing slip template.
New values
ONLINE_STORE_MENU
value was added to enumTranslatableResourceType
PACKING_SLIP_TEMPLATE
value was added to enumTranslatableResourceType
GraphQL Storefront API changes
Anchor link to section titled "GraphQL Storefront API changes"Below are all the changes currently introduced in the 2021-10 version of the GraphQL Storefront API.
Cart
Use the Storefront API to interact with a cart during a customer's session. A cart contains the merchandise that a customer intends to purchase, and the estimated cost associated with the cart.
To learn how to create a cart and retrieve it, update cart line items and customer information, and retrieve a checkout URL, refer to Manage a cart with the Storefront API.
New types
CartAutomaticDiscountAllocation
object type was addedCartBuyerIdentityInput
input object was addedCartBuyerIdentity
object type was addedCartCodeDiscountAllocation
object type was addedCartDiscountAllocation
interface type was addedCartDiscountCode
object type was addedCartEstimatedCost
object type was addedCartInput
input object was addedCartLineEstimatedCost
object type was addedCartLineInput
input object was addedCartLineUpdateInput
input object was addedCartLine
object was addedCartUserError
was addedCart
object type was addedMerchandise
union type was added
New mutations
CartAttributesUpdate
mutation was addedCartBuyerIdentityUpdate
mutation was addedCartCreate
mutation was addedCartDiscountCodesUpdate
mutation was addedCartLinesAdd
mutation was addedCartLinesRemove
mutation was addedCartLinesUpdate
mutation was addedCartNoteUpdate
mutation was added
Online store
Use QueryRoot
to fetch a specific blog, collection, page, or product by its unique attributes. You can also use the OnlineStorePublishable
interface type to access resources that can be published to the Online Store sales channel (Article, Blog, Collection, Page, and Product).
New fields
blog
field was added toQueryRoot
objectcollection
field was added toQueryRoot
objectpage
field was added toQueryRoot
objectproduct
field was added toQueryRoot
object
New types
Article
object was added toOnlineStorePublishable
interface typeBlog
object was added toOnlineStorePublishable
interface typeCollection
object was added toOnlineStorePublishable
interface typePage
object was added toOnlineStorePublishable
interface typeProduct
object was added toOnlineStorePublishable
interface type
REST Admin API changes
Anchor link to section titled "REST Admin API changes"Below are all the changes currently introduced in the 2021-10 version of the REST Admin API.
Bulk operations
Subscribe to the bulk_operations/finish
webhook topic to be notified when a bulk operation has completed, failed, or been cancelled.
New topics
bulk_operations/finish
topic was added to Webhook resource
Fulfillment: fulfillment line item ID
Use the REST Admin API to retrieve the fulfillment line item ID associated with a fulfillment. A fulfillment line item represents the quantity of items from an order line item that are included in the fulfillment.
New property
fulfillment_line_item_id
property was added toFulfillment
resource
Fulfillment orders: location address
Use the REST Admin API to request the address of the location where an order was fulfilled.
New property
origin_address
property was added toFulfillment
resource
Manual fulfillment holds
Use the REST Admin API to manually create a fulfillment hold when an order isn't ready for fulfillment immediately. For example, you could create a fulfillment hold if one of the items is backordered, or if an item was preordered before the item's release date.
New property
fulfillment_holds
property was added toFulfillmentOrder
resource
Payment terms
Use the Order and Draft Order resources to retrieve payment terms as part of an order or draft order. Payment terms represent the terms and conditions (for example, payment methods and payment schedules) under which a payment should be processed.
New properties
payment_terms
property was added to/admin/api/2021-10/draft_orders.json
payment_terms
property was added to/admin/api/2021-10/orders.json
New topics
SMS consent
Use the Checkout and Abandoned checkouts resources to retrieve whether a customer consents to receive marketing material by SMS and the phone number to which material is sent.
Use the Customer resource to retrieve, add, and update a customer's consent to receive marketing material by SMS.
Subscribe to the customers_marketing_consent/update
topic to get notified when a customer updates their SMS marketing consent.
New properties
buyer_accepts_sms_marketing
property was added toCheckout
andAbandoned checkouts
resourcessms_marketing_phone
property was added toCheckout
andAbandoned checkouts
resourcessms_marketing_consent
property was added toCustomer
resource
New topics
customers_marketing_consent/update
topic was added to Webhook resource
Shopify Payments: refund transactions
Use the REST Admin API to query Shopify Payments information related to an order refund. For example, you can retrieve the Acquirer Reference Number (ARN) that's generated for Visa or Mastercard refund transactions.
New property
payments_refund_attributes
property was added toTransaction
resource
Subscriptions
Subscribe to the subscription_billing_attempts/challenged
webhook topic to get notified when a financial institution challenges the subscription billing attempt charge as per 3D Secure. You can also subscribe to selling_plan_groups
webhook topics to get notified when a selling plan group is created, updated, or deleted.
For detailed information about required scopes and payloads, refer to subscription-related webhooks and selling plans-related webhooks.
New topics
User permissions
As of API version 2021-10, the full
permission is no longer a potential value of the permissions
property on the REST User resource. This update follows the change to API version 2021-07, which returned a complete list of explicit permissions for a user.
Removed values
full
value was removed frompermissions
property