--- title: 2022-04 release notes description: Update your app from API version 2022-01 to 2022-04. api_name: release-notes source_url: html: 'https://shopify.dev/docs/api/release-notes/previous-versions/2022-04' md: 'https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md' --- ExpandOn this page * [Breaking changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#breaking-changes) * [Graph​QL Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-admin-api-changes) * [Graph​QL Storefront API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-storefront-api-changes) * [Graph​QL Payments Apps API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-payments-apps-api-changes) * [REST Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#rest-admin-api-changes) # 2022-04 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 | | - | - | | April 1, 2022 | July 5, 2023 | The 2022-04 version of Shopify's APIs includes new ways to search and filter customers using customer segments, organize products on storefronts, and manage fulfillment and shipping for specific delivery expectations. The 2022-04 version of Shopify's APIs also includes new ways to manage app subscription discounts, and provides new Storefront API functionality that enables you to retrieve information about delivery methods. **What's new in 2022-04** The following features were added in version 2022-04 of Shopify's APIs. GraphQL Admin API changes: * Read and modify a new [API\_PERMISSION](https://shopify.dev/docs/api/admin-graphql/latest/enums/metafieldownertype#value-apipermission) metafield owner type. * Categorize apps using the [`AppPublicCategory`](https://shopify.dev/docs/api/admin-graphql/latest/enums/apppubliccategory) enum from the [`publicCategory`](https://shopify.dev/docs/api/admin-graphql/latest/objects/app#field-app-publiccategory) field that was added to the [App](https://shopify.dev/docs/api/admin-graphql/latest/objects/app#fields) object. * Give limited-time discounts on app charges using [subscription discounts](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts). * Issue prorated credits for the unused portion of an app subscription by using the [`appSubscriptionCancel`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCancel) mutation. * Search and filter a shop's customers using [customer `segments`](https://shopify.dev/docs/api/admin-graphql/latest/queries/segments). * Retrieve, add, and update the details about a customer's consent to receive marketing material by email using the [`emailMarketingConsent` ](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput#field-customerinput-emailmarketingconsent)field on the [`CustomerInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput) input object. * Embed and retrieve the origin of videos that are hosted outside of Shopify by using the [`embedUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/externalvideo#field-externalvideo-embedurl) field from the [`ExternalVideo`](https://shopify.dev/docs/api/admin-graphql/2022-01/objects/externalvideo) object. * Retrieve the range of time that a delivery is expected to be completed by using the [`maxDeliveryDateTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/deliverymethod#field-deliverymethod-maxdeliverydatetime) and [`minDeliveryDateTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/deliverymethod#field-deliverymethod-mindeliverydatetime) fields that were added to the [`DeliveryMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/deliverymethod) object. * Retrieve the latest date and time that items in a fulfillment order need to be fulfilled by using the [`fulfillBy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder#field-fulfillmentorder-fulfillby) field on the [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder#fields) object. * Create, update, and delete markets and their settings by using the [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) object. * Retrieve [product taxonomy nodes](https://help.shopify.com/txt/product_taxonomy/en.txt?shpxid=965c0c34-6026-4D5A-FDBC-CCC51738E933) using the [`productTaxonomyNodes`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/queryroot#connection-queryroot-producttaxonomynodes) connection. * Retrieve attributes of different media types by using the `originalFileSize` field on the [`GenericFile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/genericfile), [`MediaImage`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MediaImage), and [`Video`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Video) objects, or by using the `duration` field on a [`Video`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Video) object. * Apps installed on [Shopify Plus](https://www.shopify.com/plus) can retrieve information about store staff member Shopify accounts using the [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/staffmember) object. * Identify the sales channel that an order came from by using the [`ChannelInformation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelInformation#field-channelinformation-app) object. * Add custom attributes to subscriptions by using the [`SubscriptionDraft`](https://shopify.dev/docs/api/admin-graphql/latest/objects/subscriptiondraft) and [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/subscriptioncontract) objects. * Calculate fulfillment intervals regardless of whether the attempt to create billing for a subscription was successful by using the `originTime` field that was added to the [`SubscriptionBillingAttempt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/subscriptionbillingattempt) object and the [`SubscriptionBillingAttemptInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/subscriptionbillingattemptinput) input object. GraphQL Storefront API changes: * Query a group of delivery options that are available for the line items in a cart, based on the specified shipping address, by using the [`deliveryGroups`](https://shopify.dev/docs/api/storefront/latest/objects/cart#connection-cart-deliverygroups) connection on the [`Cart`](https://shopify.dev/api/storefront/latest/objects/cart#connections) object. * Retrieve SEO information associated with a collection by using the `seo` field on the [`Collection`](https://shopify.dev/docs/api/storefront/latest/objects/collection) object. * Embed and retrieve the origin of videos that are hosted outside of Shopify by using the [`originURL`](https://shopify.dev/docs/api/storefront/latest/objects/externalvideo#field-externalvideo-originurl) and [`embedUrl`](https://shopify.dev/docs/api/storefront/latest/objects/externalvideo#field-externalvideo-embedurl) fields on the [`ExternalVideo`](https://shopify.dev/docs/api/storefront/latest/objects/externalvideo) object. * [Support multiple languages on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/multiple-languages) by using the [`Language`](https://shopify.dev/docs/api/storefront/latest/objects/language) object. * Replicate a merchant's online store navigation menu on custom storefronts by using the [`menu`](https://shopify.dev/docs/api/storefront/latest/queries/menu) query. * Query Shopify-hosted videos and generic files that are referenced by a metafield in a shop by using the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/latest/unions/metafieldreference) union. * Query the ID of a shop by using the [`id`](https://shopify.dev/docs/api/storefront/latest/objects/shop#field-shop-id) field in the [`Shop`](https://shopify.dev/docs/api/storefront/latest/objects/shop) object. GraphQL Payments Apps API changes: * Mark a payment as pending by using the [`paymentSessionPending`](https://shopify.dev/docs/api/payments-apps/latest/mutations/paymentSessionPending) mutation. REST Admin API changes * Customer saved searches are deprecated. Use the GraphQL customer [`Segment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment) object instead. * Retrieve the range of time that a delivery is expected to be completed, and the latest date and time when all items in a fulfillment order need to be fulfilled, by using the [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-rest/latest/resources/fulfillmentorder) resource. * Retrieve, add, and update information about a customer's consent to receive email marketing by using the `email_marketing_consent` field on the [`Customer`](https://shopify.dev/docs/api/admin-rest/latest/resources/customer) resource. * Identify the sales channel that an order came from by using the [`Checkout`](https://shopify.dev/docs/api/admin-rest/latest/resources/checkout) and [`Order`](https://shopify.dev/docs/api/admin-rest/latest/resources/order#top) resources. *** ## 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. ### Non-encoded object IDs in the Graph​QL Storefront API Most object types in Shopify's GraphQL APIs have an `id` field. The `id` field represents the globally-unique identifier for an individual record. Currently, Shopify serves Base64-encoded object IDs from the supported stable versions of the GraphQL Storefront API. As of January 3, 2022, Shopify began serving non-encoded object IDs from the `unstable` version of the GraphQL Storefront API. The `2022-04` release is the first stable version that doesn't serve Base64-encoded object IDs. If you're caching, persisting to a database, or parsing IDs, then you need to [migrate your app](https://shopify.dev/docs/storefronts/headless/object-ids). ### Saved searches elements removed from the Graph​QL Admin API You can no longer use the following mutations on the `customerSavedSearches` query in the GraphQL Admin API: * `SavedSearchCreate` * `SavedSearchDelete` * `SavedSearchUpdate` Use the following mutations instead: * `SegmentCreate` * `SegmentDelete` * `SegmentUpdate` ### Saved searches elements removed from the REST Admin API The following endpoints were removed from the `CustomerSavedSearch` resource in the REST Admin API: * `search` * `count` * `create` * `destroy` * `index` * `show` * `update` Use the following endpoints instead: * Instead of `search`, use `customerSegmentMembers` * Instead of `count`, use `segmentCount` * Instead of `create`, use `segmentCreate` * Instead of `destroy`, use `segmentDelete` * Instead of `show`, use `segment` * Instead of `update`, use `segmentUpdate` ### Saved search discount elements removed from the Graph​QL Admin API The following types were removed from the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql): * `DiscountCustomerSavedSearches` object * `DiscountCustomerSavedSearchesInput` input object Use the following elements instead: * [`DiscountCustomerSegments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomerSegments) object * [`DiscountCustomerSegmentsInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/discountcustomersegmentsinput) input object ### Saved search fields and properties removed from price rule elements in the Graph​QL Admin API The following fields were removed from the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql): * `savedSearches` field from the [`PriceRuleCustomerSelection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/pricerulecustomerselection) object * `savedSearchesIds` field from the [`PriceRuleCustomerSelectionInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/pricerulecustomerselectioninput) input object Use the following fields instead: * `segments` field from the [`PriceRuleCustomerSelection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/pricerulecustomerselection) object * `segmentIds` field from the [`PriceRuleCustomerSelectionInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/pricerulecustomerselectioninput) input object ### Saved search property removed from Price​Rule element in the Graph​QL Admin API The `prerequisite_saved_search_ids` property from the [`PriceRule`](https://shopify.dev/docs/api/admin-rest/2022-01/resources/pricerule) resource in the [REST Admin API](https://shopify.dev/docs/api/admin-rest) is deprecated. Use the `customer_segment_prerequisite_ids` from the [`PriceRule`](https://shopify.dev/docs/api/admin-rest/2022-01/resources/pricerule) resource instead. ### Deprecated `countries` field in the GraphQL Admin API As of API version 2022-04, the `countries` field on the [`PriceListContextRuleInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/pricelistcontextruleinput) input object is deprecated. Use the `marketId` field instead. ### Deprecated fields on the `Customer` object in the GraphQL Admin API As of API version 2022-04, the following fields on the [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/customer) object are deprecated: * The `totalSpent` and `totalSpentV2` fields were removed. Use the `amountSpent` field instead. * The `ordersCount` field was removed. Use the `numberOfOrders` field instead. * The `hasNote` field was removed. The `note` field is still in use. * The `hasTimelineComment` field was removed. Use the `events` connection and a `query` argument containing `verb:comment`, or look for a `CommentEvent` in the `__typename` of events. ### Deprecated `status` field in the GraphQL Payment Apps API As of API version 2022-04, the `status` field on the [`PaymentSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/PaymentSession), [`RefundSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/RefundSession), [`CaptureSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/CaptureSession), and [`VoidSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/VoidSession) objects is deprecated. Use the `state` field instead. *** ## Graph​QL Admin API changes Below are all the changes currently introduced in the 2022-04 version of the GraphQL Admin API. ### API permission owner type for metafields As of API version 2022-04, a new [`API_PERMISSION`](https://shopify.dev/docs/api/admin-graphql/latest/enums/metafieldownertype) owner type is available for metafields. A metafield with this permission type is only readable and writable by the app that owns the metafield. **New value** * `API_PERMISSION` value was added to `MetafieldOwnerType` enum **New type** * `HasMetafields` interface was added to `AppInstallation` object ### App fields and public category As of API version 2022-04, the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/app) object includes several new fields, including the `publicCategory` field. The `publicCategory` field introduces the [`AppPublicCategory`](https://shopify.dev/docs/api/admin-graphql/latest/enums/apppubliccategory) enum, which represents the public-facing category for an app. **New fields** * `publicCategory` field was added to `App` object * `previouslyInstalled` field was added to `App` object * `webhookApiVersion` field was added to `App` object * `requestedAccessScopes` field was added to `App` object * `availableAccessScopes` field was added to `App` object * `developerType` field was added to `App` object **New types** * `AppPublicCategory` enum was added ### App subscription billing discounts As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscriptionDiscount) to offer limited-time discounts on recurring app charges using the Billing API. You can define either a percentage or a fixed amount discount, which is applied to a designated number of billing intervals. For example, you can apply a 20% discount to six billing cycles. Learn more about [app billing discounts](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts). **New types** * `AppRecurringPricing` object was added * `AppRecurringPricingInput` input object was added * `AppSubscriptionDiscount` object was added * `AppSubscriptionDiscountAmount` object was added * `AppSubscriptionDiscountInput` input object was added * `AppSubscriptionDiscountPercentage` object was added * `AppSubscriptionDiscountValueInput` input object was added * `AppSubscriptionDiscountValue` union was added **New fields** * `discount_value` field was added to `InvoiceCharge` object ### App subscription prorate As of API version 2022-04, you can issue prorated credits for the unused portion of an app subscription when using the [appSubscriptionCancel](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCancel) mutation. **New argument** * `prorate` argument was added to `appSubscriptionCancel` mutation ### Customer segmentation #### Breaking As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql) to search and filter customers using customer segments. For details about the breaking changes that were introduced in this API version, refer to [Breaking changes](#breaking-changes). **Removed fields** * `savedSearches` field was removed from `PriceRuleCustomerSelection` object * `savedSearchesIds` field was removed from `PriceRuleCustomerSelectionInput` input object **Removed types** * `DiscountCustomerSavedSearches` object was removed * `DiscountCustomerSavedSearchesInput` input object was removed **New mutations** * `SegmentCreate` mutation was added * `SegmentDelete` mutation was added * `SegmentUpdate` mutation was added **New types** * `SegmentAssociationFilterValue` object was added * `SegmentAssociationFilter` object was added * `SegmentAttributeStatistics` object was added * `SegmentBooleanFilter` object was added * `CustomerEmailAddress` object was added * `CustomerPhoneNumber` object was added * `SegmentDateFilter` object was added * `DiscountCustomerSegmentsInput` object was added * `DiscountCustomerSegments` object was added * `DiscountCustomerSegments` type was added to `DiscountCustomerSelection` union * `SegmentEnumFilterValue` object was added * `SegmentEnumFilter` object was added * `SegmentEventFilterValue` object was added * `SegmentEventFilter` object was added * `SegmentFloatFilter` object was added * `SegmentIntegerFilter` object was added * `SegmentFilter` interface was added * `CustomerSegmentMember` object was added * `SegmentMigration` object was added * `SegmentValue` object was added * `Segment` object was added * `SegmentMembership` object was added * `SegmentMembershipResponse` object was added * `SegmentStatistics` object was added * `SegmentStringFilterValue` object was added * `SegmentStringFilter` object was added **New values** * `BOTH_CUSTOMER_AND_SEGMENT_PREREQUISITES_SELECTED` value was added to `PriceRuleErrorCode` enum * `BOTH_SAVED_SEARCH_AND_SEGMENT_PREREQUISITES_SELECTED` value was added to `PriceRuleErrorCode` enum * `CUSTOMER_SEGMENT_EXCEEDED_MAX` value was added to `PriceRuleErrorCode` enum * `CUSTOMER_SEGMENT_INVALID` value was added to `PriceRuleErrorCode` enum * `CUSTOMER_SEGMENT_PREREQUISITE_DUPLICATE` value was added to `PriceRuleErrorCode` enum * `CREATED_AT` value was added to `CustomerSortKeys` enum **New fields** * `customerSegments` field was added to `DiscountCustomerSelectionInput` input object * `customerSegmentMembership` field was added to `QueryRoot` object * `segmentCount` field was added to `QueryRoot` object * `segmentIds` field was added to `PriceRuleCustomerSelectionInput` input object * `segment` field was added to `QueryRoot` object * `segments` field was added to `PriceRuleCustomerSelection` object * `unsubscribeUrl` field was added to `Customer` object **New connections** * `CustomerSegmentMemberConnection` connection was added to `CustomerSegmentMember` object * `segmentFilterSuggestions` connection was added to `QueryRoot` object * `segmentFilters` connection was added to `QueryRoot` object * `customerSegmentMembers` connection was added to `QueryRoot` object * `segmentMigrations` connection was added to `QueryRoot` object * `segmentValueSuggestions` connection was added to `QueryRoot` object * `segments` connection was added to `QueryRoot` object ### Deprecated countries field #### Breaking As of API version 2022-04, the `countries` field on the [`PriceListContextRuleInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/pricelistcontextruleinput) input object is deprecated. Use the `marketId` field instead. **Removed fields** * `countries` field was removed from `PriceListContextRuleInput` ### Deprecated fields on Customer #### Breaking As of API version 2022-04, several fields are removed from the [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/customer) object. **Removed fields** * `totalSpent` and `totalSpentV2` fields were removed. Use the `amountSpent` field instead. * `ordersCount` field was removed. Use the `amountSpent` field instead. * `hasNote` field was removed. The `note` field is still in use. * `hasTimelineComment` field was removed. Use the `events` connection and a `query` argument containing `verb:comment`, or look for a `CommentEvent` in the `__typename` of events. ### Email marketing consent As of API version 2022-04 you can use the GraphQL Admin API to retrieve, add, and update the details about a customer's consent to receive marketing material by email using channel-specific fields. You can also subscribe to the `CUSTOMERS_MARKETING_CONSENT_UPDATE` webhook topic to get notified when a customer updates their marketing consent. The `acceptsMarketing`, `acceptsMarketingUpdatedAt`, and `marketingOptInLevel` fields on the `Customer` object and `CustomerInput` input object are deprecated. Use the [`emailMarketingConsent`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput#field-customerinput-emailmarketingconsent) field on the `CustomerInput` input object instead. **Deprecated fields** * `acceptsMarketing` field is deprecated on `Customer`object and `CustomerInput` input object * `acceptsMarketingUpdatedAt` field is deprecated on `Customer`object and `CustomerInput` input object * `marketingOptInLevel` field is deprecated on `Customer`object and `CustomerInput` input object **New types** * `CustomerEmailMarketingConsentState` object was added * `CustomerEmailMarketingConsentInput` input object was added * `CustomerEmailMarketingConsentUpdateInput` input object was added * `CustomerEmailAddressMarketingState` enum was added * `CustomerEmailMarketingConsentUpdateUserErrorCode` enum was added * `CustomerEmailMarketingState` enum was added * `CustomerEmailMarketingConsentUpdatePayload` payload was added **New mutation** * `customerEmailMarketingConsentUpdate` mutation was added **New fields** * `emailMarketingConsent` field was added to `Customer` object * `emailMarketingConsent` field was added to `CustomerInput` input object, for `customerCreate` and `customerUpdate` mutations ### Error codes for translation As of API version 2022-04, the `INVALID_LOCALE_FOR_SHOP` error code on the [`TranslationErrorCode`](https://shopify.dev/docs/api/admin-graphql/latest/enums/translationerrorcode) enum is used to represent all errors related to the `locale` field on the `Translation` object. Previous versions use `INVALID_CODE` for the same errors. ### Externally-hosted videos As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/externalvideo) to query the origin and embed URLs of videos hosted outside of Shopify. **New fields** * `originUrl` field was added to `ExternalVideo` object * `embedUrl` field was added to `ExternalVideo` object ### Fulfillment: Delivery time As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/deliverymethod) to query a range of time when a delivery is expected to be completed. **New fields** * `maxDeliveryDateTime` field was added to `DeliveryMethod` object * `minDeliveryDateTime` field was added to `DeliveryMethod` object ### Fulfillment: Fulfillment time As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorder) to query the latest date and time when all items in a fulfillment order need to be fulfilled. **New fields** * `fulfillBy` field was added to `FulfillmentOrder` object ### Markets As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) to create, update, and delete markets and their settings. A market is a group of one or more regions that you want to target for international sales. **New fields** * `alternateLocales` field was added to `MarketWebPresence` object * `baseCurrency` field was added to `MarketCurrencySettings` object * `code` field was added to `MarketRegionCountry` object * `currencySettings` field was added to `Market` object * `defaultLocale` field was added to `MarketWebPresence` object * `domain` field was added to `MarketWebPresence` object * `enabled` field was added to `Market` object * `localCurrencies` field was added to `MarketCurrencySettings` object * `locale` field was added to `MarketWebPresenceRootUrl` object * `id` field was added to `Market` object * `id` field was added to `MarketRegionCountry` object * `id` field was added to `MarketWebPresence` object * `market` field was added to `MarketWebPresence` object * `market` field was added to `PriceListContextRule` object * `marketId` field was added to `PriceListContextRuleInput` input object * `marketWebPresence `field was added to `Domain` object * `name` field was added to `MarketRegionCountry` object * `pricelist` field was added to `Market` object * `primary` field was added to `Market` object * `rootUrls` field was added to `MarketWebPresence` object * `subfolderSuffix` field was added to `MarketWebPresence` object * `url` field was added to `MarketWebPresenceRootUrl` object * `webPresence` field was added to `Market` object **New connections** * `regions` connection was added to `Market` object **New mutations** * `marketCreate` mutation was added * `marketDelete` mutation was added * `marketCurrencySettingsUpdate` mutation was added * `marketRegionDelete` mutation was added * `marketRegionCreate` mutation was added * `marketRegionsCreate` mutation was added * `marketUpdate` mutation was added * `marketWebPresenceCreate` mutation was added * `marketWebPresenceDelete` mutation was added * `marketWebPresenceUpdate` mutation was added **New error codes** * `CURRENCY_MARKET_MISMATCH` error code was added to `PriceListUserError` user error * `MARKET_CURRENCY_MISMATCH` error code was added to `PriceListUserError` user error * `CONTEXT_RULE_LIMIT_ONE_OPTION` error code was added to `PriceListUserError` user error * `CONTEXT_RULE_MARKET_NOT_FOUND` error code was added to `PriceListUserError` user error * `CONTEXT_RULE_MARKET_TAKEN` error code was added to `PriceListUserError` user error * `CURRENCY_NOT_SUPPORTED` error code was added to `PriceListUserError` user error * `PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET` error code was added to `PriceListUserError` user error **New types** * `CurrencySettings` object was added to `Market` object * `CurrencySettingsUpdateInput` input object was added to `Market` object * `Market` object was added * `MarketCurrencySettingsUserError` user error was added * `MarketCreateInput` input object was added * `MarketRegionCountry` object was added * `MarketUserError` user error was added * `MarketWebPresenceRootUrl` object was added * `RegionCreateInput` input object was added to `Market` object * `WebPresence` object was added to `Market` object * `WebPresenceCreateInput` input object was added to `Market` object * `WebPresenceUpdateInput` input object was added to `Market` object ### Improvements to GraphQL connections As of API version 2022-04, we've added a `nodes` field on the `Connection` object. When you only query `node` on `edges`, you can simplify the query. We've also added the `startCursor` and `endCursor` fields on the `PageInfo` object, which allows you to simplify the shape of return data for pagination. For more information, refer to [Paginating results with GraphQL](https://shopify.dev/docs/api/usage/pagination-graphql). **New fields** * `nodes` field was added to `Connection` object * `startCursor` field was added to `PageInfo` object * `endCursor` field was added to `PageInfo` object ### Metafield definition visibility To allow custom storefronts to display your metafields, you can now use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/metafielddefinition) to toggle Storefront API access to metafield definitions. Metafield definitions enable you to define additional validation constraints for metafields and edit metafield values in context. By default, values for metafields aren't accessible to custom storefronts. Example use cases for accessing the Storefront API might include merchants who sell their Shopify products through a non-Shopify website, a video game, or another custom shopping experience. **New fields** `visibleToStorefrontApi` field was added to the following GraphQL Admin API resources: * `MetafieldDefinition` object * `StandardMetafieldDefinitionTemplate` object * `MetafieldDefinitionInput` input object * `MetafieldDefinitionUpdateInput` input object * `StandardMetafieldDefinitionEnable` mutation [Learn more about metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). ### Metafield definition error codes As of API version 2022-04, we've added an [error code](https://shopify.dev/docs/api/admin-graphql/latest/enums/metafielddefinitioncreateusererrorcode) that returns when a metafield definition is created with invalid characters in the `key` or `namespace` fields. The `namespace` and `key` fields can contain only alphanumeric characters, hyphens, and underscores. **New error code** * `INVALID_CHARACTER` error code was added to `MetafieldDefinitionCreateUserErrorCode` enum ### Metafield element index As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/metafieldssetusererror) to include the element index in metafield error messages when an array element fails validation. **New fields** * `elementIndex` field was added to `MetafieldsSetUserError` object ### Product taxonomy You can now query the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/queries/productTaxonomyNodes) to retrieve the [nodes of a product taxonomy](https://help.shopify.com/txt/product_taxonomy/en.txt?shpxid=965c0c34-6026-4D5A-FDBC-CCC51738E933). This includes all of the [standard and custom product types](https://help.shopify.com/en/manual/products/details/product-type) associated with a product. **New connection** * `productTaxonomyNodes` connection was added to `QueryRoot` ### Rich media enhancements As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/unions/metafieldreference) to query Shopify-hosted videos that are referenced by a metafield in a merchant's store. You can also query specific attributes of media types, such as the original file size of a generic file (for example, a `.pdf` or `json` file), media image, or video. **New types** * `Video` type was added to `MetafieldReference` union * `File` interface type was added to `Video` object **New fields** * `previewImageSource` field was added to `FileUpdateInput` input object * `originalFileSize` field was added to `GenericFile` object * `originalFileSize` field was added to `MediaImage` object * `originalFileSize` field was added to `Video` object * `duration` field was added to `Video` object **New values** * `VIDEO` value was added to `FileContentType` enum **New error codes** * `NON_IMAGE_MEDIA_PER_SHOP_LIMIT_EXCEEDED` error code was added to `FilesUserError` ### Staff member data You can now use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/objects/staffmember) to request data about store staff member Shopify accounts. Plus Only apps installed on [Shopify Plus](https://www.shopify.com/plus) stores can access staff member data. **New object** * `StaffMember` object was added ### Sales channel attribution As of API version 2022-04, you can use the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql) to identify the sales channel that an order came from. For example, you can now identify whether orders made through the Facebook channel app came from Facebook Marketplace, Instagram, or Messenger. Similarly, for orders made through connector apps, you can identify whether orders are attributable to specific sales channels rather than to the connector app. For an order to be correctly attributed to a channel, you need to [register the channels](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link) that your app manages. After your request has been processed, refer to the list of your registered channels in the [Partner Dashboard](https://partners.shopify.com/organizations), on the app's Marketplace extension. From there, set the specified handle as the source\_name in your request. **New objects** * `AvailableChannelDefinitionsByChannel` object was added * `ChannelDefinition` object was added * `ChannelInformation` object was added **New fields** * `channelInformation` field was added to `Order` object * `registeredSourceUrl` field added to `Order` object * `sourceIdentifier` field was added to `Order` object * `sourceName` field was added to `DraftOrderInput` Input objecf * `channelDefinitionsforInstalledChannels` field was added to `Shop` object **New argument** * `sourceName` argument was added to `DraftOrderComplete` mutation ### Subscriptions: Custom attributes As of API version 2022-04, you can add custom attributes to a [subscription draft](https://shopify.dev/docs/api/admin-graphql/latest/objects/subscriptiondraft) or [subscription contract](https://shopify.dev/docs/api/admin-graphql/latest/objects/subscriptioncontract). Custom attributes are copied to new orders that are generated from a subscription contract. **New fields** * `customAttributes` field was added to `SubscriptionDraft` object * `customAttributes` field was added to `SubscriptionDraftInput` input object * `customAttributes` field was added to `SubscriptionContract` object ### Subscriptions: Fulfillment intervals When you [create a subscription billing attempt](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract#step-4-create-a-billing-attempt), you can now calculate fulfillment intervals regardless of whether the attempt was successfully completed. This option prevents fulfillment from being pushed to the next anchor date when billing happens after the current anchor date. **New fields** * `originTime` field was added to `SubscriptionBillingAttempt` object * `originTime` field was added to `SubscriptionBillingAttemptInput` object ### Subscriptions: Payment methods As of API version 2022-04, the [`CustomerPaymentMethodRevocationReason`](https://shopify.dev/docs/api/admin-graphql/latest/enums/customerpaymentmethodrevocationreason) enum includes a new value: `MERGED`. This value is assigned when a customer replaces a payment method with another existing payment method, leaving the revoked payment method with no associated subscription contracts. The associated subscription contracts are migrated to the other payment method. **New value** * `MERGED` value was added to `CustomerPaymentMethodRevocationReason` enum *** ## Graph​QL Storefront API changes Below are all the changes currently introduced in the 2022-04 version of the GraphQL Storefront API. ### Cart As of API version 2022-04, you can use the [GraphQL Storefront API](https://shopify.dev/docs/api/storefront/unstable/objects/cartdeliverygroup) to query a group of delivery options that are available for the line items in a cart, based on the specified shipping address. Delivery groups are only available for logged-in customers that have a full default address. Refer the [cartCreate](https://shopify.dev/docs/api/storefront/latest/mutations/cartCreate#field-cartinput-buyeridentity) and [customerCreate](https://shopify.dev/docs/api/storefront/latest/mutations/customerCreate) mutations to learn more about how to create a cart for a logged-in customer. **New types** * `CartDeliveryGroup` object was added * `CartDeliveryOption` object was added * `deliveryGroups` connection was added to `Cart` object * `DeliveryMethodType` enum was added ### Collections As of API version 2022-04, you can use the [Storefront API](https://shopify.dev/docs/api/storefront/latest/objects/collection) to query SEO information associated with a collection. **New field** * `seo` field was added to `Collection` object ### Externally-hosted videos As of API version 2022-04, you can use the [GraphQL Storefront API](https://shopify.dev/docs/api/storefront/reference/products/externalvideo) to query the origin and embed URLs of videos hosted outside of Shopify. **New field** * `originUrl` field was added to `ExternalVideo` object * `embedUrl` field was added to `ExternalVideo` object ### Filtering data As of API version 2022-04, the [Storefront API](https://shopify.dev/docs/api/storefront/latest/enums/filtertype) includes a `BOOLEAN` value on the `FilterType` enum. The `BOOLEAN` value is assigned when a filter is based off of a `boolean` [metafield type](https://shopify.dev/docs/apps/build/custom-data/metafields/list-of-data-types). **New value** * `BOOLEAN` value was added to `FilterType` enum ### Improvements to GraphQL connections As of API version 2022-04, we've added a `nodes` field on the `Connection` object. When you only query `node` on `edges`, you can simplify the query. We've also added the `startCursor` and `endCursor` fields on the `PageInfo` object, which allows you to simplify the shape of return data for pagination. For more information, refer to [Paginating results with GraphQL](https://shopify.dev/docs/api/usage/pagination-graphql). **New fields** * `nodes` field was added to `Connection` object * `startCursor` field was added to `PageInfo` object * `endCursor` field was added to `PageInfo` object ### Languages As of API version 2022-04, you can use the `inContext` directive to contextualize any query in one of the shop's available languages. You can configure the languages available for each country context [within the shop’s Markets settings](https://help.shopify.com/en/manual/markets/languages/manage-languages#manage-languages-for-markets). You can access a list of available languages using the [`Localization`](https://shopify.dev/docs/api/storefront/latest/objects/localization) object. For more information, refer to [Support multiple languages on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/multiple-languages). **New type** * `Language` object was added **New fields** * `availableLanguages` field was added to `Country` object * `availableLanguages` field was added to `Localization` object * `language` field was added to `Localization` object **New argument** * `language` argument was added to `InContext` directive ### Navigation menu As of API version 2022-04, you can use the [Storefront API](https://shopify.dev/docs/api/storefront/latest/queries/menu) to query a navigation menu by its handle. The [menu](https://shopify.dev/docs/api/storefront/latest/objects/queryroot) field returns a [Menu](https://shopify.dev/docs/api/storefront/latest/queries/menu) object, and can be used to replicate a merchant's online store navigation menu on custom storefronts. **New types** * `Menu` object was added * `MenuItem` object was added * `MenuItemType` enum was added **New field** * `menu` field was added to `QueryRoot` object ### Non-encoded object IDs #### Breaking Most object types in Shopify's GraphQL APIs have an `id` field. The `id` field represents the globally-unique identifier for an individual record. Currently, Shopify serves Base64-encoded object IDs from the supported stable versions of the GraphQL Storefront API. As of January 3, 2022, Shopify began serving non-encoded object IDs from the `unstable` version of the GraphQL Storefront API. The `2022-04` release is the first stable version that doesn't serve Base64-encoded object IDs. If you're caching, persisting to a database, or parsing IDs, then you need to [migrate your app](https://shopify.dev/docs/storefronts/headless/object-ids). ### Rich media enhancements As of API version 2022-04, you can use the [GraphQL Storefront API](https://shopify.dev/docs/api/storefront/latest/unions/metafieldreference) to query Shopify-hosted videos and generic files (for example, `.pdf` and `.json` files) that are referenced by a metafield in a merchant's store. **New types** * `GenericFile` was added * `GenericFile` type was added to `MetafieldReference` union * `Video` type was added to `MetafieldReference` union ### Shop ID As of API version 2022-04, you can use the [GraphQL Storefront API](https://shopify.dev/docs/api/storefront/latest/objects/shop) to query the ID of a shop. **New field** * `id` field was added to `Shop` object *** ## Graph​QL Payments Apps API changes Below are all the changes currently introduced in the 2022-04 version of the GraphQL Payments Apps API. ### Deprecated status field #### Breaking As of API version 2022-04, the `status` field on the [`PaymentSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/PaymentSession), [`RefundSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/RefundSession), [`CaptureSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/CaptureSession), and [`VoidSession`](https://shopify.dev/docs/api/payments-apps/latest/objects/VoidSession) objects is deprecated. Use the `state` field instead. **Removed fields** * `status` field was removed from `PaymentSession` object * `status` field was removed from `RefundSession` object * `status` field was removed from `CaptureSession` object * `status` field was removed from `VoidSession` object **New fields** * `state` field was added to `PaymentSession` object * `state` field was added to `RefundSession` object * `state` field was added to `CaptureSession` object * `state` field was added to `VoidSession` object ### Pending payments As of API version 2022-04, you can use the GraphQL Payments Apps API to [mark an offsite payment as pending](https://shopify.dev/docs/apps/build/payments/offsite/use-the-cli). You can mark a payment as pending if the payment can't be completed within a reasonable amount of time. This means that customers won't need to wait for slow transactions to finish before their order is completed. **New types** * `paymentSessionPending` mutation was added * `PaymentSessionPendingUserError` object was added * `PENDING` value was added to `PaymentSessionStatusCode` enum **New arguments** * `pendingExpiresAt` argument was added to `paymentSessionPending` mutation * `reason` argument was added to `paymentSessionPending` mutation *** ## REST Admin API changes Below are all the changes currently introduced in the 2022-04 version of the REST Admin API. ### Customer segmentation #### Breaking As of API version 2022-04, you can use the [REST Admin API](https://shopify.dev/docs/api/admin-rest) to search for customers using filters. For details about the breaking changes that were introduced in this API version, refer to [Breaking changes](#breaking-changes). **Removed endpoints** * `count` endpoint was removed from `CustomerSavedSearch` resource * `create` endpoint was removed from `CustomerSavedSearch` resource * `destroy` endpoint was removed from `CustomerSavedSearch` resource * `index` endpoint was removed from `CustomerSavedSearch` resource * `search` endpoint was removed from `CustomerSavedSearch` resource * `show` endpoint was removed from `CustomerSavedSearch` resource * `update` endpoint was removed from `CustomerSavedSearch` resource **Removed properties** * `prerequisite_saved_search_ids` property was removed from `PriceRule` resource **New properties** * `customer_segment_prerequisite_ids` property was added to `PriceRule` resource ### Delivery and fulfillment time As of API version 2022-04, you can use the [REST Admin API](https://shopify.dev/docs/api/admin-rest/fulfillmentorder) to query the following information: * A range of time when a delivery is expected to be completed * The latest date and time when all items in a fulfillment order need to be fulfilled **New properties** * `delivery_method.max_delivery_date_time` property was added to `FulfillmentOrder` resource * `delivery_method.min_delivery_date_time` property was added to `FulfillmentOrder` resource * `fulfill_by` property was added to `FulfillmentOrder` resource ### Email marketing consent As of API version 2022-04, you can use the [REST Admin API](https://shopify.dev/docs/api/admin-rest/latest/resources/customer) to retrieve, add, and update the details about a customer's consent to receive marketing material by email using channel-specific fields. You can also subscribe to the `customers_marketing_consent/update` webhook topic to get notified when a customer updates their marketing consent. The `accepts_marketing`, `accepts_marketing_updated_at`, and `marketing_opt_in_level` properties on the `Customer` resource are deprecated. Use the `email_marketing_consent` property instead. **Deprecated properties** * `accepts_marketing` property is deprecated on `Customer` resource * `accepts_marketing_updated_at` property is deprecated on `Customer` resource * `marketing_opt_in_level` property is deprecated on `Customer` resource **New property** * `email_marketing_consent` property was added to `Customer` resource ### Sales channel attribution As of API version 2022-04, you can use the REST Admin API [`Checkout`](https://shopify.dev/docs/api/admin-rest/latest/resources/checkout) and [`Order`](https://shopify.dev/docs/api/admin-rest/latest/resources/order) resources to identify the sales channel that an order came from. For example, you can identify whether orders made through the Facebook channel app came from Facebook Marketplace, Instagram, or Messenger. Similarly, for orders made through connector apps, you can identify whether orders are attributable to specific sales channels rather than to the connector app. For an order to be correctly attributed to a channel, you need to [register the channels](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link) that your app manages. After your request has been processed, refer to the list of your registered channels in the [Partner Dashboard](https://partners.shopify.com/organizations), on the app's Marketplace extension. From there, set the specified handle as the source\_name in your request. **New properties** * `source_identifier` was added to `Checkout` resource * `source_identifier` was added to `Order` resource * `source_name` was added to `Checkout` resource * `source_url` was added to `Checkout` resource * `source_url` was added to `Order` resource *** * [Breaking changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#breaking-changes) * [Graph​QL Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-admin-api-changes) * [Graph​QL Storefront API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-storefront-api-changes) * [Graph​QL Payments Apps API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#graphql-payments-apps-api-changes) * [REST Admin API changes](https://shopify.dev/docs/api/release-notes/previous-versions/2022-04.md#rest-admin-api-changes)