--- title: 2022-07 release notes description: Update your app from API version 2022-04 to 2022-07. api_name: release-notes source_url: html: https://shopify.dev/docs/api/release-notes/previous-versions/2022-07 md: https://shopify.dev/docs/api/release-notes/previous-versions/2022-07.md --- ExpandOn this page * [Breaking changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#breaking-changes) * [Graph​QL Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-admin-api-changes) * [Graph​QL Storefront API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-storefront-api-changes) * [Graph​QL Function APIs changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-function-apis-changes) * [REST Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#rest-admin-api-changes) # 2022-07 release notes Note We're no longer publishing API release notes. Instead, you can find the latest updates on Shopify APIs in our [developer changelog](https://shopify.dev/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](https://shopify.dev/docs/apps/build/discounts). * Set [deadlines for fulfillment orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentOrdersSetFulfillmentDeadline). * Create [discount combinations](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCombinesWith) in your app. * [Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate) and [manage](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupUpdate) deferred purchase options. * Create a [delegate access token](https://shopify.dev/docs/api/admin-graphql/latest/mutations/delegateAccessTokenCreate). * 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](https://shopify.dev/docs/api/admin-graphql/latest/objects/genericfile) being created, updated, or deleted. * Manage [dispute evidence](https://shopify.dev/docs/api/admin-graphql/latest/queries/disputeEvidence). * Use a customer's [payment mandate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateMandatePayment) 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 [`subscriptionContractCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractCreate) and [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftUpdate) mutations. * Specify a fixed cutoff day in subscription apps. * Extend the trial of an app subscription with the [AppSubscriptionTrialExtend](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionTrialExtend) mutation. * 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. * Set the replacement behavior for a merchant with an existing subscription by using the [`replacementBehavior`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate#argument-replacementbehavior) argument that was added to the `appSubscriptionCreate` mutation. GraphQL Storefront API changes: * Query the [`Cart` object](https://shopify.dev/docs/api/storefront/latest/objects/cart) to retrieve the total number of items in a cart (`totalQuantity`) as well as the [`CartLineEstimatedCost` object](https://shopify.dev/docs/api/storefront/latest/objects/cartlineestimatedcost). * [`HasMetafields`](https://shopify.dev/docs/api/storefront/latest/interfaces/hasmetafields) now accepts a list of metafield namespaces and keys, and returns a list of associated metafields that match the given namespaces and keys. `HasMetafields.metafields` paginated connection is deprecated. * Set [checkout charges](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanCheckoutCharge) for deferred purchase options to secure customers' commitments to orders before the orders are fulfilled. * Query the [`urlRedirect`](https://shopify.dev/docs/api/storefront/latest/objects/urlredirect) object to retrieve information about a URL redirect on an online store. GraphQL Function API changes: * Create an [order discount](https://shopify.dev/docs/api/functions/reference/order-discounts) that's applied to all merchandise in the cart. * Create a [product discount](https://shopify.dev/docs/api/functions/reference/product-discounts) that's applied to a particular product or product variant in the cart. * Create a [shipping discount](https://shopify.dev/docs/api/functions/reference/shipping-discounts) that's applied to one or more shipping rates at checkout. REST Admin API changes: * Use the [`/set_fulfillment_orders_deadline`](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder#post-fulfillment-orders-set-fulfillment-orders-deadline) endpoint 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. *** ## 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. ### Cart As of API version 2022-07, the `estimatedCost` field on the [`Cart`](https://shopify.dev/docs/api/storefront/latest/objects/Cart) and [`CartLine`](https://shopify.dev/docs/api/storefront/latest/objects/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.discountAllocations` now returns discount allocations that are applied to the entire `Cart`. * `CartLine.discountAllocations` now only returns discount allocations that are applied to the specific `CartLine`. * `CartLine.total` now reflects the line total with only line-level discounts applied. It doesn't include discounts applied to the entire `Cart`. ### Deprecated properties on the `Order` resource in the REST Admin API As of API version 2022-07, the following `customer` object properties on the REST Admin API's [`Order`](https://shopify.dev/docs/api/admin-rest/latest/resources/order) resource have been deprecated: * `last_order_id` * `last_order_name` * `orders_count` * `total_spent` Use the [`Customer`](https://shopify.dev/docs/api/admin-rest/latest/resources/customer) resource instead to access these properties. ### Enhancements 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. ### Fulfillment 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](https://shopify.dev/docs/api/admin-rest): * `/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`](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder) resource instead. ### Fulfillment 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](https://shopify.dev/docs/api/admin-graphql): **Removed types** * `DraftFulfillment`: Use [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) instead. **Removed mutations** * `fulfillmentCreate`: Use [`fulfillmentCreateV2`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentCreateV2) instead. * `fulfillmentTrackingInfoUpdate`: Use [`fulfillmentTrackingInfoUpdateV2`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdateV2) instead. ### Metafields 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`](https://shopify.dev/docs/api/storefront/latest/interfaces/hasmetafields) interface. ### Removed checkout mutations As of API version 2022-07, the following mutations have been removed from the Storefront API: * `checkoutGiftCardApply`: Use [checkoutGiftCardAppend](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutgiftcardsappend) instead. * `checkoutGiftCardRemove`: Use [checkoutGiftCardRemoveV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutgiftcardremovev2) instead. * `checkoutEmailUpdate`: Use [checkoutEmailUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutemailupdatev2) instead. * `checkoutDiscountCodeApply`: Use [checkoutDiscountCodeApplyV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutdiscountcodeapplyv2) instead. * `checkoutCustomerAssociate`: Use [checkoutCustomerAssociateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcustomerassociatev2) instead. * `checkoutCustomerDisassociate`: Use [checkoutCustomerDisassociateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcustomerdisassociatev2) instead. * `checkoutCompleteWithTokenizedPayment`: Use [checkoutCompleteWithTokenizedPaymentV3](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcompletewithtokenizedpaymentv3) instead. * `checkoutCompleteWithTokenizedPaymentV2`: Use [checkoutCompleteWithTokenizedPaymentV3](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcompletewithtokenizedpaymentv3) instead. * `checkoutShippingAddressUpdate`: Use [checkoutShippingAddressUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutshippingaddressupdatev2) instead. * `checkoutCompleteWithCreditCard`: Use [checkoutCompleteWithCreditCardV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutCompleteWithCreditCardV2) instead. * `checkoutAttributesUpdate`: Use [checkoutAttributesUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutAttributesUpdateV2) instead. ### Removed 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. ### Shipping and fulfillment As of API version 2022-07, the `permitsSkuSharing` field was added to the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService#field-fulfillmentservice-permitsskusharing) and [REST Admin API](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentservice#resource-object). 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`- [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) - [REST Admin API](https://shopify.dev/docs/api/admin-rest/latest/resources/product-variant#resource-object) | 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. | * **GraphQL Admin API**: Use [InventoryLevelConnection](https://shopify.dev/docs/api/admin-graphql/latest/connections/InventoryLevelConnection) and [InventoryLevel.location](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel#field-inventorylevel-location). * **REST Admin API**: Use the [InventoryLevel](https://shopify.dev/docs/api/admin-rest/latest/resources/inventorylevel) resource. | | `fulfillmentService` on `LineItem`* [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) * [REST Admin API](https://shopify.dev/docs/api/admin-rest/latest/resources/order) | 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. | - **GraphQL Admin API**: Use [FulfillmentOrder.assignedLocation](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder#field-fulfillmentorder-assignedlocation) - **REST Admin API**: Use [FulfillmentOrder.assigned\_location\_id](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder#resource-object). | | `fulfillmentServiceId` on `ProductVariantInput`- [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductVariantInput#field-productvariantinput-fulfillmentserviceid) | 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 | ### Validation on subscription mutations As of API version 2022-07, the `phone` field of the delivery address for a subscription is validated on the [`subscriptionContractCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractCreate) and [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/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. *** ## Graph​QL Admin API changes The following are all the changes currently introduced in the 2022-07 version of the GraphQL Admin API. ### App 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](https://shopify.dev/docs/apps/build/discounts). **New types** * `AppDiscountType` object was added * `AppDiscountTypes` object was added * `DiscountAutomaticApp` object was added * `DiscountAutomaticAppInput` input object was added * `DiscountCodeApp` object was added * `DiscountCodeAppInput` input object was added * `HasMetafields` interface was added to `DiscountAutomaticNode` object * `HasMetafields` interface was added to `DiscountCodeNode` object * `HasMetafields` interface was added to `DiscountNode` object * `HasMetafieldDefinitions` interface was added to `DiscountAutomaticNode` object * `HasMetafieldDefinitions` interface was added to `DiscountCodeNode` object * `HasMetafieldDefinitions` interface was added to `DiscountNode` object * `DISCOUNT` value was added to `MetafieldOwnerType` enum **New mutations** * `DiscountCodeAppCreate` mutation was added * `DiscountCodeAppUpdate` mutation was added * `DiscountAutomaticAppCreate` mutation was added * `DiscountAutomaticAppUpdate` mutation was added ### 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** * `AppDiscountType` object was added * `AppDiscountTypes` object was added * `DiscountAutomaticApp` object was added * `DiscountAutomaticAppInput` input object was added * `DiscountCombinesWith` object was added * `DiscountCombinesWithInput` input object was added * `DiscountClass` enum was added * `DiscountNode` object was added * `DiscountNodeConnection` connection was added * `DiscountNodeEdge` object was added * `DiscountSortKeys` enum was added * `MerchandiseDiscountClass` enum was added * `ShippingDiscountClass` enum was added **New fields** `combinesWith` and `discountClass` fields were added to the following objects: * `DiscountAutomaticBasic` * `DiscountAutomaticBxgy` * `DiscountCodeBasic` * `DiscountCodeBxgy` * `DiscountCodeFreeShipping` * `PriceRule` **New mutations** * `discountAutomaticAppCreate` mutation was added * `discountAutomaticAppUpdate` mutation was added ### Braintree as a legacy subscription payment gateway Beta 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](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/migrate-to-subscriptions-api/migrate-subscription-contracts). **New types** * `CustomerPaymentMethodRemoteInput` input object was added **New error codes** * `braintree_not_enabled_for_subscriptions` error code was added to `CustomerPaymentMethodRemoteUserErrorCode` enum ### Checkout charges for deferred purchase options As of API version 2022-07, you can set [checkout charges](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanCheckoutCharge) 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** * `checkoutCharge` field was added to `SellingPlan` object * `checkoutChargeAmount` field was added to `CartEstimatedCost` object * `checkoutChargeAmount` field was added to `SellingPlanAllocation` object * `remainingBalanceChargeAmount` field was added to `SellingPlanAllocation` object **New types** * `SellingPlanCheckoutCharge` object was added * `SellingPlanCheckoutChargeValue` union was added * `SellingPlanCheckoutChargeType` enum was added ### Customer statistics As of API version 2022-07, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerStatistics) to query customer statistics like predicted spend. **New types** * `CustomerStatistics` object was added * `CustomerPredictedSpendTier` enum was added to `CustomerStatistics` object **New fields** * `predictedSpendTier` field was added to `CustomerStatistics` object * `statistics` field was added to `Customer`object ### Deadlines for fulfillment orders As of API version 2022-07, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentOrdersSetFulfillmentDeadline) to set the latest date and time by which fulfillment orders need to be fulfilled. **New types** * `FulfillmentOrdersSetFulfillmentDeadlinePayload` payload was added * `FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode` enum was added **New mutation** * `fulfillmentOrdersSetFulfillmentDeadline` mutation was added **New error code** * `FULFILLMENT_ORDERS_NOT_FOUND` error code was added to `FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode` enum ### Deferred purchase options: Pre-order and try before you buy As of API version 2022-07, you can use the GraphQL Admin API to [create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate) and [manage](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupUpdate) 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](https://shopify.dev/docs/apps/build/purchase-options/deferred). **New fields** * `category` field was added to `SellingPlan` object * `inventoryPolicy` field was added to `SellingPlan` object * `fixed` field was added to `SellingPlanBillingPolicyInput` object * `fixed` field was added to `SellingPlanDeliveryPolicyInput` object **New types** * `SellingPlanCheckoutCharge` object was added * `SellingPlanCheckoutChargePercentageValue` object was added * `SellingPlanFixedBillingPolicy` object was added * `SellingPlanFixedBillingPolicyInput` input object was added * `SellingPlanFixedDeliveryPolicy` object was added * `SellingPlanFixedDeliveryPolicyInput` input object was added * `SellingPlanInventoryPolicyInput` input object was added * `SellingPlanCheckoutChargeInput` input object was added * `SellingPlanCheckoutChargeValueInput` input object was added * `SellingPlanCheckoutChargeType` enum was added * `SellingPlanCheckoutChargeValue` union was added * `SellingPlanCategory` enum was added * `SellingPlanRemainingBalanceChargeTrigger` enum was added * `SellingPlanFulfillmentTrigger` enum was added * `SellingPlanFixedDeliveryPolicyIntent` enum was added * `SellingPlanFixedDeliveryPolicyPreAnchorBehavior` enum was added * `SellingPlanReserve` enum was added **New error codes** * `BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME` error code was added to `SellingPlanGroupUserErrorCode` enum * `CHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH` error code was added to `SellingPlanGroupUserErrorCode` enum * `FULFILLMENT_EXACT_TIME_NOT_ALLOWED` error code was added to `SellingPlanGroupUserErrorCode` enum * `INCLUSION` error code was added to `SellingPlanGroupUserErrorCode` enum * `NOT_FOUND` error code was added to `SellingPlanGroupUserErrorCode` enum * `ONLY_NEED_ONE_BILLING_POLICY_TYPE` error code was added to `SellingPlanGroupUserErrorCode` enum * `FULFILLMENT_EXACT_TIME_REQUIRED` error code was added to `SellingPlanGroupUserErrorCode` enum * `ONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE` error code was added to `SellingPlanGroupUserErrorCode` enum * `ONLY_NEED_ONE_DELIVERY_POLICY_TYPE` error code was added to `SellingPlanGroupUserErrorCode` enum * `ONLY_ONE_OF_FIXED_OR_RECURRING_BILLING` error code was added to `SellingPlanGroupUserErrorCode` enum * `ONLY_ONE_OF_FIXED_OR_RECURRING_DELIVERY` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_EXACT_TIME_NOT_ALLOWED` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_EXACT_TIME_REQUIRED` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_TIME_AFTER_CHECKOUT_MUST_BE_GREATER_THAN_ZERO` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PARTIAL_PERCENTAGE_CHECKOUT_CHARGE` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PRICE_CHECKOUT_CHARGE` error code was added to `SellingPlanGroupUserErrorCode` enum * `REMAINING_BALANCE_CHARGE_TRIGGER_ON_FULL_CHECKOUT` error code was added to `SellingPlanGroupUserErrorCode` enum * `SELLING_PLAN_ANCHORS_NOT_ALLOWED` error code was added to `SellingPlanGroupUserErrorCode` enum * `SELLING_PLAN_ANCHORS_REQUIRED` error code was added to `SellingPlanGroupUserErrorCode` enum * `SELLING_PLAN_FIXED_PRICING_POLICIES_LIMIT` error code was added to `SellingPlanGroupUserErrorCode` enum * `TOO_BIG` error code was added to `SellingPlanGroupUserErrorCode` enum * `WRONG_LENGTH` error code was added to `SellingPlanGroupUserErrorCode` enum ### Delegate access tokens As of API version 2022-07, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/mutations/delegateAccessTokenCreate) 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](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/use-delegate-tokens). **New mutation** * `delegateAccessTokenCreate` mutation was added ### Hold automations As of API version 2022-07, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) to hold fulfillments on unvalidated mailing addresses and ensure merchants check prior to requesting fulfillment. ### Improved Rejections As of API version 2022-07, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentOrderRejectFulfillmentRequest) `fulfillmentOrderRejectFulfillmentRequest` mutation has improved rejections with optional arguments. For more information, refer to the [changelog post](https://shopify.dev/changelog/fulfillment-service-sku-sharing). **New fields** * `warnings` field was added to `FulfillmentOrderLineItem` object **New arguments** * `reason` argument was added to `fulfillmentOrderRejectFulfillmentRequest` mutation * `lineItems` argument was added to `fulfillmentOrderRejectFulfillmentRequest` mutation ### MIME type for generic files Use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/genericfile) 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** * `mimeType` was added to `GenericFile` 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](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateMandatePayment) 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](https://shopify.dev/docs/apps/build/purchase-options/deferred#charging-the-remaining-balance). ### Payments dispute evidences API As of API version 2022-07, you can use the GraphQL Admin API to manage dispute evidence. **New fields** * `dispute` field was added to `QueryRoot` * `disputeEvidence` field was added to `QueryRoot` **New types** * `ShopifyPaymentsDisputeEvidence` object was added * `ShopifyPaymentsDisputeFileUpload` object was added * `ShopifyPaymentsDisputeFulfillment` object was added * `ShopifyPaymentsDisputeEvidenceUpdateInput` input object was added * `ShopifyPaymentsDisputeFileUploadUpdateInput` input object was added * `ShopifyPaymentsDisputeEvidenceFileType` enum was added **New mutations** * `disputeEvidenceUpdate` mutation was added ### Removed fulfillment types and mutations #### Breaking As of API version 2022-07, the following types and mutations have been removed from the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql): **Removed types** * `DraftFulfillment`: Use [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) instead. **Removed mutations** * `fulfillmentCreate`: Use [`fulfillmentCreateV2`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentCreateV2) instead. * `fulfillmentTrackingInfoUpdate`: Use [`fulfillmentTrackingInfoUpdateV2`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdateV2) instead. ### 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** * `cutoffDay` field was added to `SellingPlanAnchorInput` input object * `cutoffDay` field was added to `SellingPlanAnchor` 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** * `permitsSkuSharing` field was added to `FulfillmentService` object **New arguments** * `permitsSkuSharing` argument was added to `fulfillmentServiceCreate` mutation * `permitsSkuSharing` argument was added to `fulfillmentServiceUpdate` mutation ### Validation on subscription mutations #### Breaking As of API version 2022-07, the `phone` field of the delivery address for a subscription is validated on the [`subscriptionContractCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractCreate) and [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/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. *** ## Graph​QL Storefront API changes The following are all the changes currently introduced in the 2022-07 version of the GraphQL Storefront API. ### App subscriptions As of API version 2022-07, you can extend the trial of an app subscription with the [AppSubscriptionTrialExtend](https://shopify.dev/docs/api/admin-graphql/latest/mutations/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`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate#argument-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** * `replacementBehavior` argument was added to `appSubscriptionCreate` mutation **New type** * `AppSubscriptionReplacementBehavior` enum was added **New mutation** * `AppSubscriptionTrialExtend` mutation was added ### Cart #### Breaking As of API version 2022-07, you can query the [`Cart` object](https://shopify.dev/docs/api/storefront/latest/objects/cart) to retrieve the total number of items in a cart (`totalQuantity`). You can also query the [`CartLineEstimatedCost` object](https://shopify.dev/docs/api/storefront/latest/objects/cartlineestimatedcost) 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](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing). 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`](https://shopify.dev/docs/api/storefront/latest/objects/Cart) and [`CartLine`](https://shopify.dev/docs/api/storefront/latest/objects/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.discountAllocations` now returns discount allocations that are applied to the entire `Cart`. * `CartLine.discountAllocations` now only returns discount allocations that are applied to the specific `CartLine`. * `CartLine.total` now reflects the line total with only line-level discounts applied. It doesn't include discounts applied to the entire `Cart`. **New fields** * `attribute` field was added to `Cart` object * `attribute` field was added to `CartLine` object * `discountAllocations` field was added to `Cart` object * `cost` field was added to `Cart` object * `cost` field was added to `CartLine` object * `totalQuantity` field was added to `Cart` object * `amount` field was added to `CartLineEstimatedCost` object * `compareAtAmount` field was added to `CartLineEstimatedCost` object **Deprecated fields** * `estimatedCost` field has been deprecated on the `Cart` object * `estimatedCost` field has been deprecated on the `CartLine` object ### Metafields #### Breaking 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`](https://shopify.dev/docs/api/storefront/latest/interfaces/hasmetafields) interface. ### Removed checkout mutations #### Breaking As of API version 2022-07, the following mutations have been removed from the Storefront API: * `checkoutGiftCardApply`: Use [checkoutGiftCardAppend](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutgiftcardsappend) instead. * `checkoutGiftCardRemove`: Use [checkoutGiftCardRemoveV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutgiftcardremovev2) instead. * `checkoutEmailUpdate`: Use [checkoutEmailUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutemailupdatev2) instead. * `checkoutDiscountCodeApply`: Use [checkoutDiscountCodeApplyV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutdiscountcodeapplyv2) instead. * `checkoutCustomerAssociate`: Use [checkoutCustomerAssociateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcustomerassociatev2) instead. * `checkoutCustomerDisassociate`: Use [checkoutCustomerDisassociateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcustomerdisassociatev2) instead. * `checkoutCompleteWithTokenizedPayment`: Use [checkoutCompleteWithTokenizedPaymentV3](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcompletewithtokenizedpaymentv3) instead. * `checkoutCompleteWithTokenizedPaymentV2`: Use [checkoutCompleteWithTokenizedPaymentV3](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutcompletewithtokenizedpaymentv3) instead. * `checkoutShippingAddressUpdate`: Use [checkoutShippingAddressUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutshippingaddressupdatev2) instead. * `checkoutCompleteWithCreditCard`: Use [checkoutCompleteWithCreditCardV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutCompleteWithCreditCardV2) instead. * `checkoutAttributesUpdate`: Use [checkoutAttributesUpdateV2](https://shopify.dev/docs/api/storefront/latest/mutations/checkoutAttributesUpdateV2) instead. ### URL redirects As of API version 2022-07, you can query the [`urlRedirect`](https://shopify.dev/docs/api/storefront/latest/objects/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** * `UrlRedirect` object was added **New connection** * `urlRedirects` connection was added to `QueryRoot` *** ## Graph​QL Function APIs changes [Shopify Functions](https://shopify.dev/docs/api/functions/current) allow developers to customize the backend logic that powers parts of Shopify. [Function APIs](https://shopify.dev/docs/api/functions) 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. ### Function APIs for discounts As of API version 2022-07, the following Function APIs for discounts are available: * **[Order Discount API](https://shopify.dev/docs/api/functions/reference/order-discounts)**: Create a new type of discount that's applied to all merchandise in the cart. * **[Product Discount API](https://shopify.dev/docs/api/functions/reference/product-discounts)**: Create a new type of discount that's applied to a particular product or product variant in the cart. * **[Shipping Discount API](https://shopify.dev/docs/api/functions/reference/shipping-discounts)**: 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](https://shopify.dev/docs/apps/build/discounts). *** ## REST Admin API changes The following are all the changes currently introduced in the 2022-07 version of the REST Admin API. ### Deadlines for fulfillment orders As of API version 2022-07, the [`/set_fulfillment_orders_deadline`](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder#post-fulfillment-orders-set-fulfillment-orders-deadline) endpoint has been added to the [FulfillmentOrder](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder) resource. You can use this endpoint to set the latest date and time by which fulfillment orders need to be fulfilled. ### Deprecated properties on the Order resource #### Breaking As of API version 2022-07, the following `customer` object properties on the REST Admin API's [`Order`](https://shopify.dev/docs/api/admin-rest/latest/resources/order) resource have been deprecated: * `last_order_id` * `last_order_name` * `orders_count` * `total_spent` Use the [`Customer`](https://shopify.dev/docs/api/admin-rest/latest/resources/customer) resource instead to access these properties. ### Payments dispute evidences API As of API version 2022-07, you can use the Rest Admin API to manage dispute evidence. **New resources** * `dispute_evidences` resource was added * `dispute_file_uploads` resource was added **New endpoints** * `show` endpoint was added to `dispute_evidences` resource * `update` endpoint was added to `dispute_evidences` resource * `create` endpoint was added to `dispute_file_uploads` resource * `destroy` endpoint was added to `dispute_file_uploads` resource ### Removed endpoints on the Fulfillment resource #### Breaking As of API version 2022-07, the following endpoints have been removed from the `Fulfillment` resource in the [REST Admin API](https://shopify.dev/docs/api/admin-rest): * `POST /orders/{order_id}/fulfillments.json` * `PUT/PATCH /orders/{order_id}/fulfillments/{fulfillment_id}.json` * `POST /orders/{order_id}/fulfillments/{fulfillment_id}/complete.json` * `POST /orders/{order_id}/fulfillments/{fulfillment_id}/open.json` * `POST /orders/{order_id}/fulfillments/{fulfillment_id}/cancel.json` Use the [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder) resource instead. ### 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_sharing` property was added to `FulfillmentService` resource ### XML responses and payloads #### Breaking 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. *** * [Breaking changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#breaking-changes) * [Graph​QL Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-admin-api-changes) * [Graph​QL Storefront API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-storefront-api-changes) * [Graph​QL Function APIs changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#graphql-function-apis-changes) * [REST Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-07#rest-admin-api-changes)