2022-07 release notes
We're no longer publishing API release notes. Instead, you can find the latest updates on Shopify APIs in our developer changelog. You can filter updates by area. For example, you can filter API updates by the API name and version, such as GraphQL Admin API changes in version 2025-04.
| Release date | Date version is no longer supported |
|---|---|
| July 1, 2022 | July 1, 2023 |
The 2022-07 version of Shopify's APIs includes new ways to manage deferred purchase options and app discount types. This release also includes new ways to create and manage discounts with Function APIs.
What's new in 2022-07
The following features were added in version 2022-07 of Shopify's APIs.
GraphQL Admin API changes:
- Use Shopify Functions to build a discounts experience.
- Set deadlines for fulfillment orders.
- Create discount combinations in your app.
- Create and manage deferred purchase options.
- Create a delegate access token.
- Permit a SKU to be stocked at multiple fulfillment services or merchant-managed locations.
- Specify the Multipurpose Internet Mail Extensions (MIME) type of generic files being created, updated, or deleted.
- Manage dispute evidence.
- Use a customer's payment mandate to trigger a payment for the remaining balance on an order or create a payment schedule.
- Confirm that the phone field of a delivery address for a subscription is properly formatted in the
subscriptionContractCreateandsubscriptionDraftUpdatemutations. - Specify a fixed cutoff day in subscription apps.
- Extend the trial of an app subscription with the AppSubscriptionTrialExtend mutation.
- Subscribe to the
app_subscriptions/approaching_capped_amountwebhook topic to get notified when the balance used on an app subscription crosses 90% of the capped amount. - Set the replacement behavior for a merchant with an existing subscription by using the
replacementBehaviorargument that was added to theappSubscriptionCreatemutation.
GraphQL Storefront API changes:
- Query the
Cartobject to retrieve the total number of items in a cart (totalQuantity) as well as theCartLineEstimatedCostobject. HasMetafieldsnow accepts a list of metafield namespaces and keys, and returns a list of associated metafields that match the given namespaces and keys.HasMetafields.metafieldspaginated connection is deprecated.- Set checkout charges for deferred purchase options to secure customers' commitments to orders before the orders are fulfilled.
- Query the
urlRedirectobject to retrieve information about a URL redirect on an online store.
GraphQL Function API changes:
- Create an order discount that's applied to all merchandise in the cart.
- Create a product discount that's applied to a particular product or product variant in the cart.
- Create a shipping discount that's applied to one or more shipping rates at checkout.
REST Admin API changes:
- Use the
/set_fulfillment_orders_deadlineendpoint to set the latest date and time by which fulfillment orders need to be fulfilled. - Use the Rest Admin API to manage dispute evidence.
- Use the Rest Admin API to permit a SKU to be stocked at multiple fulfillment services or merchant-managed locations.
- The REST Admin API no longer supports XML-format responses and payloads. If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.
Anchor to Breaking changesBreaking 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.
Anchor to CartCart
As of API version 2022-07, the estimatedCost field on the Cart and CartLine objects in the Storefront API has been deprecated. Use cost instead to determine the estimated cost that the buyer will pay at checkout.
The 2022-07 version of the Storefront API also changes how discountAllocations on the Cart and CartLine objects are returned:
Cart.discountAllocationsnow returns discount allocations that are applied to the entireCart.CartLine.discountAllocationsnow only returns discount allocations that are applied to the specificCartLine.CartLine.totalnow reflects the line total with only line-level discounts applied. It doesn't include discounts applied to the entireCart.
Anchor to Deprecated properties on the ,[object Object], resource in the REST Admin APIDeprecated properties on the Order resource in the REST Admin API
Order resource in the REST Admin APIAs of API version 2022-07, the following customer object properties on the REST Admin API's Order resource have been deprecated:
last_order_idlast_order_nameorders_counttotal_spent
Use the Customer resource instead to access these properties.
Anchor to EnhancementsEnhancements
As of API version 2022-07 all GraphQL schemas will start using the @deprecated directive for input fields and arguments which have been deprecated. API versions 2022-04 and below will continue to use the description for deprecation warnings. You should use a GraphQL client that supports deprecated input fields and arguments when using GraphQL API versions 2022-07 or higher.
Anchor to Fulfillment endpoints removed from the REST Admin APIFulfillment endpoints removed from the REST Admin API
As of API version 2022-07, the following endpoints have been removed from the Fulfillment resource in the REST Admin API:
/orders/{order_id}/fulfillments.json/orders/{order_id}/fulfillments/{fulfillment_id}.json/orders/{order_id}/fulfillments/{fulfillment_id}/complete.json/orders/{order_id}/fulfillments/{fulfillment_id}/open.json/orders/{order_id}/fulfillments/{fulfillment_id}/cancel.json
Use the FulfillmentOrder resource instead.
Anchor to Fulfillment types and mutations removed from the GraphQL Admin APIFulfillment types and mutations removed from the Graph QL Admin API
As of API version 2022-07, the following types and mutations have been removed from the GraphQL Admin API:
Removed types
DraftFulfillment: UseFulfillmentOrderinstead.
Removed mutations
fulfillmentCreate: UsefulfillmentCreateV2instead.fulfillmentTrackingInfoUpdate: UsefulfillmentTrackingInfoUpdateV2instead.
Anchor to MetafieldsMetafields
As of API version 2022-07, the HasMetafields.metafields paginated connection in the Storefront API is deprecated. Previously, this connection enabled you to paginate over all visible metafields in a given resource.
HasMetafields.metafields now accepts a list of metafield namespaces and keys, and returns a list of associated metafields that match the given namespaces and keys.
For more information, refer to the HasMetafields interface.
Anchor to Removed checkout mutationsRemoved checkout mutations
As of API version 2022-07, the following mutations have been removed from the Storefront API:
checkoutGiftCardApply: Use checkoutGiftCardAppend instead.checkoutGiftCardRemove: Use checkoutGiftCardRemoveV2 instead.checkoutEmailUpdate: Use checkoutEmailUpdateV2 instead.checkoutDiscountCodeApply: Use checkoutDiscountCodeApplyV2 instead.checkoutCustomerAssociate: Use checkoutCustomerAssociateV2 instead.checkoutCustomerDisassociate: Use checkoutCustomerDisassociateV2 instead.checkoutCompleteWithTokenizedPayment: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutCompleteWithTokenizedPaymentV2: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutShippingAddressUpdate: Use checkoutShippingAddressUpdateV2 instead.checkoutCompleteWithCreditCard: Use checkoutCompleteWithCreditCardV2 instead.checkoutAttributesUpdate: Use checkoutAttributesUpdateV2 instead.
Anchor to Removed support for XML-format responses and payloadsRemoved support for XML-format responses and payloads
The REST Admin API no longer supports XML-format responses and payloads. Requests that expect an XML response will result in a 404 error. Requests that send an XML payload will result in a 415 error.
If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.
Anchor to Shipping and fulfillmentShipping and fulfillment
As of API version 2022-07, the permitsSkuSharing field was added to the GraphQL Admin API and REST Admin API. If you set permitsSkuSharing to true, then a fulfillment service can stock inventory at multiple fulfillment services or merchant-managed locations.
However, setting permitsSkuSharing to true causes some behavior to break. As a result, the following fields have been deprecated:
| Field | Behavior | What to use instead |
|---|---|---|
fulfillmentService on ProductVariant | If you set fulfillmentService as manual, then it no longer means that a product variant is strictly stocked at a self-managed location.As a result, apps can't use the fulfillmentService alone to determine whether the item is stocked at a third-party location or not. |
|
fulfillmentService on LineItem | When an order is created for a product variant that's stocked at a third-party service that has opted into SKU sharing, then the LineItem.fulfillmentService handle is set to the third-party service.This is different from ProductVariant.fulfillmentService, where the handle is set to manual.Shopify only assigns a given line item to a single location at checkout. As a result, for all orders, lineItem.fulfillmentService will be accurate upon order creation, but it can become inaccurate post-checkout if the merchant takes certain actions. |
|
fulfillmentServiceId on ProductVariantInput | If a merchant updates a product variant's fulfillmentService to a handle that belongs to a third-party service that has opted into SKU sharing, then the request succeeds but the fulfillmentService is set to manual.As a result, the handle is no longer set to the third-party service's handle. | Not applicable |
Anchor to Validation on subscription mutationsValidation on subscription mutations
As of API version 2022-07, the phone field of the delivery address for a subscription is validated on the subscriptionContractCreate and subscriptionDraftUpdate mutations in the GraphQL Admin API.
The validation enables you to confirm that a phone number is properly formatted and prevents errors that might occur when processing subscription payments with invalid data.
Anchor to GraphQL Admin API changesGraph QL Admin API changes
The following are all the changes currently introduced in the 2022-07 version of the GraphQL Admin API.
Anchor to App discount typesApp discount types
As of API version 2022-07, you use the GraphQL Admin API to create a new discount type in your app. Learn how.
New types
AppDiscountTypeobject was addedAppDiscountTypesobject was addedDiscountAutomaticAppobject was addedDiscountAutomaticAppInputinput object was addedDiscountCodeAppobject was addedDiscountCodeAppInputinput object was addedHasMetafieldsinterface was added toDiscountAutomaticNodeobjectHasMetafieldsinterface was added toDiscountCodeNodeobjectHasMetafieldsinterface was added toDiscountNodeobjectHasMetafieldDefinitionsinterface was added toDiscountAutomaticNodeobjectHasMetafieldDefinitionsinterface was added toDiscountCodeNodeobjectHasMetafieldDefinitionsinterface was added toDiscountNodeobjectDISCOUNTvalue was added toMetafieldOwnerTypeenum
New mutations
DiscountCodeAppCreatemutation was addedDiscountCodeAppUpdatemutation was addedDiscountAutomaticAppCreatemutation was addedDiscountAutomaticAppUpdatemutation was added
Anchor to App discount combinations,[object Object]App discount combinations
As of API version 2022-07, you can use the GraphQL Admin API to create discount combinations in your app.
New types
AppDiscountTypeobject was addedAppDiscountTypesobject was addedDiscountAutomaticAppobject was addedDiscountAutomaticAppInputinput object was addedDiscountCombinesWithobject was addedDiscountCombinesWithInputinput object was addedDiscountClassenum was addedDiscountNodeobject was addedDiscountNodeConnectionconnection was addedDiscountNodeEdgeobject was addedDiscountSortKeysenum was addedMerchandiseDiscountClassenum was addedShippingDiscountClassenum was added
New fields
combinesWith and discountClass fields were added to the following objects:
DiscountAutomaticBasicDiscountAutomaticBxgyDiscountCodeBasicDiscountCodeBxgyDiscountCodeFreeShippingPriceRule
New mutations
discountAutomaticAppCreatemutation was addeddiscountAutomaticAppUpdatemutation was added
Anchor to Braintree as a legacy subscription payment gateway,[object Object]Braintree as a legacy subscription payment gateway
Connecting Braintree as a legacy subscription payment gateway is in beta. To use this feature, you need to enable the legacy_subscriptions_braintree beta flag in your store.
As of API version 2022-07, you can connect Braintree as a legacy subscription payment gateway and migrate each pay-as-you-go contract to Shopify. After the migration, you'll use Shopify Payments as the primary payment gateway. For more information, refer to Migrating existing subscription contracts to Shopify.
New types
CustomerPaymentMethodRemoteInputinput object was added
New error codes
braintree_not_enabled_for_subscriptionserror code was added toCustomerPaymentMethodRemoteUserErrorCodeenum
Anchor to Checkout charges for deferred purchase options ,[object Object]Checkout charges for deferred purchase options
As of API version 2022-07, you can set checkout charges for deferred purchase options to secure customers' commitments to orders before the orders are fulfilled. The remaining balance amount is charged at a later date.
New fields
checkoutChargefield was added toSellingPlanobjectcheckoutChargeAmountfield was added toCartEstimatedCostobjectcheckoutChargeAmountfield was added toSellingPlanAllocationobjectremainingBalanceChargeAmountfield was added toSellingPlanAllocationobject
New types
SellingPlanCheckoutChargeobject was addedSellingPlanCheckoutChargeValueunion was addedSellingPlanCheckoutChargeTypeenum was added
Anchor to Customer statisticsCustomer statistics
As of API version 2022-07, you can use the GraphQL Admin API to query customer statistics like predicted spend.
New types
CustomerStatisticsobject was addedCustomerPredictedSpendTierenum was added toCustomerStatisticsobject
New fields
predictedSpendTierfield was added toCustomerStatisticsobjectstatisticsfield was added toCustomerobject
Anchor to Deadlines for fulfillment ordersDeadlines for fulfillment orders
As of API version 2022-07, you can use the GraphQL Admin API to set the latest date and time by which fulfillment orders need to be fulfilled.
New types
FulfillmentOrdersSetFulfillmentDeadlinePayloadpayload was addedFulfillmentOrdersSetFulfillmentDeadlineUserErrorCodeenum was added
New mutation
fulfillmentOrdersSetFulfillmentDeadlinemutation was added
New error code
FULFILLMENT_ORDERS_NOT_FOUNDerror code was added toFulfillmentOrdersSetFulfillmentDeadlineUserErrorCodeenum
Anchor to Deferred purchase options: Pre-order and try before you buyDeferred purchase options: Pre-order and try before you buy
As of API version 2022-07, you can use the GraphQL Admin API to create and manage deferred purchase options to provide merchants and customers with various ways to sell and buy products, beyond the "buy now, pay now, and ship now" experience and subscriptions. Shopify supports pre-orders and try before you buys as use cases for deferred purchase options.
There's no single API to create a specific deferred purchase option. Instead, a deferred purchase option has configurations for pricing, delivery, inventory, and billing policies. For more information, refer to Deferred purchase options.
New fields
categoryfield was added toSellingPlanobjectinventoryPolicyfield was added toSellingPlanobjectfixedfield was added toSellingPlanBillingPolicyInputobjectfixedfield was added toSellingPlanDeliveryPolicyInputobject
New types
SellingPlanCheckoutChargeobject was addedSellingPlanCheckoutChargePercentageValueobject was addedSellingPlanFixedBillingPolicyobject was addedSellingPlanFixedBillingPolicyInputinput object was addedSellingPlanFixedDeliveryPolicyobject was addedSellingPlanFixedDeliveryPolicyInputinput object was addedSellingPlanInventoryPolicyInputinput object was addedSellingPlanCheckoutChargeInputinput object was addedSellingPlanCheckoutChargeValueInputinput object was addedSellingPlanCheckoutChargeTypeenum was addedSellingPlanCheckoutChargeValueunion was addedSellingPlanCategoryenum was addedSellingPlanRemainingBalanceChargeTriggerenum was addedSellingPlanFulfillmentTriggerenum was addedSellingPlanFixedDeliveryPolicyIntentenum was addedSellingPlanFixedDeliveryPolicyPreAnchorBehaviorenum was addedSellingPlanReserveenum was added
New error codes
BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAMEerror code was added toSellingPlanGroupUserErrorCodeenumCHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCHerror code was added toSellingPlanGroupUserErrorCodeenumFULFILLMENT_EXACT_TIME_NOT_ALLOWEDerror code was added toSellingPlanGroupUserErrorCodeenumINCLUSIONerror code was added toSellingPlanGroupUserErrorCodeenumNOT_FOUNDerror code was added toSellingPlanGroupUserErrorCodeenumONLY_NEED_ONE_BILLING_POLICY_TYPEerror code was added toSellingPlanGroupUserErrorCodeenumFULFILLMENT_EXACT_TIME_REQUIREDerror code was added toSellingPlanGroupUserErrorCodeenumONLY_NEED_ONE_CHECKOUT_CHARGE_VALUEerror code was added toSellingPlanGroupUserErrorCodeenumONLY_NEED_ONE_DELIVERY_POLICY_TYPEerror code was added toSellingPlanGroupUserErrorCodeenumONLY_ONE_OF_FIXED_OR_RECURRING_BILLINGerror code was added toSellingPlanGroupUserErrorCodeenumONLY_ONE_OF_FIXED_OR_RECURRING_DELIVERYerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_EXACT_TIME_NOT_ALLOWEDerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_EXACT_TIME_REQUIREDerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_TIME_AFTER_CHECKOUT_MUST_BE_GREATER_THAN_ZEROerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PARTIAL_PERCENTAGE_CHECKOUT_CHARGEerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PRICE_CHECKOUT_CHARGEerror code was added toSellingPlanGroupUserErrorCodeenumREMAINING_BALANCE_CHARGE_TRIGGER_ON_FULL_CHECKOUTerror code was added toSellingPlanGroupUserErrorCodeenumSELLING_PLAN_ANCHORS_NOT_ALLOWEDerror code was added toSellingPlanGroupUserErrorCodeenumSELLING_PLAN_ANCHORS_REQUIREDerror code was added toSellingPlanGroupUserErrorCodeenumSELLING_PLAN_FIXED_PRICING_POLICIES_LIMITerror code was added toSellingPlanGroupUserErrorCodeenumTOO_BIGerror code was added toSellingPlanGroupUserErrorCodeenumWRONG_LENGTHerror code was added toSellingPlanGroupUserErrorCodeenum
Anchor to Delegate access tokens ,[object Object]Delegate access tokens
As of API version 2022-07, you can use the GraphQL Admin API to create a delegate access token. A delegate access token is an access token with a subset of the total permissions of an app. For more information, refer to Delegate OAuth access tokens to subsystems.
New mutation
delegateAccessTokenCreatemutation was added
Anchor to Hold automationsHold automations
As of API version 2022-07, you can use the GraphQL Admin API to hold fulfillments on unvalidated mailing addresses and ensure merchants check prior to requesting fulfillment.
Anchor to Improved RejectionsImproved Rejections
As of API version 2022-07, you can use the GraphQL Admin API fulfillmentOrderRejectFulfillmentRequest mutation has improved rejections with optional arguments.
For more information, refer to the changelog post.
New fields
-
warningsfield was added toFulfillmentOrderLineItemobjectNew arguments
-
reasonargument was added tofulfillmentOrderRejectFulfillmentRequestmutation -
lineItemsargument was added tofulfillmentOrderRejectFulfillmentRequestmutation
Anchor to MIME type for generic filesMIME type for generic files
Use the GraphQL Admin API to specify the Multipurpose Internet Mail Extensions (MIME) type of generic files being created, updated, or deleted. Response bodies return either nil or the MIME type of the generic file, such as model/usd or application/pdf.
New field
mimeTypewas added toGenericFileobject
Anchor to Payment mandates ,[object Object]Payment mandates
A payment mandate is the payment method and permission that a customer gives to the merchant to debit money. As of API version 2022-07, you can use the GraphQL Admin API to use a customer's payment mandate to trigger a payment for the remaining balance on an order or create a payment schedule. For more information, refer to Charging the remaining balance.
Anchor to Payments dispute evidences API ,[object Object]Payments dispute evidences API
As of API version 2022-07, you can use the GraphQL Admin API to manage dispute evidence.
New fields
-
disputefield was added toQueryRoot -
disputeEvidencefield was added toQueryRootNew types
-
ShopifyPaymentsDisputeEvidenceobject was added -
ShopifyPaymentsDisputeFileUploadobject was added -
ShopifyPaymentsDisputeFulfillmentobject was added -
ShopifyPaymentsDisputeEvidenceUpdateInputinput object was added -
ShopifyPaymentsDisputeFileUploadUpdateInputinput object was added -
ShopifyPaymentsDisputeEvidenceFileTypeenum was addedNew mutations
-
disputeEvidenceUpdatemutation was added
Anchor to Removed fulfillment types and mutationsRemoved fulfillment types and mutations
Anchor to BreakingBreaking
As of API version 2022-07, the following types and mutations have been removed from the GraphQL Admin API:
Removed types
-
DraftFulfillment: UseFulfillmentOrderinstead.Removed mutations
-
fulfillmentCreate: UsefulfillmentCreateV2instead. -
fulfillmentTrackingInfoUpdate: UsefulfillmentTrackingInfoUpdateV2instead.
Anchor to Selling plan anchor ,[object Object]Selling plan anchor
As of API version 2022-07, you can use the GraphQL Admin API to specify a fixed cutoff day in subscription apps.
New fields
cutoffDayfield was added toSellingPlanAnchorInputinput objectcutoffDayfield was added toSellingPlanAnchorobject
Anchor to SKU at multiple fulfillment services or merchant-managed locations ,[object Object]SKU at multiple fulfillment services or merchant-managed locations
As of API version 2022-07, you can use the GraphQL Admin API to permit a Stock Keeping Unit (SKU) to be stocked at multiple fulfillment services or merchant-managed locations.
New fields
-
permitsSkuSharingfield was added toFulfillmentServiceobjectNew arguments
-
permitsSkuSharingargument was added tofulfillmentServiceCreatemutation -
permitsSkuSharingargument was added tofulfillmentServiceUpdatemutation
Anchor to Validation on subscription mutationsValidation on subscription mutations
Anchor to BreakingBreaking
As of API version 2022-07, the phone field of the delivery address for a subscription is validated on the subscriptionContractCreate and subscriptionDraftUpdate mutations.
The validation enables you to confirm that a phone number is properly formatted and prevents errors that might occur when processing subscription payments with invalid data.
Anchor to GraphQL Storefront API changesGraph QL Storefront API changes
The following are all the changes currently introduced in the 2022-07 version of the GraphQL Storefront API.
Anchor to App subscriptions ,[object Object]App subscriptions
As of API version 2022-07, you can extend the trial of an app subscription with the AppSubscriptionTrialExtend mutation.
For usage-based app subscriptions, you can now subscribe to the app_subscriptions/approaching_capped_amount webhook topic to get notified when the balance used on an app subscription crosses 90% of the capped amount.
API version 2022-07 enables you to set the replacement behavior for a merchant with an existing subscription by using the replacementBehavior argument that was added to the appSubscriptionCreate mutation. For example you can set the behavior to immediately cancel the merchant's current app subscription and replace it with the newly created app subscription.
New argument
replacementBehaviorargument was added toappSubscriptionCreatemutation
New type
AppSubscriptionReplacementBehaviorenum was added
New mutation
AppSubscriptionTrialExtendmutation was added
Anchor to CartCart
Anchor to BreakingBreaking
As of API version 2022-07, you can query the Cart object to retrieve the total number of items in a cart (totalQuantity).
You can also query the CartLineEstimatedCost object to retrieve the unit price (amount) and the unit price comparisons with other sellers (compareAtAmount) of a merchandise line in a cart. For more information, refer to Support international pricing on storefronts.
Additionally, you can query the attribute field on the Cart and CartLine objects to retrieve attributes associated with the entire cart, or with a cart line.
Breaking changes
The estimatedCost field on the Cart and CartLine objects has been deprecated. Use cost insteed to determine the estimated cost that the buyer will pay at checkout.
The 2022-07 version of the Storefront API also changes how discountAllocations on the Cart and CartLine objects are returned:
Cart.discountAllocationsnow returns discount allocations that are applied to the entireCart.CartLine.discountAllocationsnow only returns discount allocations that are applied to the specificCartLine.CartLine.totalnow reflects the line total with only line-level discounts applied. It doesn't include discounts applied to the entireCart.
New fields
attributefield was added toCartobjectattributefield was added toCartLineobjectdiscountAllocationsfield was added toCartobjectcostfield was added toCartobjectcostfield was added toCartLineobjecttotalQuantityfield was added toCartobjectamountfield was added toCartLineEstimatedCostobjectcompareAtAmountfield was added toCartLineEstimatedCostobject
Deprecated fields
estimatedCostfield has been deprecated on theCartobjectestimatedCostfield has been deprecated on theCartLineobject
Anchor to MetafieldsMetafields
Anchor to BreakingBreaking
As of API version 2022-07, the HasMetafields.metafields paginated connection is deprecated. Previously, this connection enabled you to paginate over all visible metafields in a given resource.
HasMetafields.metafields now accepts a list of metafield namespaces and keys, and returns a list of associated metafields that match the given namespaces and keys.
For more information, refer to the HasMetafields interface.
Anchor to Removed checkout mutationsRemoved checkout mutations
Anchor to BreakingBreaking
As of API version 2022-07, the following mutations have been removed from the Storefront API:
checkoutGiftCardApply: Use checkoutGiftCardAppend instead.checkoutGiftCardRemove: Use checkoutGiftCardRemoveV2 instead.checkoutEmailUpdate: Use checkoutEmailUpdateV2 instead.checkoutDiscountCodeApply: Use checkoutDiscountCodeApplyV2 instead.checkoutCustomerAssociate: Use checkoutCustomerAssociateV2 instead.checkoutCustomerDisassociate: Use checkoutCustomerDisassociateV2 instead.checkoutCompleteWithTokenizedPayment: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutCompleteWithTokenizedPaymentV2: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutShippingAddressUpdate: Use checkoutShippingAddressUpdateV2 instead.checkoutCompleteWithCreditCard: Use checkoutCompleteWithCreditCardV2 instead.checkoutAttributesUpdate: Use checkoutAttributesUpdateV2 instead.
Anchor to URL redirects ,[object Object]URL redirects
As of API version 2022-07, you can query the urlRedirect object to retrieve information about a URL redirect on an online store. For example, you can query both the URL that users are redirected from and the URL where users will be redirected to.
New type
UrlRedirectobject was added
New connection
urlRedirectsconnection was added toQueryRoot
Anchor to GraphQL Function APIs changesGraph QL Function APIs changes
Shopify Functions allow developers to customize the backend logic that powers parts of Shopify. Function APIs are new APIs that are available as of the 2022-07 release. Function APIs let you extend your app code into Shopify. For example, you can use Function APIs to customize many aspects of the checkout experience.
Anchor to Function APIs for discounts ,[object Object]Function APIs for discounts
As of API version 2022-07, the following Function APIs for discounts are available:
- Order Discount API: Create a new type of discount that's applied to all merchandise in the cart.
- Product Discount API: Create a new type of discount that's applied to a particular product or product variant in the cart.
- Shipping Discount API: Create a new type of discount that's applied to one or more shipping rates at checkout.
Learn how to use a Function API to create a new discount type for merchants.
Anchor to REST Admin API changesREST Admin API changes
The following are all the changes currently introduced in the 2022-07 version of the REST Admin API.
Anchor to Deadlines for fulfillment orders ,[object Object]Deadlines for fulfillment orders
As of API version 2022-07, the /set_fulfillment_orders_deadline endpoint has been added to the FulfillmentOrder resource. You can use this endpoint to set the latest date and time by which fulfillment orders need to be fulfilled.
Anchor to Deprecated properties on the Order resourceDeprecated properties on the Order resource
Anchor to BreakingBreaking
As of API version 2022-07, the following customer object properties on the REST Admin API's Order resource have been deprecated:
last_order_idlast_order_nameorders_counttotal_spent
Use the Customer resource instead to access these properties.
Anchor to Payments dispute evidences API ,[object Object]Payments dispute evidences API
As of API version 2022-07, you can use the Rest Admin API to manage dispute evidence.
New resources
dispute_evidencesresource was addeddispute_file_uploadsresource was added
New endpoints
showendpoint was added todispute_evidencesresourceupdateendpoint was added todispute_evidencesresourcecreateendpoint was added todispute_file_uploadsresourcedestroyendpoint was added todispute_file_uploadsresource
Anchor to Removed endpoints on the Fulfillment resourceRemoved endpoints on the Fulfillment resource
Anchor to BreakingBreaking
As of API version 2022-07, the following endpoints have been removed from the Fulfillment resource in the REST Admin API:
POST /orders/{order_id}/fulfillments.jsonPUT/PATCH /orders/{order_id}/fulfillments/{fulfillment_id}.jsonPOST /orders/{order_id}/fulfillments/{fulfillment_id}/complete.jsonPOST /orders/{order_id}/fulfillments/{fulfillment_id}/open.jsonPOST /orders/{order_id}/fulfillments/{fulfillment_id}/cancel.json
Use the FulfillmentOrder resource instead.
Anchor to SKU at multiple fulfillment services or merchant-managed locations ,[object Object]SKU at multiple fulfillment services or merchant-managed locations
As of API version 2022-07, you can use the REST Admin API to permit a Stock Keeping Unit (SKU) to be stocked at multiple fulfillment services or merchant-managed locations.
New properties
permits_sku_sharingproperty was added toFulfillmentServiceresource
Anchor to XML responses and payloadsXML responses and payloads
Anchor to BreakingBreaking
The REST Admin API no longer supports XML-format responses and payloads. Requests that expect an XML response will result in a 404 error. Requests that send an XML payload will result in a 415 error.
If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.