From becdadeb9cfb55c0ac4d35452dcf6fa1fa5722a3 Mon Sep 17 00:00:00 2001 From: wahid Date: Thu, 2 Jul 2026 00:51:53 +0300 Subject: [PATCH 1/4] refactor: migrate TrovesApiService implementation to Apollo and update related imports --- .../kotlin/com/troves/data/di/DataModule.kt | 4 +- .../data/network/ShopifyNetworkClient.kt | 2 +- .../apollo/ApolloTrovesApiServiceImpl.kt | 82 +++++++++++++++++++ .../remote/service/{ => ktor}/AuthPlugin.kt | 2 +- .../service/{ => ktor}/HttpClientExt.kt | 2 +- .../KtorTrovesApiServiceImpl.kt} | 6 +- 6 files changed, 90 insertions(+), 8 deletions(-) create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt rename data/src/commonMain/kotlin/com/troves/data/source/remote/service/{ => ktor}/AuthPlugin.kt (88%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/service/{ => ktor}/HttpClientExt.kt (92%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/service/{TrovesApiServiceImpl.kt => ktor/KtorTrovesApiServiceImpl.kt} (95%) diff --git a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt index 86caafa6..04278b2a 100644 --- a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt +++ b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt @@ -13,7 +13,7 @@ import com.troves.data.source.local.preferenceses.AppPreferencesDataSourceImpl import com.troves.data.source.remote.RemoteDatasource import com.troves.data.source.remote.RemoteDatasourceImpl import com.troves.data.source.remote.service.TrovesApiService -import com.troves.data.source.remote.service.TrovesApiServiceImpl +import com.troves.data.source.remote.service.ktor.KtorTrovesApiServiceImpl import com.troves.domain.repository.AuthenticationRepository import com.troves.domain.repository.CartRepository import com.troves.domain.repository.PaymentRepository @@ -29,7 +29,7 @@ val dataModule = module { // ── Network ─────────────────────────────────────────────────────────────── single { provideHttpClient() } - single { TrovesApiServiceImpl(get()) } + single { KtorTrovesApiServiceImpl(get()) } // ── Remote data source ──────────────────────────────────────────────────── single { RemoteDatasourceImpl(get(), get()) } diff --git a/data/src/commonMain/kotlin/com/troves/data/network/ShopifyNetworkClient.kt b/data/src/commonMain/kotlin/com/troves/data/network/ShopifyNetworkClient.kt index 424618a8..ddde0c4a 100644 --- a/data/src/commonMain/kotlin/com/troves/data/network/ShopifyNetworkClient.kt +++ b/data/src/commonMain/kotlin/com/troves/data/network/ShopifyNetworkClient.kt @@ -1,7 +1,7 @@ package com.troves.data.network import com.troves.data.config.ShopifyConfig -import com.troves.data.source.remote.service.AuthPlugin +import com.troves.data.source.remote.service.ktor.AuthPlugin import io.ktor.client.* import io.ktor.client.plugins.* import io.ktor.client.plugins.contentnegotiation.* diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt new file mode 100644 index 00000000..095513cb --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt @@ -0,0 +1,82 @@ +package com.troves.data.source.remote.service.apollo + +import com.troves.data.source.remote.dto.Collection +import com.troves.data.source.remote.dto.CollectionImage +import com.troves.data.source.remote.dto.CustomCollectionResponse +import com.troves.data.source.remote.dto.MarketingEventsResponse +import com.troves.data.source.remote.dto.ProductDto +import com.troves.data.source.remote.dto.ProductResponse +import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.service.TrovesApiService +import com.troves.domain.entity.Product +import com.troves.domain.entity.ProductSearchParams +import com.troves.domain.utils.Result + +/** + * Copyright (c) 2026 Wahid Ali Wahid Hussien. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Author: Wahid Ali Wahid Hussien + * Created: 02/07/2026 + */ +class ApolloTrovesApiServiceImpl( + +): TrovesApiService{ + override suspend fun createProduct(productDto: ProductDto): Result { + TODO("Not yet implemented") + } + + override suspend fun getAllProducts(): Result { + TODO("Not yet implemented") + } + + override suspend fun getProductsByQuery(queryMap: Map): Result { + TODO("Not yet implemented") + } + + override suspend fun searchProducts(params: ProductSearchParams): Result> { + TODO("Not yet implemented") + } + + override suspend fun getProductImages(productId: String): Result> { + TODO("Not yet implemented") + } + + override suspend fun getProductById(productId: String): Result { + TODO("Not yet implemented") + } + + override suspend fun updateProduct(productId: String) { + TODO("Not yet implemented") + } + + override suspend fun deleteProduct(productDto: ProductDto) { + TODO("Not yet implemented") + } + + override suspend fun getAllBrands(): Result { + TODO("Not yet implemented") + } + + override suspend fun getCategory(): Result { + TODO("Not yet implemented") + } + + override suspend fun getAllEventsById(eventId: String): MarketingEventsResponse { + TODO("Not yet implemented") + } + +} \ No newline at end of file diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/AuthPlugin.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/AuthPlugin.kt similarity index 88% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/service/AuthPlugin.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/AuthPlugin.kt index 5ad38c97..b97e6911 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/AuthPlugin.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/AuthPlugin.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.service +package com.troves.data.source.remote.service.ktor import com.troves.data.config.ShopifyConfig import io.ktor.client.plugins.api.createClientPlugin diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/HttpClientExt.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/HttpClientExt.kt similarity index 92% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/service/HttpClientExt.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/HttpClientExt.kt index cdaba967..7b3a5eaa 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/HttpClientExt.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/HttpClientExt.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.service +package com.troves.data.source.remote.service.ktor import io.ktor.client.HttpClient import io.ktor.client.call.body diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiServiceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt similarity index 95% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiServiceImpl.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt index 6a778d70..3829e573 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiServiceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.service +package com.troves.data.source.remote.service.ktor import com.troves.data.source.remote.dto.Collection import com.troves.data.source.remote.dto.CollectionImage @@ -7,16 +7,16 @@ import com.troves.data.source.remote.dto.MarketingEventsResponse import com.troves.data.source.remote.dto.ProductDto import com.troves.data.source.remote.dto.ProductResponse import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.service.TrovesApiService import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import io.ktor.client.HttpClient import io.ktor.http.HttpMethod -import io.ktor.http.parameters import io.ktor.http.path import com.troves.domain.utils.Result import io.ktor.client.request.parameter -class TrovesApiServiceImpl( +class KtorTrovesApiServiceImpl( private val ktorClient: HttpClient ) : TrovesApiService { override suspend fun createProduct(productDto: ProductDto): Result { From 15028c1a02354f6cb37b474e8f105db630867dbf Mon Sep 17 00:00:00 2001 From: yasse Date: Thu, 2 Jul 2026 02:38:42 +0300 Subject: [PATCH 2/4] refactor: update package structure for DTOs and integrate Apollo client for GraphQL queries --- build.gradle.kts | 1 + data/build.gradle.kts | 12 +- .../commonMain/graphql/GetProducts.graphql | 37 + data/src/commonMain/graphql/schema.graphqls | 14822 ++++++++++++++++ .../kotlin/com/troves/data/di/DataModule.kt | 9 + .../com/troves/data/mapper/HomeMappers.kt | 6 +- .../com/troves/data/network/ApolloClient.kt | 14 + .../data/repository/WishlistRepositoryImpl.kt | 2 +- .../data/source/remote/RemoteDatasource.kt | 16 +- .../source/remote/RemoteDatasourceImpl.kt | 16 +- .../source/remote/service/TrovesApiService.kt | 14 +- .../apollo/ApolloTrovesApiServiceImpl.kt | 108 +- .../service/ktor/KtorTrovesApiServiceImpl.kt | 14 +- .../remote/{ => service/ktor}/dto/Brands.kt | 2 +- .../{ => service/ktor}/dto/Collection.kt | 2 +- .../{ => service/ktor}/dto/MarketingEvent.kt | 2 +- .../{ => service/ktor}/dto/ProductResponse.kt | 2 +- .../ktor}/dto/SingleProductResponse.kt | 2 +- .../{ => service/ktor}/dto/WishlistDto.kt | 2 +- gradle/libs.versions.toml | 12 + .../src/commonMain/kotlin/com/troves/App.kt | 11 +- 21 files changed, 15033 insertions(+), 73 deletions(-) create mode 100644 data/src/commonMain/graphql/GetProducts.graphql create mode 100644 data/src/commonMain/graphql/schema.graphqls create mode 100644 data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/Brands.kt (95%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/Collection.kt (92%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/MarketingEvent.kt (99%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/ProductResponse.kt (98%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/SingleProductResponse.kt (68%) rename data/src/commonMain/kotlin/com/troves/data/source/remote/{ => service/ktor}/dto/WishlistDto.kt (81%) diff --git a/build.gradle.kts b/build.gradle.kts index 72620532..068cf95c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,4 +9,5 @@ plugins { alias(libs.plugins.android.lint) apply false alias(libs.plugins.buildKonfig) apply false alias(libs.plugins.google.services) apply false + alias(libs.plugins.apollo) apply false } \ No newline at end of file diff --git a/data/build.gradle.kts b/data/build.gradle.kts index 1a6e7f45..42538d87 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -1,3 +1,6 @@ +@file:OptIn(ApolloExperimental::class) + +import com.apollographql.apollo.annotations.ApolloExperimental import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING import java.util.Properties @@ -15,6 +18,8 @@ plugins { alias(libs.plugins.kotlinx.serialization) alias(libs.plugins.ksp) alias(libs.plugins.androidx.room) + alias(libs.plugins.apollo) + } room { @@ -92,6 +97,11 @@ kotlin { // Firebase (GitLive KMP SDK — works on both Android & iOS) implementation(libs.firebase.auth) implementation(libs.firebase.firestore) + + // Apollo + implementation(libs.apollo.runtime) + // Memory Cache + implementation(libs.apollo.normalized.cache) } } @@ -148,4 +158,4 @@ buildkonfig { localProperties.getProperty("SHOPIFY_REST_URL") ?: error("SHOPIFY_HOSTNAME not set in local.properties") ) } -} \ No newline at end of file +} diff --git a/data/src/commonMain/graphql/GetProducts.graphql b/data/src/commonMain/graphql/GetProducts.graphql new file mode 100644 index 00000000..157a4674 --- /dev/null +++ b/data/src/commonMain/graphql/GetProducts.graphql @@ -0,0 +1,37 @@ +query GetProducts($first: Int!, $after: String, $sortKey: ProductSortKeys, $reverse: Boolean) { + products(first: $first, after: $after, sortKey: $sortKey, reverse: $reverse) { + edges { + cursor + node { + id + title + handle + vendor + productType + createdAt + updatedAt + tags + priceRange { + minVariantPrice { + amount + currencyCode + } + maxVariantPrice { + amount + currencyCode + } + } + featuredImage { + url + altText + } + } + } + pageInfo { + hasNextPage + hasPreviousPage + startCursor + endCursor + } + } +} diff --git a/data/src/commonMain/graphql/schema.graphqls b/data/src/commonMain/graphql/schema.graphqls new file mode 100644 index 00000000..94f956e3 --- /dev/null +++ b/data/src/commonMain/graphql/schema.graphqls @@ -0,0 +1,14822 @@ +""" +A version of the Shopify API. Each version has a unique handle in date-based format (YYYY-MM) or `unstable` for the development version. + +Shopify guarantees supported versions are stable. Unsupported versions include unstable and release candidate versions. Use the [`publicApiVersions`](https://shopify.dev/docs/api/storefront/current/queries/publicApiVersions) query to retrieve all available versions. Learn more about [Shopify API versioning](https://shopify.dev/docs/api/usage/versioning). +""" +type ApiVersion { + """ + The human-readable name of the version. + """ + displayName: String! + + """ + The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. + """ + handle: String! + + """ + Whether the version is actively supported by Shopify. Supported API versions are guaranteed to be stable. Unsupported API versions include unstable, release candidate, and end-of-life versions that are marked as unsupported. For more information, refer to [Versioning](https://shopify.dev/api/usage/versioning). + """ + supported: Boolean! +} + +""" +The input fields for submitting Apple Pay payment method information for checkout. +""" +input ApplePayWalletContentInput { + """ + The customer's billing address. + """ + billingAddress: MailingAddressInput! + + """ + The data for the Apple Pay wallet. + """ + data: String! + + """ + The header data for the Apple Pay wallet. + """ + header: ApplePayWalletHeaderInput! + + """ + The last digits of the card used to create the payment. + """ + lastDigits: String + + """ + The signature for the Apple Pay wallet. + """ + signature: String! + + """ + The version for the Apple Pay wallet. + """ + version: String! +} + +""" +The input fields for submitting wallet payment method information for checkout. +""" +input ApplePayWalletHeaderInput { + """ + The application data for the Apple Pay wallet. + """ + applicationData: String + + """ + The ephemeral public key for the Apple Pay wallet. + """ + ephemeralPublicKey: String! + + """ + The public key hash for the Apple Pay wallet. + """ + publicKeyHash: String! + + """ + The transaction ID for the Apple Pay wallet. + """ + transactionId: String! +} + +""" +Details about the gift card used on the checkout. +""" +type AppliedGiftCard implements Node { + """ + The amount that was taken from the gift card by applying it. + """ + amountUsed: MoneyV2! + + """ + The amount that was taken from the gift card by applying it. + """ + amountUsedV2: MoneyV2! @deprecated(reason: "Use `amountUsed` instead.") + + """ + The amount left on the gift card. + """ + balance: MoneyV2! + + """ + The amount left on the gift card. + """ + balanceV2: MoneyV2! @deprecated(reason: "Use `balance` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last characters of the gift card. + """ + lastCharacters: String! + + """ + The amount that was applied to the checkout in its currency. + """ + presentmentAmountUsed: MoneyV2! +} + +""" +A post that belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog). Each article includes content with optional HTML formatting, an excerpt for previews, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, and an associated [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image). + +Articles can be organized with tags and include [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) metadata. You can manage [comments](https://shopify.dev/docs/api/storefront/current/objects/Comment) when the blog's comment policy enables them. +""" +type Article implements HasMetafields & Node & OnlineStorePublishable & Trackable { + """ + The article's author. + """ + author: ArticleAuthor! @deprecated(reason: "Use `authorV2` instead.") + + """ + The article's author. + """ + authorV2: ArticleAuthor + + """ + The blog that the article belongs to. + """ + blog: Blog! + + """ + List of comments posted on the article. + """ + comments("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CommentConnection! + + """ + Stripped content of the article, single line with HTML tags removed. + """ + content("Truncates a string after the given length." truncateAt: Int): String! + + """ + The content of the article, complete with HTML formatting. + """ + contentHtml: HTML! + + """ + Stripped excerpt of the article, single line with HTML tags removed. + """ + excerpt("Truncates a string after the given length." truncateAt: Int): String + + """ + The excerpt of the article, complete with HTML formatting. + """ + excerptHtml: HTML + + """ + A human-friendly unique string for the Article automatically generated from its title. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the article. + """ + image: Image + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + """ + onlineStoreUrl: URL + + """ + The date and time when the article was published. + """ + publishedAt: DateTime! + + """ + The article’s SEO information. + """ + seo: SEO + + """ + A categorization that a article can be tagged with. + """ + tags: [String!]! + + """ + The article’s name. + """ + title: String! + + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String +} + +""" +The author of an article. +""" +type ArticleAuthor { + """ + The author's bio. + """ + bio: String + + """ + The author’s email. + """ + email: String! + + """ + The author's first name. + """ + firstName: String! + + """ + The author's last name. + """ + lastName: String! + + """ + The author's full name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple Articles. +""" +type ArticleConnection { + """ + A list of edges. + """ + edges: [ArticleEdge!]! + + """ + A list of the nodes contained in ArticleEdge. + """ + nodes: [Article!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Article and a cursor during pagination. +""" +type ArticleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of ArticleEdge. + """ + node: Article! +} + +""" +The set of valid sort keys for the Article query. +""" +enum ArticleSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `blog_title` value. + """ + BLOG_TITLE + + """ + Sort by the `author` value. + """ + AUTHOR + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A custom key-value pair for storing additional information on [carts](https://shopify.dev/docs/api/storefront/current/objects/Cart), [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine), [orders](https://shopify.dev/docs/api/storefront/current/objects/Order), and [order line items](https://shopify.dev/docs/api/storefront/current/objects/OrderLineItem). Common uses include gift wrapping requests, customer notes, and tracking whether a customer is a first-time buyer. + +Attributes set on a cart carry over to the resulting order after checkout. Use the [`cartAttributesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartAttributesUpdate) mutation to add or modify cart attributes. For a step-by-step guide, see [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). +""" +type Attribute { + """ + The key or name of the attribute. For example, `"customersFirstOrder"`. + """ + key: String! + + """ + The value of the attribute. For example, `"true"`. + """ + value: String +} + +""" +A custom key-value pair that stores additional information on a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart) or [cart line](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Attributes capture additional information like gift messages, special instructions, or custom order details. Learn more about [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). +""" +input AttributeInput { + """ + Key or name of the attribute. + """ + key: String! + + """ + Value of the attribute. + """ + value: String! +} + +""" +An [automatic discount](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) applied to a cart or checkout without requiring a discount code. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface. + +Includes the discount's title, value, and allocation details that specify how the discount amount distributes across entitled line items or shipping lines. +""" +type AutomaticDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Defines the shared fields for items in a shopping cart. Implemented by [`CartLine`](https://shopify.dev/docs/api/storefront/current/objects/CartLine) for individual merchandise and [`ComponentizableCartLine`](https://shopify.dev/docs/api/storefront/current/objects/ComponentizableCartLine) for grouped merchandise like bundles. + +Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan). +""" +interface BaseCartLine implements Node { + """ + An attribute associated with the cart line. + """ + attribute("The key of the attribute." key: String!): Attribute + + """ + The attributes associated with the cart line. Attributes are represented as key-value pairs. + """ + attributes: [Attribute!]! + + """ + The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + """ + cost: CartLineCost! + + """ + The discounts that have been applied to the cart line. + """ + discountAllocations: [CartDiscountAllocation!]! + + """ + The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. + """ + estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The merchandise that the buyer intends to purchase. + """ + merchandise: Merchandise! + + """ + The quantity of the merchandise that the customer intends to purchase. + """ + quantity: Int! + + """ + The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + """ + sellingPlanAllocation: SellingPlanAllocation +} + +""" +An auto-generated type for paginating through multiple BaseCartLines. +""" +type BaseCartLineConnection { + """ + A list of edges. + """ + edges: [BaseCartLineEdge!]! + + """ + A list of the nodes contained in BaseCartLineEdge. + """ + nodes: [BaseCartLine!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one BaseCartLine and a cursor during pagination. +""" +type BaseCartLineEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of BaseCartLineEdge. + """ + node: BaseCartLine! +} + +""" +A blog container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. Stores can have multiple blogs, for example to organize content by topic or purpose. + +Each blog provides access to its articles, contributing [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) objects, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information. You can retrieve articles individually [by handle](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articleByHandle) or as a [paginated list](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articles). +""" +type Blog implements HasMetafields & Node & OnlineStorePublishable { + """ + Find an article by its handle. + """ + articleByHandle("The handle of the article." handle: String!): Article + + """ + List of the blog's articles. + """ + articles("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ArticleSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| author |\n| blog_title |\n| created_at |\n| tag |\n| tag_not |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): ArticleConnection! + + """ + The authors who have contributed to the blog. + """ + authors: [ArticleAuthor!]! + + """ + A human-friendly unique string for the Blog automatically generated from its title. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + """ + onlineStoreUrl: URL + + """ + The blog's SEO information. + """ + seo: SEO + + """ + The blogs’s title. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Blogs. +""" +type BlogConnection { + """ + A list of edges. + """ + edges: [BlogEdge!]! + + """ + A list of the nodes contained in BlogEdge. + """ + nodes: [Blog!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Blog and a cursor during pagination. +""" +type BlogEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of BlogEdge. + """ + node: Blog! +} + +""" +The set of valid sort keys for the Blog query. +""" +enum BlogSortKeys { + """ + Sort by the `handle` value. + """ + HANDLE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Represents `true` or `false` values. +""" +scalar Boolean + +""" +The store's [branding configuration](https://help.shopify.com/manual/promoting-marketing/managing-brand-assets), such as logos, colors, and slogan. Access this through the [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop#field-Shop.fields.brand) object to display consistent brand assets across your storefront. +""" +type Brand { + """ + The colors of the store's brand. + """ + colors: BrandColors! + + """ + The store's cover image. + """ + coverImage: MediaImage + + """ + The store's default logo. + """ + logo: MediaImage + + """ + The store's short description. + """ + shortDescription: String + + """ + The store's slogan. + """ + slogan: String + + """ + The store's preferred logo for square UI elements. + """ + squareLogo: MediaImage +} + +""" +A group of related colors for the shop's brand. +""" +type BrandColorGroup { + """ + The background color. + """ + background: Color + + """ + The foreground color. + """ + foreground: Color +} + +""" +The colors of the shop's brand. +""" +type BrandColors { + """ + The shop's primary brand colors. + """ + primary: [BrandColorGroup!]! + + """ + The shop's secondary brand colors. + """ + secondary: [BrandColorGroup!]! +} + +""" +Identifies a B2B buyer for the [`@inContext`](https://shopify.dev/docs/storefronts/headless/bring-your-own-stack/b2b) directive. Pass this input to contextualize Storefront API queries with data like B2B-specific pricing, quantity rules, and quantity price breaks. + +For B2B customers with access to multiple company locations, include the [`companyLocationId`](https://shopify.dev/docs/api/storefront/latest/input-objects/BuyerInput#fields-companyLocationId) to specify which location they're purchasing for. +""" +input BuyerInput { + """ + The customer access token retrieved from the [Customer Accounts API](https://shopify.dev/docs/api/customer#step-obtain-access-token). + """ + customerAccessToken: String! + + """ + The identifier of the company location. + """ + companyLocationId: ID +} + +""" +Card brand, such as Visa or Mastercard, which can be used for payments. +""" +enum CardBrand { + """ + Visa. + """ + VISA + + """ + Mastercard. + """ + MASTERCARD + + """ + Discover. + """ + DISCOVER + + """ + American Express. + """ + AMERICAN_EXPRESS + + """ + Diners Club. + """ + DINERS_CLUB + + """ + JCB. + """ + JCB +} + +""" +A cart represents the merchandise that a buyer intends to purchase, and the estimated cost associated with the cart, throughout a customer's session. + +Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-checkoutUrl) field to direct buyers to Shopify's web checkout to complete their purchase. + +Learn more about [interacting with carts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). +""" +type Cart implements HasMetafields & Node { + """ + The gift cards that have been applied to the cart. + """ + appliedGiftCards: [AppliedGiftCard!]! + + """ + An attribute associated with the cart. + """ + attribute("The key of the attribute." key: String!): Attribute + + """ + The attributes associated with the cart. Attributes are represented as key-value pairs. + """ + attributes: [Attribute!]! + + """ + Information about the buyer that's interacting with the cart. + """ + buyerIdentity: CartBuyerIdentity! + + """ + The URL of the checkout for the cart. + """ + checkoutUrl: URL! + + """ + The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). + """ + cost: CartCost! + + """ + The date and time when the cart was created. + """ + createdAt: DateTime! + + """ + The delivery properties of the cart. + """ + delivery: CartDelivery! + + """ + The delivery groups available for the cart, based on the buyer identity default + delivery address preference or the default address of the logged-in customer. + """ + deliveryGroups("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Whether to include [carrier-calculated delivery rates](https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/enabling-shipping-carriers) in the response.\n\nBy default, only static shipping rates are returned. This argument requires mandatory usage of the [`@defer` directive](https://shopify.dev/docs/api/storefront#directives).\n\nFor more information, refer to [fetching carrier-calculated rates for the cart using `@defer`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/defer#fetching-carrier-calculated-rates-for-the-cart-using-defer).\n" withCarrierRates: Boolean = false): CartDeliveryGroupConnection! + + """ + The discounts that have been applied to the entire cart. + """ + discountAllocations: [CartDiscountAllocation!]! @deprecated(reason: "Use `cart.lines[].discountAllocations(lineLevelOnly: false)` and `cart.deliveryGroups[].discountAllocations` instead.") + + """ + The case-insensitive discount codes that the customer added at checkout. + """ + discountCodes: [CartDiscountCode!]! + + """ + The estimated costs that the buyer will pay at checkout. The estimated costs are subject to change and changes will be reflected at checkout. The `estimatedCost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). + """ + estimatedCost: CartEstimatedCost! @deprecated(reason: "Use `cost` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of lines containing information about the items the customer intends to purchase. + """ + lines("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): BaseCartLineConnection! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + A note that's associated with the cart. For example, the note can be a personalized message to the buyer. + """ + note: String + + """ + The total number of items in the cart. + """ + totalQuantity: Int! + + """ + The date and time when the cart was updated. + """ + updatedAt: DateTime! +} + +""" +A delivery address of the buyer that is interacting with the cart. +""" +union CartAddress = CartDeliveryAddress + +""" +Specifies a delivery address for a cart. Provide either a [`deliveryAddress`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-deliveryAddress) with full address details, or a [`copyFromCustomerAddressId`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-copyFromCustomerAddressId) to copy from an existing customer address. Used by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput). +""" +input CartAddressInput @oneOf { + """ + A delivery address stored on this cart. + """ + deliveryAddress: CartDeliveryAddressInput + + """ + Copies details from the customer address to an address on this cart. + """ + copyFromCustomerAddressId: ID +} + +""" +Return type for `cartAttributesUpdate` mutation. +""" +type CartAttributesUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +A discount allocation [that applies automatically](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) to a cart line when configured conditions are met. Unlike [`CartCodeDiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/CartCodeDiscountAllocation), automatic discounts don't require customers to enter a code. +""" +type CartAutomaticDiscountAllocation implements CartDiscountAllocation { + """ + The discount that have been applied on the cart line. + """ + discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + + """ + The discounted amount that has been applied to the cart line. + """ + discountedAmount: MoneyV2! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the allocated discount. + """ + title: String! +} + +""" +Return type for `cartBillingAddressUpdate` mutation. +""" +type CartBillingAddressUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Contact information about the buyer interacting with a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. + +For B2B scenarios, the [`purchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.purchasingCompany) field identifies the company and location on whose behalf a business customer purchases. The [`preferences`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.preferences) field stores delivery and wallet settings that prefill checkout fields to streamline the buying process. +""" +type CartBuyerIdentity { + """ + The country where the buyer is located. + """ + countryCode: CountryCode + + """ + The customer account associated with the cart. + """ + customer: Customer + + """ + An ordered set of delivery addresses tied to the buyer that is interacting with the cart. + The rank of the preferences is determined by the order of the addresses in the array. Preferences + can be used to populate relevant fields in the checkout flow. + + As of the `2025-01` release, `buyerIdentity.deliveryAddressPreferences` is deprecated. + Delivery addresses are now part of the `CartDelivery` object and managed with three new mutations: + - `cartDeliveryAddressAdd` + - `cartDeliveryAddressUpdate` + - `cartDeliveryAddressDelete` + """ + deliveryAddressPreferences: [DeliveryAddress!]! @deprecated(reason: "Use `cart.delivery` instead.") + + """ + The email address of the buyer that's interacting with the cart. + """ + email: String + + """ + The phone number of the buyer that's interacting with the cart. + """ + phone: String + + """ + A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. + Preferences are not synced back to the cart if they are overwritten. + """ + preferences: CartPreferences + + """ + The purchasing company associated with the cart. + """ + purchasingCompany: PurchasingCompany +} + +""" +The input fields for identifying the buyer associated with a cart. Buyer identity determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match the customer's shipping address. + +Used by [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) and [`cartBuyerIdentityUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartBuyerIdentityUpdate) to set contact information, location, and checkout preferences. + +> Note: +> Preferences prefill fields at checkout but don't sync back to the cart if overwritten. +""" +input CartBuyerIdentityInput { + """ + The email address of the buyer that is interacting with the cart. + """ + email: String + + """ + The phone number of the buyer that is interacting with the cart. + """ + phone: String + + """ + The company location of the buyer that is interacting with the cart. + """ + companyLocationId: ID + + """ + The country where the buyer is located. + """ + countryCode: CountryCode + + """ + The access token used to identify the customer associated with the cart. + """ + customerAccessToken: String + + """ + An ordered set of delivery addresses tied to the buyer that is interacting with the cart. + The rank of the preferences is determined by the order of the addresses in the array. Preferences + can be used to populate relevant fields in the checkout flow. + + As of the `2025-01` release, `buyerIdentity.deliveryAddressPreferences` is deprecated. + Delivery addresses are now part of the `CartDelivery` object and managed with three new mutations: + - `cartDeliveryAddressAdd` + - `cartDeliveryAddressUpdate` + - `cartDeliveryAddressDelete` + + The input must not contain more than `250` values. + """ + deliveryAddressPreferences: [DeliveryAddressInput!] @deprecated(reason: "Use `cart.delivery` instead.") + + """ + A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. + Preferences are not synced back to the cart if they are overwritten. + """ + preferences: CartPreferencesInput +} + +""" +Return type for `cartBuyerIdentityUpdate` mutation. +""" +type CartBuyerIdentityUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Represents how credit card details are provided for a direct payment. +""" +enum CartCardSource { + """ + The credit card was provided by a third party and vaulted on their system. + Using this value requires a separate permission from Shopify. + """ + SAVED_CREDIT_CARD +} + +""" +Return type for `cartClone` mutation. +""" +type CartClonePayload { + """ + The newly created cart without PII. This is a different cart from the source. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +A discount allocation applied to a cart line when a customer enters a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). +""" +type CartCodeDiscountAllocation implements CartDiscountAllocation { + """ + The code used to apply the discount. + """ + code: String! + + """ + The discount that have been applied on the cart line. + """ + discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + + """ + The discounted amount that has been applied to the cart line. + """ + discountedAmount: MoneyV2! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! +} + +""" +The completion action to checkout a cart. +""" +union CartCompletionAction = CompletePaymentChallenge + +""" +The required completion action to checkout a cart. +""" +type CartCompletionActionRequired { + """ + The action required to complete the cart completion attempt. + """ + action: CartCompletionAction + + """ + The ID of the cart completion attempt. + """ + id: String! +} + +""" +The result of a cart completion attempt. +""" +union CartCompletionAttemptResult = CartCompletionActionRequired|CartCompletionFailed|CartCompletionProcessing|CartCompletionSuccess + +""" +A failed completion to checkout a cart. +""" +type CartCompletionFailed { + """ + The errors that caused the checkout to fail. + """ + errors: [CompletionError!]! + + """ + The ID of the cart completion attempt. + """ + id: String! +} + +""" +A cart checkout completion that's still processing. +""" +type CartCompletionProcessing { + """ + The ID of the cart completion attempt. + """ + id: String! + + """ + The number of milliseconds to wait before polling again. + """ + pollDelay: Int! +} + +""" +A successful completion to checkout a cart and a created order. +""" +type CartCompletionSuccess { + """ + The date and time when the job completed. + """ + completedAt: DateTime + + """ + The ID of the cart completion attempt. + """ + id: String! + + """ + The ID of the order that's created in Shopify. + """ + orderId: ID! + + """ + The URL of the order confirmation in Shopify. + """ + orderUrl: URL! +} + +""" +The estimated costs that a buyer will pay at checkout. The `Cart` object's [`cost`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.cost) field returns this. The costs are subject to change and changes will be reflected at checkout. Costs reflect [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) based on the buyer's context. + +Amounts include the subtotal before taxes and cart-level discounts, the checkout charge amount excluding deferred payments, and the total. The subtotal and total amounts each include a corresponding boolean field indicating whether the value is an estimate. +""" +type CartCost { + """ + The estimated amount, before taxes and discounts, for the customer to pay at checkout. The checkout charge amount doesn't include any deferred payments that'll be paid at a later date. If the cart has no deferred payments, then the checkout charge amount is equivalent to `subtotalAmount`. + """ + checkoutChargeAmount: MoneyV2! + + """ + The amount, before taxes and cart-level discounts, for the customer to pay. + """ + subtotalAmount: MoneyV2! + + """ + Whether the subtotal amount is estimated. + """ + subtotalAmountEstimated: Boolean! + + """ + The total amount for the customer to pay. + """ + totalAmount: MoneyV2! + + """ + Whether the total amount is estimated. + """ + totalAmountEstimated: Boolean! + + """ + The duty amount for the customer to pay at checkout. + """ + totalDutyAmount: MoneyV2 @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + + """ + Whether the total duty amount is estimated. + """ + totalDutyAmountEstimated: Boolean! @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + + """ + The tax amount for the customer to pay at checkout. + """ + totalTaxAmount: MoneyV2 @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + + """ + Whether the total tax amount is estimated. + """ + totalTaxAmountEstimated: Boolean! @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") +} + +""" +Return type for `cartCreate` mutation. +""" +type CartCreatePayload { + """ + The new cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +The discounts automatically applied to the cart line based on prerequisites that have been met. +""" +type CartCustomDiscountAllocation implements CartDiscountAllocation { + """ + The discount that have been applied on the cart line. + """ + discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + + """ + The discounted amount that has been applied to the cart line. + """ + discountedAmount: MoneyV2! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the allocated discount. + """ + title: String! +} + +""" +The delivery properties of the cart. +""" +type CartDelivery { + """ + Selectable addresses to present to the buyer on the cart. + """ + addresses("Filter the addresses by selected status." selected: Boolean = false): [CartSelectableAddress!]! +} + +""" +Represents a mailing address for customers and shipping. +""" +type CartDeliveryAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String + + """ + The first name of the customer. + """ + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted("Whether to include the customer's name in the formatted address." withName: Boolean = false, "Whether to include the customer's company in the formatted address." withCompany: Boolean = true): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + The last name of the customer. + """ + lastName: String + + """ + The latitude coordinate of the customer address. + """ + latitude: Float + + """ + The longitude coordinate of the customer address. + """ + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields to create or update a cart address. +""" +input CartDeliveryAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + countryCode: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Return type for `cartDeliveryAddressesAdd` mutation. +""" +type CartDeliveryAddressesAddPayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartDeliveryAddressesRemove` mutation. +""" +type CartDeliveryAddressesRemovePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartDeliveryAddressesReplace` mutation. +""" +type CartDeliveryAddressesReplacePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartDeliveryAddressesUpdate` mutation. +""" +type CartDeliveryAddressesUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Preferred location used to find the closest pick up point based on coordinates. +""" +type CartDeliveryCoordinatesPreference { + """ + The two-letter code for the country of the preferred location. + + For example, US. + """ + countryCode: CountryCode! + + """ + The geographic latitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + """ + latitude: Float! + + """ + The geographic longitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + """ + longitude: Float! +} + +""" +Preferred location used to find the closest pick up point based on coordinates. +""" +input CartDeliveryCoordinatesPreferenceInput { + """ + The geographic latitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + """ + latitude: Float! + + """ + The geographic longitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + """ + longitude: Float! + + """ + The two-letter code for the country of the preferred location. + + For example, US. + """ + countryCode: CountryCode! +} + +""" +Groups cart line items that share the same delivery destination. Each group provides the available [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) choices for that address, along with the customer's selected option. + +Access through the [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) object's `deliveryGroups` field. Items are grouped by merchandise type (one-time purchase vs subscription), allowing different delivery methods for each. +""" +type CartDeliveryGroup { + """ + A list of cart lines for the delivery group. + """ + cartLines("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): BaseCartLineConnection! + + """ + The destination address for the delivery group. + """ + deliveryAddress: MailingAddress! + + """ + The delivery options available for the delivery group. + """ + deliveryOptions: [CartDeliveryOption!]! + + """ + The type of merchandise in the delivery group. + """ + groupType: CartDeliveryGroupType! + + """ + The ID for the delivery group. + """ + id: ID! + + """ + The selected delivery option for the delivery group. + """ + selectedDeliveryOption: CartDeliveryOption +} + +""" +An auto-generated type for paginating through multiple CartDeliveryGroups. +""" +type CartDeliveryGroupConnection { + """ + A list of edges. + """ + edges: [CartDeliveryGroupEdge!]! + + """ + A list of the nodes contained in CartDeliveryGroupEdge. + """ + nodes: [CartDeliveryGroup!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CartDeliveryGroup and a cursor during pagination. +""" +type CartDeliveryGroupEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of CartDeliveryGroupEdge. + """ + node: CartDeliveryGroup! +} + +""" +Defines what type of merchandise is in the delivery group. +""" +enum CartDeliveryGroupType { + """ + The delivery group only contains subscription merchandise. + """ + SUBSCRIPTION + + """ + The delivery group only contains merchandise that is either a one time purchase or a first delivery of + subscription merchandise. + """ + ONE_TIME_PURCHASE +} + +""" +The input fields for the cart's delivery properties. +""" +input CartDeliveryInput { + """ + Selectable addresses to present to the buyer on the cart. + + The input must not contain more than `250` values. + """ + addresses: [CartSelectableAddressInput!] +} + +""" +A shipping or delivery choice available to customers during checkout. Each option includes a title, estimated cost, and delivery method type such as shipping or local pickup. + +Returned by the [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) object's [`deliveryOptions`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.deliveryOptions) field and [`selectedDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.selectedDeliveryOption) field. +""" +type CartDeliveryOption { + """ + The code of the delivery option. + """ + code: String + + """ + The method for the delivery option. + """ + deliveryMethodType: DeliveryMethodType! + + """ + The description of the delivery option. + """ + description: String + + """ + The estimated cost for the delivery option. + """ + estimatedCost: MoneyV2! + + """ + The unique identifier of the delivery option. + """ + handle: String! + + """ + The title of the delivery option. + """ + title: String +} + +""" +A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. +Preferences are not synced back to the cart if they are overwritten. +""" +type CartDeliveryPreference { + """ + Preferred location used to find the closest pick up point based on coordinates. + """ + coordinates: CartDeliveryCoordinatesPreference + + """ + The preferred delivery methods such as shipping, local pickup or through pickup points. + """ + deliveryMethod: [PreferenceDeliveryMethodType!]! + + """ + The pickup handle prefills checkout fields with the location for either local pickup or pickup points delivery methods. + It accepts both location ID for local pickup and external IDs for pickup points. + """ + pickupHandle: [String!]! +} + +""" +Delivery preferences can be used to prefill the delivery section at checkout. +""" +input CartDeliveryPreferenceInput { + """ + The preferred delivery methods such as shipping, local pickup or through pickup points. + + The input must not contain more than `250` values. + """ + deliveryMethod: [PreferenceDeliveryMethodType!] + + """ + The pickup handle prefills checkout fields with the location for either local pickup or pickup points delivery methods. + It accepts both location ID for local pickup and external IDs for pickup points. + + The input must not contain more than `250` values. + """ + pickupHandle: [String!] + + """ + The coordinates of a delivery location in order of preference. + """ + coordinates: CartDeliveryCoordinatesPreferenceInput +} + +""" +The input fields for submitting direct payment method information for checkout. +""" +input CartDirectPaymentMethodInput { + """ + The customer's billing address. + """ + billingAddress: MailingAddressInput! + + """ + The session ID for the direct payment method used to create the payment. + """ + sessionId: String! + + """ + The source of the credit card payment. + """ + cardSource: CartCardSource + + """ + Indicates if the customer has accepted the subscription terms. Defaults to false. + """ + acceptedSubscriptionTerms: Boolean = false +} + +""" +A common interface for querying discount allocations regardless of how the discount was applied ([automatic](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), or custom). Each implementation represents a different discount source. + +Tracks how a discount distributes across [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Each allocation includes the [`CartDiscountApplication`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountApplication) details, the discounted amount, and whether the discount targets line items or shipping. +""" +interface CartDiscountAllocation { + """ + The discount that have been applied on the cart line. + """ + discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + + """ + The discounted amount that has been applied to the cart line. + """ + discountedAmount: MoneyV2! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! +} + +""" +Captures the intent of a discount source at the time it was applied to a cart. This includes the discount value, how it's allocated across entitled items, and which line types it targets. + +The actual discounted amounts on specific cart lines are represented by [`CartDiscountAllocation`](https://shopify.dev/docs/api/storefront/current/interfaces/CartDiscountAllocation) objects, which reference this application. +""" +type CartDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A discount code applied to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartDiscountCodesUpdate) mutation. + +The [`applicable`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountCode#field-CartDiscountCode.fields.applicable) field indicates whether the code applies to the cart's current contents, which might change as items are added or removed. +""" +type CartDiscountCode { + """ + Whether the discount code is applicable to the cart's current contents. + """ + applicable: Boolean! + + """ + The code for the discount. + """ + code: String! +} + +""" +Return type for `cartDiscountCodesUpdate` mutation. +""" +type CartDiscountCodesUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/current/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields. +""" +enum CartErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value should be less than the maximum value allowed. + """ + LESS_THAN + + """ + Merchandise line was not found in cart. + """ + INVALID_MERCHANDISE_LINE + + """ + Item cannot be purchased as configured. + """ + MERCHANDISE_NOT_APPLICABLE + + """ + Missing discount code. + """ + MISSING_DISCOUNT_CODE + + """ + Missing note. + """ + MISSING_NOTE + + """ + The note length must be below the specified maximum. + """ + NOTE_TOO_LONG + + """ + Delivery group was not found in cart. + """ + INVALID_DELIVERY_GROUP + + """ + Delivery option was not valid. + """ + INVALID_DELIVERY_OPTION + + """ + The delivery group is in a pending state. + """ + PENDING_DELIVERY_GROUPS + + """ + The payment wasn't valid. + """ + INVALID_PAYMENT + + """ + The payment method is not supported. + """ + PAYMENT_METHOD_NOT_SUPPORTED + + """ + The payment method is not applicable. + """ + PAYMENT_METHOD_NOT_APPLICABLE + + """ + The payment is invalid. Deferred payment is required. + """ + INVALID_PAYMENT_DEFERRED_PAYMENT_REQUIRED + + """ + Cannot update payment on an empty cart + """ + INVALID_PAYMENT_EMPTY_CART + + """ + Validation failed. + """ + VALIDATION_CUSTOM + + """ + The metafields were not valid. + """ + INVALID_METAFIELDS + + """ + The customer access token is required when setting a company location. + """ + MISSING_CUSTOMER_ACCESS_TOKEN + + """ + Company location not found or not allowed. + """ + INVALID_COMPANY_LOCATION + + """ + The quantity must be a multiple of the specified increment. + """ + INVALID_INCREMENT + + """ + The quantity must be above the specified minimum for the item. + """ + MINIMUM_NOT_MET + + """ + The quantity must be below the specified maximum for the item. + """ + MAXIMUM_EXCEEDED + + """ + Too many delivery addresses on Cart. + """ + TOO_MANY_DELIVERY_ADDRESSES + + """ + Only one delivery address can be selected. + """ + ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED + + """ + The delivery address was not found. + """ + INVALID_DELIVERY_ADDRESS_ID + + """ + Buyer cannot purchase for company location. + """ + BUYER_CANNOT_PURCHASE_FOR_COMPANY_LOCATION + + """ + Bundles and addons cannot be mixed. + """ + BUNDLES_AND_ADDONS_CANNOT_BE_MIXED + + """ + Cannot reference existing parent lines by variant_id. + """ + PARENT_LINE_INVALID_REFERENCE + + """ + Parent line not found. + """ + PARENT_LINE_NOT_FOUND + + """ + Parent line nesting is too deep or circular. + """ + PARENT_LINE_NESTING_TOO_DEEP + + """ + Nested cartlines are blocked due to an incompatibility. + """ + PARENT_LINE_OPERATION_BLOCKED + + """ + The specified gift card recipient is invalid. + """ + GIFT_CARD_RECIPIENT_INVALID + + """ + The specified address field is required. + """ + ADDRESS_FIELD_IS_REQUIRED + + """ + The specified address field is too long. + """ + ADDRESS_FIELD_IS_TOO_LONG + + """ + The specified address field contains emojis. + """ + ADDRESS_FIELD_CONTAINS_EMOJIS + + """ + The specified address field contains HTML tags. + """ + ADDRESS_FIELD_CONTAINS_HTML_TAGS + + """ + The specified address field contains a URL. + """ + ADDRESS_FIELD_CONTAINS_URL + + """ + The specified address field does not match the expected pattern. + """ + ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN + + """ + The given zip code is invalid for the provided province. + """ + INVALID_ZIP_CODE_FOR_PROVINCE + + """ + The given zip code is invalid for the provided country. + """ + INVALID_ZIP_CODE_FOR_COUNTRY + + """ + The given zip code is unsupported. + """ + ZIP_CODE_NOT_SUPPORTED + + """ + The given province cannot be found. + """ + PROVINCE_NOT_FOUND + + """ + A general error occurred during address validation. + """ + UNSPECIFIED_ADDRESS_ERROR + + """ + Credit card has expired. + """ + PAYMENTS_CREDIT_CARD_BASE_EXPIRED + + """ + Credit card gateway is not supported. + """ + PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED + + """ + Credit card error. + """ + PAYMENTS_CREDIT_CARD_GENERIC + + """ + Credit card month is invalid. + """ + PAYMENTS_CREDIT_CARD_MONTH_INCLUSION + + """ + Credit card number is invalid. + """ + PAYMENTS_CREDIT_CARD_NUMBER_INVALID + + """ + Credit card number format is invalid. + """ + PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT + + """ + Credit card verification value is blank. + """ + PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK + + """ + Credit card verification value is invalid for card type. + """ + PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE + + """ + Credit card has expired. + """ + PAYMENTS_CREDIT_CARD_YEAR_EXPIRED + + """ + Credit card expiry year is invalid. + """ + PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR + + """ + Variant can only be purchased with a selling plan. + """ + VARIANT_REQUIRES_SELLING_PLAN + + """ + Selling plan is not applicable. + """ + SELLING_PLAN_NOT_APPLICABLE + + """ + An error occurred while saving the cart. + """ + SERVICE_UNAVAILABLE + + """ + The cart is too large to save. + """ + CART_TOO_LARGE +} + +""" +The estimated costs that the buyer pays at checkout. Uses [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity) to determine [international pricing](https://shopify.dev/docs/custom-storefronts/internationalization/international-pricing). + +Includes the subtotal, total amount, duties, and taxes. The [`checkoutChargeAmount`](https://shopify.dev/docs/api/storefront/current/objects/CartEstimatedCost#field-CartEstimatedCost.fields.checkoutChargeAmount) field excludes deferred payments that are charged later, making it useful for displaying what the customer pays immediately. +""" +type CartEstimatedCost { + """ + The estimated amount, before taxes and discounts, for the customer to pay at checkout. The checkout charge amount doesn't include any deferred payments that'll be paid at a later date. If the cart has no deferred payments, then the checkout charge amount is equivalent to`subtotal_amount`. + """ + checkoutChargeAmount: MoneyV2! + + """ + The estimated amount, before taxes and discounts, for the customer to pay. + """ + subtotalAmount: MoneyV2! + + """ + The estimated total amount for the customer to pay. + """ + totalAmount: MoneyV2! + + """ + The estimated duty amount for the customer to pay at checkout. + """ + totalDutyAmount: MoneyV2 + + """ + The estimated tax amount for the customer to pay at checkout. + """ + totalTaxAmount: MoneyV2 +} + +""" +The input fields for submitting a billing address without a selected payment method. +""" +input CartFreePaymentMethodInput { + """ + The customer's billing address. + """ + billingAddress: MailingAddressInput! +} + +""" +Return type for `cartGiftCardCodesAdd` mutation. +""" +type CartGiftCardCodesAddPayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartGiftCardCodesRemove` mutation. +""" +type CartGiftCardCodesRemovePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartGiftCardCodesUpdate` mutation. +""" +type CartGiftCardCodesUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +The input fields for creating a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + +Accepts merchandise lines, discount codes, gift card codes, and a note. You can also set custom attributes, metafields, buyer identity for international pricing, and delivery addresses. +""" +input CartInput { + """ + An array of key-value pairs that contains additional information about the cart. + + The input must not contain more than `250` values. + """ + attributes: [AttributeInput!] + + """ + A list of merchandise lines to add to the cart. + + The input must not contain more than `250` values. + """ + lines: [CartLineInput!] + + """ + The case-insensitive discount codes that the customer added at checkout. + + The input must not contain more than `250` values. + """ + discountCodes: [String!] + + """ + The case-insensitive gift card codes. + + The input must not contain more than `250` values. + """ + giftCardCodes: [String!] + + """ + A note that's associated with the cart. For example, the note can be a personalized message to the buyer. + """ + note: String + + """ + The customer associated with the cart. Used to determine [international pricing] + (https://shopify.dev/custom-storefronts/internationalization/international-pricing). + Buyer identity should match the customer's shipping address. + """ + buyerIdentity: CartBuyerIdentityInput + + """ + The delivery-related fields for the cart. + """ + delivery: CartDeliveryInput + + """ + The metafields to associate with this cart. + + The input must not contain more than `250` values. + """ + metafields: [CartInputMetafieldInput!] +} + +""" +The input fields for a cart metafield value to set. + +Cart metafields will be copied to order metafields at order creation time if there is a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. +""" +input CartInputMetafieldInput { + """ + The key name of the metafield. + """ + key: String! + + """ + The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. + """ + value: String! + + """ + The type of data that the cart metafield stores. + The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). + """ + type: String! +} + +""" +An item in a customer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts. + +Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a [`SellingPlanAllocation`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) for purchase options like subscriptions, pre-orders, or try-before-you-buy. The [`instructions`](https://shopify.dev/docs/api/storefront/current/objects/CartLine#field-CartLine.fields.instructions) field indicates whether the line can be removed or have its quantity updated. +""" +type CartLine implements BaseCartLine & Node { + """ + An attribute associated with the cart line. + """ + attribute("The key of the attribute." key: String!): Attribute + + """ + The attributes associated with the cart line. Attributes are represented as key-value pairs. + """ + attributes: [Attribute!]! + + """ + The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + """ + cost: CartLineCost! + + """ + The discounts that have been applied to the cart line. + """ + discountAllocations: [CartDiscountAllocation!]! + + """ + The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. + """ + estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The instructions for the line item. + """ + instructions: CartLineInstructions! + + """ + The merchandise that the buyer intends to purchase. + """ + merchandise: Merchandise! + + """ + The parent of the line item. + """ + parentRelationship: CartLineParentRelationship + + """ + The quantity of the merchandise that the customer intends to purchase. + """ + quantity: Int! + + """ + The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + """ + sellingPlanAllocation: SellingPlanAllocation +} + +""" +Cost breakdown for a single line item in a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). Includes the per-unit price, the subtotal before line-level discounts, and the final total amount the buyer pays. + +The [`compareAtAmountPerQuantity`](https://shopify.dev/docs/api/storefront/current/objects/CartLineCost#field-CartLineCost.fields.compareAtAmountPerQuantity) field shows the original price when the item is on sale, enabling the display of savings to customers. +""" +type CartLineCost { + """ + The amount of the merchandise line. + """ + amountPerQuantity: MoneyV2! + + """ + The compare at amount of the merchandise line. + """ + compareAtAmountPerQuantity: MoneyV2 + + """ + The cost of the merchandise line before line-level discounts. + """ + subtotalAmount: MoneyV2! + + """ + The total cost of the merchandise line. + """ + totalAmount: MoneyV2! +} + +""" +The estimated cost of the merchandise line that the buyer will pay at checkout. +""" +type CartLineEstimatedCost { + """ + The amount of the merchandise line. + """ + amount: MoneyV2! + + """ + The compare at amount of the merchandise line. + """ + compareAtAmount: MoneyV2 + + """ + The estimated cost of the merchandise line before discounts. + """ + subtotalAmount: MoneyV2! + + """ + The estimated total cost of the merchandise line. + """ + totalAmount: MoneyV2! +} + +""" +The input fields for adding a merchandise line to a cart. Each line represents a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) the buyer intends to purchase, along with the quantity and optional [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) for subscriptions. + +Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation when creating a cart with initial items, and the [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesAdd) mutation when adding items to an existing cart. +""" +input CartLineInput { + """ + An array of key-value pairs that contains additional information about the merchandise line. + + The input must not contain more than `250` values. + """ + attributes: [AttributeInput!] + + """ + The quantity of the merchandise. + """ + quantity: Int = 1 + + """ + The ID of the merchandise that the buyer intends to purchase. + """ + merchandiseId: ID! + + """ + The ID of the selling plan that the merchandise is being purchased with. + """ + sellingPlanId: ID + + """ + The parent line item of the cart line. + """ + parent: CartLineParentInput +} + +""" +Represents instructions for a cart line item. +""" +type CartLineInstructions { + """ + Whether the line item can be removed from the cart. + """ + canRemove: Boolean! + + """ + Whether the line item quantity can be updated. + """ + canUpdateQuantity: Boolean! +} + +""" +The parent line item of the cart line. +""" +input CartLineParentInput @oneOf { + """ + The id of the parent line item. + """ + lineId: ID + + """ + The ID of the parent line merchandise. + """ + merchandiseId: ID +} + +""" +Represents the parent relationship of a cart line. +""" +type CartLineParentRelationship { + """ + The parent cart line. + """ + parent: CartLine! +} + +""" +The input fields for updating a merchandise line in a cart. Used by the [`cartLinesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate) mutation. + +Specify the line item's [`id`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineUpdateInput#fields-id) along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan. +""" +input CartLineUpdateInput { + """ + The ID of the merchandise line. + """ + id: ID! + + """ + The quantity of the line item. + """ + quantity: Int + + """ + The ID of the merchandise for the line item. + """ + merchandiseId: ID + + """ + An array of key-value pairs that contains additional information about the merchandise line. + + The input must not contain more than `250` values. + """ + attributes: [AttributeInput!] + + """ + The ID of the selling plan that the merchandise is being purchased with. + """ + sellingPlanId: ID +} + +""" +Return type for `cartLinesAdd` mutation. +""" +type CartLinesAddPayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartLinesRemove` mutation. +""" +type CartLinesRemovePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Return type for `cartLinesUpdate` mutation. +""" +type CartLinesUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +The input fields to delete a cart metafield. +""" +input CartMetafieldDeleteInput { + """ + The ID of the cart resource. + """ + ownerId: ID! + + """ + The key name of the cart metafield. Can either be a composite key (`namespace.key`) or a simple key + that relies on the default app-reserved namespace. + """ + key: String! +} + +""" +Return type for `cartMetafieldDelete` mutation. +""" +type CartMetafieldDeletePayload { + """ + The ID of the deleted cart metafield. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDeleteUserError!]! +} + +""" +The input fields for a cart metafield value to set. +""" +input CartMetafieldsSetInput { + """ + The ID of the cart resource. + """ + ownerId: ID! + + """ + The key name of the cart metafield. This can either be a composite key (`namespace.key`) or a simple key + that relies on the default app-reserved namespace. + """ + key: String! + + """ + The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. + """ + value: String! + + """ + The type of data that the cart metafield stores. + The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). + """ + type: String! +} + +""" +Return type for `cartMetafieldsSet` mutation. +""" +type CartMetafieldsSetPayload { + """ + The list of cart metafields that were set. + """ + metafields: [Metafield!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldsSetUserError!]! +} + +""" +Return type for `cartNoteUpdate` mutation. +""" +type CartNoteUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +An error occurred during the cart operation. +""" +type CartOperationError { + """ + The error code. + """ + code: String! + + """ + The error message. + """ + message: String +} + +""" +The input fields for updating the payment method that will be used to checkout. +""" +input CartPaymentInput { + """ + The amount that the customer will be charged at checkout. + """ + amount: MoneyInput! + + """ + An ID of the order placed on the originating platform. + Note that this value doesn't correspond to the Shopify Order ID. + """ + sourceIdentifier: String + + """ + The input fields to use to checkout a cart without providing a payment method. + Use this payment method input if the total cost of the cart is 0. + """ + freePaymentMethod: CartFreePaymentMethodInput + + """ + The input fields to use when checking out a cart with a direct payment method (like a credit card). + """ + directPaymentMethod: CartDirectPaymentMethodInput + + """ + The input fields to use when checking out a cart with a wallet payment method (like Shop Pay or Apple Pay). + """ + walletPaymentMethod: CartWalletPaymentMethodInput +} + +""" +Return type for `cartPaymentUpdate` mutation. +""" +type CartPaymentUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. +Preferences are not synced back to the cart if they are overwritten. +""" +type CartPreferences { + """ + Delivery preferences can be used to prefill the delivery section in at checkout. + """ + delivery: CartDeliveryPreference + + """ + Wallet preferences are used to populate relevant payment fields in the checkout flow. + Accepted value: `["shop_pay"]`. + """ + wallet: [String!] +} + +""" +The input fields represent preferences for the buyer that is interacting with the cart. +""" +input CartPreferencesInput { + """ + Delivery preferences can be used to prefill the delivery section in at checkout. + """ + delivery: CartDeliveryPreferenceInput + + """ + Wallet preferences are used to populate relevant payment fields in the checkout flow. + Accepted value: `["shop_pay"]`. + + The input must not contain more than `250` values. + """ + wallet: [String!] +} + +""" +Return type for `cartPrepareForCompletion` mutation. +""" +type CartPrepareForCompletionPayload { + """ + The result of cart preparation for completion. + """ + result: CartPrepareForCompletionResult + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! +} + +""" +The result of cart preparation. +""" +union CartPrepareForCompletionResult = CartStatusNotReady|CartStatusReady|CartThrottled + +""" +Return type for `cartRemovePersonalData` mutation. +""" +type CartRemovePersonalDataPayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +A selectable delivery address for a cart. +""" +type CartSelectableAddress { + """ + The delivery address. + """ + address: CartAddress! + + """ + A unique identifier for the address, specific to this cart. + """ + id: ID! + + """ + This delivery address will not be associated with the buyer after a successful checkout. + """ + oneTimeUse: Boolean! + + """ + Sets exactly one address as pre-selected for the buyer. + """ + selected: Boolean! +} + +""" +The input fields for a selectable delivery address to present to the buyer. Used by [`CartDeliveryInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartDeliveryInput) when creating a cart with the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + +You can pre-select an address for the buyer, mark it as one-time use so it isn't saved after checkout, and specify how strictly the address should be validated. +""" +input CartSelectableAddressInput { + """ + Exactly one kind of delivery address. + """ + address: CartAddressInput! + + """ + Sets exactly one address as pre-selected for the buyer. + """ + selected: Boolean + + """ + When true, this delivery address will not be associated with the buyer after a successful checkout. + """ + oneTimeUse: Boolean + + """ + Defines what kind of address validation is requested. + """ + validationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY +} + +""" +The input fields to update a line item on a cart. +""" +input CartSelectableAddressUpdateInput { + """ + The id of the selectable address. + """ + id: ID! + + """ + Exactly one kind of delivery address. + """ + address: CartAddressInput + + """ + Sets exactly one address as pre-selected for the buyer. + """ + selected: Boolean + + """ + When true, this delivery address will not be associated with the buyer after a successful checkout. + """ + oneTimeUse: Boolean + + """ + Defines what kind of address validation is requested. + """ + validationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY +} + +""" +The input fields for updating the selected delivery options for a delivery group. +""" +input CartSelectedDeliveryOptionInput { + """ + The ID of the cart delivery group. + """ + deliveryGroupId: ID! + + """ + The handle of the selected delivery option. + """ + deliveryOptionHandle: String! +} + +""" +Return type for `cartSelectedDeliveryOptionsUpdate` mutation. +""" +type CartSelectedDeliveryOptionsUpdatePayload { + """ + The updated cart. + """ + cart: Cart + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! + + """ + A list of warnings that occurred during the mutation. + """ + warnings: [CartWarning!]! +} + +""" +Cart is not ready for payment update and completion. +""" +type CartStatusNotReady { + """ + The result of cart preparation for completion. + """ + cart: Cart + + """ + The list of errors that caused the cart to not be ready for payment update and completion. + """ + errors: [CartOperationError!]! +} + +""" +Cart is ready for payment update and completion. +""" +type CartStatusReady { + """ + The result of cart preparation for completion. + """ + cart: Cart +} + +""" +Return type for `cartSubmitForCompletion` mutation. +""" +type CartSubmitForCompletionPayload { + """ + The result of cart submission for completion. + """ + result: CartSubmitForCompletionResult + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartUserError!]! +} + +""" +The result of cart submit completion. +""" +union CartSubmitForCompletionResult = SubmitAlreadyAccepted|SubmitFailed|SubmitSuccess|SubmitThrottled + +""" +Response signifying that the access to cart request is currently being throttled. +The client can retry after `poll_after`. +""" +type CartThrottled { + """ + The result of cart preparation for completion. + """ + cart: Cart + + """ + The polling delay. + """ + pollAfter: DateTime! +} + +""" +Represents an error that happens during execution of a cart mutation. +""" +type CartUserError implements DisplayableError { + """ + The error code. + """ + code: CartErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The input fields for submitting wallet payment method information for checkout. +""" +input CartWalletPaymentMethodInput { + """ + The payment method information for the Apple Pay wallet. + """ + applePayWalletContent: ApplePayWalletContentInput + + """ + The payment method information for the Shop Pay wallet. + """ + shopPayWalletContent: ShopPayWalletContentInput +} + +""" +A non-blocking issue that occurred during a cart mutation. Unlike errors, warnings don't prevent the mutation from completing but indicate potential problems that may affect the buyer's experience. + +Each warning includes a code identifying the issue type, a human-readable message, and a target ID pointing to the affected resource. +""" +type CartWarning { + """ + The code of the warning. + """ + code: CartWarningCode! + + """ + The message text of the warning. + """ + message: String! + + """ + The target of the warning. + """ + target: ID! +} + +""" +The code for the cart warning. +""" +enum CartWarningCode { + """ + The merchandise does not have enough stock. + """ + MERCHANDISE_NOT_ENOUGH_STOCK + + """ + The merchandise is out of stock. + """ + MERCHANDISE_OUT_OF_STOCK + + """ + Gift cards are not available as a payment method. + """ + PAYMENTS_GIFT_CARDS_UNAVAILABLE + + """ + A delivery address with the same details already exists on this cart. + """ + DUPLICATE_DELIVERY_ADDRESS + + """ + The discount code cannot be honored. + """ + DISCOUNT_CODE_NOT_HONOURED + + """ + The discount was not found. + """ + DISCOUNT_NOT_FOUND + + """ + The discount is currently inactive. + """ + DISCOUNT_CURRENTLY_INACTIVE + + """ + The discount usage limit has been reached. + """ + DISCOUNT_USAGE_LIMIT_REACHED + + """ + The customer's discount usage limit has been reached. + """ + DISCOUNT_CUSTOMER_USAGE_LIMIT_REACHED + + """ + The customer is not eligible for this discount. + """ + DISCOUNT_CUSTOMER_NOT_ELIGIBLE + + """ + An eligible customer is missing for this discount. + """ + DISCOUNT_ELIGIBLE_CUSTOMER_MISSING + + """ + The quantity is not in range for this discount. + """ + DISCOUNT_QUANTITY_NOT_IN_RANGE + + """ + The purchase is not in range for this discount. + """ + DISCOUNT_PURCHASE_NOT_IN_RANGE + + """ + There are no entitled line items for this discount. + """ + DISCOUNT_NO_ENTITLED_LINE_ITEMS + + """ + There are no entitled shipping lines for this discount. + """ + DISCOUNT_NO_ENTITLED_SHIPPING_LINES + + """ + The purchase type is incompatible with this discount. + """ + DISCOUNT_INCOMPATIBLE_PURCHASE_TYPE + + """ + Only one-time purchase is available for B2B orders. + """ + MERCHANDISE_SELLING_PLAN_NOT_APPLICABLE_ON_COMPANY_LOCATION +} + +""" +A filter used to view a subset of products in a collection matching a specific category value. +""" +input CategoryFilter { + """ + The id of the category to filter on. + """ + id: String! +} + +""" +A group of products [organized by a merchant](https://help.shopify.com/manual/products/collections) to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria. + +Query a collection's products with [filtering options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) like availability, price range, vendor, and tags. Each collection includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, an optional [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image), and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). +""" +type Collection implements HasMetafields & Node & OnlineStorePublishable & Trackable { + """ + Stripped description of the collection, single line with HTML tags removed. + """ + description("Truncates a string after the given length." truncateAt: Int): String! + + """ + The description of the collection, complete with HTML formatting. + """ + descriptionHtml: HTML! + + """ + A human-friendly unique string for the collection automatically generated from its title. + Limit of 255 characters. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Image associated with the collection. + """ + image: Image + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + """ + onlineStoreUrl: URL + + """ + List of products in the collection. + """ + products("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT, "Returns a subset of products matching all product filters.\n\nThe input must not contain more than `250` values." filters: [ProductFilter!]): ProductConnection! + + """ + The collection's SEO information. + """ + seo: SEO! + + """ + The collection’s name. Limit of 255 characters. + """ + title: String! + + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String + + """ + The date and time when the collection was last modified. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Collections. +""" +type CollectionConnection { + """ + A list of edges. + """ + edges: [CollectionEdge!]! + + """ + A list of the nodes contained in CollectionEdge. + """ + nodes: [Collection!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + The total count of Collections. + """ + totalCount: UnsignedInt64! +} + +""" +An auto-generated type which holds one Collection and a cursor during pagination. +""" +type CollectionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of CollectionEdge. + """ + node: Collection! +} + +""" +The set of valid sort keys for the Collection query. +""" +enum CollectionSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A string containing a hexadecimal representation of a color. + +For example, "#6A8D48". +""" +scalar Color + +""" +A comment on an article. +""" +type Comment implements Node { + """ + The comment’s author. + """ + author: CommentAuthor! + + """ + Stripped content of the comment, single line with HTML tags removed. + """ + content("Truncates a string after the given length." truncateAt: Int): String! + + """ + The content of the comment, complete with HTML formatting. + """ + contentHtml: HTML! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The author of a comment. +""" +type CommentAuthor { + """ + The author's email. + """ + email: String! + + """ + The author’s name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple Comments. +""" +type CommentConnection { + """ + A list of edges. + """ + edges: [CommentEdge!]! + + """ + A list of the nodes contained in CommentEdge. + """ + nodes: [Comment!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Comment and a cursor during pagination. +""" +type CommentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of CommentEdge. + """ + node: Comment! +} + +""" +A B2B organization that purchases from the shop. In the Storefront API, company information is accessed through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object on [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity), which provides the associated location and contact for the current purchasing context. + +You can store custom data using [metafields](https://shopify.dev/docs/apps/build/metafields). +""" +type Company implements HasMetafields & Node { + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify. + """ + createdAt: DateTime! + + """ + A unique externally-supplied ID for the company. + """ + externalId: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The name of the company. + """ + name: String! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + """ + updatedAt: DateTime! +} + +""" +A company's main point of contact. +""" +type CompanyContact implements Node { + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was created in Shopify. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The company contact's locale (language). + """ + locale: String + + """ + The company contact's job title. + """ + title: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was last modified. + """ + updatedAt: DateTime! +} + +""" +A branch or office of a [`Company`](https://shopify.dev/docs/api/storefront/current/objects/Company) where B2B customers can place orders. When a B2B customer selects a location after logging in, the Storefront API contextualizes product queries to return location-specific pricing and quantity rules. + +Access through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object, which associates the location with the buyer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). +""" +type CompanyLocation implements HasMetafields & Node { + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was created in Shopify. + """ + createdAt: DateTime! + + """ + A unique externally-supplied ID for the company. + """ + externalId: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The preferred locale of the company location. + """ + locale: String + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The name of the company location. + """ + name: String! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was last modified. + """ + updatedAt: DateTime! +} + +""" +The action for the 3DS payment redirect. +""" +type CompletePaymentChallenge { + """ + The URL for the 3DS payment redirect. + """ + redirectUrl: URL +} + +""" +An error that occurred during a cart completion attempt. +""" +type CompletionError { + """ + The error code. + """ + code: CompletionErrorCode! + + """ + The error message. + """ + message: String +} + +""" +The code of the error that occurred during a cart completion attempt. +""" +enum CompletionErrorCode { + ERROR + + INVENTORY_RESERVATION_ERROR + + PAYMENT_ERROR + + PAYMENT_TRANSIENT_ERROR + + PAYMENT_AMOUNT_TOO_SMALL + + PAYMENT_GATEWAY_NOT_ENABLED_ERROR + + PAYMENT_INSUFFICIENT_FUNDS + + PAYMENT_INVALID_PAYMENT_METHOD + + PAYMENT_INVALID_CURRENCY + + PAYMENT_INVALID_CREDIT_CARD + + PAYMENT_INVALID_BILLING_ADDRESS + + PAYMENT_CARD_DECLINED + + PAYMENT_CALL_ISSUER +} + +""" +Represents information about the grouped merchandise in the cart. +""" +type ComponentizableCartLine implements BaseCartLine & Node { + """ + An attribute associated with the cart line. + """ + attribute("The key of the attribute." key: String!): Attribute + + """ + The attributes associated with the cart line. Attributes are represented as key-value pairs. + """ + attributes: [Attribute!]! + + """ + The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + """ + cost: CartLineCost! + + """ + The discounts that have been applied to the cart line. + """ + discountAllocations: [CartDiscountAllocation!]! + + """ + The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. + """ + estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The components of the line item. + """ + lineComponents: [CartLine!]! + + """ + The merchandise that the buyer intends to purchase. + """ + merchandise: Merchandise! + + """ + The quantity of the merchandise that the customer intends to purchase. + """ + quantity: Int! + + """ + The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + """ + sellingPlanAllocation: SellingPlanAllocation +} + +""" +Details for count of elements. +""" +type Count { + """ + Count of elements. + """ + count: Int! + + """ + Precision of count, how exact is the value. + """ + precision: CountPrecision! +} + +""" +The precision of the value returned by a count field. +""" +enum CountPrecision { + """ + The count is exactly the value. + """ + EXACT + + """ + The count is at least the value. A limit was reached. + """ + AT_LEAST +} + +""" +A country with localization settings for a storefront. Includes the country's currency, available languages, default language, and unit system (metric or imperial). + +Access countries through the [localization](https://shopify.dev/docs/api/storefront/current/queries/localization) query, which returns both the list of available countries and the currently active country. Use the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to change the active country context. +""" +type Country { + """ + The languages available for the country. + """ + availableLanguages: [Language!]! + + """ + The currency of the country. + """ + currency: Currency! + + """ + The default language for the country. + """ + defaultLanguage: Language! + + """ + The ISO code of the country. + """ + isoCode: CountryCode! + + """ + The market that includes this country. + """ + market: Market @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + The name of the country. + """ + name: String! + + """ + The unit system used in the country. + """ + unitSystem: UnitSystem! +} + +""" +The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. +If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision +of another country. For example, the territories associated with Spain are represented by the country code `ES`, +and the territories associated with the United States of America are represented by the country code `US`. +""" +enum CountryCode { + """ + Afghanistan. + """ + AF + + """ + Åland Islands. + """ + AX + + """ + Albania. + """ + AL + + """ + Algeria. + """ + DZ + + """ + Andorra. + """ + AD + + """ + Angola. + """ + AO + + """ + Anguilla. + """ + AI + + """ + Antigua & Barbuda. + """ + AG + + """ + Argentina. + """ + AR + + """ + Armenia. + """ + AM + + """ + Aruba. + """ + AW + + """ + Ascension Island. + """ + AC + + """ + Australia. + """ + AU + + """ + Austria. + """ + AT + + """ + Azerbaijan. + """ + AZ + + """ + Bahamas. + """ + BS + + """ + Bahrain. + """ + BH + + """ + Bangladesh. + """ + BD + + """ + Barbados. + """ + BB + + """ + Belarus. + """ + BY + + """ + Belgium. + """ + BE + + """ + Belize. + """ + BZ + + """ + Benin. + """ + BJ + + """ + Bermuda. + """ + BM + + """ + Bhutan. + """ + BT + + """ + Bolivia. + """ + BO + + """ + Bosnia & Herzegovina. + """ + BA + + """ + Botswana. + """ + BW + + """ + Bouvet Island. + """ + BV + + """ + Brazil. + """ + BR + + """ + British Indian Ocean Territory. + """ + IO + + """ + Brunei. + """ + BN + + """ + Bulgaria. + """ + BG + + """ + Burkina Faso. + """ + BF + + """ + Burundi. + """ + BI + + """ + Cambodia. + """ + KH + + """ + Canada. + """ + CA + + """ + Cape Verde. + """ + CV + + """ + Caribbean Netherlands. + """ + BQ + + """ + Cayman Islands. + """ + KY + + """ + Central African Republic. + """ + CF + + """ + Chad. + """ + TD + + """ + Chile. + """ + CL + + """ + China. + """ + CN + + """ + Christmas Island. + """ + CX + + """ + Cocos (Keeling) Islands. + """ + CC + + """ + Colombia. + """ + CO + + """ + Comoros. + """ + KM + + """ + Congo - Brazzaville. + """ + CG + + """ + Congo - Kinshasa. + """ + CD + + """ + Cook Islands. + """ + CK + + """ + Costa Rica. + """ + CR + + """ + Croatia. + """ + HR + + """ + Cuba. + """ + CU + + """ + Curaçao. + """ + CW + + """ + Cyprus. + """ + CY + + """ + Czechia. + """ + CZ + + """ + Côte d’Ivoire. + """ + CI + + """ + Denmark. + """ + DK + + """ + Djibouti. + """ + DJ + + """ + Dominica. + """ + DM + + """ + Dominican Republic. + """ + DO + + """ + Ecuador. + """ + EC + + """ + Egypt. + """ + EG + + """ + El Salvador. + """ + SV + + """ + Equatorial Guinea. + """ + GQ + + """ + Eritrea. + """ + ER + + """ + Estonia. + """ + EE + + """ + Eswatini. + """ + SZ + + """ + Ethiopia. + """ + ET + + """ + Falkland Islands. + """ + FK + + """ + Faroe Islands. + """ + FO + + """ + Fiji. + """ + FJ + + """ + Finland. + """ + FI + + """ + France. + """ + FR + + """ + French Guiana. + """ + GF + + """ + French Polynesia. + """ + PF + + """ + French Southern Territories. + """ + TF + + """ + Gabon. + """ + GA + + """ + Gambia. + """ + GM + + """ + Georgia. + """ + GE + + """ + Germany. + """ + DE + + """ + Ghana. + """ + GH + + """ + Gibraltar. + """ + GI + + """ + Greece. + """ + GR + + """ + Greenland. + """ + GL + + """ + Grenada. + """ + GD + + """ + Guadeloupe. + """ + GP + + """ + Guatemala. + """ + GT + + """ + Guernsey. + """ + GG + + """ + Guinea. + """ + GN + + """ + Guinea-Bissau. + """ + GW + + """ + Guyana. + """ + GY + + """ + Haiti. + """ + HT + + """ + Heard & McDonald Islands. + """ + HM + + """ + Vatican City. + """ + VA + + """ + Honduras. + """ + HN + + """ + Hong Kong SAR. + """ + HK + + """ + Hungary. + """ + HU + + """ + Iceland. + """ + IS + + """ + India. + """ + IN + + """ + Indonesia. + """ + ID + + """ + Iran. + """ + IR + + """ + Iraq. + """ + IQ + + """ + Ireland. + """ + IE + + """ + Isle of Man. + """ + IM + + """ + Israel. + """ + IL + + """ + Italy. + """ + IT + + """ + Jamaica. + """ + JM + + """ + Japan. + """ + JP + + """ + Jersey. + """ + JE + + """ + Jordan. + """ + JO + + """ + Kazakhstan. + """ + KZ + + """ + Kenya. + """ + KE + + """ + Kiribati. + """ + KI + + """ + North Korea. + """ + KP + + """ + Kosovo. + """ + XK + + """ + Kuwait. + """ + KW + + """ + Kyrgyzstan. + """ + KG + + """ + Laos. + """ + LA + + """ + Latvia. + """ + LV + + """ + Lebanon. + """ + LB + + """ + Lesotho. + """ + LS + + """ + Liberia. + """ + LR + + """ + Libya. + """ + LY + + """ + Liechtenstein. + """ + LI + + """ + Lithuania. + """ + LT + + """ + Luxembourg. + """ + LU + + """ + Macao SAR. + """ + MO + + """ + Madagascar. + """ + MG + + """ + Malawi. + """ + MW + + """ + Malaysia. + """ + MY + + """ + Maldives. + """ + MV + + """ + Mali. + """ + ML + + """ + Malta. + """ + MT + + """ + Martinique. + """ + MQ + + """ + Mauritania. + """ + MR + + """ + Mauritius. + """ + MU + + """ + Mayotte. + """ + YT + + """ + Mexico. + """ + MX + + """ + Moldova. + """ + MD + + """ + Monaco. + """ + MC + + """ + Mongolia. + """ + MN + + """ + Montenegro. + """ + ME + + """ + Montserrat. + """ + MS + + """ + Morocco. + """ + MA + + """ + Mozambique. + """ + MZ + + """ + Myanmar (Burma). + """ + MM + + """ + Namibia. + """ + NA + + """ + Nauru. + """ + NR + + """ + Nepal. + """ + NP + + """ + Netherlands. + """ + NL + + """ + Netherlands Antilles. + """ + AN + + """ + New Caledonia. + """ + NC + + """ + New Zealand. + """ + NZ + + """ + Nicaragua. + """ + NI + + """ + Niger. + """ + NE + + """ + Nigeria. + """ + NG + + """ + Niue. + """ + NU + + """ + Norfolk Island. + """ + NF + + """ + North Macedonia. + """ + MK + + """ + Norway. + """ + NO + + """ + Oman. + """ + OM + + """ + Pakistan. + """ + PK + + """ + Palestinian Territories. + """ + PS + + """ + Panama. + """ + PA + + """ + Papua New Guinea. + """ + PG + + """ + Paraguay. + """ + PY + + """ + Peru. + """ + PE + + """ + Philippines. + """ + PH + + """ + Pitcairn Islands. + """ + PN + + """ + Poland. + """ + PL + + """ + Portugal. + """ + PT + + """ + Qatar. + """ + QA + + """ + Cameroon. + """ + CM + + """ + Réunion. + """ + RE + + """ + Romania. + """ + RO + + """ + Russia. + """ + RU + + """ + Rwanda. + """ + RW + + """ + St. Barthélemy. + """ + BL + + """ + St. Helena. + """ + SH + + """ + St. Kitts & Nevis. + """ + KN + + """ + St. Lucia. + """ + LC + + """ + St. Martin. + """ + MF + + """ + St. Pierre & Miquelon. + """ + PM + + """ + Samoa. + """ + WS + + """ + San Marino. + """ + SM + + """ + São Tomé & Príncipe. + """ + ST + + """ + Saudi Arabia. + """ + SA + + """ + Senegal. + """ + SN + + """ + Serbia. + """ + RS + + """ + Seychelles. + """ + SC + + """ + Sierra Leone. + """ + SL + + """ + Singapore. + """ + SG + + """ + Sint Maarten. + """ + SX + + """ + Slovakia. + """ + SK + + """ + Slovenia. + """ + SI + + """ + Solomon Islands. + """ + SB + + """ + Somalia. + """ + SO + + """ + South Africa. + """ + ZA + + """ + South Georgia & South Sandwich Islands. + """ + GS + + """ + South Korea. + """ + KR + + """ + South Sudan. + """ + SS + + """ + Spain. + """ + ES + + """ + Sri Lanka. + """ + LK + + """ + St. Vincent & Grenadines. + """ + VC + + """ + Sudan. + """ + SD + + """ + Suriname. + """ + SR + + """ + Svalbard & Jan Mayen. + """ + SJ + + """ + Sweden. + """ + SE + + """ + Switzerland. + """ + CH + + """ + Syria. + """ + SY + + """ + Taiwan. + """ + TW + + """ + Tajikistan. + """ + TJ + + """ + Tanzania. + """ + TZ + + """ + Thailand. + """ + TH + + """ + Timor-Leste. + """ + TL + + """ + Togo. + """ + TG + + """ + Tokelau. + """ + TK + + """ + Tonga. + """ + TO + + """ + Trinidad & Tobago. + """ + TT + + """ + Tristan da Cunha. + """ + TA + + """ + Tunisia. + """ + TN + + """ + Türkiye. + """ + TR + + """ + Turkmenistan. + """ + TM + + """ + Turks & Caicos Islands. + """ + TC + + """ + Tuvalu. + """ + TV + + """ + Uganda. + """ + UG + + """ + Ukraine. + """ + UA + + """ + United Arab Emirates. + """ + AE + + """ + United Kingdom. + """ + GB + + """ + United States. + """ + US + + """ + U.S. Outlying Islands. + """ + UM + + """ + Uruguay. + """ + UY + + """ + Uzbekistan. + """ + UZ + + """ + Vanuatu. + """ + VU + + """ + Venezuela. + """ + VE + + """ + Vietnam. + """ + VN + + """ + British Virgin Islands. + """ + VG + + """ + Wallis & Futuna. + """ + WF + + """ + Western Sahara. + """ + EH + + """ + Yemen. + """ + YE + + """ + Zambia. + """ + ZM + + """ + Zimbabwe. + """ + ZW + + """ + Unknown Region. + """ + ZZ +} + +""" +The part of the image that should remain after cropping. +""" +enum CropRegion { + """ + Keep the center of the image. + """ + CENTER + + """ + Keep the top of the image. + """ + TOP + + """ + Keep the bottom of the image. + """ + BOTTOM + + """ + Keep the left of the image. + """ + LEFT + + """ + Keep the right of the image. + """ + RIGHT +} + +""" +A currency. +""" +type Currency { + """ + The ISO code of the currency. + """ + isoCode: CurrencyCode! + + """ + The name of the currency. + """ + name: String! + + """ + The symbol of the currency. + """ + symbol: String! +} + +""" +The three-letter currency codes that represent the world currencies used in +stores. These include standard ISO 4217 codes, legacy codes, +and non-standard codes. +""" +enum CurrencyCode { + """ + United States Dollars (USD). + """ + USD + + """ + Euro (EUR). + """ + EUR + + """ + United Kingdom Pounds (GBP). + """ + GBP + + """ + Canadian Dollars (CAD). + """ + CAD + + """ + Afghan Afghani (AFN). + """ + AFN + + """ + Albanian Lek (ALL). + """ + ALL + + """ + Algerian Dinar (DZD). + """ + DZD + + """ + Angolan Kwanza (AOA). + """ + AOA + + """ + Argentine Pesos (ARS). + """ + ARS + + """ + Armenian Dram (AMD). + """ + AMD + + """ + Aruban Florin (AWG). + """ + AWG + + """ + Australian Dollars (AUD). + """ + AUD + + """ + Barbadian Dollar (BBD). + """ + BBD + + """ + Azerbaijani Manat (AZN). + """ + AZN + + """ + Bangladesh Taka (BDT). + """ + BDT + + """ + Bahamian Dollar (BSD). + """ + BSD + + """ + Bahraini Dinar (BHD). + """ + BHD + + """ + Burundian Franc (BIF). + """ + BIF + + """ + Belize Dollar (BZD). + """ + BZD + + """ + Bermudian Dollar (BMD). + """ + BMD + + """ + Bhutanese Ngultrum (BTN). + """ + BTN + + """ + Bosnia and Herzegovina Convertible Mark (BAM). + """ + BAM + + """ + Brazilian Real (BRL). + """ + BRL + + """ + Bolivian Boliviano (BOB). + """ + BOB + + """ + Botswana Pula (BWP). + """ + BWP + + """ + Brunei Dollar (BND). + """ + BND + + """ + Bulgarian Lev (BGN). + """ + BGN + + """ + Burmese Kyat (MMK). + """ + MMK + + """ + Cambodian Riel. + """ + KHR + + """ + Cape Verdean escudo (CVE). + """ + CVE + + """ + Cayman Dollars (KYD). + """ + KYD + + """ + Central African CFA Franc (XAF). + """ + XAF + + """ + Chilean Peso (CLP). + """ + CLP + + """ + Chinese Yuan Renminbi (CNY). + """ + CNY + + """ + Colombian Peso (COP). + """ + COP + + """ + Comorian Franc (KMF). + """ + KMF + + """ + Congolese franc (CDF). + """ + CDF + + """ + Costa Rican Colones (CRC). + """ + CRC + + """ + Croatian Kuna (HRK). + """ + HRK + + """ + Czech Koruny (CZK). + """ + CZK + + """ + Danish Kroner (DKK). + """ + DKK + + """ + Dominican Peso (DOP). + """ + DOP + + """ + East Caribbean Dollar (XCD). + """ + XCD + + """ + Egyptian Pound (EGP). + """ + EGP + + """ + Eritrean Nakfa (ERN). + """ + ERN + + """ + Ethiopian Birr (ETB). + """ + ETB + + """ + Falkland Islands Pounds (FKP). + """ + FKP + + """ + CFP Franc (XPF). + """ + XPF + + """ + Fijian Dollars (FJD). + """ + FJD + + """ + Gibraltar Pounds (GIP). + """ + GIP + + """ + Gambian Dalasi (GMD). + """ + GMD + + """ + Ghanaian Cedi (GHS). + """ + GHS + + """ + Guatemalan Quetzal (GTQ). + """ + GTQ + + """ + Guyanese Dollar (GYD). + """ + GYD + + """ + Georgian Lari (GEL). + """ + GEL + + """ + Haitian Gourde (HTG). + """ + HTG + + """ + Honduran Lempira (HNL). + """ + HNL + + """ + Hong Kong Dollars (HKD). + """ + HKD + + """ + Hungarian Forint (HUF). + """ + HUF + + """ + Icelandic Kronur (ISK). + """ + ISK + + """ + Indian Rupees (INR). + """ + INR + + """ + Indonesian Rupiah (IDR). + """ + IDR + + """ + Israeli New Shekel (NIS). + """ + ILS + + """ + Iraqi Dinar (IQD). + """ + IQD + + """ + Jamaican Dollars (JMD). + """ + JMD + + """ + Japanese Yen (JPY). + """ + JPY + + """ + Jersey Pound. + """ + JEP + + """ + Jordanian Dinar (JOD). + """ + JOD + + """ + Kazakhstani Tenge (KZT). + """ + KZT + + """ + Kenyan Shilling (KES). + """ + KES + + """ + Kiribati Dollar (KID). + """ + KID + + """ + Kuwaiti Dinar (KWD). + """ + KWD + + """ + Kyrgyzstani Som (KGS). + """ + KGS + + """ + Laotian Kip (LAK). + """ + LAK + + """ + Latvian Lati (LVL). + """ + LVL + + """ + Lebanese Pounds (LBP). + """ + LBP + + """ + Lesotho Loti (LSL). + """ + LSL + + """ + Liberian Dollar (LRD). + """ + LRD + + """ + Lithuanian Litai (LTL). + """ + LTL + + """ + Malagasy Ariary (MGA). + """ + MGA + + """ + Macedonia Denar (MKD). + """ + MKD + + """ + Macanese Pataca (MOP). + """ + MOP + + """ + Malawian Kwacha (MWK). + """ + MWK + + """ + Maldivian Rufiyaa (MVR). + """ + MVR + + """ + Mauritanian Ouguiya (MRU). + """ + MRU + + """ + Mexican Pesos (MXN). + """ + MXN + + """ + Malaysian Ringgits (MYR). + """ + MYR + + """ + Mauritian Rupee (MUR). + """ + MUR + + """ + Moldovan Leu (MDL). + """ + MDL + + """ + Moroccan Dirham. + """ + MAD + + """ + Mongolian Tugrik. + """ + MNT + + """ + Mozambican Metical. + """ + MZN + + """ + Namibian Dollar. + """ + NAD + + """ + Nepalese Rupee (NPR). + """ + NPR + + """ + Netherlands Antillean Guilder. + """ + ANG + + """ + New Zealand Dollars (NZD). + """ + NZD + + """ + Nicaraguan Córdoba (NIO). + """ + NIO + + """ + Nigerian Naira (NGN). + """ + NGN + + """ + Norwegian Kroner (NOK). + """ + NOK + + """ + Omani Rial (OMR). + """ + OMR + + """ + Panamian Balboa (PAB). + """ + PAB + + """ + Pakistani Rupee (PKR). + """ + PKR + + """ + Papua New Guinean Kina (PGK). + """ + PGK + + """ + Paraguayan Guarani (PYG). + """ + PYG + + """ + Peruvian Nuevo Sol (PEN). + """ + PEN + + """ + Philippine Peso (PHP). + """ + PHP + + """ + Polish Zlotych (PLN). + """ + PLN + + """ + Qatari Rial (QAR). + """ + QAR + + """ + Romanian Lei (RON). + """ + RON + + """ + Russian Rubles (RUB). + """ + RUB + + """ + Rwandan Franc (RWF). + """ + RWF + + """ + Samoan Tala (WST). + """ + WST + + """ + Saint Helena Pounds (SHP). + """ + SHP + + """ + Saudi Riyal (SAR). + """ + SAR + + """ + Serbian dinar (RSD). + """ + RSD + + """ + Seychellois Rupee (SCR). + """ + SCR + + """ + Singapore Dollars (SGD). + """ + SGD + + """ + Sudanese Pound (SDG). + """ + SDG + + """ + Somali Shilling (SOS). + """ + SOS + + """ + Syrian Pound (SYP). + """ + SYP + + """ + South African Rand (ZAR). + """ + ZAR + + """ + South Korean Won (KRW). + """ + KRW + + """ + South Sudanese Pound (SSP). + """ + SSP + + """ + Solomon Islands Dollar (SBD). + """ + SBD + + """ + Sri Lankan Rupees (LKR). + """ + LKR + + """ + Surinamese Dollar (SRD). + """ + SRD + + """ + Swazi Lilangeni (SZL). + """ + SZL + + """ + Swedish Kronor (SEK). + """ + SEK + + """ + Swiss Francs (CHF). + """ + CHF + + """ + Taiwan Dollars (TWD). + """ + TWD + + """ + Thai baht (THB). + """ + THB + + """ + Tanzanian Shilling (TZS). + """ + TZS + + """ + Trinidad and Tobago Dollars (TTD). + """ + TTD + + """ + Tunisian Dinar (TND). + """ + TND + + """ + Turkish Lira (TRY). + """ + TRY + + """ + Turkmenistani Manat (TMT). + """ + TMT + + """ + Ugandan Shilling (UGX). + """ + UGX + + """ + Ukrainian Hryvnia (UAH). + """ + UAH + + """ + United Arab Emirates Dirham (AED). + """ + AED + + """ + Uruguayan Pesos (UYU). + """ + UYU + + """ + Uzbekistan som (UZS). + """ + UZS + + """ + Vanuatu Vatu (VUV). + """ + VUV + + """ + Venezuelan Bolivares Soberanos (VES). + """ + VES + + """ + Vietnamese đồng (VND). + """ + VND + + """ + West African CFA franc (XOF). + """ + XOF + + """ + Yemeni Rial (YER). + """ + YER + + """ + Zambian Kwacha (ZMW). + """ + ZMW + + """ + Belarusian Ruble (BYN). + """ + BYN + + """ + Belarusian Ruble (BYR). + """ + BYR @deprecated(reason: "`BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead.") + + """ + Djiboutian Franc (DJF). + """ + DJF + + """ + Guinean Franc (GNF). + """ + GNF + + """ + Iranian Rial (IRR). + """ + IRR + + """ + Libyan Dinar (LYD). + """ + LYD + + """ + Sierra Leonean Leone (SLL). + """ + SLL + + """ + Sao Tome And Principe Dobra (STD). + """ + STD @deprecated(reason: "`STD` is deprecated. Use `STN` available from version `2022-07` onwards instead.") + + """ + Sao Tome And Principe Dobra (STN). + """ + STN + + """ + Tajikistani Somoni (TJS). + """ + TJS + + """ + Tongan Pa'anga (TOP). + """ + TOP + + """ + Venezuelan Bolivares (VED). + """ + VED + + """ + Venezuelan Bolivares (VEF). + """ + VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.") + + """ + Unrecognized currency. + """ + XXX +} + +""" +A customer account with the shop. Includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) and marketing preferences for logged-in customers, so they don't have to provide these details at every checkout. + +Access the customer through the [`customer`](https://shopify.dev/docs/api/storefront/current/queries/customer) query using a customer access token obtained from the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation. + +The object implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface, enabling retrieval of [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. +""" +type Customer implements HasMetafields { + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean! + + """ + A list of addresses for the customer. + """ + addresses("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MailingAddressConnection! + + """ + The URL of the customer's avatar image. + """ + avatarUrl: String + + """ + The date and time when the customer was created. + """ + createdAt: DateTime! + + """ + The customer’s default address. + """ + defaultAddress: MailingAddress + + """ + The customer’s name, email or phone number. + """ + displayName: String! + + """ + The customer’s email address. + """ + email: String + + """ + The customer’s first name. + """ + firstName: String + + """ + A unique ID for the customer. + """ + id: ID! + + """ + The customer’s last name. + """ + lastName: String + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The number of orders that the customer has made at the store in their lifetime. + """ + numberOfOrders: UnsignedInt64! + + """ + The orders associated with the customer. + """ + orders("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: OrderSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| processed_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): OrderConnection! + + """ + The customer’s phone number. + """ + phone: String + + """ + The social login provider associated with the customer. + """ + socialLoginProvider: SocialLoginProvider + + """ + A comma separated list of tags that have been added to the customer. + Additional access scope required: unauthenticated_read_customer_tags. + """ + tags: [String!]! + + """ + The date and time when the customer information was updated. + """ + updatedAt: DateTime! +} + +""" +A unique authentication token that identifies a logged-in customer and authorizes modifications to the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) object. The token is required for customer-specific operations like updating profile information or managing addresses. + +Tokens have an expiration date and must be renewed using [`customerAccessTokenRenew`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenRenew) before they expire. Create tokens with [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) using legacy customer account authentication (email and password), or with [`customerAccessTokenCreateWithMultipass`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreateWithMultipass) for single sign-on flows. +""" +type CustomerAccessToken { + """ + The customer’s access token. + """ + accessToken: String! + + """ + The date and time when the customer access token expires. + """ + expiresAt: DateTime! +} + +""" +The input fields for authenticating a customer with email and password. Used by the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation to generate a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken), which is required to read or modify customer data. +""" +input CustomerAccessTokenCreateInput { + """ + The email associated to the customer. + """ + email: String! + + """ + The login password to be used by the customer. + """ + password: String! +} + +""" +Return type for `customerAccessTokenCreate` mutation. +""" +type CustomerAccessTokenCreatePayload { + """ + The newly created customer access token object. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerAccessTokenCreateWithMultipass` mutation. +""" +type CustomerAccessTokenCreateWithMultipassPayload { + """ + An access token object associated with the customer. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! +} + +""" +Return type for `customerAccessTokenDelete` mutation. +""" +type CustomerAccessTokenDeletePayload { + """ + The destroyed access token. + """ + deletedAccessToken: String + + """ + ID of the destroyed customer access token. + """ + deletedCustomerAccessTokenId: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAccessTokenRenew` mutation. +""" +type CustomerAccessTokenRenewPayload { + """ + The renewed customer access token object. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerActivateByUrl` mutation. +""" +type CustomerActivateByUrlPayload { + """ + The customer that was activated. + """ + customer: Customer + + """ + A new customer access token for the customer. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! +} + +""" +The input fields to activate a customer. +""" +input CustomerActivateInput { + """ + The activation token required to activate the customer. + """ + activationToken: String! + + """ + New password that will be set during activation. + """ + password: String! +} + +""" +Return type for `customerActivate` mutation. +""" +type CustomerActivatePayload { + """ + The customer object. + """ + customer: Customer + + """ + A newly created customer access token object for the customer. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerAddressCreate` mutation. +""" +type CustomerAddressCreatePayload { + """ + The new customer address object. + """ + customerAddress: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerAddressDelete` mutation. +""" +type CustomerAddressDeletePayload { + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + ID of the deleted customer address. + """ + deletedCustomerAddressId: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerAddressUpdate` mutation. +""" +type CustomerAddressUpdatePayload { + """ + The customer’s updated mailing address. + """ + customerAddress: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +The input fields for creating a new [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) account. Used by the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. + +For legacy customer accounts only and requires an email address and password. Optionally accepts the customer's name, phone number, and email marketing consent. + +> Caution: +> The password is used for customer authentication. Ensure it's transmitted securely and never logged or stored in plain text. +""" +input CustomerCreateInput { + """ + The customer’s first name. + """ + firstName: String + + """ + The customer’s last name. + """ + lastName: String + + """ + The customer’s email. + """ + email: String! + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The login password used by the customer. + """ + password: String! + + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean +} + +""" +Return type for `customerCreate` mutation. +""" +type CustomerCreatePayload { + """ + The created customer object. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerDefaultAddressUpdate` mutation. +""" +type CustomerDefaultAddressUpdatePayload { + """ + The updated customer object. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Error codes returned by the [`CustomerUserError`](https://shopify.dev/docs/api/storefront/current/objects/CustomerUserError) object. These codes identify specific validation and processing failures for customer-related mutations, including account creation, updates, password resets, and address management. +""" +enum CustomerErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Unidentified customer. + """ + UNIDENTIFIED_CUSTOMER + + """ + Customer is disabled. + """ + CUSTOMER_DISABLED + + """ + Input password starts or ends with whitespace. + """ + PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE + + """ + Input contains HTML tags. + """ + CONTAINS_HTML_TAGS + + """ + Input contains URL. + """ + CONTAINS_URL + + """ + Invalid activation token. + """ + TOKEN_INVALID + + """ + Customer already enabled. + """ + ALREADY_ENABLED + + """ + Address does not exist. + """ + NOT_FOUND + + """ + Input email contains an invalid domain name. + """ + BAD_DOMAIN + + """ + Multipass token is not valid. + """ + INVALID_MULTIPASS_REQUEST +} + +""" +Return type for `customerRecover` mutation. +""" +type CustomerRecoverPayload { + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Return type for `customerResetByUrl` mutation. +""" +type CustomerResetByUrlPayload { + """ + The customer object which was reset. + """ + customer: Customer + + """ + A newly created customer access token object for the customer. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +The input fields to reset a customer's password. +""" +input CustomerResetInput { + """ + The reset token required to reset the customer’s password. + """ + resetToken: String! + + """ + New password that will be set as part of the reset password process. + """ + password: String! +} + +""" +Return type for `customerReset` mutation. +""" +type CustomerResetPayload { + """ + The customer object which was reset. + """ + customer: Customer + + """ + A newly created customer access token object for the customer. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +The input fields for updating a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Used by the [`customerUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/customerUpdate) mutation. + +> Caution: +> Updating the password invalidates all existing access tokens, including the one used to perform the mutation. The response returns a new access token. Ensure your app handles the new token returned in the response to avoid logging the customer out. +""" +input CustomerUpdateInput { + """ + The customer’s first name. + """ + firstName: String + + """ + The customer’s last name. + """ + lastName: String + + """ + The customer’s email. + """ + email: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. + """ + phone: String + + """ + The login password used by the customer. + """ + password: String + + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean +} + +""" +Return type for `customerUpdate` mutation. +""" +type CustomerUpdatePayload { + """ + The updated customer object. + """ + customer: Customer + + """ + The newly created customer access token. If the customer's password is updated, all previous access tokens + (including the one used to perform this mutation) become invalid, and a new token is generated. + """ + customerAccessToken: CustomerAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + customerUserErrors: [CustomerUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") +} + +""" +Represents an error that happens during execution of a customer mutation. +""" +type CustomerUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. +For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is +represented as `"2019-09-07T15:50:00Z`". +""" +scalar DateTime + +""" +A signed decimal number, which supports arbitrary precision and is serialized as a string. + +Example values: `"29.99"`, `"29.999"`. +""" +scalar Decimal + +""" +A delivery address of the buyer that is interacting with the cart. +""" +union DeliveryAddress = MailingAddress + +""" +The input fields for delivery address preferences. +""" +input DeliveryAddressInput { + """ + A delivery address preference of a buyer that is interacting with the cart. + """ + deliveryAddress: MailingAddressInput + + """ + Whether the given delivery address is considered to be a one-time use address. One-time use addresses do not + get persisted to the buyer's personal addresses when checking out. + """ + oneTimeUse: Boolean = false + + """ + Defines what kind of address validation is requested. + """ + deliveryAddressValidationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY + + """ + The ID of a customer address that is associated with the buyer that is interacting with the cart. + """ + customerAddressId: ID +} + +""" +Controls how delivery addresses are validated during cart operations. The default validation checks only the country code, while strict validation verifies all address fields against Shopify's checkout rules and rejects invalid addresses. + +Used by [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) when setting buyer identity preferences, and by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput) when managing cart delivery addresses. +""" +enum DeliveryAddressValidationStrategy { + """ + Only the country code is validated. + """ + COUNTRY_CODE_ONLY + + """ + Strict validation is performed, i.e. all fields in the address are validated + according to Shopify's checkout rules. If the address fails validation, the cart will not be updated. + """ + STRICT +} + +""" +List of different delivery method types. +""" +enum DeliveryMethodType { + """ + Shipping. + """ + SHIPPING + + """ + Local Pickup. + """ + PICK_UP + + """ + Retail. + """ + RETAIL + + """ + Local Delivery. + """ + LOCAL + + """ + Shipping to a Pickup Point. + """ + PICKUP_POINT + + """ + None. + """ + NONE +} + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet { + """ + Apple Pay. + """ + APPLE_PAY + + """ + Android Pay. + """ + ANDROID_PAY + + """ + Google Pay. + """ + GOOGLE_PAY + + """ + Shopify Pay. + """ + SHOPIFY_PAY +} + +""" +The calculated discount amount applied to a line item or shipping line. While a [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) captures the discount's rules and intentions, the allocation shows how much was actually deducted. + +Each allocation includes the discounted amount and a reference to the originating discount application. +""" +type DiscountAllocation { + """ + Amount of discount allocated. + """ + allocatedAmount: MoneyV2! + + """ + The discount this allocated amount originated from. + """ + discountApplication: DiscountApplication! +} + +""" +Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), and manual discounts. + +The actual discounted amount on a line item or shipping line is represented by the [`DiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/DiscountAllocation) object, which references the discount application it originated from. +""" +interface DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Controls how a discount's value is distributed across entitled lines. A discount can either spread its value across all entitled lines or apply the full value to each line individually. + +Used by the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and its implementations to capture the intentions of a discount source at the time of application. +""" +enum DiscountApplicationAllocationMethod { + """ + The value is spread across all entitled lines. + """ + ACROSS + + """ + The value is applied onto every entitled line. + """ + EACH + + """ + The value is specifically applied onto a particular line. + """ + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. +""" +type DiscountApplicationConnection { + """ + A list of edges. + """ + edges: [DiscountApplicationEdge!]! + + """ + A list of the nodes contained in DiscountApplicationEdge. + """ + nodes: [DiscountApplication!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. +""" +type DiscountApplicationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of DiscountApplicationEdge. + """ + node: DiscountApplication! +} + +""" +The lines on the order to which the discount is applied, of the type defined by +the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of +`LINE_ITEM`, applies the discount on all line items that are entitled to the discount. +The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines. +""" +enum DiscountApplicationTargetSelection { + """ + The discount is allocated onto all the lines. + """ + ALL + + """ + The discount is allocated onto only the lines that it's entitled for. + """ + ENTITLED + + """ + The discount is allocated onto explicitly chosen lines. + """ + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +""" +enum DiscountApplicationTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +Records the configuration and intent of a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes) when a customer applies it. This includes the code string, allocation method, target type, and discount value at the time of application. The [`applicable`](https://shopify.dev/docs/api/storefront/latest/objects/DiscountCodeApplication#field-DiscountCodeApplication.fields.applicable) field indicates whether the code was successfully applied. + +> Note: +> To see the actual amounts discounted on specific line items or shipping lines, use the [`DiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/DiscountAllocation) object instead. +""" +type DiscountCodeApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + Specifies whether the discount code was applied successfully. + """ + applicable: Boolean! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Represents an error in the input of a mutation. +""" +interface DisplayableError { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A web address associated with a shop. The [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop) object's [`primaryDomain`](https://shopify.dev/docs/api/storefront/current/objects/Shop#field-Shop.fields.primaryDomain) field returns this to identify the shop's online store URL. +""" +type Domain { + """ + The host name of the domain (eg: `example.com`). + """ + host: String! + + """ + Whether SSL is enabled or not. + """ + sslEnabled: Boolean! + + """ + The URL of the domain (eg: `https://example.com`). + """ + url: URL! +} + +""" +Represents a video hosted outside of Shopify. +""" +type ExternalVideo implements Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + The embed URL of the video for the respective host. + """ + embedUrl: URL! + + """ + The URL. + """ + embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + + """ + The host of the external video. + """ + host: MediaHost! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + The origin URL of the video on the respective host. + """ + originUrl: URL! + + """ + The presentation for a media. + """ + presentation: MediaPresentation + + """ + The preview image for the media. + """ + previewImage: Image +} + +""" +A filter option available on collection and search results pages. Each filter includes a type, display label, and selectable values that customers can use to narrow down products. + +The [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) objects contain an [`input`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.input) field that you can combine to [build dynamic filtering queries](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products). Merchants [configure available filters](https://help.shopify.com/manual/online-store/search-and-discovery/filters) using the Shopify Search & Discovery app. +""" +type Filter { + """ + A unique identifier. + """ + id: String! + + """ + A human-friendly string for this filter. + """ + label: String! + + """ + Describes how to present the filter values. + Returns a value only for filters of type `LIST`. Returns null for other types. + """ + presentation: FilterPresentation + + """ + An enumeration that denotes the type of data this filter represents. + """ + type: FilterType! + + """ + The list of values for this filter. + """ + values: [FilterValue!]! +} + +""" +Defines how to present the filter values, specifies the presentation of the filter. +""" +enum FilterPresentation { + """ + Image presentation, filter values display an image. + """ + IMAGE + + """ + Swatch presentation, filter values display color or image patterns. + """ + SWATCH + + """ + Text presentation, no additional visual display for filter values. + """ + TEXT +} + +""" +The type of data that the filter group represents. + +For more information, refer to [Filter products in a collection with the Storefront API] +(https://shopify.dev/custom-storefronts/products-collections/filter-products). +""" +enum FilterType { + """ + A list of selectable values. + """ + LIST + + """ + A range of prices. + """ + PRICE_RANGE + + """ + A boolean value. + """ + BOOLEAN +} + +""" +A selectable option within a [`Filter`](https://shopify.dev/docs/api/storefront/current/objects/Filter), such as a specific color, size, or product type. Each value includes a count of matching results and a human-readable label for display. + +The [`input`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.input) field provides ready-to-use JSON for building dynamic filtering interfaces. You can combine the `input` values from multiple selected [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) objects to construct filter queries. Visual representations are available through the [`image`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.image) or [`swatch`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.swatch) fields when the parent filter's presentation type supports them. +""" +type FilterValue { + """ + The number of results that match this filter value. + """ + count: Int! + + """ + A unique identifier. + """ + id: String! + + """ + The visual representation when the filter's presentation is `IMAGE`. + """ + image: MediaImage + + """ + An input object that can be used to filter by this value on the parent field. + + The value is provided as a helper for building dynamic filtering UI. For + example, if you have a list of selected `FilterValue` objects, you can combine + their respective `input` values to use in a subsequent query. + """ + input: JSON! + + """ + A human-friendly string for this filter value. + """ + label: String! + + """ + The visual representation when the filter's presentation is `SWATCH`. + """ + swatch: Swatch +} + +""" +Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). +""" +scalar Float + +""" +A shipment of one or more items in an order. Accessed through the [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order) object's [`successfulFulfillments`](https://shopify.dev/docs/api/storefront/current/objects/Order#field-Order.fields.successfulFulfillments) field. + +Each fulfillment includes the line items that shipped, the tracking company name, and tracking details like numbers and URLs. An order can have multiple fulfillments when items ship separately or from different locations. +""" +type Fulfillment { + """ + List of the fulfillment's line items. + """ + fulfillmentLineItems("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentLineItemConnection! + + """ + The name of the tracking company. + """ + trackingCompany: String + + """ + Tracking information associated with the fulfillment, + such as the tracking number and tracking URL. + """ + trackingInfo("Truncate the array result to this size." first: Int): [FulfillmentTrackingInfo!]! +} + +""" +Records how many units of an [`OrderLineItem`](https://shopify.dev/docs/api/storefront/current/objects/OrderLineItem) were included in a [`Fulfillment`](https://shopify.dev/docs/api/storefront/current/objects/Fulfillment). Each order line item has at most one fulfillment line item per fulfillment. +""" +type FulfillmentLineItem { + """ + The associated order's line item. + """ + lineItem: OrderLineItem! + + """ + The amount fulfilled in this fulfillment. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple FulfillmentLineItems. +""" +type FulfillmentLineItemConnection { + """ + A list of edges. + """ + edges: [FulfillmentLineItemEdge!]! + + """ + A list of the nodes contained in FulfillmentLineItemEdge. + """ + nodes: [FulfillmentLineItem!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. +""" +type FulfillmentLineItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of FulfillmentLineItemEdge. + """ + node: FulfillmentLineItem! +} + +""" +Tracking information associated with the fulfillment. +""" +type FulfillmentTrackingInfo { + """ + The tracking number of the fulfillment. + """ + number: String + + """ + The URL to track the fulfillment. + """ + url: URL +} + +""" +Any file that doesn't fit into a designated type like image or video. For example, a PDF or JSON document. Use this object to manage files in a merchant's store. + +Generic files are commonly referenced through [file reference metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types) and returned as part of the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/current/unions/MetafieldReference) union. + +Includes the file's URL, MIME type, size in bytes, and an optional preview image. +""" +type GenericFile implements Node { + """ + A word or phrase to indicate the contents of a file. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The MIME type of the file. + """ + mimeType: String + + """ + The size of the original file in bytes. + """ + originalFileSize: Int + + """ + The preview image for the file. + """ + previewImage: Image + + """ + The URL of the file. + """ + url: URL +} + +""" +The input fields used to specify a geographical location. +""" +input GeoCoordinateInput { + """ + The coordinate's latitude value. + """ + latitude: Float! + + """ + The coordinate's longitude value. + """ + longitude: Float! +} + +""" +A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a +complete list of HTML elements. + +Example value: `"

Grey cotton knit sweater.

"` +""" +scalar HTML + +""" +Implemented by resources that support custom metadata through [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. Types like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) implement this interface to provide consistent access to metafields. + +You can retrieve a [single metafield](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafield) by namespace and key, or fetch [multiple metafields](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) in a single request. If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. +""" +interface HasMetafields { + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! +} + +""" +The input fields to identify a [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) on an owner resource by namespace and key. Used as an argument to the [`metafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) field of the `HasMetafields` interface to retrieve multiple metafields in a single request. + +If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. +""" +input HasMetafieldsIdentifier { + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + The identifier for the metafield. + """ + key: String! +} + +""" +Represents a unique identifier, often used to refetch an object. +The ID type appears in a JSON response as a String, but it is not intended to be human-readable. + +Example value: `"gid://shopify/Product/10079785100"` +""" +scalar ID + +""" +An ISO 8601-encoded datetime +""" +scalar ISO8601DateTime + +""" +An image resource with URL, dimensions, and transformation options. Used for product images, collection images, media previews, and other visual content throughout the storefront. + +The [`url`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.url) field accepts an [`ImageTransformInput`](https://shopify.dev/docs/api/storefront/current/input-objects/ImageTransformInput) argument for resizing, cropping, scaling for retina displays, and converting between image formats. Use the [`thumbhash`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.thumbhash) field to display lightweight placeholders while images load. +""" +type Image { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + height: Int + + """ + A unique ID for the image. + """ + id: ID + + """ + The location of the original image as a URL. + + If there are any existing transformations in the original source URL, they will remain and not be stripped. + """ + originalSrc: URL! @deprecated(reason: "Use `url` instead.") + + """ + The location of the image as a URL. + """ + src: URL! @deprecated(reason: "Use `url` instead.") + + """ + The ThumbHash of the image. + + Useful to display placeholder images while the original image is loading. + + See https://evanw.github.io/thumbhash/ for details on how to use it. + """ + thumbhash: String + + """ + The location of the transformed image as a URL. + + All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. + Otherwise any transformations which an image type doesn't support will be ignored. + """ + transformedSrc("Image width in pixels between 1 and 5760." maxWidth: Int, "Image height in pixels between 1 and 5760." maxHeight: Int, "Crops the image according to the specified region." crop: CropRegion, "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1, "Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported)." preferredContentType: ImageContentType): URL! @deprecated(reason: "Use `url(transform:)` instead") + + """ + The location of the image as a URL. + + If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + + All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + + If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). + """ + url("A set of options to transform the original image." transform: ImageTransformInput): URL! + + """ + The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + width: Int +} + +""" +An auto-generated type for paginating through multiple Images. +""" +type ImageConnection { + """ + A list of edges. + """ + edges: [ImageEdge!]! + + """ + A list of the nodes contained in ImageEdge. + """ + nodes: [Image!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +List of supported image content types. +""" +enum ImageContentType { + """ + A PNG image. + """ + PNG + + """ + A JPG image. + """ + JPG + + """ + A WEBP image. + """ + WEBP +} + +""" +An auto-generated type which holds one Image and a cursor during pagination. +""" +type ImageEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of ImageEdge. + """ + node: Image! +} + +""" +The available options for transforming an image. + +All transformation options are considered best effort. Any transformation that +the original image type doesn't support will be ignored. +""" +input ImageTransformInput { + """ + The region of the image to remain after cropping. + Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, + where the `maxWidth` and `maxHeight` aren't equal. + The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while + a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ + maxWidth: 5, maxHeight: 10, crop: LEFT }` will result + in an image with a width of 5 and height of 10, where the right side of the image is removed. + """ + crop: CropRegion + + """ + Image width in pixels between 1 and 5760. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 5760. + """ + maxHeight: Int + + """ + Image size multiplier for high-resolution retina displays. Must be within 1..3. + """ + scale: Int = 1 + + """ + Convert the source image into the preferred content type. + Supported conversions: `.svg` to `.png`, any file type to `.jpg`, and any file type to `.webp`. + """ + preferredContentType: ImageContentType +} + +""" +Provide details about the contexts influenced by the @inContext directive on a field. +""" +type InContextAnnotation { + description: String! + + type: InContextAnnotationType! +} + +""" +This gives information about the type of context that impacts a field. For example, for a query with @inContext(language: "EN"), the type would point to the name: LanguageCode and kind: ENUM. +""" +type InContextAnnotationType { + kind: String! + + name: String! +} + +""" +Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +""" +scalar Int + +""" +A [JSON](https://www.json.org/json-en.html) object. + +Example value: +`{ + "product": { + "id": "gid://shopify/Product/1346443542550", + "title": "White T-shirt", + "options": [{ + "name": "Size", + "values": ["M", "L"] + }] + } +}` +""" +scalar JSON + +""" +A language available for a localized storefront experience. Provides the language name in both its native form (endonym) and translated into the current language, along with its [`LanguageCode`](https://shopify.dev/docs/api/storefront/current/enums/LanguageCode). + +Returned by the [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) and [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) objects to indicate available and active languages. Pass the `isoCode` to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to retrieve translated content in that language. +""" +type Language { + """ + The name of the language in the language itself. If the language uses capitalization, it is capitalized for a mid-sentence position. + """ + endonymName: String! + + """ + The ISO code. + """ + isoCode: LanguageCode! + + """ + The name of the language in the current language. + """ + name: String! +} + +""" +Supported languages for retrieving translated storefront content. Pass a language code to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to return product titles, descriptions, and other translatable fields in that language. + +The [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) object provides the list of available languages for the active country, and each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) in [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) includes its own available languages. +""" +enum LanguageCode { + """ + Afrikaans. + """ + AF + + """ + Akan. + """ + AK + + """ + Amharic. + """ + AM + + """ + Arabic. + """ + AR + + """ + Assamese. + """ + AS + + """ + Azerbaijani. + """ + AZ + + """ + Belarusian. + """ + BE + + """ + Bulgarian. + """ + BG + + """ + Bambara. + """ + BM + + """ + Bangla. + """ + BN + + """ + Tibetan. + """ + BO + + """ + Breton. + """ + BR + + """ + Bosnian. + """ + BS + + """ + Catalan. + """ + CA + + """ + Chechen. + """ + CE + + """ + Central Kurdish. + """ + CKB + + """ + Czech. + """ + CS + + """ + Welsh. + """ + CY + + """ + Danish. + """ + DA + + """ + German. + """ + DE + + """ + Dzongkha. + """ + DZ + + """ + Ewe. + """ + EE + + """ + Greek. + """ + EL + + """ + English. + """ + EN + + """ + Esperanto. + """ + EO + + """ + Spanish. + """ + ES + + """ + Estonian. + """ + ET + + """ + Basque. + """ + EU + + """ + Persian. + """ + FA + + """ + Fulah. + """ + FF + + """ + Finnish. + """ + FI + + """ + Filipino. + """ + FIL + + """ + Faroese. + """ + FO + + """ + French. + """ + FR + + """ + Western Frisian. + """ + FY + + """ + Irish. + """ + GA + + """ + Scottish Gaelic. + """ + GD + + """ + Galician. + """ + GL + + """ + Gujarati. + """ + GU + + """ + Manx. + """ + GV + + """ + Hausa. + """ + HA + + """ + Hebrew. + """ + HE + + """ + Hindi. + """ + HI + + """ + Croatian. + """ + HR + + """ + Hungarian. + """ + HU + + """ + Armenian. + """ + HY + + """ + Interlingua. + """ + IA + + """ + Indonesian. + """ + ID + + """ + Igbo. + """ + IG + + """ + Sichuan Yi. + """ + II + + """ + Icelandic. + """ + IS + + """ + Italian. + """ + IT + + """ + Japanese. + """ + JA + + """ + Javanese. + """ + JV + + """ + Georgian. + """ + KA + + """ + Kikuyu. + """ + KI + + """ + Kazakh. + """ + KK + + """ + Kalaallisut. + """ + KL + + """ + Khmer. + """ + KM + + """ + Kannada. + """ + KN + + """ + Korean. + """ + KO + + """ + Kashmiri. + """ + KS + + """ + Kurdish. + """ + KU + + """ + Cornish. + """ + KW + + """ + Kyrgyz. + """ + KY + + """ + Luxembourgish. + """ + LB + + """ + Ganda. + """ + LG + + """ + Lingala. + """ + LN + + """ + Lao. + """ + LO + + """ + Lithuanian. + """ + LT + + """ + Luba-Katanga. + """ + LU + + """ + Latvian. + """ + LV + + """ + Malagasy. + """ + MG + + """ + Māori. + """ + MI + + """ + Macedonian. + """ + MK + + """ + Malayalam. + """ + ML + + """ + Mongolian. + """ + MN + + """ + Marathi. + """ + MR + + """ + Malay. + """ + MS + + """ + Maltese. + """ + MT + + """ + Burmese. + """ + MY + + """ + Norwegian (Bokmål). + """ + NB + + """ + North Ndebele. + """ + ND + + """ + Nepali. + """ + NE + + """ + Dutch. + """ + NL + + """ + Norwegian Nynorsk. + """ + NN + + """ + Norwegian. + """ + NO + + """ + Oromo. + """ + OM + + """ + Odia. + """ + OR + + """ + Ossetic. + """ + OS + + """ + Punjabi. + """ + PA + + """ + Polish. + """ + PL + + """ + Pashto. + """ + PS + + """ + Portuguese (Brazil). + """ + PT_BR + + """ + Portuguese (Portugal). + """ + PT_PT + + """ + Quechua. + """ + QU + + """ + Romansh. + """ + RM + + """ + Rundi. + """ + RN + + """ + Romanian. + """ + RO + + """ + Russian. + """ + RU + + """ + Kinyarwanda. + """ + RW + + """ + Sanskrit. + """ + SA + + """ + Sardinian. + """ + SC + + """ + Sindhi. + """ + SD + + """ + Northern Sami. + """ + SE + + """ + Sango. + """ + SG + + """ + Sinhala. + """ + SI + + """ + Slovak. + """ + SK + + """ + Slovenian. + """ + SL + + """ + Shona. + """ + SN + + """ + Somali. + """ + SO + + """ + Albanian. + """ + SQ + + """ + Serbian. + """ + SR + + """ + Sundanese. + """ + SU + + """ + Swedish. + """ + SV + + """ + Swahili. + """ + SW + + """ + Tamil. + """ + TA + + """ + Telugu. + """ + TE + + """ + Tajik. + """ + TG + + """ + Thai. + """ + TH + + """ + Tigrinya. + """ + TI + + """ + Turkmen. + """ + TK + + """ + Tongan. + """ + TO + + """ + Turkish. + """ + TR + + """ + Tatar. + """ + TT + + """ + Uyghur. + """ + UG + + """ + Ukrainian. + """ + UK + + """ + Urdu. + """ + UR + + """ + Uzbek. + """ + UZ + + """ + Vietnamese. + """ + VI + + """ + Wolof. + """ + WO + + """ + Xhosa. + """ + XH + + """ + Yiddish. + """ + YI + + """ + Yoruba. + """ + YO + + """ + Chinese (Simplified). + """ + ZH_CN + + """ + Chinese (Traditional). + """ + ZH_TW + + """ + Zulu. + """ + ZU + + """ + Chinese. + """ + ZH + + """ + Portuguese. + """ + PT + + """ + Church Slavic. + """ + CU + + """ + Volapük. + """ + VO + + """ + Latin. + """ + LA + + """ + Serbo-Croatian. + """ + SH + + """ + Moldavian. + """ + MO +} + +""" +Information about the shop's configured localized experiences, including available countries and languages. The [`country`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.country) and [`language`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.language) fields reflect the active localization context, which you can change using the `@inContext` directive on queries. + +Use [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) to list all countries with enabled localized experiences, and [`availableLanguages`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableLanguages) to get languages available for the currently active country. Each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) includes its own currency, unit system, and available languages. +""" +type Localization { + """ + The list of countries with enabled localized experiences. + """ + availableCountries: [Country!]! + + """ + The list of languages available for the active country. + """ + availableLanguages: [Language!]! + + """ + The country of the active localized experience. Use the `@inContext` directive to change this value. + """ + country: Country! + + """ + The language of the active localized experience. Use the `@inContext` directive to change this value. + """ + language: Language! + + """ + The market including the country of the active localized experience. Use the `@inContext` directive to change this value. + """ + market: Market! @deprecated(reason: "This `market` field will be removed in a future version of the API.") +} + +""" +A physical store location where product inventory is held and that supports in-store pickup. Provides the location's name, address, and geographic coordinates for proximity-based sorting. Use with [`StoreAvailability`](https://shopify.dev/docs/api/storefront/current/objects/StoreAvailability) to show customers where a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) is available for pickup. + +Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). +""" +type Location implements HasMetafields & Node { + """ + The address of the location. + """ + address: LocationAddress! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The name of the location. + """ + name: String! +} + +""" +Represents the address of a location. +""" +type LocationAddress { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The country of the location. + """ + country: String + + """ + The country code of the location. + """ + countryCode: String + + """ + A formatted version of the address for the location. + """ + formatted: [String!]! + + """ + The latitude coordinates of the location. + """ + latitude: Float + + """ + The longitude coordinates of the location. + """ + longitude: Float + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The code for the province, state, or district of the address of the location. + """ + provinceCode: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple Locations. +""" +type LocationConnection { + """ + A list of edges. + """ + edges: [LocationEdge!]! + + """ + A list of the nodes contained in LocationEdge. + """ + nodes: [Location!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Location and a cursor during pagination. +""" +type LocationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of LocationEdge. + """ + node: Location! +} + +""" +The set of valid sort keys for the Location query. +""" +enum LocationSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `city` value. + """ + CITY + + """ + Sort by the `distance` value. + """ + DISTANCE +} + +""" +A physical mailing address associated with a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) or [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order). Stores standard address components including street address, city, province, country, and postal code, along with customer name and company information. + +The address includes geographic coordinates and provides pre-formatted output through the [`formatted`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress#field-MailingAddress.fields.formatted) field, which can optionally include or exclude name and company details. +""" +type MailingAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted("Whether to include the customer's name in the formatted address." withName: Boolean = false, "Whether to include the customer's company in the formatted address." withCompany: Boolean = true): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer. + """ + lastName: String + + """ + The latitude coordinate of the customer address. + """ + latitude: Float + + """ + The longitude coordinate of the customer address. + """ + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. +""" +type MailingAddressConnection { + """ + A list of edges. + """ + edges: [MailingAddressEdge!]! + + """ + A list of the nodes contained in MailingAddressEdge. + """ + nodes: [MailingAddress!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MailingAddress and a cursor during pagination. +""" +type MailingAddressEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of MailingAddressEdge. + """ + node: MailingAddress! +} + +""" +The input fields for creating or updating a [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress). Accepts standard address components including street address, city, province, country, and postal code, along with customer name and contact information. + +Used by the [`customerAddressCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressCreate) and [`customerAddressUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressUpdate) mutations, and as part of [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) for cart delivery preferences. +""" +input MailingAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String + + """ + The first name of the customer. + """ + firstName: String + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +A discount created manually by a merchant, as opposed to [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) or [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and includes a title, optional description, and the discount value as either a fixed amount or percentage. +""" +type ManualDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the application. + """ + description: String + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An audience of buyers that a merchant targets for sales. Audiences can include geographic regions, company locations, and retail locations. Markets enable localized shopping experiences with region-specific languages, currencies, and pricing. + +Each market has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Market#field-Market.fields.handle) for identification and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). Learn more about [building localized experiences with Shopify Markets](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets). +""" +type Market implements HasMetafields & Node { + """ + A human-readable unique string for the market automatically generated from its title. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! +} + +""" +A common set of fields for media content associated with [products](https://shopify.dev/docs/api/storefront/current/objects/Product). Implementations include [`MediaImage`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage) for Shopify-hosted images, [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) for Shopify-hosted videos, [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) for videos hosted on platforms like YouTube or Vimeo, and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d) for 3D models. + +Each implementation shares fields for alt text, content type, and preview images, while adding type-specific fields like embed URLs for external videos or source files for 3D models. +""" +interface Media { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + The presentation for a media. + """ + presentation: MediaPresentation + + """ + The preview image for the media. + """ + previewImage: Image +} + +""" +An auto-generated type for paginating through multiple Media. +""" +type MediaConnection { + """ + A list of edges. + """ + edges: [MediaEdge!]! + + """ + A list of the nodes contained in MediaEdge. + """ + nodes: [Media!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a media object. +""" +enum MediaContentType { + """ + An externally hosted video. + """ + EXTERNAL_VIDEO + + """ + A Shopify hosted image. + """ + IMAGE + + """ + A 3d model. + """ + MODEL_3D + + """ + A Shopify hosted video. + """ + VIDEO +} + +""" +An auto-generated type which holds one Media and a cursor during pagination. +""" +type MediaEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of MediaEdge. + """ + node: Media! +} + +""" +Host for a Media Resource. +""" +enum MediaHost { + """ + Host for YouTube embedded videos. + """ + YOUTUBE + + """ + Host for Vimeo embedded videos. + """ + VIMEO +} + +""" +An image hosted on Shopify's content delivery network (CDN). Used for product images, brand logos, and other visual content across the storefront. + +The [`image`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage#field-MediaImage.fields.image) field provides the actual image data with transformation options. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface alongside other media types like [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d). +""" +type MediaImage implements Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image for the media. + """ + image: Image + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + The presentation for a media. + """ + presentation: MediaPresentation + + """ + The preview image for the media. + """ + previewImage: Image +} + +""" +A media presentation. +""" +type MediaPresentation implements Node { + """ + A JSON object representing a presentation view. + """ + asJson("The format to transform the settings." format: MediaPresentationFormat!): JSON + + """ + A globally-unique ID. + """ + id: ID! @deprecated(reason: "MediaPresentation IDs are being deprecated. Access the data directly via the asJson field on the Media type.") +} + +""" +The possible formats for a media presentation. +""" +enum MediaPresentationFormat { + """ + A model viewer presentation. + """ + MODEL_VIEWER + + """ + A media image presentation. + """ + IMAGE +} + +""" +A navigation structure for building store [menus](https://help.shopify.com/manual/online-store/menus-and-links). Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can be nested to create multi-level navigation hierarchies. + +Menu items can link to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. Use the [`menu`](https://shopify.dev/docs/api/storefront/current/queries/menu) query to retrieve a menu by its handle. +""" +type Menu implements Node { + """ + The menu's handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The menu's child items. + """ + items: [MenuItem!]! + + """ + The count of items on the menu. + """ + itemsCount: Int! + + """ + The menu's title. + """ + title: String! +} + +""" +A navigation link within a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu). Each item has a title, URL, and can link to store resources like [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + +Menu items support nested hierarchies through the [`items`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.items) field, enabling dropdown or multi-level navigation structures. The [`tags`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.tags) field filters results when the item links to a collection specifically. +""" +type MenuItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The menu item's child items. + """ + items: [MenuItem!]! + + """ + The linked resource. + """ + resource: MenuItemResource + + """ + The ID of the linked resource. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!]! + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's URL. + """ + url: URL +} + +""" +The list of possible resources a `MenuItem` can reference. +""" +union MenuItemResource = Article|Blog|Collection|Metaobject|Page|Product|ShopPolicy + +""" +A menu item type. +""" +enum MenuItemType { + """ + A frontpage link. + """ + FRONTPAGE + + """ + A collection link. + """ + COLLECTION + + """ + A collection link. + """ + COLLECTIONS + + """ + A product link. + """ + PRODUCT + + """ + A catalog link. + """ + CATALOG + + """ + A page link. + """ + PAGE + + """ + A blog link. + """ + BLOG + + """ + An article link. + """ + ARTICLE + + """ + A search link. + """ + SEARCH + + """ + A shop policy link. + """ + SHOP_POLICY + + """ + An http link. + """ + HTTP + + """ + A metaobject page link. + """ + METAOBJECT + + """ + A customer account page link. + """ + CUSTOMER_ACCOUNT_PAGE +} + +""" +A [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) that a buyer intends to purchase at checkout. +""" +union Merchandise = ProductVariant + +""" +[Custom metadata](https://shopify.dev/docs/apps/build/metafields) attached to a Shopify resource such as a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), or [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Each metafield is identified by a namespace and key, and stores a value with an associated type. + +Values are always stored as strings, but the [`type`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.type) field indicates how to interpret the data. When a metafield's type is a resource reference, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) or [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) fields to retrieve the linked objects. Access metafields on any resource that implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface. +""" +type Metafield implements Node { + """ + The date and time when the storefront metafield was created. + """ + createdAt: DateTime! + + """ + The description of a metafield. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique identifier for the metafield within its namespace. + """ + key: String! + + """ + Whether the metafield's type is a list type. Returns `true` for types like `list.color` or `list.single_line_text_field`. + """ + list: Boolean! + + """ + The container for a group of metafields that the metafield is associated with. + """ + namespace: String! + + """ + The type of resource that the metafield is attached to. + """ + parentResource: MetafieldParentResource! + + """ + Returns a reference object if the metafield's type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of reference objects if the metafield's type is a resource reference list. + """ + references("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): MetafieldReferenceConnection + + """ + The type name of the metafield. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/definitions/types). + """ + type: String! + + """ + The date and time when the metafield was last updated. + """ + updatedAt: DateTime! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! +} + +""" +Possible error codes that can be returned by `MetafieldDeleteUserError`. +""" +enum MetafieldDeleteErrorCode { + """ + The owner ID is invalid. + """ + INVALID_OWNER + + """ + Metafield not found. + """ + METAFIELD_DOES_NOT_EXIST + + """ + The current app is not authorized to perform this action. + """ + APP_NOT_AUTHORIZED +} + +""" +An error that occurs during the execution of cart metafield deletion. +""" +type MetafieldDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDeleteErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Filters products in a collection by matching a specific metafield value. Used by the [`ProductFilter`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter) input's `productMetafield` and `variantMetafield` fields. + +Supports the following metafield types: `number_integer`, `number_decimal`, `single_line_text_field`, and `boolean`. +""" +input MetafieldFilter { + """ + The namespace of the metafield to filter on. + """ + namespace: String! + + """ + The key of the metafield to filter on. + """ + key: String! + + """ + The value of the metafield. + """ + value: String! +} + +""" +The Shopify resource that owns a metafield. Returned by the `Metafield` object's [`parentResource`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.parentResource) field, enabling traversal from a metafield back to the resource it's attached to. +""" +union MetafieldParentResource = Article|Blog|Cart|Collection|Company|CompanyLocation|Customer|Location|Market|Order|Page|Product|ProductVariant|SellingPlan|Shop + +""" +The resource that a metafield points to when its type is a resource reference. Metafields can store references to other Shopify resources, and this union provides access to the actual referenced object. + +Returned by the `Metafield` object's [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) field for single references or the [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) field for lists. +""" +union MetafieldReference = Article|Collection|GenericFile|MediaImage|Metaobject|Model3d|Page|Product|ProductVariant|Video + +""" +An auto-generated type for paginating through multiple MetafieldReferences. +""" +type MetafieldReferenceConnection { + """ + A list of edges. + """ + edges: [MetafieldReferenceEdge!]! + + """ + A list of the nodes contained in MetafieldReferenceEdge. + """ + nodes: [MetafieldReference!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldReference and a cursor during pagination. +""" +type MetafieldReferenceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of MetafieldReferenceEdge. + """ + node: MetafieldReference! +} + +""" +An error that occurs during the execution of `MetafieldsSet`. +""" +type MetafieldsSetUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldsSetUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldsSetUserError`. +""" +enum MetafieldsSetUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is too long. + """ + TOO_LONG + + """ + The owner ID is invalid. + """ + INVALID_OWNER + + """ + The value is invalid for metafield type or for definition options. + """ + INVALID_VALUE + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The current app is not authorized to perform this action. + """ + APP_NOT_AUTHORIZED +} + +""" +An instance of [custom structured data](https://shopify.dev/docs/apps/build/metaobjects) defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections. + +Each metaobject contains fields that match the types and validation rules specified in its definition. [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the `renderable` capability, then the [`seo`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.seo) field provides SEO metadata. If it has the `online_store` capability, then the [`onlineStoreUrl`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.onlineStoreUrl) field returns the public URL. +""" +type Metaobject implements Node & OnlineStorePublishable { + """ + Accesses a field of the object by key. + """ + field("The key of the field." key: String!): MetaobjectField + + """ + All object fields with defined values. + Omitted object keys can be assumed null, and no guarantees are made about field order. + """ + fields: [MetaobjectField!]! + + """ + The unique handle of the metaobject. Useful as a custom ID. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL used for viewing the metaobject on the shop's Online Store. Returns `null` if the metaobject definition doesn't have the `online_store` capability. + """ + onlineStoreUrl: URL + + """ + The metaobject's SEO information. Returns `null` if the metaobject definition + doesn't have the `renderable` capability. + """ + seo: MetaobjectSEO + + """ + The type of the metaobject. + """ + type: String! + + """ + The date and time when the metaobject was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Metaobjects. +""" +type MetaobjectConnection { + """ + A list of edges. + """ + edges: [MetaobjectEdge!]! + + """ + A list of the nodes contained in MetaobjectEdge. + """ + nodes: [Metaobject!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Metaobject and a cursor during pagination. +""" +type MetaobjectEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of MetaobjectEdge. + """ + node: Metaobject! +} + +""" +The value of a field within a [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject). For fields that reference other resources, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/MetaobjectField#field-MetaobjectField.fields.reference) field for single references or [`references`](https://shopify.dev/docs/api/storefront/current/objects/MetaobjectField#field-MetaobjectField.fields.references) for lists. +""" +type MetaobjectField { + """ + The field key. + """ + key: String! + + """ + A referenced object if the field type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of referenced objects if the field type is a resource reference list. + """ + references("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): MetafieldReferenceConnection + + """ + The type name of the field. + See the list of [supported types](https://shopify.dev/apps/metafields/definitions/types). + """ + type: String! + + """ + The field value. + """ + value: String +} + +""" +The input fields used to retrieve a metaobject by handle. +""" +input MetaobjectHandleInput { + """ + The handle of the metaobject. + """ + handle: String! + + """ + The type of the metaobject. + """ + type: String! +} + +""" +SEO information for a metaobject. +""" +type MetaobjectSEO { + """ + The meta description. + """ + description: MetaobjectField + + """ + The SEO title. + """ + title: MetaobjectField +} + +""" +Represents a Shopify hosted 3D model. +""" +type Model3d implements Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + The presentation for a media. + """ + presentation: MediaPresentation + + """ + The preview image for the media. + """ + previewImage: Image + + """ + The sources for a 3d model. + """ + sources: [Model3dSource!]! +} + +""" +Represents a source for a Shopify hosted 3d model. +""" +type Model3dSource { + """ + The filesize of the 3d model. + """ + filesize: Int! + + """ + The format of the 3d model. + """ + format: String! + + """ + The MIME type of the 3d model. + """ + mimeType: String! + + """ + The URL of the 3d model. + """ + url: String! +} + +""" +The input fields for a monetary value with currency. +""" +input MoneyInput { + """ + Decimal money amount. + """ + amount: Decimal! + + """ + Currency of the money. + """ + currencyCode: CurrencyCode! +} + +""" +A precise monetary value with its associated currency. Combines a decimal amount with a three-letter [`CurrencyCode`](https://shopify.dev/docs/api/storefront/current/enums/CurrencyCode) to express prices, costs, and other financial values. For example, 12.99 USD. +""" +type MoneyV2 { + """ + Decimal money amount. + """ + amount: Decimal! + + """ + Currency of the money. + """ + currencyCode: CurrencyCode! +} + +""" +The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. +""" +type Mutation { + """ + Updates the attributes on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Attributes are custom key-value pairs that store additional information, such as gift messages, special instructions, or order notes. + """ + cartAttributesUpdate("An array of key-value pairs that contains additional information about the cart.\n\nThe input must not contain more than `250` values." attributes: [AttributeInput!]!, "The ID of the cart." cartId: ID!): CartAttributesUpdatePayload + + """ + Updates the billing address on the cart. + """ + cartBillingAddressUpdate("The ID of the cart." cartId: ID!, "The customer's billing address." billingAddress: MailingAddressInput): CartBillingAddressUpdatePayload + + """ + Updates the buyer identity on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart), including contact information, location, and checkout preferences. The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. + + Use this mutation to associate a logged-in customer via access token, set a B2B company location, or configure checkout preferences like delivery method. Preferences prefill checkout fields but don't sync back to the cart if overwritten at checkout. + """ + cartBuyerIdentityUpdate("The ID of the cart." cartId: ID!, "The customer associated with the cart. Used to determine\n[international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing).\nBuyer identity should match the customer's shipping address.\n" buyerIdentity: CartBuyerIdentityInput!): CartBuyerIdentityUpdatePayload + + """ + Creates a clone of the specified cart with all personally identifiable information removed. + """ + cartClone("The ID of the cart to clone." cartId: ID!): CartClonePayload + + """ + Creates a new [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) for a buyer session. You can optionally initialize the cart with merchandise lines, discount codes, gift card codes, buyer identity for international pricing, and custom attributes. + + The returned cart includes a `checkoutUrl` that directs the buyer to complete their purchase. + """ + cartCreate("The fields used to create a cart." input: CartInput): CartCreatePayload + + """ + Adds delivery addresses to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). A cart can have up to 20 delivery addresses. One address can be marked as selected for checkout, and addresses can optionally be marked as one-time use so they aren't saved to the customer's account. + """ + cartDeliveryAddressesAdd("The ID of the cart." cartId: ID!, "A list of delivery addresses to add to the cart.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressInput!]!): CartDeliveryAddressesAddPayload + + """ + Removes delivery addresses from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by their IDs, allowing batch removal in a single request. + """ + cartDeliveryAddressesRemove("The ID of the cart." cartId: ID!, "A list of delivery addresses by handle to remove from the cart.\n\nThe input must not contain more than `250` values." addressIds: [ID!]!): CartDeliveryAddressesRemovePayload + + """ + Replaces all delivery addresses on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) with a new set of addresses in a single operation. Unlike [`cartDeliveryAddressesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartDeliveryAddressesUpdate), which modifies existing addresses, this mutation removes all current addresses and sets the provided list as the new delivery addresses. + + One address can be marked as selected, and each address can be flagged for one-time use or configured with a specific validation strategy. + """ + cartDeliveryAddressesReplace("The ID of the cart." cartId: ID!, "A list of delivery addresses to replace on the cart.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressInput!]!): CartDeliveryAddressesReplacePayload + + """ + Updates one or more delivery addresses on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Each address can be modified to change its details, set it as the pre-selected address for checkout, or mark it for one-time use so it isn't saved to the customer's account. + """ + cartDeliveryAddressesUpdate("The ID of the cart." cartId: ID!, "The delivery addresses to update.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressUpdateInput!]!): CartDeliveryAddressesUpdatePayload + + """ + Updates the discount codes applied to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). This mutation replaces all existing discount codes with the provided list, so pass an empty array to remove all codes. Discount codes are case-insensitive. + + After updating, check each [`CartDiscountCode`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountCode) in the cart's [`discountCodes`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.discountCodes) field to see whether the code is applicable to the cart's current contents. + """ + cartDiscountCodesUpdate("The ID of the cart." cartId: ID!, "The case-insensitive discount codes that the customer added at checkout.\n\nThe input must not contain more than `250` values." discountCodes: [String!]!): CartDiscountCodesUpdatePayload + + """ + Adds gift card codes to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) without replacing any codes already applied. Gift card codes are case-insensitive. + + To replace all gift card codes instead of adding to them, use [`cartGiftCardCodesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartGiftCardCodesUpdate). + """ + cartGiftCardCodesAdd("The ID of the cart." cartId: ID!, "The case-insensitive gift card codes to add.\n\nThe input must not contain more than `250` values." giftCardCodes: [String!]!): CartGiftCardCodesAddPayload + + """ + Removes gift cards from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) using their IDs. You can retrieve the IDs of applied gift cards from the cart's [`appliedGiftCards`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.appliedGiftCards) field. + """ + cartGiftCardCodesRemove("The ID of the cart." cartId: ID!, "The gift cards to remove.\n\nThe input must not contain more than `250` values." appliedGiftCardIds: [ID!]!): CartGiftCardCodesRemovePayload + + """ + Updates the gift card codes applied to the cart. Unlike [`cartGiftCardCodesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartGiftCardCodesAdd), which adds codes without replacing existing ones, this mutation sets the gift card codes for the cart. Gift card codes are case-insensitive. + """ + cartGiftCardCodesUpdate("The ID of the cart." cartId: ID!, "The case-insensitive gift card codes.\n\nThe input must not contain more than `250` values." giftCardCodes: [String!]!): CartGiftCardCodesUpdatePayload + + """ + Adds one or more merchandise lines to an existing [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Each line specifies the [product variant](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to purchase. Quantity defaults to `1` if not provided. + + You can add up to 250 lines in a single request. Use [`CartLineInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineInput) to configure each line's merchandise, quantity, selling plan, custom attributes, and any parent relationships for nested line items such as warranties or add-ons. + """ + cartLinesAdd("The ID of the cart." cartId: ID!, "A list of merchandise lines to add to the cart.\n\nThe input must not contain more than `250` values." lines: [CartLineInput!]!): CartLinesAddPayload + + """ + Removes one or more merchandise lines from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Accepts up to 250 line IDs per request. Returns the updated cart along with any errors or warnings. + """ + cartLinesRemove("The ID of the cart." cartId: ID!, "The merchandise line IDs to remove.\n\nThe input must not contain more than `250` values." lineIds: [ID!]!): CartLinesRemovePayload + + """ + Updates one or more merchandise lines on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). You can modify the quantity, swap the merchandise, change custom attributes, or update the selling plan for each line. You can update a maximum of 250 lines per request. + + Omitting the [`attributes`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate#arguments-lines.fields.attributes) field or setting it to null preserves existing line attributes. Pass an empty array to clear all attributes from a line. + """ + cartLinesUpdate("The ID of the cart." cartId: ID!, "The merchandise lines to update.\n\nThe input must not contain more than `250` values." lines: [CartLineUpdateInput!]!): CartLinesUpdatePayload + + """ + Deletes a cart metafield. + + > Note: + > This mutation won't trigger [Shopify Functions](https://shopify.dev/docs/api/functions). The changes won't be available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions. + """ + cartMetafieldDelete("The input fields used to delete a cart metafield." input: CartMetafieldDeleteInput!): CartMetafieldDeletePayload + + """ + Sets [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) values on a cart, creating new metafields or updating existing ones. Accepts up to 25 metafields per request. + + Cart metafields can automatically copy to order metafields when an order is created, if there's a matching order metafield definition with the [cart to order copyable](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. + + > Note: + > This mutation doesn't trigger [Shopify Functions](https://shopify.dev/docs/api/functions). Changes aren't available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions. + """ + cartMetafieldsSet("The list of Cart metafield values to set. Maximum of 25.\n\nThe input must not contain more than `250` values." metafields: [CartMetafieldsSetInput!]!): CartMetafieldsSetPayload + + """ + Updates the note on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). The note is a text field that stores additional information, such as a personalized message from the buyer or special instructions for the order. + """ + cartNoteUpdate("The ID of the cart." cartId: ID!, "The note on the cart." note: String!): CartNoteUpdatePayload + + """ + Update the customer's payment method that will be used to checkout. + """ + cartPaymentUpdate("The ID of the cart." cartId: ID!, "The payment information for the cart that will be used at checkout." payment: CartPaymentInput!): CartPaymentUpdatePayload + + """ + Prepare the cart for cart checkout completion. + """ + cartPrepareForCompletion("The ID of the cart." cartId: ID!): CartPrepareForCompletionPayload + + """ + Removes personally identifiable information from the cart. + """ + cartRemovePersonalData("The ID of the cart." cartId: ID!): CartRemovePersonalDataPayload + + """ + Updates the selected delivery option for one or more [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) objects in a cart. Each delivery group represents items shipping to a specific address and offers multiple delivery options with different costs and methods. + + Use this mutation when a customer chooses their preferred shipping method during checkout. The [`deliveryOptionHandle`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectedDeliveryOptionInput#field-CartSelectedDeliveryOptionInput.fields.deliveryOptionHandle) identifies which [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) to select for each delivery group. + """ + cartSelectedDeliveryOptionsUpdate("The ID of the cart." cartId: ID!, "The selected delivery options.\n\nThe input must not contain more than `250` values." selectedDeliveryOptions: [CartSelectedDeliveryOptionInput!]!): CartSelectedDeliveryOptionsUpdatePayload + + """ + Submit the cart for checkout completion. + """ + cartSubmitForCompletion("The ID of the cart." cartId: ID!, "The attemptToken is used to guarantee an idempotent result.\nIf more than one call uses the same attemptToken within a short period of time, only one will be accepted.\n" attemptToken: String!): CartSubmitForCompletionPayload + + """ + For legacy customer accounts only. + + Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) using the customer's email and password. The access token is required to read or modify the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) object, such as updating account information or managing addresses. + + The token has an expiration time. Use [`customerAccessTokenRenew`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenRenew) to extend the token before it expires, or create a new token if it's already expired. + + > Caution: + > This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password. + """ + customerAccessTokenCreate("The fields used to create a customer access token." input: CustomerAccessTokenCreateInput!): CustomerAccessTokenCreatePayload + + """ + Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) using a [multipass token](https://shopify.dev/docs/api/multipass) instead of email and password. This enables single sign-on for customers who authenticate through an external system. + + If the customer doesn't exist in Shopify, then a new customer record is created automatically. If the customer exists but the record is disabled, then the customer record is re-enabled. + + > Caution: + > Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance. + """ + customerAccessTokenCreateWithMultipass("A valid [multipass token](https://shopify.dev/api/multipass) to be authenticated." multipassToken: String!): CustomerAccessTokenCreateWithMultipassPayload + + """ + Permanently destroys a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken). Use this mutation when a customer explicitly signs out or when you need to revoke the token. Use [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) to generate a new token with the customer's credentials. + + > Caution: + > This action is irreversible. The customer needs to sign in again to obtain a new access token. + """ + customerAccessTokenDelete("The access token used to identify the customer." customerAccessToken: String!): CustomerAccessTokenDeletePayload + + """ + Extends the validity of a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) before it expires. The renewed token maintains authenticated access to customer operations. + + Renewal must happen before the token's [`expiresAt`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken#field-CustomerAccessToken.fields.expiresAt) time. If a token has already expired, then use [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) to generate a new token with the customer's credentials. + + > Caution: + > Store access tokens securely. Never store tokens in plain text or insecure locations, and avoid exposing them in URLs or logs. + """ + customerAccessTokenRenew("The access token used to identify the customer." customerAccessToken: String!): CustomerAccessTokenRenewPayload + + """ + Activates a customer account using an activation token received from the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. The customer sets their password during activation and receives a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for authenticated access. + + For a simpler approach that doesn't require parsing the activation URL, use [`customerActivateByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerActivateByUrl) instead. + + > Caution: + > This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token. + """ + customerActivate("Specifies the customer to activate." id: ID!, "The fields used to activate a customer." input: CustomerActivateInput!): CustomerActivatePayload + + """ + Activates a customer account using the full activation URL from the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. This approach simplifies activation by accepting the complete URL directly, eliminating the need to parse it for the customer ID and activation token. Returns a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for authenticating subsequent requests. + + > Caution: + > Store the returned access token securely. It grants access to the customer's account data. + """ + customerActivateByUrl("The customer activation URL." activationUrl: URL!, "A new password set during activation." password: String!): CustomerActivateByUrlPayload + + """ + Creates a new [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Use the customer's [access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressCreate#arguments-customerAccessToken) to identify them. Successful creation returns the new address. + + Each customer can have multiple addresses. + """ + customerAddressCreate("The access token used to identify the customer." customerAccessToken: String!, "The customer mailing address to create." address: MailingAddressInput!): CustomerAddressCreatePayload + + """ + Permanently deletes a specific [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a valid [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressDelete#arguments-customerAccessToken) to authenticate the request. + + > Caution: + > This action is irreversible. You can't recover the deleted address. + """ + customerAddressDelete("Specifies the address to delete." id: ID!, "The access token used to identify the customer." customerAccessToken: String!): CustomerAddressDeletePayload + + """ + Updates an existing [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressUpdate#arguments-customerAccessToken) to identify the customer, an ID to specify which address to modify, and an [`address`](https://shopify.dev/docs/api/storefront/current/input-objects/MailingAddressInput) with the updated fields. + + Successful update returns the updated [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress). + """ + customerAddressUpdate("The access token used to identify the customer." customerAccessToken: String!, "Specifies the customer address to update." id: ID!, "The customer’s mailing address." address: MailingAddressInput!): CustomerAddressUpdatePayload + + """ + Creates a new [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) account with the provided contact information and login credentials. The customer can then sign in for things such as accessing their account, viewing order history, and managing saved addresses. + + > Caution: + > This mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code. + """ + customerCreate("The fields used to create a new customer." input: CustomerCreateInput!): CustomerCreatePayload + + """ + Updates the default address of an existing [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerDefaultAddressUpdate#arguments-customerAccessToken) to identify the customer and an address ID to specify which address to set as the new default. + """ + customerDefaultAddressUpdate("The access token used to identify the customer." customerAccessToken: String!, "ID of the address to set as the new default for the customer." addressId: ID!): CustomerDefaultAddressUpdatePayload + + """ + Sends a reset password email to the customer. The email contains a reset password URL and token that you can pass to the [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerResetByUrl) or [`customerReset`](https://shopify.dev/docs/api/storefront/current/mutations/customerReset) mutation to reset the customer's password. + + This mutation is throttled by IP. With private access, you can provide a [`Shopify-Storefront-Buyer-IP` header](https://shopify.dev/docs/api/usage/authentication#optional-ip-header) instead of the request IP. The header is case-sensitive. + + > Caution: + > Ensure the value provided to `Shopify-Storefront-Buyer-IP` is trusted. Unthrottled access to this mutation presents a security risk. + """ + customerRecover("The email address of the customer to recover." email: String!): CustomerRecoverPayload + + """ + Resets a customer's password using the reset token from a password recovery email. On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for immediate authentication. + + Use the [`customerRecover`](https://shopify.dev/docs/api/storefront/current/mutations/customerRecover) mutation to send the password recovery email that provides the reset token. Alternatively, use [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerResetByUrl) if you have the full reset URL instead of the customer ID and token. + + > Caution: + > This mutation handles sensitive customer credentials. Validate password requirements on the client before submission. + """ + customerReset("Specifies the customer to reset." id: ID!, "The fields used to reset a customer’s password." input: CustomerResetInput!): CustomerResetPayload + + """ + Resets a customer's password using the reset URL from a password recovery email. The reset URL is generated by the [`customerRecover`](https://shopify.dev/docs/api/storefront/current/mutations/customerRecover) mutation. + + On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for immediate authentication. + + > Caution: + > This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code. + """ + customerResetByUrl("The customer's reset password url." resetUrl: URL!, "New password that will be set as part of the reset password process." password: String!): CustomerResetByUrlPayload + + """ + Updates a [customer's](https://shopify.dev/docs/api/storefront/current/objects/Customer) personal information such as name, password, and marketing preferences. Requires a valid [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) to authenticate the customer making the update. + + If the customer's password is updated, then all previous access tokens become invalid. The mutation returns a new access token in the payload to maintain the customer's session. + + > Caution: + > Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out. + """ + customerUpdate("The access token used to identify the customer." customerAccessToken: String!, "The customer object input." customer: CustomerUpdateInput!): CustomerUpdatePayload + + """ + Creates a [Shop Pay payment request session](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestSession) for processing payments. The session includes a checkout URL where customers complete their purchase and a token for subsequent operations like submitting the payment. + + The `sourceIdentifier` must be unique across all orders to ensure accurate reconciliation. + + For a complete integration guide including the JavaScript SDK setup and checkout flow, refer to the [Shop Component API documentation](https://shopify.dev/docs/api/commerce-components/pay). For implementation steps, see the [development journey guide](https://shopify.dev/docs/api/commerce-components/pay/development-journey). For common error scenarios, see the [troubleshooting guide](https://shopify.dev/docs/api/commerce-components/pay/troubleshooting-guide). + """ + shopPayPaymentRequestSessionCreate("A unique identifier for the payment request session." sourceIdentifier: String!, "A payment request object." paymentRequest: ShopPayPaymentRequestInput!): ShopPayPaymentRequestSessionCreatePayload + + """ + Finalizes a [Shop Pay payment request session](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestSession). Call this mutation after creating a session with [`shopPayPaymentRequestSessionCreate`](https://shopify.dev/docs/api/storefront/current/mutations/shopPayPaymentRequestSessionCreate). + + The [`idempotencyKey`](https://shopify.dev/docs/api/storefront/current/mutations/shopPayPaymentRequestSessionSubmit#arguments-idempotencyKey) argument ensures the payment transaction occurs only once, preventing duplicate charges. On success, returns a [`ShopPayPaymentRequestReceipt`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestReceipt) with the processing status and a receipt token. + + For a complete integration guide including the JavaScript SDK setup and checkout flow, refer to the [Shop Component API documentation](https://shopify.dev/docs/api/commerce-components/pay). For implementation steps, see the [development journey guide](https://shopify.dev/docs/api/commerce-components/pay/development-journey). For common error scenarios, see the [troubleshooting guide](https://shopify.dev/docs/api/commerce-components/pay/troubleshooting-guide). + """ + shopPayPaymentRequestSessionSubmit("A token representing a payment session request." token: String!, "The final payment request object." paymentRequest: ShopPayPaymentRequestInput!, "The idempotency key is used to guarantee an idempotent result." idempotencyKey: String!, "The order name to be used for the order created from the payment request." orderName: String): ShopPayPaymentRequestSessionSubmitPayload +} + +""" +Enables global object identification following the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). Any type implementing this interface has a globally-unique `id` field and can be fetched directly using the [`node`](https://shopify.dev/docs/api/storefront/current/queries/node) or [`nodes`](https://shopify.dev/docs/api/storefront/current/queries/nodes) queries. +""" +interface Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Represents a resource that can be published to the Online Store sales channel. +""" +interface OnlineStorePublishable { + """ + The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + """ + onlineStoreUrl: URL +} + +""" +An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. +""" +type Order implements HasMetafields & Node { + """ + The address associated with the payment method. + """ + billingAddress: MailingAddress + + """ + The reason for the order's cancellation. Returns `null` if the order wasn't canceled. + """ + cancelReason: OrderCancelReason + + """ + The date and time when the order was canceled. Returns null if the order wasn't canceled. + """ + canceledAt: DateTime + + """ + The code of the currency used for the payment. + """ + currencyCode: CurrencyCode! + + """ + The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes aren't included unless the order is a taxes-included order. + """ + currentSubtotalPrice: MoneyV2! + + """ + The total cost of duties for the order, including refunds. + """ + currentTotalDuties: MoneyV2 + + """ + The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. + """ + currentTotalPrice: MoneyV2! + + """ + The total cost of shipping, excluding shipping lines that have been refunded or removed. Taxes aren't included unless the order is a taxes-included order. + """ + currentTotalShippingPrice: MoneyV2! + + """ + The total of all taxes applied to the order, excluding taxes for returned line items. + """ + currentTotalTax: MoneyV2! + + """ + A list of the custom attributes added to the order. For example, whether an order is a customer's first. + """ + customAttributes: [Attribute!]! + + """ + The locale code in which this specific order happened. + """ + customerLocale: String + + """ + The unique URL that the customer can use to access the order. + """ + customerUrl: URL + + """ + Discounts that have been applied on the order. + """ + discountApplications("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DiscountApplicationConnection! + + """ + Whether the order has had any edits applied or not. + """ + edited: Boolean! + + """ + The customer's email address. + """ + email: String + + """ + The financial status of the order. + """ + financialStatus: OrderFinancialStatus + + """ + The fulfillment status for the order. + """ + fulfillmentStatus: OrderFulfillmentStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + List of the order’s line items. + """ + lineItems("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderLineItemConnection! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + Unique identifier for the order that appears on the order. + For example, _#1000_ or _Store1001. + """ + name: String! + + """ + A unique numeric identifier for the order for use by shop owner and customer. + """ + orderNumber: Int! + + """ + The total cost of duties charged at checkout. + """ + originalTotalDuties: MoneyV2 + + """ + The total price of the order before any applied edits. + """ + originalTotalPrice: MoneyV2! + + """ + The customer's phone number for receiving SMS notifications. + """ + phone: String + + """ + The date and time when the order was imported. + This value can be set to dates in the past when importing from other systems. + If no value is provided, it will be auto-generated based on current date and time. + """ + processedAt: DateTime! + + """ + The address to where the order will be shipped. + """ + shippingAddress: MailingAddress + + """ + The discounts that have been allocated onto the shipping line by discount applications. + """ + shippingDiscountAllocations: [DiscountAllocation!]! + + """ + The unique URL for the order's status page. + """ + statusUrl: URL! + + """ + Price of the order before shipping and taxes. + """ + subtotalPrice: MoneyV2 + + """ + Price of the order before duties, shipping and taxes. + """ + subtotalPriceV2: MoneyV2 @deprecated(reason: "Use `subtotalPrice` instead.") + + """ + List of the order’s successful fulfillments. + """ + successfulFulfillments("Truncate the array result to this size." first: Int): [Fulfillment!] + + """ + The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). + """ + totalPrice: MoneyV2! + + """ + The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). + """ + totalPriceV2: MoneyV2! @deprecated(reason: "Use `totalPrice` instead.") + + """ + The total amount that has been refunded. + """ + totalRefunded: MoneyV2! + + """ + The total amount that has been refunded. + """ + totalRefundedV2: MoneyV2! @deprecated(reason: "Use `totalRefunded` instead.") + + """ + The total cost of shipping. + """ + totalShippingPrice: MoneyV2! + + """ + The total cost of shipping. + """ + totalShippingPriceV2: MoneyV2! @deprecated(reason: "Use `totalShippingPrice` instead.") + + """ + The total cost of taxes. + """ + totalTax: MoneyV2 + + """ + The total cost of taxes. + """ + totalTaxV2: MoneyV2 @deprecated(reason: "Use `totalTax` instead.") +} + +""" +Represents the reason for the order's cancellation. +""" +enum OrderCancelReason { + """ + The customer wanted to cancel the order. + """ + CUSTOMER + + """ + Payment was declined. + """ + DECLINED + + """ + The order was fraudulent. + """ + FRAUD + + """ + There was insufficient inventory. + """ + INVENTORY + + """ + Staff made an error. + """ + STAFF + + """ + The order was canceled for an unlisted reason. + """ + OTHER +} + +""" +An auto-generated type for paginating through multiple Orders. +""" +type OrderConnection { + """ + A list of edges. + """ + edges: [OrderEdge!]! + + """ + A list of the nodes contained in OrderEdge. + """ + nodes: [Order!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + The total count of Orders. + """ + totalCount: UnsignedInt64! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. +""" +type OrderEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of OrderEdge. + """ + node: Order! +} + +""" +Represents the order's current financial status. +""" +enum OrderFinancialStatus { + """ + Displayed as **Pending**. + """ + PENDING + + """ + Displayed as **Authorized**. + """ + AUTHORIZED + + """ + Displayed as **Partially paid**. + """ + PARTIALLY_PAID + + """ + Displayed as **Partially refunded**. + """ + PARTIALLY_REFUNDED + + """ + Displayed as **Voided**. + """ + VOIDED + + """ + Displayed as **Paid**. + """ + PAID + + """ + Displayed as **Refunded**. + """ + REFUNDED +} + +""" +The aggregated fulfillment status of an [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order), summarizing the state of all line items. Used for display purposes. + +Statuses range from unfulfilled to fully fulfilled, with intermediate states such as in progress and on hold. + +Learn more about [order statuses](https://help.shopify.com/manual/fulfillment/managing-orders/order-status). +""" +enum OrderFulfillmentStatus { + """ + Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. + """ + UNFULFILLED + + """ + Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. + """ + PARTIALLY_FULFILLED + + """ + Displayed as **Fulfilled**. All of the items in the order have been fulfilled. + """ + FULFILLED + + """ + Displayed as **Restocked**. All of the items in the order have been restocked. Replaced by "UNFULFILLED" status. + """ + RESTOCKED + + """ + Displayed as **Pending fulfillment**. A request for fulfillment of some items awaits a response from the fulfillment service. Replaced by "IN_PROGRESS" status. + """ + PENDING_FULFILLMENT + + """ + Displayed as **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. + """ + OPEN + + """ + Displayed as **In progress**. Some of the items in the order have been fulfilled, or a request for fulfillment has been sent to the fulfillment service. + """ + IN_PROGRESS + + """ + Displayed as **On hold**. All of the unfulfilled items in this order are on hold. + """ + ON_HOLD + + """ + Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. + """ + SCHEDULED +} + +""" +Represents a single line in an order. There is one line item for each distinct product variant. +""" +type OrderLineItem { + """ + The number of entries associated to the line item minus the items that have been removed. + """ + currentQuantity: Int! + + """ + List of custom attributes associated to the line item. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the order line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total price of the line item, including discounts, and displayed in the presentment currency. + """ + discountedTotalPrice: MoneyV2! + + """ + The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it's displayed in the presentment currency. + """ + originalTotalPrice: MoneyV2! + + """ + The number of products variants associated to the line item. + """ + quantity: Int! + + """ + The title of the product combined with title of the variant. + """ + title: String! + + """ + The product variant object associated to the line item. + """ + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple OrderLineItems. +""" +type OrderLineItemConnection { + """ + A list of edges. + """ + edges: [OrderLineItemEdge!]! + + """ + A list of the nodes contained in OrderLineItemEdge. + """ + nodes: [OrderLineItem!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OrderLineItem and a cursor during pagination. +""" +type OrderLineItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of OrderLineItemEdge. + """ + node: OrderLineItem! +} + +""" +The set of valid sort keys for the Order query. +""" +enum OrderSortKeys { + """ + Sort by the `processed_at` value. + """ + PROCESSED_AT + + """ + Sort by the `total_price` value. + """ + TOTAL_PRICE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A [custom content page](https://help.shopify.com/manual/online-store/add-edit-pages) on a merchant's store. Pages display HTML-formatted content, such as "About Us", contact details, or store policies. + +Each page has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Page#field-Page.fields.handle) for URL routing and includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information for search engine optimization. Pages support [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) attachments for storing additional custom data. +""" +type Page implements HasMetafields & Node & OnlineStorePublishable & Trackable { + """ + The description of the page, complete with HTML formatting. + """ + body: HTML! + + """ + Summary of the page body. + """ + bodySummary: String! + + """ + The timestamp of the page creation. + """ + createdAt: DateTime! + + """ + A human-friendly unique string for the page automatically generated from its title. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + """ + onlineStoreUrl: URL + + """ + The page's SEO information. + """ + seo: SEO + + """ + The title of the page. + """ + title: String! + + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String + + """ + The timestamp of the latest page update. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Pages. +""" +type PageConnection { + """ + A list of edges. + """ + edges: [PageEdge!]! + + """ + A list of the nodes contained in PageEdge. + """ + nodes: [Page!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Page and a cursor during pagination. +""" +type PageEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of PageEdge. + """ + node: Page! +} + +""" +Returns information about pagination in a connection, in accordance with the +[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). +For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +""" +type PageInfo { + """ + The cursor corresponding to the last node in edges. + """ + endCursor: String + + """ + Whether there are more pages to fetch following the current page. + """ + hasNextPage: Boolean! + + """ + Whether there are any pages prior to the current page. + """ + hasPreviousPage: Boolean! + + """ + The cursor corresponding to the first node in edges. + """ + startCursor: String +} + +""" +The set of valid sort keys for the Page query. +""" +enum PageSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Type for paginating through multiple sitemap's resources. +""" +type PaginatedSitemapResources { + """ + Whether there are more pages to fetch following the current page. + """ + hasNextPage: Boolean! + + """ + List of sitemap resources for the current page. + Note: The number of items varies between 0 and 250 per page. + """ + items: [SitemapResourceInterface!]! +} + +""" +Settings related to payments. +""" +type PaymentSettings { + """ + List of the card brands which the business entity accepts. + """ + acceptedCardBrands: [CardBrand!]! + + """ + The url pointing to the endpoint to vault credit cards. + """ + cardVaultUrl: URL! + + """ + The country where the shop is located. When multiple business entities operate within the shop, then this will represent the country of the business entity that's serving the specified buyer context. + """ + countryCode: CountryCode! + + """ + The three-letter code for the shop's primary currency. + """ + currencyCode: CurrencyCode! + + """ + A list of enabled currencies (ISO 4217 format) that the shop accepts. + Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. + """ + enabledPresentmentCurrencies: [CurrencyCode!]! + + """ + The shop’s Shopify Payments account ID. + """ + shopifyPaymentsAccountId: String + + """ + List of the digital wallets which the business entity supports. + """ + supportedDigitalWallets: [DigitalWallet!]! +} + +""" +Decides the distribution of results. +""" +enum PredictiveSearchLimitScope { + """ + Return results up to limit across all types. + """ + ALL + + """ + Return results up to limit per type. + """ + EACH +} + +""" +Returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query to power type-ahead search experiences. Includes matching [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects, along with query suggestions that help customers refine their search. +""" +type PredictiveSearchResult { + """ + The articles that match the search query. + """ + articles: [Article!]! + + """ + The articles that match the search query. + """ + collections: [Collection!]! + + """ + The pages that match the search query. + """ + pages: [Page!]! + + """ + The products that match the search query. + """ + products: [Product!]! + + """ + The query suggestions that are relevant to the search query. + """ + queries: [SearchQuerySuggestion!]! +} + +""" +The types of search items to perform predictive search on. +""" +enum PredictiveSearchType { + """ + Returns matching collections. + """ + COLLECTION + + """ + Returns matching products. + """ + PRODUCT + + """ + Returns matching pages. + """ + PAGE + + """ + Returns matching articles. + """ + ARTICLE + + """ + Returns matching query strings. + """ + QUERY +} + +""" +The preferred delivery methods such as shipping, local pickup or through pickup points. +""" +enum PreferenceDeliveryMethodType { + """ + A delivery method used to send items directly to a buyer’s specified address. + """ + SHIPPING + + """ + A delivery method used to let buyers receive items directly from a specific location within an area. + """ + PICK_UP + + """ + A delivery method used to let buyers collect purchases at designated locations like parcel lockers. + """ + PICKUP_POINT +} + +""" +A price range for filtering products in a collection. Used by the [`ProductFilter`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter) input's [`price`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter#fields-price) field. + +> Note: Omitting the [maximum](https://shopify.dev/docs/api/storefront/currents/input-objects/PriceRangeFilter#fields-max) returns all products above the [minimum](https://shopify.dev/docs/api/storefront/current/input-objects/PriceRangeFilter#fields-min). +""" +input PriceRangeFilter { + """ + The minimum price in the range. Defaults to zero. + """ + min: Float = 0.0 + + """ + The maximum price in the range. Empty indicates no max price. + """ + max: Float +} + +""" +A percentage discount value applied to cart items or orders. Returned as part of the [`PricingValue`](https://shopify.dev/docs/api/storefront/current/unions/PricingValue) union on [discount applications](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication), where it represents discounts calculated as a percentage off rather than a [fixed amount](https://shopify.dev/docs/api/storefront/current/objects/MoneyV2). +""" +type PricingPercentageValue { + """ + The percentage value of the object. + """ + percentage: Float! +} + +""" +The price value (fixed or percentage) for a discount application. +""" +union PricingValue = MoneyV2|PricingPercentageValue + +""" +Represents an item listed in a shop's catalog. + +Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections. + +Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). + +Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections). +""" +type Product implements HasMetafields & Node & OnlineStorePublishable & Trackable { + """ + A list of variants whose selected options differ with the provided selected options by one, ordered by variant id. + If selected options are not provided, adjacent variants to the first available variant is returned. + + Note that this field returns an array of variants. In most cases, the number of variants in this array will be low. + However, with a low number of options and a high number of values per option, the number of variants returned + here can be high. In such cases, it recommended to avoid using this field. + + This list of variants can be used in combination with the `options` field to build a rich variant picker that + includes variant availability or other variant information. + """ + adjacentVariants("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!], "Whether to ignore product options that are not present on the requested product." ignoreUnknownOptions: Boolean = true, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): [ProductVariant!]! + + """ + Indicates if at least one product variant is available for sale. + """ + availableForSale: Boolean! + + """ + The category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). + """ + category: TaxonomyCategory + + """ + A list of [collections](/docs/api/storefront/latest/objects/Collection) that include the product. + """ + collections("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + + """ + The [compare-at price range](https://help.shopify.com/manual/products/details/product-pricing/sale-pricing) of the product in the shop's default currency. + """ + compareAtPriceRange: ProductPriceRange! + + """ + The date and time when the product was created. + """ + createdAt: DateTime! + + """ + A single-line description of the product, with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed. + """ + description("Truncates a string after the given length." truncateAt: Int): String! + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + descriptionHtml: HTML! + + """ + An encoded string containing all option value combinations + with a corresponding variant that is currently available for sale. + + Integers represent option and values: + [0,1] represents option_value at array index 0 for the option at array index 0 + + `:`, `,`, ` ` and `-` are control characters. + `:` indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. + `,` indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. + ` ` indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. + `-` indicates a continuous range of option values. ex: 0 1-3 4 + + Decoding process: + + Example options: [Size, Color, Material] + Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] + Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,," + + Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," + Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," + Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," + Step 4: Map to options + option values to determine existing variants: + + [Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), + [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), + [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0). + + """ + encodedVariantAvailability: String + + """ + An encoded string containing all option value combinations with a corresponding variant. + + Integers represent option and values: + [0,1] represents option_value at array index 0 for the option at array index 0 + + `:`, `,`, ` ` and `-` are control characters. + `:` indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. + `,` indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. + ` ` indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. + `-` indicates a continuous range of option values. ex: 0 1-3 4 + + Decoding process: + + Example options: [Size, Color, Material] + Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] + Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,," + + Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," + Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," + Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," + Step 4: Map to options + option values to determine existing variants: + + [Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), + [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), + [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0). + + """ + encodedVariantExistence: String + + """ + The featured image for the product. + + This field is functionally equivalent to `images(first: 1)`. + """ + featuredImage: Image + + """ + A unique, human-readable string of the product's title. + A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + The handle is used in the online store URL for the product. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + List of images associated with the product. + """ + images("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductImageSortKeys = POSITION): ImageConnection! + + """ + Whether the product is a gift card. + """ + isGiftCard: Boolean! + + """ + The [media](/docs/apps/build/online-store/product-media) that are associated with the product. Valid media are images, 3D models, videos. + """ + media("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductMediaSortKeys = POSITION): MediaConnection! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The product's URL on the online store. + If `null`, then the product isn't published to the online store sales channel. + """ + onlineStoreUrl: URL + + """ + A list of product options. The limit is defined by the [shop's resource limits for product options](/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) (`Shop.resourceLimits.maxProductOptions`). + """ + options("Truncate the array result to this size." first: Int): [ProductOption!]! + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRange: ProductPriceRange! + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String! + + """ + The date and time when the product was published to the channel. + """ + publishedAt: DateTime! + + """ + Whether the product can only be purchased with a [selling plan](/docs/apps/build/purchase-options/subscriptions/selling-plans). Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels, except the online store. + """ + requiresSellingPlan: Boolean! + + """ + Find an active product variant based on selected options, availability or the first variant. + + All arguments are optional. If no selected options are provided, the first available variant is returned. + If no variants are available, the first variant is returned. + """ + selectedOrFirstAvailableVariant("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!], "Whether to ignore unknown product options." ignoreUnknownOptions: Boolean = true, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): ProductVariant + + """ + A list of all [selling plan groups](/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) that are associated with the product either directly, or through the product's variants. + """ + sellingPlanGroups("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanGroupConnection! + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEO! + + """ + A comma-separated list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, + use the GraphQL Admin API's [`tagsAdd`](/docs/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!]! + + """ + The name for the product that displays to customers. The title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. + """ + title: String! + + """ + The quantity of inventory that's in stock. + """ + totalInventory: Int + + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String + + """ + The date and time when the product was last modified. + A product's `updatedAt` value can change for different reasons. For example, if an order + is placed for a product that has inventory tracking set up, then the inventory adjustment + is counted as an update. + """ + updatedAt: DateTime! + + """ + Find a product’s variant based on its selected options. + This is useful for converting a user’s selection of product options into a single matching variant. + If there is not a variant for the selected options, `null` will be returned. + """ + variantBySelectedOptions("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!]!, "Whether to ignore unknown product options." ignoreUnknownOptions: Boolean = false, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): ProductVariant + + """ + A list of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. + """ + variants("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductVariantSortKeys = POSITION): ProductVariantConnection! + + """ + The number of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. + """ + variantsCount: Count + + """ + The name of the product's vendor. + """ + vendor: String! +} + +""" +Sort options for products within a [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection). Used by the [`products`](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products) connection to order results by best-selling, price, title, creation date, or the collection's default and manual ordering. + +> Note: The [`RELEVANCE`](https://shopify.dev/docs/api/storefront/current/enums/ProductCollectionSortKeys#enums-RELEVANCE) key applies only when you specify a search query. +""" +enum ProductCollectionSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `price` value. + """ + PRICE + + """ + Sort by the `best-selling` value. + """ + BEST_SELLING + + """ + Sort by the `created` value. + """ + CREATED + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `manual` value. + """ + MANUAL + + """ + Sort by the `collection-default` value. + """ + COLLECTION_DEFAULT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +An auto-generated type for paginating through multiple Products. +""" +type ProductConnection { + """ + A list of edges. + """ + edges: [ProductEdge!]! + + """ + A list of available filters. + """ + filters: [Filter!]! + + """ + A list of the nodes contained in ProductEdge. + """ + nodes: [Product!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. +""" +type ProductEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of ProductEdge. + """ + node: Product! +} + +""" +The input fields for a filter used to view a subset of products in a collection. +By default, the `available` and `price` filters are enabled. Filters are customized with the Shopify Search & Discovery app. +Learn more about [customizing storefront filtering](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters). +""" +input ProductFilter { + """ + Filter on if the product is available for sale. + """ + available: Boolean + + """ + A variant option to filter on. + """ + variantOption: VariantOptionFilter + + """ + A product category to filter on. + """ + category: CategoryFilter + + """ + A standard product attribute metafield to filter on. + """ + taxonomyMetafield: TaxonomyMetafieldFilter + + """ + The product type to filter on. + """ + productType: String + + """ + The product vendor to filter on. + """ + productVendor: String + + """ + A range of prices to filter with-in. + """ + price: PriceRangeFilter + + """ + A product metafield to filter on. + """ + productMetafield: MetafieldFilter + + """ + A variant metafield to filter on. + """ + variantMetafield: MetafieldFilter + + """ + A product tag to filter on. + """ + tag: String +} + +""" +The set of valid sort keys for the ProductImage query. +""" +enum ProductImageSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The set of valid sort keys for the ProductMedia query. +""" +enum ProductMediaSortKeys { + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A customizable product attribute that customers select when purchasing, such as "Size", "Color", or "Material". Each option has a name and a set of [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue) objects representing the available choices. + +Different combinations of option values create distinct [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. Option values can include visual swatches that display colors or images to help customers make selections. Option names have a 255-character limit. + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). +""" +type ProductOption implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product option’s name. + """ + name: String! + + """ + The corresponding option value to the product option. + """ + optionValues: [ProductOptionValue!]! + + """ + The corresponding value to the product option name. + """ + values: [String!]! @deprecated(reason: "Use `optionValues` instead.") +} + +""" +A specific value for a [`ProductOption`](https://shopify.dev/docs/api/storefront/current/objects/ProductOption), such as "Red" or "Blue" for a "Color" option. Option values combine across different options to create [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. + +Each value can include a visual swatch that displays a color or image. The [`firstSelectableVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue#field-ProductOptionValue.fields.firstSelectableVariant) field returns the variant that combines this option value with the lowest-position values for all other options. This is useful for building product selection interfaces. + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). +""" +type ProductOptionValue implements Node { + """ + The product variant that combines this option value with the + lowest-position option values for all other options. + + This field will always return a variant, provided a variant including this option value exists. + """ + firstSelectableVariant: ProductVariant + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the product option value. + """ + name: String! + + """ + The swatch of the product option value. + """ + swatch: ProductOptionValueSwatch +} + +""" +A visual representation for a [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue), such as a color or image. Swatches help customers visualize options like "Red" or "Blue" without relying solely on text labels. +""" +type ProductOptionValueSwatch { + """ + The swatch color. + """ + color: Color + + """ + The swatch image. + """ + image: Media +} + +""" +The minimum and maximum prices across all variants of a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). +""" +type ProductPriceRange { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +The recommendation intent that is used to generate product recommendations. +You can use intent to generate product recommendations according to different strategies. +""" +enum ProductRecommendationIntent { + """ + Offer customers a mix of products that are similar or complementary to a product for which recommendations are to be fetched. An example is substitutable products that display in a You may also like section. + """ + RELATED + + """ + Offer customers products that are complementary to a product for which recommendations are to be fetched. An example is add-on products that display in a Pair it with section. + """ + COMPLEMENTARY +} + +""" +Sorting options for the [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) query. Supports sorting products by criteria such as best-selling and price, and by product attributes such as type, and vendor. + +> Note: Use the [`RELEVANCE`](https://shopify.dev/docs/api/storefront/current/enums/ProductSortKeys#enums-RELEVANCE) key only when a search query is specified. +""" +enum ProductSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `vendor` value. + """ + VENDOR + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `best_selling` value. + """ + BEST_SELLING + + """ + Sort by the `price` value. + """ + PRICE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A specific version of a [product](https://shopify.dev/docs/api/storefront/current/objects/Product) available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + +For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases. + +Variants also support subscriptions and pre-orders through [selling plan allocations](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) objects, bundle configurations through [product variant components](https://shopify.dev/docs/api/storefront/current/objects/ProductVariantComponent) objects, and [shop pay installments pricing](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) for flexible payment options. +""" +type ProductVariant implements HasMetafields & Node { + """ + Indicates if the product variant is available for sale. + """ + availableForSale: Boolean! + + """ + The barcode (for example, ISBN, UPC, or GTIN) associated with the variant. + """ + barcode: String + + """ + The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. + """ + compareAtPrice: MoneyV2 + + """ + The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. + """ + compareAtPriceV2: MoneyV2 @deprecated(reason: "Use `compareAtPrice` instead.") + + """ + List of bundles components included in the variant considering only fixed bundles. + """ + components("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): ProductVariantComponentConnection! + + """ + Whether a product is out of stock but still available for purchase (used for backorders). + """ + currentlyNotInStock: Boolean! + + """ + List of bundles that include this variant considering only fixed bundles. + """ + groupedBy("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): ProductVariantConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Image associated with the product variant. This field falls back to the product image if no image is available. + """ + image: Image + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The product variant’s price. + """ + price: MoneyV2! + + """ + The product variant’s price. + """ + priceV2: MoneyV2! @deprecated(reason: "Use `price` instead.") + + """ + The product object that the product variant belongs to. + """ + product: Product! + + """ + The total sellable quantity of the variant for online sales channels. + """ + quantityAvailable: Int + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): QuantityPriceBreakConnection! + + """ + The quantity rule for the product variant in a given context. + """ + quantityRule: QuantityRule! + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components. + """ + requiresComponents: Boolean! + + """ + Whether a customer needs to provide a shipping address when placing an order for the product variant. + """ + requiresShipping: Boolean! + + """ + List of product options applied to the variant. + """ + selectedOptions: [SelectedOption!]! + + """ + Represents an association between a variant and a selling plan. Selling plan allocations describe which selling plans are available for each variant, and what their impact is on pricing. + """ + sellingPlanAllocations("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanAllocationConnection! + + """ + The Shop Pay Installments pricing information for the product variant. + """ + shopPayInstallmentsPricing: ShopPayInstallmentsProductVariantPricing + + """ + The SKU (stock keeping unit) associated with the variant. + """ + sku: String + + """ + The in-store pickup availability of this variant by location. + """ + storeAvailability("Used to sort results based on proximity to the provided location." near: GeoCoordinateInput, "Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StoreAvailabilityConnection! + + """ + Whether tax is charged when the product variant is sold. + """ + taxable: Boolean! + + """ + The product variant’s title. + """ + title: String! + + """ + The unit price value for the variant based on the variant's measurement. + """ + unitPrice: MoneyV2 + + """ + The unit price measurement for the variant. + """ + unitPriceMeasurement: UnitPriceMeasurement + + """ + The weight of the product variant in the unit system specified with `weight_unit`. + """ + weight: Float + + """ + Unit of measurement for weight. + """ + weightUnit: WeightUnit! +} + +""" +An individual product variant included in a [fixed bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). Fixed bundles group multiple products together and sell them as a single unit, with the bundle's inventory determined by its components. + +Access components through the `ProductVariant` object's [`components`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.components) field. +""" +type ProductVariantComponent { + """ + The product variant object that the component belongs to. + """ + productVariant: ProductVariant! + + """ + The quantity of component present in the bundle. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ProductVariantComponents. +""" +type ProductVariantComponentConnection { + """ + A list of edges. + """ + edges: [ProductVariantComponentEdge!]! + + """ + A list of the nodes contained in ProductVariantComponentEdge. + """ + nodes: [ProductVariantComponent!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +""" +type ProductVariantComponentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of ProductVariantComponentEdge. + """ + node: ProductVariantComponent! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. +""" +type ProductVariantConnection { + """ + A list of edges. + """ + edges: [ProductVariantEdge!]! + + """ + A list of the nodes contained in ProductVariantEdge. + """ + nodes: [ProductVariant!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. +""" +type ProductVariantEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of ProductVariantEdge. + """ + node: ProductVariant! +} + +""" +The set of valid sort keys for the ProductVariant query. +""" +enum ProductVariantSortKeys { + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `sku` value. + """ + SKU + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Represents information about the buyer that is interacting with the cart. +""" +type PurchasingCompany { + """ + The company associated to the order or draft order. + """ + company: Company! + + """ + The company contact associated to the order or draft order. + """ + contact: CompanyContact + + """ + The company location associated to the order or draft order. + """ + location: CompanyLocation! +} + +""" +Quantity price breaks lets you offer different rates that are based on the +amount of a specific variant being ordered. +""" +type QuantityPriceBreak { + """ + Minimum quantity required to reach new quantity break price. + """ + minimumQuantity: Int! + + """ + The price of variant after reaching the minimum quanity. + """ + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple QuantityPriceBreaks. +""" +type QuantityPriceBreakConnection { + """ + A list of edges. + """ + edges: [QuantityPriceBreakEdge!]! + + """ + A list of the nodes contained in QuantityPriceBreakEdge. + """ + nodes: [QuantityPriceBreak!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +""" +type QuantityPriceBreakEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of QuantityPriceBreakEdge. + """ + node: QuantityPriceBreak! +} + +""" +The quantity rule for the product variant in a given context. +""" +type QuantityRule { + """ + The value that specifies the quantity increment between minimum and maximum of the rule. + Only quantities divisible by this value will be considered valid. + + The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum + must be divisible by this value. + """ + increment: Int! + + """ + An optional value that defines the highest allowed quantity purchased by the customer. + If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + """ + maximum: Int + + """ + The value that defines the lowest allowed quantity purchased by the customer. + The minimum must be a multiple of the quantity rule's increment. + """ + minimum: Int! +} + +""" +The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start. + +Use individual queries like [`product`](https://shopify.dev/docs/api/storefront/current/queries/product) or [`collection`](https://shopify.dev/docs/api/storefront/current/queries/collection) to fetch specific resources by ID or handle. Use plural queries like [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) or [`collections`](https://shopify.dev/docs/api/storefront/current/queries/collections) to retrieve paginated lists with optional filtering and sorting. The [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) and [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries enable storefront search functionality. + +Explore queries interactively with the [GraphiQL explorer and sample query kit](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/api-exploration). +""" +type QueryRoot { + """ + Returns an [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) by its ID. Each article belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) and includes content in both plain text and HTML formats, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, [`Comment`](https://shopify.dev/docs/api/storefront/current/objects/Comment) objects, tags, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) data. + """ + article("The ID of the `Article`." id: ID!): Article + + """ + Returns a paginated list of [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects from the shop's [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. Each article is a blog post containing content, author information, tags, and optional images. + + Use the `query` argument to filter results by author, blog title, tags, or date fields. Sort results using the `sortKey` argument and reverse them with the `reverse` argument. + """ + articles("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ArticleSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| author |\n| blog_title |\n| created_at |\n| tag |\n| tag_not |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): ArticleConnection! + + """ + Retrieves a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) by its handle or ID. A blog organizes [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects for the online store and includes author information, [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) settings, and custom [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + """ + blog("The handle of the `Blog`." handle: String, "The ID of the `Blog`." id: ID): Blog + + """ + Retrieves a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) by its handle. A blog organizes [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects for the online store and includes author information, [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) settings, and custom [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + """ + blogByHandle("The handle of the blog." handle: String!): Blog @deprecated(reason: "Use `blog` instead.") + + """ + Returns a paginated list of the shop's [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. Each blog serves as a container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. + """ + blogs("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: BlogSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| handle |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): BlogConnection! + + """ + Returns a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by its ID. The cart contains the merchandise lines a buyer intends to purchase, along with estimated costs, applied discounts, gift cards, and delivery options. + + Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/latest/queries/cart#returns-Cart.fields.checkoutUrl) field to redirect buyers to Shopify's web checkout when they're ready to complete their purchase. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). + """ + cart("The ID of the cart." id: ID!): Cart + + """ + A poll for the status of the cart checkout completion and order creation. + """ + cartCompletionAttempt("The ID of the attempt." attemptId: String!): CartCompletionAttemptResult + + """ + Retrieves a single [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection) by its ID or handle. Use the [`products`](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products) field to access items in the collection. + """ + collection("The ID of the `Collection`." id: ID, "The handle of the `Collection`." handle: String): Collection + + """ + Retrieves a [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection) by its URL-friendly handle. Handles are automatically generated from collection titles but merchants can customize them. + """ + collectionByHandle("The handle of the collection." handle: String!): Collection @deprecated(reason: "Use `collection` instead.") + + """ + Returns a paginated list of the shop's [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection). Each `Collection` object includes a nested connection to its [products](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products). + """ + collections("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CollectionSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| collection_type |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): CollectionConnection! + + """ + Retrieves the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) associated with the provided access token. Use the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation to obtain an access token using legacy customer account authentication (email and password). + + The returned customer includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress), [orders](https://shopify.dev/docs/api/storefront/current/objects/Order), and [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. + """ + customer("The customer access token." customerAccessToken: String!): Customer + + """ + Returns the shop's localization settings. Use this query to build [country and language selectors](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets) for your storefront. + + The [`country`](https://shopify.dev/docs/api/storefront/latest/queries/localization#returns-Localization.fields.country) and [`language`](https://shopify.dev/docs/api/storefront/latest/queries/localization#returns-Localization.fields.language) fields reflect the active localized experience. To change the context, use the [`@inContext`](https://shopify.dev/docs/api/storefront#directives) directive with your desired country or language code. + """ + localization: Localization! + + """ + Returns shop locations that support in-store pickup. Use the `near` argument with [`GeoCoordinateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/GeoCoordinateInput) to sort results by proximity to the customer's location. + + When sorting by distance, set `sortKey` to [`DISTANCE`](https://shopify.dev/docs/api/storefront/current/queries/locations#arguments-sortKey.enums.DISTANCE) and provide coordinates using the [`near`](https://shopify.dev/docs/api/storefront/current/queries/locations#arguments-near) argument. + + Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). + """ + locations("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: LocationSortKeys = ID, "Used to sort results based on proximity to the provided location." near: GeoCoordinateInput): LocationConnection! + + """ + Retrieves a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu) by its handle. Menus are [hierarchical navigation structures](https://help.shopify.com/manual/online-store/menus-and-links) that merchants configure for their storefront, such as header and footer navigation. + + Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can nest up to three levels deep, with each item linking to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + """ + menu("The navigation menu's handle." handle: String!): Menu + + """ + Retrieves a single [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject) by either its [`global ID`](https://shopify.dev/docs/api/storefront/current/queries/metaobject#arguments-id) or its [`handle`](https://shopify.dev/docs/api/storefront/current/queries/metaobject#arguments-handle). + + > Note: + > When using the handle, you must also provide the metaobject type because handles are only unique within a type. + """ + metaobject("The ID of the metaobject." id: ID, "The handle and type of the metaobject." handle: MetaobjectHandleInput): Metaobject + + """ + Returns a paginated list of [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject) entries for a specific type. Metaobjects are [custom data structures](https://shopify.dev/docs/apps/build/metaobjects) that extend Shopify's data model with merchant-defined or app-defined content like size charts, product highlights, or custom sections. + + The required `type` argument specifies which metaobject type to retrieve. You can sort results by `id` or `updated_at` using the `sortKey` argument. + """ + metaobjects("The type of metaobject to retrieve." type: String!, "The key of a field to sort with. Supports \"id\" and \"updated_at\"." sortKey: String, "Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetaobjectConnection! + + """ + Retrieves any object that implements the [`Node`](https://shopify.dev/docs/api/storefront/current/interfaces/Node) interface by its globally-unique ID. Use inline fragments to access type-specific fields on the returned object. + + This query follows the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface) and is commonly used for refetching objects when you have their ID but need updated data. + """ + node("The ID of the Node to return." id: ID!): Node + + """ + Retrieves multiple objects by their global IDs in a single request. Any object that implements the [`Node`](https://shopify.dev/docs/api/storefront/current/interfaces/Node) interface can be fetched, including [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [pages](https://shopify.dev/docs/api/storefront/current/objects/Page). + + Use inline fragments to access type-specific fields on the returned objects. The input accepts up to 250 IDs. + """ + nodes("The IDs of the Nodes to return.\n\nThe input must not contain more than `250` values." ids: [ID!]!): [Node]! + + """ + Retrieves a [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page) by its [`handle`](https://shopify.dev/docs/api/storefront/current/queries/page#arguments-handle) or [`id`](https://shopify.dev/docs/api/storefront/current/queries/page#arguments-id). Pages are static content pages that merchants display outside their product catalog, such as "About Us," "Contact," or policy pages. + + The returned page includes information such as the [HTML body content](https://shopify.dev/docs/api/storefront/current/queries/page#returns-Page.fields.body), [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, and any associated [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + """ + page("The handle of the `Page`." handle: String, "The ID of the `Page`." id: ID): Page + + """ + Retrieves a [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page) by its handle. + """ + pageByHandle("The handle of the page." handle: String!): Page @deprecated(reason: "Use `page` instead.") + + """ + Returns a paginated list of the shop's content [pages](https://shopify.dev/docs/api/storefront/current/objects/Page). Pages are custom HTML content like "About Us", "Contact", or policy information that merchants display outside their product catalog. + """ + pages("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: PageSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| handle |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): PageConnection! + + """ + Settings related to payments. + """ + paymentSettings: PaymentSettings! + + """ + Returns suggested results as customers type in a search field, enabling type-ahead search experiences. The query matches [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), and [articles](https://shopify.dev/docs/api/storefront/current/objects/Article) based on partial search terms, and also provides [search query suggestions](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion) to help customers refine their search. + + You can filter results by resource type and limit the quantity. The [`limitScope`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch#arguments-limitScope) argument controls whether limits apply across all result types or per type. Use [`unavailableProducts`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch#arguments-unavailableProducts) to control how out-of-stock products appear in results. + """ + predictiveSearch("Limits the number of results based on `limit_scope`. The value can range from 1 to 10, and the default is 10." limit: Int, "Decides the distribution of results." limitScope: PredictiveSearchLimitScope, "The search query." query: String!, "Specifies the list of resource fields to use for search. The default fields searched on are TITLE, PRODUCT_TYPE, VARIANT_TITLE, and VENDOR. For the best search experience, you should search on the default field set.\n\nThe input must not contain more than `250` values." searchableFields: [SearchableField!], "The types of resources to search for.\n\nThe input must not contain more than `250` values." types: [PredictiveSearchType!], "Specifies how unavailable products are displayed in the search results." unavailableProducts: SearchUnavailableProductsType): PredictiveSearchResult + + """ + Retrieves a single [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) by its ID or handle. Use this query to build product detail pages, access variant and pricing information, or fetch product media and [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). See some [examples of querying products](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/getting-started). + """ + product("The ID of the `Product`." id: ID, "The handle of the `Product`." handle: String): Product + + """ + Retrieves a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) by its handle. The handle is a URL-friendly identifier that's automatically generated from the product's title. If no product exists with the specified handle, returns `null`. + """ + productByHandle("A unique, human-readable string of the product's title.\nA handle can contain letters, hyphens (`-`), and numbers, but no spaces.\nThe handle is used in the online store URL for the product.\n" handle: String!): Product @deprecated(reason: "Use `product` instead.") + + """ + Returns recommended products for a given product, identified by either ID or handle. Use the [`intent`](https://shopify.dev/docs/api/storefront/current/enums/ProductRecommendationIntent) argument to control the recommendation strategy. + + Shopify [auto-generates related recommendations](https://shopify.dev/docs/storefronts/themes/product-merchandising/recommendations) based on sales data, product descriptions, and collection relationships. Complementary recommendations require [manual configuration](https://help.shopify.com/manual/online-store/storefront-search/search-and-discovery-recommendations) through the Shopify Search & Discovery app. Returns up to ten [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) objects. + """ + productRecommendations("The id of the product." productId: ID, "The handle of the product." productHandle: String, "The recommendation intent that is used to generate product recommendations. You can use intent to generate product recommendations on various pages across the channels, according to different strategies." intent: ProductRecommendationIntent = RELATED): [Product!] + + """ + Returns a paginated list of all tags that have been added to [products](https://shopify.dev/docs/api/storefront/current/objects/Product) in the shop. Useful for building tag-based product filtering or navigation in a storefront. + """ + productTags("Returns up to the first `n` elements from the list." first: Int!): StringConnection! + + """ + Returns a list of product types from the shop's [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) objects that are published to your app. Use this query to build [filtering interfaces](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) or navigation menus based on product categorization. + """ + productTypes("Returns up to the first `n` elements from the list." first: Int!): StringConnection! + + """ + Returns a paginated list of the shop's [products](https://shopify.dev/docs/api/storefront/current/objects/Product). + + For full-text storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) query instead. + """ + products("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductSortKeys = ID, "You can apply one or multiple filters to a query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| available_for_sale | Filter by products that have at least one product variant available for sale. |\n| created_at | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| product_type | Filter by a comma-separated list of [product types](https://help.shopify.com/en/manual/products/details/product-type). | | | `product_type:snowboard` |\n| tag | Filter products by the product [`tags`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags) field. | | | `tag:my_tag` |\n| tag_not | Filter by products that don't have the specified product [tags](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags). | | | `tag_not:my_tag` |\n| title | Filter by the product [`title`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-title) field. | | | `title:The Minimal Snowboard` |\n| updated_at | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\n| variants.price | Filter by the price of the product's variants. |\n| vendor | Filter by the product [`vendor`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-vendor) field. | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nLearn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ProductConnection! + + """ + Returns all public Storefront [API versions](https://shopify.dev/docs/api/storefront/current/objects/ApiVersion), including supported, release candidate, and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """ + Returns paginated search results for [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) resources based on a query string. Results are sorted by relevance by default. + + The response includes the total result count and available product filters for building [faceted search interfaces](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products). Use the [`prefix`](https://shopify.dev/docs/api/storefront/current/enums/SearchPrefixQueryType) argument to enable partial word matching on the last search term, allowing queries like "winter snow" to match "snowboard" or "snowshoe". + """ + search("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: SearchSortKeys = RELEVANCE, "The search query." query: String!, "Specifies whether to perform a partial word match on the last search term." prefix: SearchPrefixQueryType, "Returns a subset of products matching all product filters.\n\nThe input must not contain more than `250` values." productFilters: [ProductFilter!], "The types of resources to search for.\n\nThe input must not contain more than `250` values." types: [SearchType!], "Specifies how unavailable products or variants are displayed in the search results." unavailableProducts: SearchUnavailableProductsType): SearchResultItemConnection! + + """ + Returns the [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop) associated with the storefront access token. The `Shop` object provides general store information such as the shop name, description, and primary domain. + + Use this query to access data like store policies, [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings), [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) configuration, and shipping destinations. It also exposes [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. + """ + shop: Shop! + + """ + Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization. The query provides a page count and paginated access to resources like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. + + When paginating through resources, the number of items per page varies from 0 to 250, and empty pages can occur without indicating the end of results. Always check [`hasNextPage`](https://shopify.dev/docs/api/storefront/current/objects/PaginatedSitemapResources#field-PaginatedSitemapResources.fields.hasNextPage) to determine if more pages are available. + """ + sitemap("The type of the resource for the sitemap." type: SitemapType!): Sitemap! + + """ + Returns a paginated list of [`UrlRedirect`](https://shopify.dev/docs/api/storefront/current/objects/UrlRedirect) objects configured for the shop. Each redirect maps an old path to a target location. + """ + urlRedirects("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| path |\n| target |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): UrlRedirectConnection! +} + +""" +Search engine optimization metadata for a resource. The title and description appear in search engine results and browser tabs. +""" +type SEO { + """ + The meta description. + """ + description: String + + """ + The SEO title. + """ + title: String +} + +""" +A discount application created by a Shopify Script. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and captures the discount's value, allocation method, and targeting rules at the time the script applied it. +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + Which lines of targetType that the discount is allocated over. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + The type of line that the discount is applicable towards. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application as defined by the Script. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Specifies whether to perform a partial word match on the last search term. +""" +enum SearchPrefixQueryType { + """ + Perform a partial word match on the last search term. + """ + LAST + + """ + Don't perform a partial word match on the last search term. + """ + NONE +} + +""" +A suggested search term returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query. Query suggestions help customers refine their searches by showing relevant terms as they type. + +The [`text`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.text) field provides the plain suggestion, while [`styledText`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.styledText) includes HTML tags to highlight matching portions. Implements [`Trackable`](https://shopify.dev/docs/api/storefront/current/interfaces/Trackable) for analytics reporting on search traffic origins. +""" +type SearchQuerySuggestion implements Trackable { + """ + The text of the search query suggestion with highlighted HTML tags. + """ + styledText: String! + + """ + The text of the search query suggestion. + """ + text: String! + + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String +} + +""" +A search result that matches the search query. +""" +union SearchResultItem = Article|Page|Product + +""" +An auto-generated type for paginating through multiple SearchResultItems. +""" +type SearchResultItemConnection { + """ + A list of edges. + """ + edges: [SearchResultItemEdge!]! + + """ + A list of the nodes contained in SearchResultItemEdge. + """ + nodes: [SearchResultItem!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + A list of available filters. + """ + productFilters: [Filter!]! + + """ + The total number of results. + """ + totalCount: Int! +} + +""" +An auto-generated type which holds one SearchResultItem and a cursor during pagination. +""" +type SearchResultItemEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of SearchResultItemEdge. + """ + node: SearchResultItem! +} + +""" +The set of valid sort keys for the search query. +""" +enum SearchSortKeys { + """ + Sort by the `price` value. + """ + PRICE + + """ + Sort by relevance to the search terms. + """ + RELEVANCE +} + +""" +The types of search items to perform search within. +""" +enum SearchType { + """ + Returns matching products. + """ + PRODUCT + + """ + Returns matching pages. + """ + PAGE + + """ + Returns matching articles. + """ + ARTICLE +} + +""" +Specifies whether to display results for unavailable products. +""" +enum SearchUnavailableProductsType { + """ + Show unavailable products in the order that they're found. + """ + SHOW + + """ + Exclude unavailable products. + """ + HIDE + + """ + Show unavailable products after all other matching results. This is the default. + """ + LAST +} + +""" +Specifies the list of resource fields to search. +""" +enum SearchableField { + """ + Author of the page or article. + """ + AUTHOR + + """ + Body of the page or article or product description or collection description. + """ + BODY + + """ + Product type. + """ + PRODUCT_TYPE + + """ + Tag associated with the product or article. + """ + TAG + + """ + Title of the page or article or product title or collection title. + """ + TITLE + + """ + Variant barcode. + """ + VARIANTS_BARCODE + + """ + Variant SKU. + """ + VARIANTS_SKU + + """ + Variant title. + """ + VARIANTS_TITLE + + """ + Product vendor. + """ + VENDOR +} + +""" +A name/value pair representing a product option selection on a variant. The [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) object's [`selectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.selectedOptions) field returns this to indicate which options define that variant, such as "Size: Large" or "Color: Red". +""" +type SelectedOption { + """ + The product option’s name. + """ + name: String! + + """ + The product option’s value. + """ + value: String! +} + +""" +The input fields required for a selected option. +""" +input SelectedOptionInput { + """ + The product option’s name. + """ + name: String! + + """ + The product option’s value. + """ + value: String! +} + +""" +Represents deferred or recurring purchase options for [products](https://shopify.dev/docs/api/storefront/current/objects/Product) and [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), such as subscriptions, pre-orders, or try-before-you-buy. Each selling plan belongs to a [`SellingPlanGroup`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) and defines billing, pricing, inventory, and delivery policies. +""" +type SellingPlan implements HasMetafields { + """ + The billing policy for the selling plan. + """ + billingPolicy: SellingPlanBillingPolicy + + """ + The initial payment due for the purchase. + """ + checkoutCharge: SellingPlanCheckoutCharge! + + """ + The delivery policy for the selling plan. + """ + deliveryPolicy: SellingPlanDeliveryPolicy + + """ + The description of the selling plan. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'. + """ + name: String! + + """ + The selling plan options available in the drop-down list in the storefront. For example, 'Delivery every week' or 'Delivery every 2 weeks' specifies the delivery frequency options for the product. Individual selling plans contribute their options to the associated selling plan group. For example, a selling plan group might have an option called `option1: Delivery every`. One selling plan in that group could contribute `option1: 2 weeks` with the pricing for that option, and another selling plan could contribute `option1: 4 weeks`, with different pricing. + """ + options: [SellingPlanOption!]! + + """ + The price adjustments that a selling plan makes when a variant is purchased with a selling plan. + """ + priceAdjustments: [SellingPlanPriceAdjustment!]! + + """ + Whether purchasing the selling plan will result in multiple deliveries. + """ + recurringDeliveries: Boolean! +} + +""" +Links a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to a [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan), providing the pricing details for that specific combination. Each allocation includes the checkout charge amount, any remaining balance due for the purchase, and up to two price adjustments that show how the selling plan affects the variant's price. + +Selling plan allocations are available on product variants and [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine), enabling storefronts to display information such as subscription or purchase option pricing before and during checkout. +""" +type SellingPlanAllocation { + """ + The checkout charge amount due for the purchase. + """ + checkoutChargeAmount: MoneyV2! + + """ + A list of price adjustments, with a maximum of two. When there are two, the first price adjustment goes into effect at the time of purchase, while the second one starts after a certain number of orders. A price adjustment represents how a selling plan affects pricing when a variant is purchased with a selling plan. Prices display in the customer's currency if the shop is configured for it. + """ + priceAdjustments: [SellingPlanAllocationPriceAdjustment!]! + + """ + The remaining balance charge amount due for the purchase. + """ + remainingBalanceChargeAmount: MoneyV2! + + """ + A representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. + """ + sellingPlan: SellingPlan! +} + +""" +An auto-generated type for paginating through multiple SellingPlanAllocations. +""" +type SellingPlanAllocationConnection { + """ + A list of edges. + """ + edges: [SellingPlanAllocationEdge!]! + + """ + A list of the nodes contained in SellingPlanAllocationEdge. + """ + nodes: [SellingPlanAllocation!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SellingPlanAllocation and a cursor during pagination. +""" +type SellingPlanAllocationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of SellingPlanAllocationEdge. + """ + node: SellingPlanAllocation! +} + +""" +The resulting prices for variants when they're purchased with a specific selling plan. +""" +type SellingPlanAllocationPriceAdjustment { + """ + The price of the variant when it's purchased without a selling plan for the same number of deliveries. For example, if a customer purchases 6 deliveries of $10.00 granola separately, then the price is 6 x $10.00 = $60.00. + """ + compareAtPrice: MoneyV2! + + """ + The effective price for a single delivery. For example, for a prepaid subscription plan that includes 6 deliveries at the price of $48.00, the per delivery price is $8.00. + """ + perDeliveryPrice: MoneyV2! + + """ + The price of the variant when it's purchased with a selling plan For example, for a prepaid subscription plan that includes 6 deliveries of $10.00 granola, where the customer gets 20% off, the price is 6 x $10.00 x 0.80 = $48.00. + """ + price: MoneyV2! + + """ + The resulting price per unit for the variant associated with the selling plan. If the variant isn't sold by quantity or measurement, then this field returns `null`. + """ + unitPrice: MoneyV2 +} + +""" +The selling plan billing policy. +""" +union SellingPlanBillingPolicy = SellingPlanRecurringBillingPolicy + +""" +The initial payment due for the purchase. +""" +type SellingPlanCheckoutCharge { + """ + The charge type for the checkout charge. + """ + type: SellingPlanCheckoutChargeType! + + """ + The charge value for the checkout charge. + """ + value: SellingPlanCheckoutChargeValue! +} + +""" +The percentage value of the price used for checkout charge. +""" +type SellingPlanCheckoutChargePercentageValue { + """ + The percentage value of the price used for checkout charge. + """ + percentage: Float! +} + +""" +The checkout charge when the full amount isn't charged at checkout. +""" +enum SellingPlanCheckoutChargeType { + """ + The checkout charge is a percentage of the product or variant price. + """ + PERCENTAGE + + """ + The checkout charge is a fixed price amount. + """ + PRICE +} + +""" +The portion of the price to be charged at checkout. +""" +union SellingPlanCheckoutChargeValue = MoneyV2|SellingPlanCheckoutChargePercentageValue + +""" +An auto-generated type for paginating through multiple SellingPlans. +""" +type SellingPlanConnection { + """ + A list of edges. + """ + edges: [SellingPlanEdge!]! + + """ + A list of the nodes contained in SellingPlanEdge. + """ + nodes: [SellingPlan!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +The selling plan delivery policy. +""" +union SellingPlanDeliveryPolicy = SellingPlanRecurringDeliveryPolicy + +""" +An auto-generated type which holds one SellingPlan and a cursor during pagination. +""" +type SellingPlanEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of SellingPlanEdge. + """ + node: SellingPlan! +} + +""" +A fixed amount that's deducted from the original variant price. For example, $10.00 off. +""" +type SellingPlanFixedAmountPriceAdjustment { + """ + The money value of the price adjustment. + """ + adjustmentAmount: MoneyV2! +} + +""" +A fixed price adjustment for a variant that's purchased with a selling plan. +""" +type SellingPlanFixedPriceAdjustment { + """ + A new price of the variant when it's purchased with the selling plan. + """ + price: MoneyV2! +} + +""" +A selling method that defines how products can be sold through purchase options like subscriptions, pre-orders, or try-before-you-buy. Groups one or more [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) objects that share the same selling method and options. + +The `SellingPlanGroup` acts as a container for one or more individual `SellingPlan` objects, enabling merchants to offer multiple options (like weekly or monthly deliveries) under one, unified category on a product page. +""" +type SellingPlanGroup { + """ + A display friendly name for the app that created the selling plan group. + """ + appName: String + + """ + The name of the selling plan group. + """ + name: String! + + """ + Represents the selling plan options available in the drop-down list in the storefront. For example, 'Delivery every week' or 'Delivery every 2 weeks' specifies the delivery frequency options for the product. + """ + options: [SellingPlanGroupOption!]! + + """ + A list of selling plans in a selling plan group. A selling plan is a representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. + """ + sellingPlans("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanConnection! +} + +""" +An auto-generated type for paginating through multiple SellingPlanGroups. +""" +type SellingPlanGroupConnection { + """ + A list of edges. + """ + edges: [SellingPlanGroupEdge!]! + + """ + A list of the nodes contained in SellingPlanGroupEdge. + """ + nodes: [SellingPlanGroup!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. +""" +type SellingPlanGroupEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of SellingPlanGroupEdge. + """ + node: SellingPlanGroup! +} + +""" +Represents an option on a selling plan group that's available in the drop-down list in the storefront. + +Individual selling plans contribute their options to the associated selling plan group. For example, a selling plan group might have an option called `option1: Delivery every`. One selling plan in that group could contribute `option1: 2 weeks` with the pricing for that option, and another selling plan could contribute `option1: 4 weeks`, with different pricing. +""" +type SellingPlanGroupOption { + """ + The name of the option. For example, 'Delivery every'. + """ + name: String! + + """ + The values for the options specified by the selling plans in the selling plan group. For example, '1 week', '2 weeks', '3 weeks'. + """ + values: [String!]! +} + +""" +Represents a valid selling plan interval. +""" +enum SellingPlanInterval { + """ + Day interval. + """ + DAY + + """ + Month interval. + """ + MONTH + + """ + Week interval. + """ + WEEK + + """ + Year interval. + """ + YEAR +} + +""" +An option provided by a Selling Plan. +""" +type SellingPlanOption { + """ + The name of the option (ie "Delivery every"). + """ + name: String + + """ + The value of the option (ie "Month"). + """ + value: String +} + +""" +A percentage amount that's deducted from the original variant price. For example, 10% off. +""" +type SellingPlanPercentagePriceAdjustment { + """ + The percentage value of the price adjustment. + """ + adjustmentPercentage: Float! +} + +""" +Represents by how much the price of a variant associated with a selling plan is adjusted. Each variant can have up to two price adjustments. If a variant has multiple price adjustments, then the first price adjustment applies when the variant is initially purchased. The second price adjustment applies after a certain number of orders (specified by the `orderCount` field) are made. If a selling plan doesn't have any price adjustments, then the unadjusted price of the variant is the effective price. +""" +type SellingPlanPriceAdjustment { + """ + The type of price adjustment. An adjustment value can have one of three types: percentage, amount off, or a new price. + """ + adjustmentValue: SellingPlanPriceAdjustmentValue! + + """ + The number of orders that the price adjustment applies to. If the price adjustment always applies, then this field is `null`. + """ + orderCount: Int +} + +""" +Represents by how much the price of a variant associated with a selling plan is adjusted. Each variant can have up to two price adjustments. +""" +union SellingPlanPriceAdjustmentValue = SellingPlanFixedAmountPriceAdjustment|SellingPlanFixedPriceAdjustment|SellingPlanPercentagePriceAdjustment + +""" +The recurring billing policy for the selling plan. +""" +type SellingPlanRecurringBillingPolicy { + """ + The billing frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between billings. + """ + intervalCount: Int! +} + +""" +The recurring delivery policy for the selling plan. +""" +type SellingPlanRecurringDeliveryPolicy { + """ + The delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between deliveries. + """ + intervalCount: Int! +} + +""" +The central hub for store-wide settings and information accessible through the Storefront API. Provides the shop's name, description, and branding configuration including logos and colors through the [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) object. + +Access store policies such as privacy, refund, shipping, and terms of service via [`ShopPolicy`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicy), and the subscription policy via [`ShopPolicyWithDefault`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicyWithDefault). [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings) expose accepted card brands, supported digital wallets, and enabled presentment currencies. The object also includes the primary [`Domain`](https://shopify.dev/docs/api/storefront/current/objects/Domain), countries the shop ships to, [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing), and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. +""" +type Shop implements HasMetafields & Node { + """ + The shop's branding configuration. + """ + brand: Brand + + """ + Translations for customer accounts. + """ + customerAccountTranslations: [Translation!] + + """ + The URL for the customer account (only present if shop has a customer account vanity domain). + """ + customerAccountUrl: String + + """ + A description of the shop. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + + """ + A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + """ + metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + + """ + A string representing the way currency is formatted when the currency isn’t specified. + """ + moneyFormat: String! + + """ + The shop’s name. + """ + name: String! + + """ + Settings related to payments. + """ + paymentSettings: PaymentSettings! + + """ + The primary domain of the shop’s Online Store. + """ + primaryDomain: Domain! + + """ + The shop’s privacy policy. + """ + privacyPolicy: ShopPolicy + + """ + The shop’s refund policy. + """ + refundPolicy: ShopPolicy + + """ + The shop’s shipping policy. + """ + shippingPolicy: ShopPolicy + + """ + Countries that the shop ships to. + """ + shipsToCountries: [CountryCode!]! + + """ + The Shop Pay Installments pricing information for the shop. + """ + shopPayInstallmentsPricing: ShopPayInstallmentsPricing + + """ + The social login providers for customer accounts. + """ + socialLoginProviders: [SocialLoginProvider!]! + + """ + The shop’s subscription policy. + """ + subscriptionPolicy: ShopPolicyWithDefault + + """ + The shop’s terms of service. + """ + termsOfService: ShopPolicy +} + +""" +The financing plan in Shop Pay Installments. +""" +type ShopPayInstallmentsFinancingPlan implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The maximum price to qualify for the financing plan. + """ + maxPrice: MoneyV2! + + """ + The minimum price to qualify for the financing plan. + """ + minPrice: MoneyV2! + + """ + The terms of the financing plan. + """ + terms: [ShopPayInstallmentsFinancingPlanTerm!]! +} + +""" +The payment frequency for a Shop Pay Installments Financing Plan. +""" +enum ShopPayInstallmentsFinancingPlanFrequency { + """ + Weekly payment frequency. + """ + WEEKLY + + """ + Monthly payment frequency. + """ + MONTHLY +} + +""" +The terms of the financing plan in Shop Pay Installments. +""" +type ShopPayInstallmentsFinancingPlanTerm implements Node { + """ + The annual percentage rate (APR) of the financing plan. + """ + apr: Int! + + """ + The payment frequency for the financing plan. + """ + frequency: ShopPayInstallmentsFinancingPlanFrequency! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The number of installments for the financing plan. + """ + installmentsCount: Count + + """ + The type of loan for the financing plan. + """ + loanType: ShopPayInstallmentsLoan! +} + +""" +The loan type for a Shop Pay Installments Financing Plan Term. +""" +enum ShopPayInstallmentsLoan { + """ + An interest-bearing loan type. + """ + INTEREST + + """ + A split-pay loan type. + """ + SPLIT_PAY + + """ + A zero-percent loan type. + """ + ZERO_PERCENT +} + +""" +The result for a Shop Pay Installments pricing request. +""" +type ShopPayInstallmentsPricing { + """ + The financing plans available for the given price range. + """ + financingPlans: [ShopPayInstallmentsFinancingPlan!]! + + """ + The maximum price to qualify for financing. + """ + maxPrice: MoneyV2! + + """ + The minimum price to qualify for financing. + """ + minPrice: MoneyV2! +} + +""" +The shop pay installments pricing information for a product variant. +""" +type ShopPayInstallmentsProductVariantPricing implements Node { + """ + Whether the product variant is available. + """ + available: Boolean! + + """ + Whether the product variant is eligible for Shop Pay Installments. + """ + eligible: Boolean! + + """ + The full price of the product variant. + """ + fullPrice: MoneyV2! + + """ + The ID of the product variant. + """ + id: ID! + + """ + The number of payment terms available for the product variant. + """ + installmentsCount: Count + + """ + The price per term for the product variant. + """ + pricePerTerm: MoneyV2! +} + +""" +Represents a Shop Pay payment request. +""" +type ShopPayPaymentRequest { + """ + The delivery methods for the payment request. + """ + deliveryMethods: [ShopPayPaymentRequestDeliveryMethod!]! @deprecated(reason: "This field is deprecated and will be removed in a future version.") + + """ + The discount codes for the payment request. + """ + discountCodes: [String!]! + + """ + The discounts for the payment request order. + """ + discounts: [ShopPayPaymentRequestDiscount!] + + """ + The line items for the payment request. + """ + lineItems: [ShopPayPaymentRequestLineItem!]! + + """ + The locale for the payment request. + """ + locale: String! + + """ + The presentment currency for the payment request. + """ + presentmentCurrency: CurrencyCode! + + """ + The delivery method type for the payment request. + """ + selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType! + + """ + The shipping address for the payment request. + """ + shippingAddress: ShopPayPaymentRequestContactField + + """ + The shipping lines for the payment request. + """ + shippingLines: [ShopPayPaymentRequestShippingLine!]! + + """ + The subtotal amount for the payment request. + """ + subtotal: MoneyV2! + + """ + The total amount for the payment request. + """ + total: MoneyV2! + + """ + The total shipping price for the payment request. + """ + totalShippingPrice: ShopPayPaymentRequestTotalShippingPrice + + """ + The total tax for the payment request. + """ + totalTax: MoneyV2 +} + +""" +Represents a contact field for a Shop Pay payment request. +""" +type ShopPayPaymentRequestContactField { + """ + The first address line of the contact field. + """ + address1: String! + + """ + The second address line of the contact field. + """ + address2: String + + """ + The city of the contact field. + """ + city: String! + + """ + The company name of the contact field. + """ + companyName: String + + """ + The country of the contact field. + """ + countryCode: String! + + """ + The email of the contact field. + """ + email: String + + """ + The first name of the contact field. + """ + firstName: String! + + """ + The first name of the contact field. + """ + lastName: String! + + """ + The phone number of the contact field. + """ + phone: String + + """ + The postal code of the contact field. + """ + postalCode: String + + """ + The province of the contact field. + """ + provinceCode: String +} + +""" +Represents a delivery method for a Shop Pay payment request. +""" +type ShopPayPaymentRequestDeliveryMethod { + """ + The amount for the delivery method. + """ + amount: MoneyV2! + + """ + The code of the delivery method. + """ + code: String! + + """ + The detail about when the delivery may be expected. + """ + deliveryExpectationLabel: String + + """ + The detail of the delivery method. + """ + detail: String + + """ + The label of the delivery method. + """ + label: String! + + """ + The maximum delivery date for the delivery method. + """ + maxDeliveryDate: ISO8601DateTime + + """ + The minimum delivery date for the delivery method. + """ + minDeliveryDate: ISO8601DateTime +} + +""" +The input fields to create a delivery method for a Shop Pay payment request. +""" +input ShopPayPaymentRequestDeliveryMethodInput { + """ + The code of the delivery method. + """ + code: String + + """ + The label of the delivery method. + """ + label: String + + """ + The detail of the delivery method. + """ + detail: String + + """ + The amount for the delivery method. + """ + amount: MoneyInput + + """ + The minimum delivery date for the delivery method. + """ + minDeliveryDate: ISO8601DateTime + + """ + The maximum delivery date for the delivery method. + """ + maxDeliveryDate: ISO8601DateTime + + """ + The detail about when the delivery may be expected. + """ + deliveryExpectationLabel: String +} + +""" +Represents the delivery method type for a Shop Pay payment request. +""" +enum ShopPayPaymentRequestDeliveryMethodType { + """ + The delivery method type is shipping. + """ + SHIPPING + + """ + The delivery method type is pickup. + """ + PICKUP +} + +""" +Represents a discount for a Shop Pay payment request. +""" +type ShopPayPaymentRequestDiscount { + """ + The amount of the discount. + """ + amount: MoneyV2! + + """ + The label of the discount. + """ + label: String! +} + +""" +The input fields to create a discount for a Shop Pay payment request. +""" +input ShopPayPaymentRequestDiscountInput { + """ + The label of the discount. + """ + label: String + + """ + The amount of the discount. + """ + amount: MoneyInput +} + +""" +Represents an image for a Shop Pay payment request line item. +""" +type ShopPayPaymentRequestImage { + """ + The alt text of the image. + """ + alt: String + + """ + The source URL of the image. + """ + url: String! +} + +""" +The input fields to create an image for a Shop Pay payment request. +""" +input ShopPayPaymentRequestImageInput { + """ + The source URL of the image. + """ + url: String! + + """ + The alt text of the image. + """ + alt: String +} + +""" +The input fields represent a Shop Pay payment request. +""" +input ShopPayPaymentRequestInput { + """ + The discount codes for the payment request. + + The input must not contain more than `250` values. + """ + discountCodes: [String!] + + """ + The line items for the payment request. + + The input must not contain more than `250` values. + """ + lineItems: [ShopPayPaymentRequestLineItemInput!] + + """ + The shipping lines for the payment request. + + The input must not contain more than `250` values. + """ + shippingLines: [ShopPayPaymentRequestShippingLineInput!] + + """ + The total amount for the payment request. + """ + total: MoneyInput! + + """ + The subtotal amount for the payment request. + """ + subtotal: MoneyInput! + + """ + The discounts for the payment request order. + + The input must not contain more than `250` values. + """ + discounts: [ShopPayPaymentRequestDiscountInput!] + + """ + The total shipping price for the payment request. + """ + totalShippingPrice: ShopPayPaymentRequestTotalShippingPriceInput + + """ + The total tax for the payment request. + """ + totalTax: MoneyInput + + """ + The delivery methods for the payment request. + + The input must not contain more than `250` values. + """ + deliveryMethods: [ShopPayPaymentRequestDeliveryMethodInput!] @deprecated(reason: "This field is deprecated and will be removed in a future version.") + + """ + The delivery method type for the payment request. + """ + selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType + + """ + The locale for the payment request. + """ + locale: String! + + """ + The presentment currency for the payment request. + """ + presentmentCurrency: CurrencyCode! + + """ + The encrypted payment method for the payment request. + """ + paymentMethod: String +} + +""" +Represents a line item for a Shop Pay payment request. +""" +type ShopPayPaymentRequestLineItem { + """ + The final item price for the line item. + """ + finalItemPrice: MoneyV2! + + """ + The final line price for the line item. + """ + finalLinePrice: MoneyV2! + + """ + The image of the line item. + """ + image: ShopPayPaymentRequestImage + + """ + The item discounts for the line item. + """ + itemDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The label of the line item. + """ + label: String! + + """ + The line discounts for the line item. + """ + lineDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The original item price for the line item. + """ + originalItemPrice: MoneyV2 + + """ + The original line price for the line item. + """ + originalLinePrice: MoneyV2 + + """ + The quantity of the line item. + """ + quantity: Int! + + """ + Whether the line item requires shipping. + """ + requiresShipping: Boolean + + """ + The SKU of the line item. + """ + sku: String +} + +""" +The input fields to create a line item for a Shop Pay payment request. +""" +input ShopPayPaymentRequestLineItemInput { + """ + The label of the line item. + """ + label: String + + """ + The quantity of the line item. + """ + quantity: Int! + + """ + The SKU of the line item. + """ + sku: String + + """ + Whether the line item requires shipping. + """ + requiresShipping: Boolean + + """ + The image of the line item. + """ + image: ShopPayPaymentRequestImageInput + + """ + The original line price for the line item. + """ + originalLinePrice: MoneyInput + + """ + The final line price for the line item. + """ + finalLinePrice: MoneyInput + + """ + The line discounts for the line item. + + The input must not contain more than `250` values. + """ + lineDiscounts: [ShopPayPaymentRequestDiscountInput!] + + """ + The original item price for the line item. + """ + originalItemPrice: MoneyInput + + """ + The final item price for the line item. + """ + finalItemPrice: MoneyInput + + """ + The item discounts for the line item. + + The input must not contain more than `250` values. + """ + itemDiscounts: [ShopPayPaymentRequestDiscountInput!] +} + +""" +Represents a receipt for a Shop Pay payment request. +""" +type ShopPayPaymentRequestReceipt { + """ + The payment request object. + """ + paymentRequest: ShopPayPaymentRequest! + + """ + The processing status. + """ + processingStatusType: String! + + """ + The token of the receipt. + """ + token: String! +} + +""" +Represents a Shop Pay payment request session. +""" +type ShopPayPaymentRequestSession { + """ + The checkout URL of the Shop Pay payment request session. + """ + checkoutUrl: URL! + + """ + The payment request associated with the Shop Pay payment request session. + """ + paymentRequest: ShopPayPaymentRequest! + + """ + The source identifier of the Shop Pay payment request session. + """ + sourceIdentifier: String! + + """ + The token of the Shop Pay payment request session. + """ + token: String! +} + +""" +Return type for `shopPayPaymentRequestSessionCreate` mutation. +""" +type ShopPayPaymentRequestSessionCreatePayload { + """ + The new Shop Pay payment request session object. + """ + shopPayPaymentRequestSession: ShopPayPaymentRequestSession + + """ + Error codes for failed Shop Pay payment request session mutations. + """ + userErrors: [UserErrorsShopPayPaymentRequestSessionUserErrors!]! +} + +""" +Return type for `shopPayPaymentRequestSessionSubmit` mutation. +""" +type ShopPayPaymentRequestSessionSubmitPayload { + """ + The checkout on which the payment was applied. + """ + paymentRequestReceipt: ShopPayPaymentRequestReceipt + + """ + Error codes for failed Shop Pay payment request session mutations. + """ + userErrors: [UserErrorsShopPayPaymentRequestSessionUserErrors!]! +} + +""" +Represents a shipping line for a Shop Pay payment request. +""" +type ShopPayPaymentRequestShippingLine { + """ + The amount for the shipping line. + """ + amount: MoneyV2! + + """ + The code of the shipping line. + """ + code: String! + + """ + The label of the shipping line. + """ + label: String! +} + +""" +The input fields to create a shipping line for a Shop Pay payment request. +""" +input ShopPayPaymentRequestShippingLineInput { + """ + The code of the shipping line. + """ + code: String + + """ + The label of the shipping line. + """ + label: String + + """ + The amount for the shipping line. + """ + amount: MoneyInput +} + +""" +Represents a shipping total for a Shop Pay payment request. +""" +type ShopPayPaymentRequestTotalShippingPrice { + """ + The discounts for the shipping total. + """ + discounts: [ShopPayPaymentRequestDiscount!]! + + """ + The final total for the shipping total. + """ + finalTotal: MoneyV2! + + """ + The original total for the shipping total. + """ + originalTotal: MoneyV2 +} + +""" +The input fields to create a shipping total for a Shop Pay payment request. +""" +input ShopPayPaymentRequestTotalShippingPriceInput { + """ + The discounts for the shipping total. + + The input must not contain more than `250` values. + """ + discounts: [ShopPayPaymentRequestDiscountInput!] + + """ + The original total for the shipping total. + """ + originalTotal: MoneyInput + + """ + The final total for the shipping total. + """ + finalTotal: MoneyInput +} + +""" +The input fields for submitting Shop Pay payment method information for checkout. +""" +input ShopPayWalletContentInput { + """ + The customer's billing address. + """ + billingAddress: MailingAddressInput! + + """ + Session token for transaction. + """ + sessionToken: String! +} + +""" +Policy that a merchant has configured for their store, such as their refund or privacy policy. +""" +type ShopPolicy implements Node { + """ + Policy text, maximum size of 64kb. + """ + body: String! + + """ + Policy’s handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Policy’s title. + """ + title: String! + + """ + Public URL to the policy. + """ + url: URL! +} + +""" +A policy for the store that comes with a default value, such as a subscription policy. +If the merchant hasn't configured a policy for their store, then the policy will return the default value. +Otherwise, the policy will return the merchant-configured value. +""" +type ShopPolicyWithDefault { + """ + The text of the policy. Maximum size: 64KB. + """ + body: String! + + """ + The handle of the policy. + """ + handle: String! + + """ + The unique ID of the policy. A default policy doesn't have an ID. + """ + id: ID + + """ + The title of the policy. + """ + title: String! + + """ + Public URL to the policy. + """ + url: URL! +} + +""" +Contains all fields required to generate sitemaps. +""" +type Sitemap { + """ + The number of sitemap's pages for a given type. + """ + pagesCount: Count + + """ + A list of sitemap's resources for a given type. + + Important Notes: + - The number of items per page varies from 0 to 250. + - Empty pages (0 items) may occur and do not necessarily indicate the end of results. + - Always check `hasNextPage` to determine if more pages are available. + """ + resources("The page number to fetch." page: Int!): PaginatedSitemapResources +} + +""" +Represents a sitemap's image. +""" +type SitemapImage { + """ + Image's alt text. + """ + alt: String + + """ + Path to the image. + """ + filepath: String + + """ + The date and time when the image was updated. + """ + updatedAt: DateTime! +} + +""" +Represents a sitemap resource that is not a metaobject. +""" +type SitemapResource implements SitemapResourceInterface { + """ + Resource's handle. + """ + handle: String! + + """ + Resource's image. + """ + image: SitemapImage + + """ + Resource's title. + """ + title: String + + """ + The date and time when the resource was updated. + """ + updatedAt: DateTime! +} + +""" +Represents the common fields for all sitemap resource types. +""" +interface SitemapResourceInterface { + """ + Resource's handle. + """ + handle: String! + + """ + The date and time when the resource was updated. + """ + updatedAt: DateTime! +} + +""" +A SitemapResourceMetaobject represents a metaobject with +[the `renderable` capability](https://shopify.dev/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities#render-metaobjects-as-web-pages). +""" +type SitemapResourceMetaobject implements SitemapResourceInterface { + """ + Resource's handle. + """ + handle: String! + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + onlineStoreUrlHandle: String + + """ + The type of the metaobject. + """ + type: String! + + """ + The date and time when the resource was updated. + """ + updatedAt: DateTime! +} + +""" +The types of resources potentially present in a sitemap. +""" +enum SitemapType { + """ + Products present in the sitemap. + """ + PRODUCT + + """ + Collections present in the sitemap. + """ + COLLECTION + + """ + Pages present in the sitemap. + """ + PAGE + + """ + Metaobjects present in the sitemap. Only metaobject types with the + [`renderable` capability](https://shopify.dev/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities#render-metaobjects-as-web-pages) + are included in sitemap. + """ + METAOBJECT + + """ + Blogs present in the sitemap. + """ + BLOG + + """ + Articles present in the sitemap. + """ + ARTICLE +} + +""" +A social login provider for customer accounts. +""" +type SocialLoginProvider { + """ + The handle of the social login provider. + """ + handle: String! +} + +""" +Inventory information for a product variant at a physical store location that offers local pickup. Includes stock availability, quantity on hand, and estimated pickup readiness time. Availability also includes inventory that can be moved to the location through a store transfer route, so a variant can be available for pickup with no on-hand stock at the location. + +Local pickup must be [enabled in the store's shipping settings](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup) for this data to be returned. Results can be sorted by proximity to a customer's location using the `near` argument on the [`ProductVariant.storeAvailability`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.storeAvailability) connection. + +Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). +""" +type StoreAvailability { + """ + Whether the product variant can be picked up at this location. This is `true` when the variant is in stock here, can be supplied through a store transfer from another location, or is sold with untracked or oversellable inventory (its inventory isn't tracked, or its inventory policy allows continuing to sell when out of stock). As a result, `available` can be `true` even when `quantityAvailable` is `0`. + """ + available: Boolean! + + """ + The location where this product variant is stocked at. + """ + location: Location! + + """ + Returns the estimated amount of time it takes for pickup to be ready (Example: Usually ready in 24 hours). When the variant is out of stock at this location and supplied through a store transfer, this reflects the estimated transfer transit time when available, otherwise it falls back to the location's standard pickup processing time. + """ + pickUpTime: String! + + """ + The quantity of the product variant physically in stock at this location. This counts on-hand inventory only and excludes inventory available through a store transfer, so it can be `0` while `available` is `true`. + """ + quantityAvailable: Int! +} + +""" +An auto-generated type for paginating through multiple StoreAvailabilities. +""" +type StoreAvailabilityConnection { + """ + A list of edges. + """ + edges: [StoreAvailabilityEdge!]! + + """ + A list of the nodes contained in StoreAvailabilityEdge. + """ + nodes: [StoreAvailability!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one StoreAvailability and a cursor during pagination. +""" +type StoreAvailabilityEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of StoreAvailabilityEdge. + """ + node: StoreAvailability! +} + +""" +Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text. +""" +scalar String + +""" +An auto-generated type for paginating through multiple Strings. +""" +type StringConnection { + """ + A list of edges. + """ + edges: [StringEdge!]! + + """ + A list of the nodes contained in StringEdge. + """ + nodes: [String!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one String and a cursor during pagination. +""" +type StringEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of StringEdge. + """ + node: String! +} + +""" +An error that occurred during cart submit for completion. +""" +type SubmissionError { + """ + The error code. + """ + code: SubmissionErrorCode! + + """ + The error message. + """ + message: String +} + +""" +The code of the error that occurred during cart submit for completion. +""" +enum SubmissionErrorCode { + ERROR + + NO_DELIVERY_GROUP_SELECTED + + BUYER_IDENTITY_EMAIL_IS_INVALID + + BUYER_IDENTITY_EMAIL_REQUIRED + + BUYER_IDENTITY_PHONE_IS_INVALID + + DELIVERY_ADDRESS1_INVALID + + DELIVERY_ADDRESS1_REQUIRED + + DELIVERY_ADDRESS1_TOO_LONG + + DELIVERY_ADDRESS2_INVALID + + DELIVERY_ADDRESS2_REQUIRED + + DELIVERY_ADDRESS2_TOO_LONG + + DELIVERY_CITY_INVALID + + DELIVERY_CITY_REQUIRED + + DELIVERY_CITY_TOO_LONG + + DELIVERY_COMPANY_INVALID + + DELIVERY_COMPANY_REQUIRED + + DELIVERY_COMPANY_TOO_LONG + + DELIVERY_COUNTRY_REQUIRED + + DELIVERY_FIRST_NAME_INVALID + + DELIVERY_FIRST_NAME_REQUIRED + + DELIVERY_FIRST_NAME_TOO_LONG + + DELIVERY_INVALID_POSTAL_CODE_FOR_COUNTRY + + DELIVERY_INVALID_POSTAL_CODE_FOR_ZONE + + DELIVERY_LAST_NAME_INVALID + + DELIVERY_LAST_NAME_REQUIRED + + DELIVERY_LAST_NAME_TOO_LONG + + DELIVERY_NO_DELIVERY_AVAILABLE + + DELIVERY_NO_DELIVERY_AVAILABLE_FOR_MERCHANDISE_LINE + + DELIVERY_OPTIONS_PHONE_NUMBER_INVALID + + DELIVERY_OPTIONS_PHONE_NUMBER_REQUIRED + + DELIVERY_PHONE_NUMBER_INVALID + + DELIVERY_PHONE_NUMBER_REQUIRED + + DELIVERY_POSTAL_CODE_INVALID + + DELIVERY_POSTAL_CODE_REQUIRED + + DELIVERY_ZONE_NOT_FOUND + + DELIVERY_ZONE_REQUIRED_FOR_COUNTRY + + DELIVERY_ADDRESS_REQUIRED + + MERCHANDISE_NOT_APPLICABLE + + MERCHANDISE_LINE_LIMIT_REACHED + + MERCHANDISE_NOT_ENOUGH_STOCK_AVAILABLE + + MERCHANDISE_OUT_OF_STOCK + + MERCHANDISE_PRODUCT_NOT_PUBLISHED + + PAYMENTS_ADDRESS1_INVALID + + PAYMENTS_ADDRESS1_REQUIRED + + PAYMENTS_ADDRESS1_TOO_LONG + + PAYMENTS_ADDRESS2_INVALID + + PAYMENTS_ADDRESS2_REQUIRED + + PAYMENTS_ADDRESS2_TOO_LONG + + PAYMENTS_CITY_INVALID + + PAYMENTS_CITY_REQUIRED + + PAYMENTS_CITY_TOO_LONG + + PAYMENTS_COMPANY_INVALID + + PAYMENTS_COMPANY_REQUIRED + + PAYMENTS_COMPANY_TOO_LONG + + PAYMENTS_COUNTRY_REQUIRED + + PAYMENTS_CREDIT_CARD_BASE_EXPIRED + + PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED + + PAYMENTS_CREDIT_CARD_BASE_INVALID_START_DATE_OR_ISSUE_NUMBER_FOR_DEBIT + + PAYMENTS_CREDIT_CARD_BRAND_NOT_SUPPORTED + + PAYMENTS_CREDIT_CARD_FIRST_NAME_BLANK + + PAYMENTS_CREDIT_CARD_GENERIC + + PAYMENTS_CREDIT_CARD_LAST_NAME_BLANK + + PAYMENTS_CREDIT_CARD_MONTH_INCLUSION + + PAYMENTS_CREDIT_CARD_NAME_INVALID + + PAYMENTS_CREDIT_CARD_NUMBER_INVALID + + PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT + + PAYMENTS_CREDIT_CARD_SESSION_ID + + PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK + + PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE + + PAYMENTS_CREDIT_CARD_YEAR_EXPIRED + + PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR + + PAYMENTS_FIRST_NAME_INVALID + + PAYMENTS_FIRST_NAME_REQUIRED + + PAYMENTS_FIRST_NAME_TOO_LONG + + PAYMENTS_INVALID_POSTAL_CODE_FOR_COUNTRY + + PAYMENTS_INVALID_POSTAL_CODE_FOR_ZONE + + PAYMENTS_LAST_NAME_INVALID + + PAYMENTS_LAST_NAME_REQUIRED + + PAYMENTS_LAST_NAME_TOO_LONG + + PAYMENTS_METHOD_UNAVAILABLE + + PAYMENTS_METHOD_REQUIRED + + PAYMENTS_UNACCEPTABLE_PAYMENT_AMOUNT + + PAYMENTS_PHONE_NUMBER_INVALID + + PAYMENTS_PHONE_NUMBER_REQUIRED + + PAYMENTS_POSTAL_CODE_INVALID + + PAYMENTS_POSTAL_CODE_REQUIRED + + PAYMENTS_SHOPIFY_PAYMENTS_REQUIRED + + PAYMENTS_WALLET_CONTENT_MISSING + + PAYMENTS_BILLING_ADDRESS_ZONE_NOT_FOUND + + PAYMENTS_BILLING_ADDRESS_ZONE_REQUIRED_FOR_COUNTRY + + """ + Redirect to checkout required to complete this action. + """ + REDIRECT_TO_CHECKOUT_REQUIRED + + TAXES_MUST_BE_DEFINED + + TAXES_LINE_ID_NOT_FOUND + + TAXES_DELIVERY_GROUP_ID_NOT_FOUND + + """ + Validation failed. + """ + VALIDATION_CUSTOM +} + +""" +Cart submit for checkout completion is successful. +""" +type SubmitAlreadyAccepted { + """ + The ID of the cart completion attempt that will be used for polling for the result. + """ + attemptId: String! +} + +""" +Cart submit for checkout completion failed. +""" +type SubmitFailed { + """ + The URL of the checkout for the cart. + """ + checkoutUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + errors: [SubmissionError!]! +} + +""" +Cart submit for checkout completion is already accepted. +""" +type SubmitSuccess { + """ + The ID of the cart completion attempt that will be used for polling for the result. + """ + attemptId: String! + + """ + The url to which the buyer should be redirected after the cart is successfully submitted. + """ + redirectUrl: URL! +} + +""" +Cart submit for checkout completion is throttled. +""" +type SubmitThrottled { + """ + UTC date time string that indicates the time after which clients should make their next + poll request. Any poll requests sent before this time will be ignored. Use this value to schedule the + next poll request. + """ + pollAfter: DateTime! +} + +""" +A visual representation for filter values, containing a color, an image, or both. The [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) object's [`swatch`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.swatch) field returns this when the filter's presentation is set to `SWATCH`. +""" +type Swatch { + """ + The swatch color. + """ + color: Color + + """ + The swatch image. + """ + image: MediaImage +} + +""" +A category from Shopify's [Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) assigned to a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). Categories provide hierarchical classification through the `ancestors` field. + +The [`ancestors`](https://shopify.dev/docs/api/storefront/current/objects/TaxonomyCategory#field-TaxonomyCategory.fields.ancestors) field returns the parent chain from the immediate parent up to the root. Each ancestor category also includes its own `ancestors`. + +The [`name`](https://shopify.dev/docs/api/storefront/latest/objects/TaxonomyCategory#field-TaxonomyCategory.fields.name) field returns the localized category name based on the storefront's request language with shop locale fallbacks. If a translation isn't available for the resolved locale, the English taxonomy name is returned. +""" +type TaxonomyCategory implements Node { + """ + All parent nodes of the current taxonomy category. + """ + ancestors: [TaxonomyCategory!]! + + """ + A static identifier for the taxonomy category. + """ + id: ID! + + """ + The localized name of the taxonomy category. + """ + name: String! +} + +""" +A filter used to view a subset of products in a collection matching a specific taxonomy metafield value. +""" +input TaxonomyMetafieldFilter { + """ + The namespace of the metafield to filter on. + """ + namespace: String! + + """ + The key of the metafield to filter on. + """ + key: String! + + """ + The value of the metafield. + """ + value: String! +} + +""" +Represents a resource that you can track the origin of the search traffic. +""" +interface Trackable { + """ + URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + """ + trackingParameters: String +} + +""" +Translation represents a translation of a key-value pair. +""" +type Translation { + """ + The key of the translation. + """ + key: String! + + """ + The value of the translation. + """ + value: String! +} + +""" +Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and +[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + +For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host +(`example.myshopify.com`). +""" +scalar URL + +""" +The measurement data used to calculate unit prices for a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant). Unit pricing helps customers compare costs across different package sizes by showing a standardized price, such as "$9.99 / 100ml". + +The object includes the quantity being sold (value and unit) and the reference measurement used for price comparison. Use this alongside the variant's [`unitPrice`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.unitPrice) field to display complete unit pricing information. +""" +type UnitPriceMeasurement { + """ + The type of unit of measurement for the unit price measurement. + """ + measuredType: UnitPriceMeasurementMeasuredType + + """ + The quantity unit for the unit price measurement. + """ + quantityUnit: UnitPriceMeasurementMeasuredUnit + + """ + The quantity value for the unit price measurement. + """ + quantityValue: Float! + + """ + The reference unit for the unit price measurement. + """ + referenceUnit: UnitPriceMeasurementMeasuredUnit + + """ + The reference value for the unit price measurement. + """ + referenceValue: Int! +} + +""" +The accepted types of unit of measurement. +""" +enum UnitPriceMeasurementMeasuredType { + """ + Unit of measurements representing volumes. + """ + VOLUME + + """ + Unit of measurements representing weights. + """ + WEIGHT + + """ + Unit of measurements representing lengths. + """ + LENGTH + + """ + Unit of measurements representing areas. + """ + AREA + + """ + Unit of measurements representing counts. + """ + COUNT + + """ + The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. + """ + UNKNOWN +} + +""" +The valid units of measurement for a unit price measurement. +""" +enum UnitPriceMeasurementMeasuredUnit { + """ + 1000 milliliters equals 1 liter. + """ + ML + + """ + 100 centiliters equals 1 liter. + """ + CL + + """ + Metric system unit of volume. + """ + L + + """ + 1 cubic meter equals 1000 liters. + """ + M3 + + """ + Imperial system unit of volume (U.S. customary unit). + """ + FLOZ + + """ + 1 pint equals 16 fluid ounces (U.S. customary unit). + """ + PT + + """ + 1 quart equals 32 fluid ounces (U.S. customary unit). + """ + QT + + """ + 1 gallon equals 128 fluid ounces (U.S. customary unit). + """ + GAL + + """ + 1000 milligrams equals 1 gram. + """ + MG + + """ + Metric system unit of weight. + """ + G + + """ + 1 kilogram equals 1000 grams. + """ + KG + + """ + Imperial system unit of weight. + """ + LB + + """ + 16 ounces equals 1 pound. + """ + OZ + + """ + 1000 millimeters equals 1 meter. + """ + MM + + """ + 100 centimeters equals 1 meter. + """ + CM + + """ + Metric system unit of length. + """ + M + + """ + Imperial system unit of length. + """ + IN + + """ + 1 foot equals 12 inches. + """ + FT + + """ + 1 yard equals 36 inches. + """ + YD + + """ + Metric system unit of area. + """ + M2 + + """ + Imperial system unit of area. + """ + FT2 + + """ + 1 item, a unit of count. + """ + ITEM + + """ + The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. + """ + UNKNOWN +} + +""" +Systems of weights and measures. +""" +enum UnitSystem { + """ + Imperial system of weights and measures. + """ + IMPERIAL_SYSTEM + + """ + Metric system of weights and measures. + """ + METRIC_SYSTEM +} + +""" +An unsigned 64-bit integer. Represents whole numeric values between 0 and 2^64 - 1 encoded as a string of base-10 digits. + +Example value: `"50"`. +""" +scalar UnsignedInt64 + +""" +A redirect on the online store. +""" +type UrlRedirect implements Node { + """ + The ID of the URL redirect. + """ + id: ID! + + """ + The old path to be redirected from. When the user visits this path, they'll be redirected to the target location. + """ + path: String! + + """ + The target location where the user will be redirected to. + """ + target: String! +} + +""" +An auto-generated type for paginating through multiple UrlRedirects. +""" +type UrlRedirectConnection { + """ + A list of edges. + """ + edges: [UrlRedirectEdge!]! + + """ + A list of the nodes contained in UrlRedirectEdge. + """ + nodes: [UrlRedirect!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one UrlRedirect and a cursor during pagination. +""" +type UrlRedirectEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of UrlRedirectEdge. + """ + node: UrlRedirect! +} + +""" +Represents an error in the input of a mutation. +""" +type UserError implements DisplayableError { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Error codes for failed Shop Pay payment request session mutations. +""" +type UserErrorsShopPayPaymentRequestSessionUserErrors implements DisplayableError { + """ + The error code. + """ + code: UserErrorsShopPayPaymentRequestSessionUserErrorsCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopPayPaymentRequestSessionUserErrors`. +""" +enum UserErrorsShopPayPaymentRequestSessionUserErrorsCode { + """ + Payment request input is invalid. + """ + PAYMENT_REQUEST_INVALID_INPUT + + """ + Payment request not found. + """ + PAYMENT_REQUEST_NOT_FOUND + + """ + Idempotency key has already been used. + """ + IDEMPOTENCY_KEY_ALREADY_USED +} + +""" +The input fields for a filter used to view a subset of products in a collection matching a specific variant option. +""" +input VariantOptionFilter { + """ + The name of the variant option to filter on. + """ + name: String! + + """ + The value of the variant option to filter on. + """ + value: String! +} + +""" +A video hosted on Shopify's servers. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface and provides multiple video sources through the [`sources`](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources) field, each with [format](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.format), dimensions, and [URL information](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.url) for adaptive playback. + +For videos hosted on external platforms like YouTube or Vimeo, use [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) instead. +""" +type Video implements Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + The presentation for a media. + """ + presentation: MediaPresentation + + """ + The preview image for the media. + """ + previewImage: Image + + """ + The sources for a video. + """ + sources: [VideoSource!]! +} + +""" +Represents a source for a Shopify hosted video. +""" +type VideoSource { + """ + The format of the video source. + """ + format: String! + + """ + The height of the video. + """ + height: Int! + + """ + The video MIME type. + """ + mimeType: String! + + """ + The URL of the video. + """ + url: String! + + """ + The width of the video. + """ + width: Int! +} + +""" +The visitor's consent to data processing purposes for the shop. true means accepting the purposes, false means declining them, and null means that the visitor didn't express a preference. +""" +input VisitorConsent { + """ + The visitor accepts or rejects the preferences data processing purpose. + """ + preferences: Boolean + + """ + The visitor accepts or rejects the analytics data processing purpose. + """ + analytics: Boolean + + """ + The visitor accepts or rejects the first and third party marketing data processing purposes. + """ + marketing: Boolean + + """ + The visitor accepts or rejects the sale or sharing of their data with third parties. + """ + saleOfData: Boolean +} + +""" +Units of measurement for weight, supporting both metric and imperial systems. Used by [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to specify the unit for the variant's weight value. +""" +enum WeightUnit { + """ + 1 kilogram equals 1000 grams. + """ + KILOGRAMS + + """ + Metric system unit of mass. + """ + GRAMS + + """ + 1 pound equals 16 ounces. + """ + POUNDS + + """ + Imperial system unit of mass. + """ + OUNCES +} + +""" +A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. + +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor. +""" +type __Directive { + args(includeDeprecated: Boolean = false): [__InputValue!]! + + description: String + + isRepeatable: Boolean + + locations: [__DirectiveLocation!]! + + name: String! + + onField: Boolean! @deprecated(reason: "Use `locations`.") + + onFragment: Boolean! @deprecated(reason: "Use `locations`.") + + onOperation: Boolean! @deprecated(reason: "Use `locations`.") +} + +""" +A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies. +""" +enum __DirectiveLocation { + """ + Location adjacent to a query operation. + """ + QUERY + + """ + Location adjacent to a mutation operation. + """ + MUTATION + + """ + Location adjacent to a subscription operation. + """ + SUBSCRIPTION + + """ + Location adjacent to a field. + """ + FIELD + + """ + Location adjacent to a fragment definition. + """ + FRAGMENT_DEFINITION + + """ + Location adjacent to a fragment spread. + """ + FRAGMENT_SPREAD + + """ + Location adjacent to an inline fragment. + """ + INLINE_FRAGMENT + + """ + Location adjacent to a schema definition. + """ + SCHEMA + + """ + Location adjacent to a scalar definition. + """ + SCALAR + + """ + Location adjacent to an object type definition. + """ + OBJECT + + """ + Location adjacent to a field definition. + """ + FIELD_DEFINITION + + """ + Location adjacent to an argument definition. + """ + ARGUMENT_DEFINITION + + """ + Location adjacent to an interface definition. + """ + INTERFACE + + """ + Location adjacent to a union definition. + """ + UNION + + """ + Location adjacent to an enum definition. + """ + ENUM + + """ + Location adjacent to an enum value definition. + """ + ENUM_VALUE + + """ + Location adjacent to an input object type definition. + """ + INPUT_OBJECT + + """ + Location adjacent to an input object field definition. + """ + INPUT_FIELD_DEFINITION + + """ + Location adjacent to a variable definition. + """ + VARIABLE_DEFINITION +} + +""" +One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string. +""" +type __EnumValue { + deprecationReason: String + + description: String + + isDeprecated: Boolean! + + isPrivatelyDocumented: Boolean! + + name: String! +} + +""" +Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. +""" +type __Field { + args(includeDeprecated: Boolean = false): [__InputValue!]! + + deprecationReason: String + + description: String + + inContextAnnotations: [InContextAnnotation!]! + + isDeprecated: Boolean! + + isPrivatelyDocumented: Boolean! + + name: String! + + requiredAccess: String + + tokenRequired: Boolean! + + type: __Type! +} + +""" +Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value. +""" +type __InputValue { + """ + A GraphQL-formatted string representing the default value for this input value. + """ + defaultValue: String + + deprecationReason: String + + description: String + + isDeprecated: Boolean! + + maxInputSize: Int + + name: String! + + type: __Type! +} + +""" +A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations. +""" +type __Schema { + description: String + + """ + A list of all directives supported by this server. + """ + directives: [__Directive!]! + + """ + If this server supports mutation, the type that mutation operations will be rooted at. + """ + mutationType: __Type + + """ + The type that query operations will be rooted at. + """ + queryType: __Type! + + """ + If this server support subscription, the type that subscription operations will be rooted at. + """ + subscriptionType: __Type + + """ + A list of all types supported by this server. + """ + types: [__Type!]! +} + +""" +The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. + +Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. +""" +type __Type { + description: String + + enumValues(includeDeprecated: Boolean = false): [__EnumValue!] + + fields(includeDeprecated: Boolean = false): [__Field!] + + inputFields(includeDeprecated: Boolean = false): [__InputValue!] + + interfaces: [__Type!] + + isOneOf: Boolean! + + isPrivatelyDocumented: Boolean! + + kind: __TypeKind! + + name: String + + ofType: __Type + + possibleTypes: [__Type!] + + requiredAccess: String + + specifiedByURL: String + + tokenRequired: Boolean! +} + +""" +An enum describing what kind of type a given `__Type` is. +""" +enum __TypeKind { + """ + Indicates this type is a scalar. + """ + SCALAR + + """ + Indicates this type is an object. `fields` and `interfaces` are valid fields. + """ + OBJECT + + """ + Indicates this type is an interface. `fields` and `possibleTypes` are valid fields. + """ + INTERFACE + + """ + Indicates this type is a union. `possibleTypes` is a valid field. + """ + UNION + + """ + Indicates this type is an enum. `enumValues` is a valid field. + """ + ENUM + + """ + Indicates this type is an input object. `inputFields` is a valid field. + """ + INPUT_OBJECT + + """ + Indicates this type is a list. `ofType` is a valid field. + """ + LIST + + """ + Indicates this type is a non-null. `ofType` is a valid field. + """ + NON_NULL +} + +""" +Marks an element of a GraphQL schema as having restricted access. +""" +directive @accessRestricted("Explains the reason around this restriction" reason: String = null) on FIELD_DEFINITION | OBJECT + +""" +Informs the server to delay the execution of the current fragment, potentially resulting in multiple responses from the server. Non-deferred data is delivered in the initial response and data deferred is delivered in subsequent responses. Only available on development stores with the Defer Directive developer preview enabled. +""" +directive @defer("When `true`, fragment should be deferred. When `false`, fragment will not be\ndeferred and data will be included in the initial response. Defaults to `true`\nwhen omitted.\n" if: Boolean = true, "May be used to identify the data from responses and associate it with the\ncorresponding defer directive. `label` must be unique label across all `@defer` and\n`@stream` directives in a document. `label` must not be provided as a variable.\n" label: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT + +""" +Marks an element of a GraphQL schema as no longer supported. +""" +directive @deprecated("Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/)." reason: String = "No longer supported") on FIELD_DEFINITION | ENUM_VALUE | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION + +""" +Contextualizes data based on the additional information provided by the directive. For example, you can use the `@inContext(country: CA)` directive to [query a product's price](https://shopify.dev/custom-storefronts/internationalization/international-pricing) in a storefront within the context of Canada. +""" +directive @inContext("The country code for context. For example, `CA`." country: CountryCode, "The language code for context. For example, `EN`." language: LanguageCode, "The identifier of the customer's preferred location." preferredLocationId: ID, "The buyer's identity." buyer: BuyerInput, "The visitor's consent preferences for data processing purposes." visitorConsent: VisitorConsent) on QUERY | MUTATION + +""" +Directs the executor to include this field or fragment only when the `if` argument is true. +""" +directive @include("Included when true." if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + +""" +Requires that exactly one field must be supplied and that field must not be `null`. +""" +directive @oneOf on INPUT_OBJECT + +""" +Directs the executor to skip this field or fragment when the `if` argument is true. +""" +directive @skip("Skipped when true." if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT + +""" +Exposes a URL that specifies the behavior of this scalar. +""" +directive @specifiedBy("The URL that specifies the behavior of this scalar." url: String!) on SCALAR + +schema { + query: QueryRoot + mutation: Mutation +} + diff --git a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt index 04278b2a..42b10452 100644 --- a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt +++ b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt @@ -1,7 +1,9 @@ package com.troves.data.di +import com.apollographql.apollo.ApolloClient import com.troves.data.local.database.DatabaseFactory import com.troves.data.local.database.TrovesDatabase +import com.troves.data.network.provideApolloClient import com.troves.data.network.provideHttpClient import com.troves.data.repository.CartRepositoryImpl import com.troves.data.repository.PaymentRepositoryImpl @@ -13,6 +15,7 @@ import com.troves.data.source.local.preferenceses.AppPreferencesDataSourceImpl import com.troves.data.source.remote.RemoteDatasource import com.troves.data.source.remote.RemoteDatasourceImpl import com.troves.data.source.remote.service.TrovesApiService +import com.troves.data.source.remote.service.apollo.ApolloTrovesApiServiceImpl import com.troves.data.source.remote.service.ktor.KtorTrovesApiServiceImpl import com.troves.domain.repository.AuthenticationRepository import com.troves.domain.repository.CartRepository @@ -30,6 +33,12 @@ val dataModule = module { // ── Network ─────────────────────────────────────────────────────────────── single { provideHttpClient() } single { KtorTrovesApiServiceImpl(get()) } + single { + provideApolloClient() + } + single { + ApolloTrovesApiServiceImpl(get()) + } // ── Remote data source ──────────────────────────────────────────────────── single { RemoteDatasourceImpl(get(), get()) } diff --git a/data/src/commonMain/kotlin/com/troves/data/mapper/HomeMappers.kt b/data/src/commonMain/kotlin/com/troves/data/mapper/HomeMappers.kt index abc53cdc..789c04b1 100644 --- a/data/src/commonMain/kotlin/com/troves/data/mapper/HomeMappers.kt +++ b/data/src/commonMain/kotlin/com/troves/data/mapper/HomeMappers.kt @@ -1,8 +1,8 @@ package com.troves.data.mapper -import com.troves.data.source.remote.dto.CustomCollectionDto -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.SmartCollection +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionDto +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.SmartCollection import com.troves.domain.entity.Product import com.troves.domain.entity.Brand import com.troves.domain.entity.Category diff --git a/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt b/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt new file mode 100644 index 00000000..98e7a7ea --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt @@ -0,0 +1,14 @@ +package com.troves.data.network + +import com.apollographql.apollo.ApolloClient +import com.apollographql.apollo.network.http.LoggingInterceptor +import com.troves.data.config.ShopifyConfig + + fun provideApolloClient(): ApolloClient { + return ApolloClient.Builder() + .serverUrl("${ShopifyConfig.REST_URL}/graphql.json") + .addHttpHeader("X-Shopify-Storefront-Access-Token", ShopifyConfig.API_KEY) + .addHttpHeader("Content-Type", "application/json") + .addHttpInterceptor(LoggingInterceptor(level = LoggingInterceptor.Level.BODY)) + .build() +} \ No newline at end of file diff --git a/data/src/commonMain/kotlin/com/troves/data/repository/WishlistRepositoryImpl.kt b/data/src/commonMain/kotlin/com/troves/data/repository/WishlistRepositoryImpl.kt index cedaba31..6d2f6178 100644 --- a/data/src/commonMain/kotlin/com/troves/data/repository/WishlistRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/repository/WishlistRepositoryImpl.kt @@ -3,7 +3,7 @@ package com.troves.data.repository import com.troves.data.local.database.WishlistDao import com.troves.data.local.database.WishlistEntity import com.troves.data.source.remote.RemoteDatasource -import com.troves.data.source.remote.dto.WishlistDto +import com.troves.data.source.remote.service.ktor.dto.WishlistDto import com.troves.domain.utils.Result import com.troves.domain.entity.Product import com.troves.domain.repository.WishlistRepository diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt index f7e0113d..7ab52e05 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt @@ -1,16 +1,16 @@ package com.troves.data.source.remote -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result -import com.troves.data.source.remote.dto.WishlistDto +import com.troves.data.source.remote.service.ktor.dto.WishlistDto interface RemoteDatasource { //region product diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt index f6d34dbb..a6cf9233 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt @@ -1,13 +1,13 @@ package com.troves.data.source.remote -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.SingleProductResponse -import com.troves.data.source.remote.dto.WishlistDto +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse +import com.troves.data.source.remote.service.ktor.dto.WishlistDto import com.troves.data.source.remote.service.TrovesApiService import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiService.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiService.kt index cfe217f9..9723a454 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiService.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/TrovesApiService.kt @@ -1,12 +1,12 @@ package com.troves.data.source.remote.service -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt index 095513cb..2e25b57e 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt @@ -1,46 +1,82 @@ package com.troves.data.source.remote.service.apollo -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.SingleProductResponse +import com.apollographql.apollo.ApolloClient +import com.apollographql.apollo.api.Optional +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse import com.troves.data.source.remote.service.TrovesApiService +import com.troves.data.source.remote.service.apollo.graphql.GetProductsQuery import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result -/** - * Copyright (c) 2026 Wahid Ali Wahid Hussien. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Author: Wahid Ali Wahid Hussien - * Created: 02/07/2026 - */ -class ApolloTrovesApiServiceImpl( + + +class ApolloTrovesApiServiceImpl( +private val apolloClient: ApolloClient ): TrovesApiService{ override suspend fun createProduct(productDto: ProductDto): Result { TODO("Not yet implemented") } - override suspend fun getAllProducts(): Result { - TODO("Not yet implemented") + override suspend fun getAllProducts( + ): Result { + return try { + val response = apolloClient.query( + GetProductsQuery( + first = 20, + after = Optional.presentIfNotNull(null), + reverse = Optional.presentIfNotNull(null) + ) + ).execute() + + if (response.hasErrors()) { + val errorMessage = response.errors?.firstOrNull()?.message ?: "Unknown GraphQL Error" + return Result.Error(Exception(errorMessage)) + } + + val productsData = response.data?.products + + // Map the Relay edges/nodes structure to your Clean Architecture Domain Model + val domainProducts = productsData?.edges?.map { edge -> + edge.node.toDomainProduct() + + } ?: emptyList() + + val products: List = domainProducts.map { + ProductDto( + id = it.id, + title = it.title, + vendor = it.vendor, + status = it.status, + adminGraphqlApiId = null, + bodyHtml = null, + createdAt = null, + handle = null, + image = null, + images = emptyList(), + options = emptyList(), + productType = null, + publishedAt = null, + publishedScope = null, + tags = null, + updatedAt = null, + variants = emptyList(), + ) + } + val productResponse = ProductResponse(products = products) + + Result.Success(productResponse) + + } catch (e: Exception) { + Result.Error(e) + } } override suspend fun getProductsByQuery(queryMap: Map): Result { @@ -79,4 +115,14 @@ class ApolloTrovesApiServiceImpl( TODO("Not yet implemented") } -} \ No newline at end of file +} +private fun GetProductsQuery.Node.toDomainProduct(): Product { + return Product( + id = this.id.toLongOrNull() ?: 0L, + title = this.title, + vendor = this.vendor, + imageUrl = this.featuredImage?.url?.toString() ?: "", + price = this.priceRange.maxVariantPrice.amount.toString(), + status = "active" + ) +} diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt index 3829e573..78d8d6cf 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/KtorTrovesApiServiceImpl.kt @@ -1,12 +1,12 @@ package com.troves.data.source.remote.service.ktor -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse import com.troves.data.source.remote.service.TrovesApiService import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Brands.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Brands.kt similarity index 95% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Brands.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Brands.kt index 92710aa4..b02d9ac4 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Brands.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Brands.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.SerialName diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Collection.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Collection.kt similarity index 92% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Collection.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Collection.kt index 649c3077..fff35d91 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/Collection.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/Collection.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.SerialName diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/MarketingEvent.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/MarketingEvent.kt similarity index 99% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/MarketingEvent.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/MarketingEvent.kt index 985a2adc..79295f63 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/MarketingEvent.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/MarketingEvent.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/ProductResponse.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/ProductResponse.kt similarity index 98% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/ProductResponse.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/ProductResponse.kt index 24787a5f..8abfadae 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/ProductResponse.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/ProductResponse.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.SerialName diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/SingleProductResponse.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/SingleProductResponse.kt similarity index 68% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/SingleProductResponse.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/SingleProductResponse.kt index 48af34f4..98a2f1f0 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/SingleProductResponse.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/SingleProductResponse.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.Serializable diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/WishlistDto.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/WishlistDto.kt similarity index 81% rename from data/src/commonMain/kotlin/com/troves/data/source/remote/dto/WishlistDto.kt rename to data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/WishlistDto.kt index 67b93b13..20c35d13 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/dto/WishlistDto.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/ktor/dto/WishlistDto.kt @@ -1,4 +1,4 @@ -package com.troves.data.source.remote.dto +package com.troves.data.source.remote.service.ktor.dto import kotlinx.serialization.Serializable diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fb5e04c8..5b1ad7f9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -44,6 +44,7 @@ firebase-kotlin-sdk = "2.4.0" googleServices = "4.5.0" credentials = "1.2.2" googleid = "1.1.0" +apollo = "5.0.1" [libraries] androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidx-core-splashscreen" } @@ -117,6 +118,11 @@ firebase-firestore = { module = "dev.gitlive:firebase-firestore", version.ref = firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +# Apollo +apollo-runtime = { module = "com.apollographql.apollo:apollo-runtime", version.ref = "apollo" } +apollo-normalized-cache = { module = "com.apollographql.apollo:apollo-normalized-cache", version.ref = "apollo" } +apollo-normalized-cache-sqlite = { module = "com.apollographql.apollo:apollo-normalized-cache-sqlite", version.ref = "apollo" } + [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } androidMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } @@ -130,6 +136,7 @@ androidx-room = { id = "androidx.room", version.ref = "room" } android-lint = { id = "com.android.lint", version.ref = "agp" } buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" } google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" } +apollo = { id = "com.apollographql.apollo", version.ref = "apollo" } [bundles] coil = [ @@ -143,4 +150,9 @@ ktor = [ "ktor-client-auth", "ktor-serialization-kotlinx-json", "ktor-logging" +] +apollo = [ + "apollo-normalized-cache-sqlite", + "apollo-normalized-cache", + "apollo-runtime" ] \ No newline at end of file diff --git a/shared/src/commonMain/kotlin/com/troves/App.kt b/shared/src/commonMain/kotlin/com/troves/App.kt index fe109e3a..37c9236f 100644 --- a/shared/src/commonMain/kotlin/com/troves/App.kt +++ b/shared/src/commonMain/kotlin/com/troves/App.kt @@ -1,14 +1,23 @@ package com.troves import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.tooling.preview.Preview +import com.troves.data.network.provideApolloClient +import com.troves.data.source.local.preferenceses.AppPreferencesDataSourceImpl +import com.troves.data.source.remote.service.apollo.ApolloTrovesApiServiceImpl import com.troves.designsystem.theme.SpTheme import com.troves.presintation.navigation.AppNav +import org.koin.compose.koinInject @Composable @Preview fun App() { - SpTheme { + SpTheme { + val apiService = koinInject() + LaunchedEffect(key1 = Unit) { + apiService.getAllProducts() + } AppNav() } } \ No newline at end of file From 688876ec0ae7e7e53f4a103beaf2c86624096c29 Mon Sep 17 00:00:00 2001 From: yasse Date: Thu, 2 Jul 2026 16:15:03 +0300 Subject: [PATCH 3/4] add GraphQL queries and fragments for product and collection retrieval --- data/build.gradle.kts | 18 + data/src/commonMain/graphql/Fragments.graphql | 28 + .../commonMain/graphql/GetCollections.graphql | 13 + .../commonMain/graphql/GetProductById.graphql | 5 + .../commonMain/graphql/GetProducts.graphql | 23 +- .../graphql/GetProductsBySearch.graphql | 15 + data/src/commonMain/graphql/schema.graphqls | 97230 ++++++++++++++-- .../kotlin/com/troves/data/di/DataModule.kt | 8 +- .../com/troves/data/network/ApolloClient.kt | 6 +- .../apollo/ApolloTrovesApiServiceImpl.kt | 149 +- .../service/apollo/mapper/CollectionMapper.kt | 35 + .../service/apollo/mapper/DtoFactory.kt | 39 + .../service/apollo/mapper/ProductMapper.kt | 53 + .../service/apollo/util/ApolloExtensions.kt | 41 + .../service/apollo/util/ShopifySearchQuery.kt | 18 + .../src/commonMain/kotlin/com/troves/App.kt | 6 +- 16 files changed, 90617 insertions(+), 7070 deletions(-) create mode 100644 data/src/commonMain/graphql/Fragments.graphql create mode 100644 data/src/commonMain/graphql/GetCollections.graphql create mode 100644 data/src/commonMain/graphql/GetProductById.graphql create mode 100644 data/src/commonMain/graphql/GetProductsBySearch.graphql create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/CollectionMapper.kt create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/DtoFactory.kt create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/ProductMapper.kt create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ApolloExtensions.kt create mode 100644 data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ShopifySearchQuery.kt diff --git a/data/build.gradle.kts b/data/build.gradle.kts index 42538d87..bdb2a081 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -159,3 +159,21 @@ buildkonfig { ) } } +apollo { + service(name = "service") { + packageName.set("com.troves.data.source.remote.service.apollo.graphql") + srcDir(file("src/commonMain/graphql")) + generateDataBuilders.set(true) + val apiKey = localProperties.getProperty("SHOPIFY_API_KEY") ?: "" + val url = localProperties.getProperty("SHOPIFY_REST_URL") ?: "" + + + introspection { + endpointUrl.set("${url}graphql.json") + + schemaFile.set(file("src/commonMain/graphql/schema.graphqls")) + + headers.put("X-Shopify-Access-Token", apiKey) + } + } +} \ No newline at end of file diff --git a/data/src/commonMain/graphql/Fragments.graphql b/data/src/commonMain/graphql/Fragments.graphql new file mode 100644 index 00000000..6f956e25 --- /dev/null +++ b/data/src/commonMain/graphql/Fragments.graphql @@ -0,0 +1,28 @@ +# Shared product selection (Shopify Admin API) used by every product query so a single +# Kotlin mapper (ProductCard.toProductDto) can populate the REST-shaped ProductDto. +fragment ProductCard on Product { + id + title + vendor + status + descriptionHtml + featuredImage { + url + } + priceRangeV2 { + minVariantPrice { + amount + } + } + images(first: 10) { + edges { + node { + url + } + } + } + options { + name + values + } +} diff --git a/data/src/commonMain/graphql/GetCollections.graphql b/data/src/commonMain/graphql/GetCollections.graphql new file mode 100644 index 00000000..5a3c4ba3 --- /dev/null +++ b/data/src/commonMain/graphql/GetCollections.graphql @@ -0,0 +1,13 @@ +query GetCollections($first: Int!, $query: String, $after: String) { + collections(first: $first, query: $query, after: $after) { + edges { + node { + id + title + image { + url + } + } + } + } +} diff --git a/data/src/commonMain/graphql/GetProductById.graphql b/data/src/commonMain/graphql/GetProductById.graphql new file mode 100644 index 00000000..c735e108 --- /dev/null +++ b/data/src/commonMain/graphql/GetProductById.graphql @@ -0,0 +1,5 @@ +query GetProductById($id: ID!) { + product(id: $id) { + ...ProductCard + } +} diff --git a/data/src/commonMain/graphql/GetProducts.graphql b/data/src/commonMain/graphql/GetProducts.graphql index 157a4674..30b273e3 100644 --- a/data/src/commonMain/graphql/GetProducts.graphql +++ b/data/src/commonMain/graphql/GetProducts.graphql @@ -3,28 +3,7 @@ query GetProducts($first: Int!, $after: String, $sortKey: ProductSortKeys, $reve edges { cursor node { - id - title - handle - vendor - productType - createdAt - updatedAt - tags - priceRange { - minVariantPrice { - amount - currencyCode - } - maxVariantPrice { - amount - currencyCode - } - } - featuredImage { - url - altText - } + ...ProductCard } } pageInfo { diff --git a/data/src/commonMain/graphql/GetProductsBySearch.graphql b/data/src/commonMain/graphql/GetProductsBySearch.graphql new file mode 100644 index 00000000..fe7228d7 --- /dev/null +++ b/data/src/commonMain/graphql/GetProductsBySearch.graphql @@ -0,0 +1,15 @@ +query GetProductsBySearch( + $first: Int!, + $query: String, + $after: String, + $sortKey: ProductSortKeys, + $reverse: Boolean +) { + products(first: $first, query: $query, after: $after, sortKey: $sortKey, reverse: $reverse) { + edges { + node { + ...ProductCard + } + } + } +} diff --git a/data/src/commonMain/graphql/schema.graphqls b/data/src/commonMain/graphql/schema.graphqls index 94f956e3..b0bc9af5 100644 --- a/data/src/commonMain/graphql/schema.graphqls +++ b/data/src/commonMain/graphql/schema.graphqls @@ -1,175 +1,208 @@ """ -A version of the Shopify API. Each version has a unique handle in date-based format (YYYY-MM) or `unstable` for the development version. +An Amazon Web Services Amazon Resource Name (ARN), including the Region and account ID. +For more information, refer to [Amazon Resource Names](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). +""" +scalar ARN -Shopify guarantees supported versions are stable. Unsupported versions include unstable and release candidate versions. Use the [`publicApiVersions`](https://shopify.dev/docs/api/storefront/current/queries/publicApiVersions) query to retrieve all available versions. Learn more about [Shopify API versioning](https://shopify.dev/docs/api/usage/versioning). """ -type ApiVersion { +An incomplete checkout where the customer added items and provided contact information but didn't complete the purchase. Tracks the customer's cart contents, pricing details, addresses, and timestamps to enable recovery campaigns and abandonment analytics. + +The checkout includes a recovery URL that merchants can send to customers to resume their purchase. [`AbandonedCheckoutLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckoutLineItem) objects preserve the original [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) selections, quantities, and pricing at the time of abandonment. +""" +type AbandonedCheckout implements Navigable & Node { """ - The human-readable name of the version. + The URL for the buyer to recover their checkout. """ - displayName: String! + abandonedCheckoutUrl: URL! """ - The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. + The billing address provided by the buyer. + Null if the user didn't provide a billing address. """ - handle: String! + billingAddress: MailingAddress """ - Whether the version is actively supported by Shopify. Supported API versions are guaranteed to be stable. Unsupported API versions include unstable, release candidate, and end-of-life versions that are marked as unsupported. For more information, refer to [Versioning](https://shopify.dev/api/usage/versioning). + The date and time when the buyer completed the checkout. + Null if the checkout hasn't been completed. """ - supported: Boolean! -} + completedAt: DateTime -""" -The input fields for submitting Apple Pay payment method information for checkout. -""" -input ApplePayWalletContentInput { """ - The customer's billing address. + The date and time when the checkout was created. """ - billingAddress: MailingAddressInput! + createdAt: DateTime! """ - The data for the Apple Pay wallet. + A list of extra information that has been added to the checkout. """ - data: String! + customAttributes: [Attribute!]! """ - The header data for the Apple Pay wallet. + The customer who created this checkout. + May be null if the checkout was created from a draft order or via an app. """ - header: ApplePayWalletHeaderInput! + customer: Customer """ - The last digits of the card used to create the payment. + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. """ - lastDigits: String + defaultCursor: String! """ - The signature for the Apple Pay wallet. + The discount codes entered by the buyer at checkout. """ - signature: String! + discountCodes: [String!]! """ - The version for the Apple Pay wallet. + A globally-unique ID. """ - version: String! -} + id: ID! -""" -The input fields for submitting wallet payment method information for checkout. -""" -input ApplePayWalletHeaderInput { """ - The application data for the Apple Pay wallet. + A list of the line items in this checkout. """ - applicationData: String + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): AbandonedCheckoutLineItemConnection! """ - The ephemeral public key for the Apple Pay wallet. + The number of products in the checkout. """ - ephemeralPublicKey: String! + lineItemsQuantity: Int! @deprecated(reason: "Use [AbandonedCheckoutLineItem.quantity](https://shopify.dev/api/admin-graphql/unstable/objects/AbandonedCheckoutLineItem#field-quantity) instead.") """ - The public key hash for the Apple Pay wallet. + Unique merchant-facing identifier for the checkout. """ - publicKeyHash: String! + name: String! """ - The transaction ID for the Apple Pay wallet. + A merchant-facing note added to the checkout. Not visible to the buyer. """ - transactionId: String! -} + note: String! -""" -Details about the gift card used on the checkout. -""" -type AppliedGiftCard implements Node { """ - The amount that was taken from the gift card by applying it. + The shipping address to where the line items will be shipped. + Null if the user didn't provide a shipping address. """ - amountUsed: MoneyV2! + shippingAddress: MailingAddress """ - The amount that was taken from the gift card by applying it. + The sum of all items in the checkout, including discounts but excluding shipping, taxes and tips. """ - amountUsedV2: MoneyV2! @deprecated(reason: "Use `amountUsed` instead.") + subtotalPriceSet: MoneyBag! """ - The amount left on the gift card. + Individual taxes charged on the checkout. """ - balance: MoneyV2! + taxLines: [TaxLine!]! """ - The amount left on the gift card. + Whether taxes are included in line item and shipping line prices. """ - balanceV2: MoneyV2! @deprecated(reason: "Use `balance` instead.") + taxesIncluded: Boolean! """ - A globally-unique ID. + The total amount of discounts to be applied. """ - id: ID! + totalDiscountSet: MoneyBag! """ - The last characters of the gift card. + The total duties applied to the checkout. """ - lastCharacters: String! + totalDutiesSet: MoneyBag + + """ + The sum of the prices of all line items in the checkout. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The sum of all items in the checkout, including discounts, shipping, taxes, and tips. + """ + totalPriceSet: MoneyBag! + + """ + The total tax applied to the checkout. + """ + totalTaxSet: MoneyBag """ - The amount that was applied to the checkout in its currency. + The date and time when the checkout was most recently updated. """ - presentmentAmountUsed: MoneyV2! + updatedAt: DateTime! } """ -A post that belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog). Each article includes content with optional HTML formatting, an excerpt for previews, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, and an associated [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image). +An auto-generated type for paginating through multiple AbandonedCheckouts. +""" +type AbandonedCheckoutConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AbandonedCheckoutEdge!]! + + """ + A list of nodes that are contained in AbandonedCheckoutEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [AbandonedCheckout!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} -Articles can be organized with tags and include [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) metadata. You can manage [comments](https://shopify.dev/docs/api/storefront/current/objects/Comment) when the blog's comment policy enables them. """ -type Article implements HasMetafields & Node & OnlineStorePublishable & Trackable { +An auto-generated type which holds one AbandonedCheckout and a cursor during pagination. +""" +type AbandonedCheckoutEdge { """ - The article's author. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - author: ArticleAuthor! @deprecated(reason: "Use `authorV2` instead.") + cursor: String! """ - The article's author. + The item at the end of AbandonedCheckoutEdge. """ - authorV2: ArticleAuthor + node: AbandonedCheckout! +} +""" +A single line item in an abandoned checkout. +""" +type AbandonedCheckoutLineItem implements Node { """ - The blog that the article belongs to. + A list of line item components for this line item. """ - blog: Blog! + components: [AbandonedCheckoutLineItemComponent!] """ - List of comments posted on the article. + A list of extra information that has been added to the line item. """ - comments("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CommentConnection! + customAttributes: [Attribute!]! """ - Stripped content of the article, single line with HTML tags removed. + Discount allocations that have been applied on the line item. """ - content("Truncates a string after the given length." truncateAt: Int): String! + discountAllocations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DiscountAllocationConnection! """ - The content of the article, complete with HTML formatting. + Final total price for the entire quantity of this line item, including discounts. """ - contentHtml: HTML! + discountedTotalPriceSet: MoneyBag! """ - Stripped excerpt of the article, single line with HTML tags removed. + The total price for the entire quantity of this line item, after all discounts are applied, at both the line item and code-based line item level. """ - excerpt("Truncates a string after the given length." truncateAt: Int): String + discountedTotalPriceWithCodeDiscount: MoneyBag! """ - The excerpt of the article, complete with HTML formatting. + The price of a single variant unit after discounts are applied at the line item level, in shop and presentment currencies. """ - excerptHtml: HTML + discountedUnitPriceSet: MoneyBag! """ - A human-friendly unique string for the Article automatically generated from its title. + The price of a single variant unit after all discounts are applied, at both the line item and code-based line item level. """ - handle: String! + discountedUnitPriceWithCodeDiscount: MoneyBag! """ A globally-unique ID. @@ -177,144 +210,154 @@ type Article implements HasMetafields & Node & OnlineStorePublishable & Trackabl id: ID! """ - The image associated with the article. + The image associated with the line item's variant or product. + NULL if the line item has no product, or if neither the variant nor the product have an image. """ image: Image """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Original total price for the entire quantity of this line item, before discounts. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + originalTotalPriceSet: MoneyBag! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + Original price for a single unit of this line item, before discounts. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + originalUnitPriceSet: MoneyBag! """ - The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + The parent relationship for this line item. """ - onlineStoreUrl: URL + parentRelationship: AbandonedCheckoutLineItemParentRelationship """ - The date and time when the article was published. + Product for this line item. + NULL for custom line items and products that were deleted after checkout began. """ - publishedAt: DateTime! + product: Product """ - The article’s SEO information. + The quantity of the line item. """ - seo: SEO + quantity: Int! """ - A categorization that a article can be tagged with. + SKU for the inventory item associated with the variant, if any. """ - tags: [String!]! + sku: String """ - The article’s name. + Title of the line item. Defaults to the product's title. """ - title: String! + title: String + + """ + Product variant for this line item. + NULL for custom line items and variants that were deleted after checkout began. + """ + variant: ProductVariant """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + Title of the variant for this line item. + NULL for custom line items and products that don't have distinct variants. """ - trackingParameters: String + variantTitle: String } """ -The author of an article. +The list of line item components that belong to a line item. """ -type ArticleAuthor { +type AbandonedCheckoutLineItemComponent { """ - The author's bio. + A globally-unique ID. """ - bio: String + id: ID! """ - The author’s email. + The variant image associated with the line item component. + NULL if the variant associated doesn't have an image. """ - email: String! + image: Image """ - The author's first name. + The quantity of the line item component. """ - firstName: String! + quantity: Int! """ - The author's last name. + Title of the line item component. """ - lastName: String! + title: String! """ - The author's full name. + The name of the variant. """ - name: String! + variantTitle: String } """ -An auto-generated type for paginating through multiple Articles. +An auto-generated type for paginating through multiple AbandonedCheckoutLineItems. """ -type ArticleConnection { +type AbandonedCheckoutLineItemConnection { """ - A list of edges. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - edges: [ArticleEdge!]! + edges: [AbandonedCheckoutLineItemEdge!]! """ - A list of the nodes contained in ArticleEdge. + A list of nodes that are contained in AbandonedCheckoutLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - nodes: [Article!]! + nodes: [AbandonedCheckoutLineItem!]! """ - Information to aid in pagination. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ pageInfo: PageInfo! } """ -An auto-generated type which holds one Article and a cursor during pagination. +An auto-generated type which holds one AbandonedCheckoutLineItem and a cursor during pagination. """ -type ArticleEdge { +type AbandonedCheckoutLineItemEdge { """ - A cursor for use in pagination. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ cursor: String! """ - The item at the end of ArticleEdge. + The item at the end of AbandonedCheckoutLineItemEdge. """ - node: Article! + node: AbandonedCheckoutLineItem! } """ -The set of valid sort keys for the Article query. +The line relationship between two line items in an abandoned checkout. """ -enum ArticleSortKeys { +type AbandonedCheckoutLineItemParentRelationship { """ - Sort by the `title` value. - """ - TITLE - + The parent line item of the current line item. """ - Sort by the `blog_title` value. - """ - BLOG_TITLE + parent: AbandonedCheckoutLineItem! +} +""" +The set of valid sort keys for the AbandonedCheckout query. +""" +enum AbandonedCheckoutSortKeys { """ - Sort by the `author` value. + Sort by the `checkout_id` value. """ - AUTHOR + CHECKOUT_ID """ - Sort by the `updated_at` value. + Sort by the `created_at` value. """ - UPDATED_AT + CREATED_AT """ - Sort by the `published_at` value. + Sort by the `customer_name` value. """ - PUBLISHED_AT + CUSTOMER_NAME """ Sort by the `id` value. @@ -326,102 +369,78 @@ enum ArticleSortKeys { Don't use this sort key when no search query is specified. """ RELEVANCE -} - -""" -A custom key-value pair for storing additional information on [carts](https://shopify.dev/docs/api/storefront/current/objects/Cart), [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine), [orders](https://shopify.dev/docs/api/storefront/current/objects/Order), and [order line items](https://shopify.dev/docs/api/storefront/current/objects/OrderLineItem). Common uses include gift wrapping requests, customer notes, and tracking whether a customer is a first-time buyer. - -Attributes set on a cart carry over to the resulting order after checkout. Use the [`cartAttributesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartAttributesUpdate) mutation to add or modify cart attributes. For a step-by-step guide, see [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). -""" -type Attribute { - """ - The key or name of the attribute. For example, `"customersFirstOrder"`. - """ - key: String! """ - The value of the attribute. For example, `"true"`. + Sort by the `total_price` value. """ - value: String + TOTAL_PRICE } """ -A custom key-value pair that stores additional information on a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart) or [cart line](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Attributes capture additional information like gift messages, special instructions, or custom order details. Learn more about [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). +Tracks a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s incomplete shopping journey, whether they abandoned while browsing [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), adding items to cart, or during checkout. Provides data about the customer's behavior and products they interacted with. + +The abandonment includes fields that indicate whether the customer has completed any [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) or [draft orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) after the abandonment occurred. It also tracks when emails were sent and how long since the customer's last activity across different abandonment types. """ -input AttributeInput { +type Abandonment implements Node { """ - Key or name of the attribute. + The abandonment payload for the abandoned checkout. """ - key: String! + abandonedCheckoutPayload: AbandonedCheckout """ - Value of the attribute. + The abandonment type. """ - value: String! -} - -""" -An [automatic discount](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) applied to a cart or checkout without requiring a discount code. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface. + abandonmentType: AbandonmentAbandonmentType! -Includes the discount's title, value, and allocation details that specify how the discount amount distributes across entitled line items or shipping lines. -""" -type AutomaticDiscountApplication implements DiscountApplication { """ - The method by which the discount's value is allocated to its entitled items. + The app associated with an abandoned checkout. """ - allocationMethod: DiscountApplicationAllocationMethod! + app: App! """ - Which lines of targetType that the discount is allocated over. + Permalink to the cart page. """ - targetSelection: DiscountApplicationTargetSelection! + cartUrl: URL """ - The type of line that the discount is applicable towards. + The date and time when the abandonment was created. """ - targetType: DiscountApplicationTargetType! + createdAt: DateTime! """ - The title of the application. + The customer who abandoned this event. """ - title: String! + customer: Customer! """ - The value of the discount application. + Whether the customer has a draft order since this abandonment has been abandoned. """ - value: PricingValue! -} - -""" -Defines the shared fields for items in a shopping cart. Implemented by [`CartLine`](https://shopify.dev/docs/api/storefront/current/objects/CartLine) for individual merchandise and [`ComponentizableCartLine`](https://shopify.dev/docs/api/storefront/current/objects/ComponentizableCartLine) for grouped merchandise like bundles. + customerHasNoDraftOrderSinceAbandonment: Boolean! -Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan). -""" -interface BaseCartLine implements Node { """ - An attribute associated with the cart line. + Whether the customer has completed an order since this checkout has been abandoned. """ - attribute("The key of the attribute." key: String!): Attribute + customerHasNoOrderSinceAbandonment: Boolean! """ - The attributes associated with the cart line. Attributes are represented as key-value pairs. + The number of days since the last abandonment email was sent to the customer. """ - attributes: [Attribute!]! + daysSinceLastAbandonmentEmail: Int! """ - The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + When the email was sent, if that's the case. """ - cost: CartLineCost! + emailSentAt: DateTime """ - The discounts that have been applied to the cart line. + The email state (e.g., sent or not sent). """ - discountAllocations: [CartDiscountAllocation!]! + emailState: AbandonmentEmailState """ - The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. + The number of hours since the customer has last abandoned a checkout. """ - estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") + hoursSinceLastAbandonedCheckout: Float """ A globally-unique ID. @@ -429,8551 +448,92164 @@ interface BaseCartLine implements Node { id: ID! """ - The merchandise that the buyer intends to purchase. + Whether the products in abandonment are available. """ - merchandise: Merchandise! + inventoryAvailable: Boolean! """ - The quantity of the merchandise that the customer intends to purchase. + Whether the abandonment event comes from a custom storefront channel. """ - quantity: Int! + isFromCustomStorefront: Boolean! """ - The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + Whether the abandonment event comes from the Online Store sales channel. """ - sellingPlanAllocation: SellingPlanAllocation -} + isFromOnlineStore: Boolean! -""" -An auto-generated type for paginating through multiple BaseCartLines. -""" -type BaseCartLineConnection { """ - A list of edges. + Whether the abandonment event comes from the Shop app sales channel. """ - edges: [BaseCartLineEdge!]! + isFromShopApp: Boolean! """ - A list of the nodes contained in BaseCartLineEdge. + Whether the abandonment event comes from Shop Pay. """ - nodes: [BaseCartLine!]! + isFromShopPay: Boolean! """ - Information to aid in pagination. + Whether the customer didn't complete another most significant step since this abandonment. """ - pageInfo: PageInfo! -} + isMostSignificantAbandonment: Boolean! -""" -An auto-generated type which holds one BaseCartLine and a cursor during pagination. -""" -type BaseCartLineEdge { """ - A cursor for use in pagination. + The date for the latest browse abandonment. """ - cursor: String! + lastBrowseAbandonmentDate: DateTime! """ - The item at the end of BaseCartLineEdge. + The date for the latest cart abandonment. """ - node: BaseCartLine! -} + lastCartAbandonmentDate: DateTime! -""" -A blog container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. Stores can have multiple blogs, for example to organize content by topic or purpose. + """ + The date for the latest checkout abandonment. + """ + lastCheckoutAbandonmentDate: DateTime! -Each blog provides access to its articles, contributing [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) objects, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information. You can retrieve articles individually [by handle](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articleByHandle) or as a [paginated list](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articles). -""" -type Blog implements HasMetafields & Node & OnlineStorePublishable { """ - Find an article by its handle. + The most recent step type. """ - articleByHandle("The handle of the article." handle: String!): Article + mostRecentStep: AbandonmentAbandonmentType! """ - List of the blog's articles. + The products added to the cart during the customer abandoned visit. """ - articles("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ArticleSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| author |\n| blog_title |\n| created_at |\n| tag |\n| tag_not |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): ArticleConnection! + productsAddedToCart("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CustomerVisitProductInfoConnection! """ - The authors who have contributed to the blog. + The products viewed during the customer abandoned visit. """ - authors: [ArticleAuthor!]! + productsViewed("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CustomerVisitProductInfoConnection! """ - A human-friendly unique string for the Blog automatically generated from its title. + The date and time when the visit started. """ - handle: String! + visitStartedAt: DateTime +} +""" +Specifies the abandonment type. +""" +enum AbandonmentAbandonmentType { """ - A globally-unique ID. + The abandonment event is an abandoned browse. """ - id: ID! + BROWSE """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The abandonment event is an abandoned cart. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + CART """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The abandonment event is an abandoned checkout. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + CHECKOUT +} +""" +Specifies the delivery state of a marketing activity. +""" +enum AbandonmentDeliveryState { """ - The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + The marketing activity action has not yet been sent. """ - onlineStoreUrl: URL + NOT_SENT """ - The blog's SEO information. + The marketing activity action has been sent. """ - seo: SEO + SENT """ - The blogs’s title. + The marketing activity action has been scheduled for later delivery. """ - title: String! + SCHEDULED } """ -An auto-generated type for paginating through multiple Blogs. +Specifies the email state. """ -type BlogConnection { +enum AbandonmentEmailState { """ - A list of edges. + The email has not yet been sent. """ - edges: [BlogEdge!]! + NOT_SENT """ - A list of the nodes contained in BlogEdge. + The email has been sent. """ - nodes: [Blog!]! + SENT """ - Information to aid in pagination. + The email has been scheduled for later delivery. """ - pageInfo: PageInfo! + SCHEDULED } """ -An auto-generated type which holds one Blog and a cursor during pagination. +Return type for `abandonmentEmailStateUpdate` mutation. """ -type BlogEdge { +type AbandonmentEmailStateUpdatePayload { """ - A cursor for use in pagination. + The updated abandonment. """ - cursor: String! + abandonment: Abandonment """ - The item at the end of BlogEdge. + The list of errors that occurred from executing the mutation. """ - node: Blog! + userErrors: [AbandonmentEmailStateUpdateUserError!]! } """ -The set of valid sort keys for the Blog query. +An error that occurs during the execution of `AbandonmentEmailStateUpdate`. """ -enum BlogSortKeys { - """ - Sort by the `handle` value. - """ - HANDLE - +type AbandonmentEmailStateUpdateUserError implements DisplayableError { """ - Sort by the `title` value. + The error code. """ - TITLE + code: AbandonmentEmailStateUpdateUserErrorCode """ - Sort by the `id` value. + The path to the input field that caused the error. """ - ID + field: [String!] """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The error message. """ - RELEVANCE + message: String! } """ -Represents `true` or `false` values. -""" -scalar Boolean - -""" -The store's [branding configuration](https://help.shopify.com/manual/promoting-marketing/managing-brand-assets), such as logos, colors, and slogan. Access this through the [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop#field-Shop.fields.brand) object to display consistent brand assets across your storefront. +Possible error codes that can be returned by `AbandonmentEmailStateUpdateUserError`. """ -type Brand { +enum AbandonmentEmailStateUpdateUserErrorCode { """ - The colors of the store's brand. + Unable to find an Abandonment for the provided ID. """ - colors: BrandColors! + ABANDONMENT_NOT_FOUND +} +""" +Return type for `abandonmentUpdateActivitiesDeliveryStatuses` mutation. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesPayload { """ - The store's cover image. + The updated abandonment. """ - coverImage: MediaImage + abandonment: Abandonment """ - The store's default logo. + The list of errors that occurred from executing the mutation. """ - logo: MediaImage + userErrors: [AbandonmentUpdateActivitiesDeliveryStatusesUserError!]! +} +""" +An error that occurs during the execution of `AbandonmentUpdateActivitiesDeliveryStatuses`. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesUserError implements DisplayableError { """ - The store's short description. + The error code. """ - shortDescription: String + code: AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode """ - The store's slogan. + The path to the input field that caused the error. """ - slogan: String + field: [String!] """ - The store's preferred logo for square UI elements. + The error message. """ - squareLogo: MediaImage + message: String! } """ -A group of related colors for the shop's brand. +Possible error codes that can be returned by `AbandonmentUpdateActivitiesDeliveryStatusesUserError`. """ -type BrandColorGroup { +enum AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode { + """ + Unable to find an Abandonment for the provided ID. """ - The background color. + ABANDONMENT_NOT_FOUND + + """ + Unable to find a marketing activity for the provided ID. """ - background: Color + MARKETING_ACTIVITY_NOT_FOUND """ - The foreground color. + Unable to find delivery status info for the provided ID. """ - foreground: Color + DELIVERY_STATUS_INFO_NOT_FOUND } """ -The colors of the shop's brand. +A permission that controls access to [GraphQL Admin API](https://shopify.dev/docs/api/usage/access-scopes#authenticated-access-scopes) or [Storefront API](https://shopify.dev/docs/api/usage/access-scopes#unauthenticated-access-scopes) types. Each scope defines what data an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) can read or write, following the format `{action}_{resource}` where action is typically "read" or "write". + +Apps declare required and optional access scopes in their configuration. During installation, merchants review and grant these permissions, determining what shop data the app can access. The granted scopes remain active until the merchant uninstalls the app or revokes them. Apps can programmatically revoke their own dynamically granted optional scopes using [`appRevokeAccessScopes`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appRevokeAccessScopes). """ -type BrandColors { +type AccessScope { """ - The shop's primary brand colors. + A description of the actions that the access scope allows an app to perform. """ - primary: [BrandColorGroup!]! + description: String! """ - The shop's secondary brand colors. + A readable string that represents the access scope. The string usually follows the format `{action}_{resource}`. `{action}` is `read` or `write`, and `{resource}` is the resource that the action can be performed on. `{action}` and `{resource}` are separated by an underscore. For example, `read_orders` or `write_products`. """ - secondary: [BrandColorGroup!]! + handle: String! } """ -Identifies a B2B buyer for the [`@inContext`](https://shopify.dev/docs/storefronts/headless/bring-your-own-stack/b2b) directive. Pass this input to contextualize Storefront API queries with data like B2B-specific pricing, quantity rules, and quantity price breaks. - -For B2B customers with access to multiple company locations, include the [`companyLocationId`](https://shopify.dev/docs/api/storefront/latest/input-objects/BuyerInput#fields-companyLocationId) to specify which location they're purchasing for. +Possible account types that a staff member can have. """ -input BuyerInput { +enum AccountType { """ - The customer access token retrieved from the [Customer Accounts API](https://shopify.dev/docs/api/customer#step-obtain-access-token). + The account can access the Shopify admin. """ - customerAccessToken: String! + REGULAR """ - The identifier of the company location. + The account cannot access the Shopify admin. """ - companyLocationId: ID -} + RESTRICTED -""" -Card brand, such as Visa or Mastercard, which can be used for payments. -""" -enum CardBrand { """ - Visa. + The user has not yet accepted the invitation to create an account. """ - VISA + INVITED """ - Mastercard. + The admin has not yet accepted the request to create a collaborator account. """ - MASTERCARD + REQUESTED """ - Discover. + The account of a partner who collaborates with the merchant. """ - DISCOVER + COLLABORATOR """ - American Express. + The account of a partner collaborator team member. """ - AMERICAN_EXPRESS + COLLABORATOR_TEAM_MEMBER """ - Diners Club. + The account can be signed into via a SAML provider. """ - DINERS_CLUB + SAML """ - JCB. + The user has not yet accepted the invitation to become the store owner. """ - JCB + INVITED_STORE_OWNER } """ -A cart represents the merchandise that a buyer intends to purchase, and the estimated cost associated with the cart, throughout a customer's session. - -Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-checkoutUrl) field to direct buyers to Shopify's web checkout to complete their purchase. - -Learn more about [interacting with carts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). +Represents an operation publishing all products to a publication. """ -type Cart implements HasMetafields & Node { +type AddAllProductsOperation implements Node & ResourceOperation { """ - The gift cards that have been applied to the cart. + A globally-unique ID. """ - appliedGiftCards: [AppliedGiftCard!]! + id: ID! """ - An attribute associated with the cart. + The count of processed rows, summing imported, failed, and skipped rows. """ - attribute("The key of the attribute." key: String!): Attribute + processedRowCount: Int """ - The attributes associated with the cart. Attributes are represented as key-value pairs. + Represents a rows objects within this background operation. """ - attributes: [Attribute!]! + rowCount: RowCount """ - Information about the buyer that's interacting with the cart. + The status of this operation. """ - buyerIdentity: CartBuyerIdentity! + status: ResourceOperationStatus! +} - """ - The URL of the checkout for the cart. - """ - checkoutUrl: URL! +""" +Additional fees applied to an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) beyond the standard product and shipping costs. Additional fees typically include duties, import fees, or other special handling charges that need separate tracking from regular [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects. +Each fee includes its name, price in both shop and presentment currencies, and any applicable taxes broken down by [`TaxLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxLine). +""" +type AdditionalFee implements Node { """ - The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). + A globally-unique ID. """ - cost: CartCost! + id: ID! """ - The date and time when the cart was created. + The name of the additional fee. """ - createdAt: DateTime! + name: String! """ - The delivery properties of the cart. + The price of the additional fee. """ - delivery: CartDelivery! + price: MoneyBag! """ - The delivery groups available for the cart, based on the buyer identity default - delivery address preference or the default address of the logged-in customer. + A list of taxes charged on the additional fee. """ - deliveryGroups("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Whether to include [carrier-calculated delivery rates](https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/enabling-shipping-carriers) in the response.\n\nBy default, only static shipping rates are returned. This argument requires mandatory usage of the [`@defer` directive](https://shopify.dev/docs/api/storefront#directives).\n\nFor more information, refer to [fetching carrier-calculated rates for the cart using `@defer`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/defer#fetching-carrier-calculated-rates-for-the-cart-using-defer).\n" withCarrierRates: Boolean = false): CartDeliveryGroupConnection! + taxLines: [TaxLine!]! +} +""" +A sale associated with an additional fee charge. +""" +type AdditionalFeeSale implements Sale { """ - The discounts that have been applied to the entire cart. + The type of order action that the sale represents. """ - discountAllocations: [CartDiscountAllocation!]! @deprecated(reason: "Use `cart.lines[].discountAllocations(lineLevelOnly: false)` and `cart.deliveryGroups[].discountAllocations` instead.") + actionType: SaleActionType! """ - The case-insensitive discount codes that the customer added at checkout. + The additional fees for the associated sale. """ - discountCodes: [CartDiscountCode!]! + additionalFee: SaleAdditionalFee! """ - The estimated costs that the buyer will pay at checkout. The estimated costs are subject to change and changes will be reflected at checkout. The `estimatedCost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). + The unique ID for the sale. """ - estimatedCost: CartEstimatedCost! @deprecated(reason: "Use `cost` instead.") + id: ID! """ - A globally-unique ID. + The line type assocated with the sale. """ - id: ID! + lineType: SaleLineType! """ - A list of lines containing information about the items the customer intends to purchase. + The number of units either ordered or intended to be returned. """ - lines("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): BaseCartLineConnection! + quantity: Int """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + All individual taxes associated with the sale. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + taxes: [SaleTax!]! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The total sale amount after taxes and discounts. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + totalAmount: MoneyBag! """ - A note that's associated with the cart. For example, the note can be a personalized message to the buyer. + The total discounts allocated to the sale after taxes. """ - note: String + totalDiscountAmountAfterTaxes: MoneyBag! """ - The total number of items in the cart. + The total discounts allocated to the sale before taxes. """ - totalQuantity: Int! + totalDiscountAmountBeforeTaxes: MoneyBag! """ - The date and time when the cart was updated. + The total amount of taxes for the sale. """ - updatedAt: DateTime! + totalTaxAmount: MoneyBag! } """ -A delivery address of the buyer that is interacting with the cart. -""" -union CartAddress = CartDeliveryAddress - -""" -Specifies a delivery address for a cart. Provide either a [`deliveryAddress`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-deliveryAddress) with full address details, or a [`copyFromCustomerAddressId`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-copyFromCustomerAddressId) to copy from an existing customer address. Used by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput). +A sale associated with an order price adjustment. """ -input CartAddressInput @oneOf { +type AdjustmentSale implements Sale { """ - A delivery address stored on this cart. + The type of order action that the sale represents. """ - deliveryAddress: CartDeliveryAddressInput + actionType: SaleActionType! """ - Copies details from the customer address to an address on this cart. + The unique ID for the sale. """ - copyFromCustomerAddressId: ID -} + id: ID! -""" -Return type for `cartAttributesUpdate` mutation. -""" -type CartAttributesUpdatePayload { """ - The updated cart. + The line type assocated with the sale. """ - cart: Cart + lineType: SaleLineType! """ - The list of errors that occurred from executing the mutation. + The number of units either ordered or intended to be returned. """ - userErrors: [CartUserError!]! + quantity: Int """ - A list of warnings that occurred during the mutation. + All individual taxes associated with the sale. """ - warnings: [CartWarning!]! -} + taxes: [SaleTax!]! -""" -A discount allocation [that applies automatically](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) to a cart line when configured conditions are met. Unlike [`CartCodeDiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/CartCodeDiscountAllocation), automatic discounts don't require customers to enter a code. -""" -type CartAutomaticDiscountAllocation implements CartDiscountAllocation { """ - The discount that have been applied on the cart line. + The total sale amount after taxes and discounts. """ - discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + totalAmount: MoneyBag! """ - The discounted amount that has been applied to the cart line. + The total discounts allocated to the sale after taxes. """ - discountedAmount: MoneyV2! + totalDiscountAmountAfterTaxes: MoneyBag! """ - The type of line that the discount is applicable towards. + The total discounts allocated to the sale before taxes. """ - targetType: DiscountApplicationTargetType! + totalDiscountAmountBeforeTaxes: MoneyBag! """ - The title of the allocated discount. + The total amount of taxes for the sale. """ - title: String! + totalTaxAmount: MoneyBag! } """ -Return type for `cartBillingAddressUpdate` mutation. +The set of valid sort keys for the Adjustments query. """ -type CartBillingAddressUpdatePayload { +enum AdjustmentsSortKeys { """ - The updated cart. + Sort by the `id` value. """ - cart: Cart + ID """ - The list of errors that occurred from executing the mutation. + Sort by the `time` value. """ - userErrors: [CartUserError!]! + TIME +} + +""" +Represents a discount configuration that applies to all items in a customer's cart without restriction. This object enables store-wide promotions that affect every product equally. + +For example, a "Sitewide 10% Off Everything" sale would target all items, ensuring that every product in the customer's cart receives the promotional discount regardless of category or collection. +This universal targeting approach simplifies promotional campaigns and provides customers with clear, straightforward savings across the entire product catalog. +""" +type AllDiscountItems { """ - A list of warnings that occurred during the mutation. + Whether all items are eligible for the discount. This value always returns `true`. """ - warnings: [CartWarning!]! + allItems: Boolean! } """ -Contact information about the buyer interacting with a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. - -For B2B scenarios, the [`purchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.purchasingCompany) field identifies the company and location on whose behalf a business customer purchases. The [`preferences`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.preferences) field stores delivery and wallet settings that prefill checkout fields to streamline the buying process. +The Android mobile platform application. """ -type CartBuyerIdentity { +type AndroidApplication { """ - The country where the buyer is located. + Whether Android App Links are supported by this app. """ - countryCode: CountryCode + appLinksEnabled: Boolean! """ - The customer account associated with the cart. + The Android application ID. """ - customer: Customer + applicationId: String """ - An ordered set of delivery addresses tied to the buyer that is interacting with the cart. - The rank of the preferences is determined by the order of the addresses in the array. Preferences - can be used to populate relevant fields in the checkout flow. - - As of the `2025-01` release, `buyerIdentity.deliveryAddressPreferences` is deprecated. - Delivery addresses are now part of the `CartDelivery` object and managed with three new mutations: - - `cartDeliveryAddressAdd` - - `cartDeliveryAddressUpdate` - - `cartDeliveryAddressDelete` + A globally-unique ID. """ - deliveryAddressPreferences: [DeliveryAddress!]! @deprecated(reason: "Use `cart.delivery` instead.") + id: ID! """ - The email address of the buyer that's interacting with the cart. + The SHA256 fingerprints of the app's signing certificate. """ - email: String + sha256CertFingerprints: [String!]! +} +""" +A version of the API, as defined by [Shopify API versioning](https://shopify.dev/api/usage/versioning). +Versions are commonly referred to by their handle (for example, `2021-10`). +""" +type ApiVersion { """ - The phone number of the buyer that's interacting with the cart. + The human-readable name of the version. """ - phone: String + displayName: String! """ - A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. - Preferences are not synced back to the cart if they are overwritten. + The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. """ - preferences: CartPreferences + handle: String! """ - The purchasing company associated with the cart. + Whether the version is actively supported by Shopify. Supported API versions are guaranteed to be stable. Unsupported API versions include unstable, release candidate, and end-of-life versions that are marked as unsupported. For more information, refer to [Versioning](https://shopify.dev/api/usage/versioning). """ - purchasingCompany: PurchasingCompany + supported: Boolean! } """ -The input fields for identifying the buyer associated with a cart. Buyer identity determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match the customer's shipping address. - -Used by [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) and [`cartBuyerIdentityUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartBuyerIdentityUpdate) to set contact information, location, and checkout preferences. +A Shopify application that extends store functionality. Apps integrate with Shopify through APIs to add features, automate workflows, or connect external services. -> Note: -> Preferences prefill fields at checkout but don't sync back to the cart if overwritten. +Provides metadata about the app including its developer information and listing details in the Shopify App Store. Use the [`installation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App#field-App.fields.installation) field to determine if the app is currently installed on the shop and access installation-specific details like granted [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) objects. Check [`failedRequirements`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App#field-App.fields.failedRequirements) before installation to identify any prerequisites that must be met. """ -input CartBuyerIdentityInput { - """ - The email address of the buyer that is interacting with the cart. - """ - email: String - - """ - The phone number of the buyer that is interacting with the cart. - """ - phone: String - +type App implements Node { """ - The company location of the buyer that is interacting with the cart. + A unique application API identifier. """ - companyLocationId: ID + apiKey: String! """ - The country where the buyer is located. + App store page URL of the app. """ - countryCode: CountryCode + appStoreAppUrl: URL """ - The access token used to identify the customer associated with the cart. + App store page URL of the developer who created the app. """ - customerAccessToken: String + appStoreDeveloperUrl: URL """ - An ordered set of delivery addresses tied to the buyer that is interacting with the cart. - The rank of the preferences is determined by the order of the addresses in the array. Preferences - can be used to populate relevant fields in the checkout flow. - - As of the `2025-01` release, `buyerIdentity.deliveryAddressPreferences` is deprecated. - Delivery addresses are now part of the `CartDelivery` object and managed with three new mutations: - - `cartDeliveryAddressAdd` - - `cartDeliveryAddressUpdate` - - `cartDeliveryAddressDelete` - - The input must not contain more than `250` values. + All requestable access scopes available to the app. """ - deliveryAddressPreferences: [DeliveryAddressInput!] @deprecated(reason: "Use `cart.delivery` instead.") + availableAccessScopes: [AccessScope!]! """ - A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. - Preferences are not synced back to the cart if they are overwritten. + Banner image for the app. """ - preferences: CartPreferencesInput -} + banner: Image! -""" -Return type for `cartBuyerIdentityUpdate` mutation. -""" -type CartBuyerIdentityUpdatePayload { """ - The updated cart. + Description of the app. """ - cart: Cart + description: String """ - The list of errors that occurred from executing the mutation. + The name of the app developer. """ - userErrors: [CartUserError!]! + developerName: String """ - A list of warnings that occurred during the mutation. + The type of app developer. """ - warnings: [CartWarning!]! -} + developerType: AppDeveloperType! -""" -Represents how credit card details are provided for a direct payment. -""" -enum CartCardSource { """ - The credit card was provided by a third party and vaulted on their system. - Using this value requires a separate permission from Shopify. + Website of the developer who created the app. """ - SAVED_CREDIT_CARD -} + developerUrl: URL! @deprecated(reason: "Use `appStoreDeveloperUrl` instead.") -""" -Return type for `cartClone` mutation. -""" -type CartClonePayload { """ - The newly created cart without PII. This is a different cart from the source. + Whether the app uses the Embedded App SDK. """ - cart: Cart + embedded: Boolean! """ - The list of errors that occurred from executing the mutation. + Requirements that must be met before the app can be installed. """ - userErrors: [CartUserError!]! + failedRequirements: [FailedRequirement!]! """ - A list of warnings that occurred during the mutation. + A list of app features that are shown in the Shopify App Store listing. """ - warnings: [CartWarning!]! -} + features: [String!]! -""" -A discount allocation applied to a cart line when a customer enters a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). -""" -type CartCodeDiscountAllocation implements CartDiscountAllocation { """ - The code used to apply the discount. + Feedback from this app about the store. """ - code: String! + feedback: AppFeedback """ - The discount that have been applied on the cart line. + Handle of the app. """ - discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + handle: String """ - The discounted amount that has been applied to the cart line. + Icon that represents the app. """ - discountedAmount: MoneyV2! + icon: Image! """ - The type of line that the discount is applicable towards. + A globally-unique ID. """ - targetType: DiscountApplicationTargetType! -} - -""" -The completion action to checkout a cart. -""" -union CartCompletionAction = CompletePaymentChallenge + id: ID! -""" -The required completion action to checkout a cart. -""" -type CartCompletionActionRequired { """ - The action required to complete the cart completion attempt. + Webpage where you can install the app, if app requires explicit user permission. """ - action: CartCompletionAction + installUrl: URL """ - The ID of the cart completion attempt. + Corresponding AppInstallation for this shop and App. + Returns null if the App isn't installed. """ - id: String! -} + installation: AppInstallation -""" -The result of a cart completion attempt. -""" -union CartCompletionAttemptResult = CartCompletionActionRequired|CartCompletionFailed|CartCompletionProcessing|CartCompletionSuccess - -""" -A failed completion to checkout a cart. -""" -type CartCompletionFailed { """ - The errors that caused the checkout to fail. + Whether the app is the [post purchase](https://shopify.dev/apps/checkout/post-purchase) app in use. """ - errors: [CompletionError!]! + isPostPurchaseAppInUse: Boolean! """ - The ID of the cart completion attempt. + Webpage that the app starts in. """ - id: String! -} + launchUrl: URL! @deprecated(reason: "Use AppInstallation.launchUrl instead") -""" -A cart checkout completion that's still processing. -""" -type CartCompletionProcessing { """ - The ID of the cart completion attempt. + Menu items for the app, which also appear as submenu items in left navigation sidebar in the Shopify admin. """ - id: String! + navigationItems: [NavigationItem!]! @deprecated(reason: "Use AppInstallation.navigationItems instead") """ - The number of milliseconds to wait before polling again. + The optional scopes requested by the app. Lists the optional access scopes the app has declared in its configuration. These scopes are optionally requested by the app after installation. """ - pollDelay: Int! -} + optionalAccessScopes: [AccessScope!]! -""" -A successful completion to checkout a cart and a created order. -""" -type CartCompletionSuccess { """ - The date and time when the job completed. + Whether the app was previously installed on the current shop. """ - completedAt: DateTime + previouslyInstalled: Boolean! """ - The ID of the cart completion attempt. + Detailed information about the app pricing. """ - id: String! + pricingDetails: String """ - The ID of the order that's created in Shopify. + Summary of the app pricing details. """ - orderId: ID! + pricingDetailsSummary: String! """ - The URL of the order confirmation in Shopify. + Link to app privacy policy. """ - orderUrl: URL! -} - -""" -The estimated costs that a buyer will pay at checkout. The `Cart` object's [`cost`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.cost) field returns this. The costs are subject to change and changes will be reflected at checkout. Costs reflect [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) based on the buyer's context. + privacyPolicyUrl: URL -Amounts include the subtotal before taxes and cart-level discounts, the checkout charge amount excluding deferred payments, and the total. The subtotal and total amounts each include a corresponding boolean field indicating whether the value is an estimate. -""" -type CartCost { """ - The estimated amount, before taxes and discounts, for the customer to pay at checkout. The checkout charge amount doesn't include any deferred payments that'll be paid at a later date. If the cart has no deferred payments, then the checkout charge amount is equivalent to `subtotalAmount`. + The public category for the app. """ - checkoutChargeAmount: MoneyV2! + publicCategory: AppPublicCategory! """ - The amount, before taxes and cart-level discounts, for the customer to pay. + Whether the app is published to the Shopify App Store. """ - subtotalAmount: MoneyV2! + published: Boolean! """ - Whether the subtotal amount is estimated. + The access scopes requested by the app. Lists the access scopes the app has declared in its configuration. Merchant must grant approval to these scopes for the app to be installed. """ - subtotalAmountEstimated: Boolean! + requestedAccessScopes: [AccessScope!]! """ - The total amount for the customer to pay. + Screenshots of the app. """ - totalAmount: MoneyV2! + screenshots: [Image!]! """ - Whether the total amount is estimated. + Whether the app was developed by Shopify. """ - totalAmountEstimated: Boolean! + shopifyDeveloped: Boolean! """ - The duty amount for the customer to pay at checkout. + Name of the app. """ - totalDutyAmount: MoneyV2 @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + title: String! """ - Whether the total duty amount is estimated. + Message that appears when the app is uninstalled. For example: + By removing this app, you will no longer be able to publish products to MySocialSite or view this app in your Shopify admin. You can re-enable this channel at any time. """ - totalDutyAmountEstimated: Boolean! @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + uninstallMessage: String! """ - The tax amount for the customer to pay at checkout. + Webpage where you can uninstall the app. """ - totalTaxAmount: MoneyV2 @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + uninstallUrl: URL @deprecated(reason: "Use AppInstallation.uninstallUrl instead") """ - Whether the total tax amount is estimated. + The webhook API version for the app. """ - totalTaxAmountEstimated: Boolean! @deprecated(reason: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.\n") + webhookApiVersion: String! } """ -Return type for `cartCreate` mutation. +A catalog that defines the publication associated with an app. """ -type CartCreatePayload { +type AppCatalog implements Catalog & Node { """ - The new cart. + The apps associated with the catalog. """ - cart: Cart + apps("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): AppConnection! """ - The list of errors that occurred from executing the mutation. + A globally-unique ID. """ - userErrors: [CartUserError!]! + id: ID! """ - A list of warnings that occurred during the mutation. + Most recent catalog operations. """ - warnings: [CartWarning!]! -} + operations: [ResourceOperation!]! -""" -The discounts automatically applied to the cart line based on prerequisites that have been met. -""" -type CartCustomDiscountAllocation implements CartDiscountAllocation { """ - The discount that have been applied on the cart line. + The price list associated with the catalog. """ - discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + priceList: PriceList """ - The discounted amount that has been applied to the cart line. + A group of products and collections that's published to a catalog. """ - discountedAmount: MoneyV2! + publication: Publication """ - The type of line that the discount is applicable towards. + The status of the catalog. """ - targetType: DiscountApplicationTargetType! + status: CatalogStatus! """ - The title of the allocated discount. + The name of the catalog. """ title: String! } """ -The delivery properties of the cart. +An auto-generated type for paginating through multiple Apps. """ -type CartDelivery { +type AppConnection { """ - Selectable addresses to present to the buyer on the cart. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - addresses("Filter the addresses by selected status." selected: Boolean = false): [CartSelectableAddress!]! -} + edges: [AppEdge!]! -""" -Represents a mailing address for customers and shipping. -""" -type CartDeliveryAddress { """ - The first line of the address. Typically the street address or PO Box number. + A list of nodes that are contained in AppEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - address1: String + nodes: [App!]! """ - The second line of the address. Typically the number of the apartment, suite, or unit. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - address2: String + pageInfo: PageInfo! +} + +""" +Represents monetary credits that merchants can apply toward future app purchases, subscriptions, or usage-based billing within their Shopify store. App credits provide a flexible way to offer refunds, promotional credits, or compensation without processing external payments. +For example, if a merchant experiences service downtime, an app might issue credits equivalent to the affected billing period. These credits can apply to future charges, reducing the merchant's next invoice or extending their subscription period. + +Use the `AppCredit` object to: +- Issue refunds for service interruptions or billing disputes +- Provide promotional credits for new merchant onboarding +- Compensate merchants for app-related issues or downtime +- Create loyalty rewards or referral bonuses within your billing system +- Track credit balances and application history for accounting purposes + +For comprehensive billing strategies and credit management patterns, see the [subscription billing guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). +""" +type AppCredit implements Node { """ - The name of the city, district, village, or town. + The amount that can be used towards future app purchases in Shopify. """ - city: String + amount: MoneyV2! """ - The name of the customer's company or organization. + The date and time when the app credit was created. """ - company: String + createdAt: DateTime! """ - The two-letter code for the country of the address. - - For example, US. + The description of the app credit. """ - countryCode: String + description: String! """ - The first name of the customer. + A globally-unique ID. """ - firstName: String + id: ID! """ - A formatted version of the address, customized by the provided arguments. + Whether the app credit is a test transaction. """ - formatted("Whether to include the customer's name in the formatted address." withName: Boolean = false, "Whether to include the customer's company in the formatted address." withCompany: Boolean = true): [String!]! + test: Boolean! +} +""" +An auto-generated type for paginating through multiple AppCredits. +""" +type AppCreditConnection { """ - A comma-separated list of the values for city, province, and country. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - formattedArea: String + edges: [AppCreditEdge!]! """ - The last name of the customer. + A list of nodes that are contained in AppCreditEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - lastName: String + nodes: [AppCredit!]! """ - The latitude coordinate of the customer address. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - latitude: Float + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one AppCredit and a cursor during pagination. +""" +type AppCreditEdge { """ - The longitude coordinate of the customer address. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - longitude: Float + cursor: String! """ - The full name of the customer, based on firstName and lastName. + The item at the end of AppCreditEdge. """ - name: String + node: AppCredit! +} +""" +Possible types of app developer. +""" +enum AppDeveloperType { """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. + Indicates the app developer is Shopify. """ - phone: String + SHOPIFY """ - The alphanumeric code for the region. + Indicates the app developer is a Partner. + """ + PARTNER - For example, ON. """ - provinceCode: String + Indicates the app developer works directly for a Merchant. + """ + MERCHANT """ - The zip or postal code of the address. + Indicates the app developer is unknown. It is not categorized as any of the other developer types. """ - zip: String + UNKNOWN } """ -The input fields to create or update a cart address. +The details about the app extension that's providing the +[discount type](https://help.shopify.com/manual/discounts/discount-types). +This information includes the app extension's name and +[client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), +[App Bridge configuration](https://shopify.dev/docs/api/app-bridge), +[discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), +[function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), +and other metadata about the discount type, including the discount type's name and description. """ -input CartDeliveryAddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String - +type AppDiscountType { """ - The second line of the address. Typically the number of the apartment, suite, or unit. + The name of the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). """ - address2: String + app: App! """ - The name of the city, district, village, or town. + The [App Bridge configuration](https://shopify.dev/docs/api/app-bridge) + for the [discount type](https://help.shopify.com/manual/discounts/discount-types). """ - city: String + appBridge: FunctionsAppBridge! """ - The name of the customer's company or organization. + The [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets) + of the app extension that's providing the [discount type](https://help.shopify.com/manual/discounts/discount-types). """ - company: String + appKey: String! """ - The name of the country. + A description of the + [discount type](https://help.shopify.com/manual/discounts/discount-types) + provided by the app extension. """ - countryCode: CountryCode + description: String """ - The first name of the customer. + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. """ - firstName: String + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") """ - The last name of the customer. + The list of [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that this app extension supports. """ - lastName: String + discountClasses: [DiscountClass!]! """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. + The + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries) + associated with the app extension providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). """ - phone: String + functionId: String! """ - The region of the address, such as the province, state, or district. + The type of line item on an order that the + [discount type](https://help.shopify.com/manual/discounts/discount-types) applies to. + Valid values: `SHIPPING_LINE` and `LINE_ITEM`. """ - provinceCode: String + targetType: DiscountApplicationTargetType! @deprecated(reason: "Use `discountClasses` instead.") """ - The zip or postal code of the address. + The name of the [discount type](https://help.shopify.com/manual/discounts/discount-types) + that the app extension is providing. """ - zip: String + title: String! } """ -Return type for `cartDeliveryAddressesAdd` mutation. +An auto-generated type for paginating through multiple AppDiscountTypes. """ -type CartDeliveryAddressesAddPayload { +type AppDiscountTypeConnection { """ - The updated cart. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - cart: Cart + edges: [AppDiscountTypeEdge!]! """ - The list of errors that occurred from executing the mutation. + A list of nodes that are contained in AppDiscountTypeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - userErrors: [CartUserError!]! + nodes: [AppDiscountType!]! """ - A list of warnings that occurred during the mutation. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - warnings: [CartWarning!]! + pageInfo: PageInfo! } """ -Return type for `cartDeliveryAddressesRemove` mutation. +An auto-generated type which holds one AppDiscountType and a cursor during pagination. """ -type CartDeliveryAddressesRemovePayload { - """ - The updated cart. - """ - cart: Cart - +type AppDiscountTypeEdge { """ - The list of errors that occurred from executing the mutation. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - userErrors: [CartUserError!]! + cursor: String! """ - A list of warnings that occurred during the mutation. + The item at the end of AppDiscountTypeEdge. """ - warnings: [CartWarning!]! + node: AppDiscountType! } """ -Return type for `cartDeliveryAddressesReplace` mutation. +An auto-generated type which holds one App and a cursor during pagination. """ -type CartDeliveryAddressesReplacePayload { - """ - The updated cart. +type AppEdge { """ - cart: Cart - - """ - The list of errors that occurred from executing the mutation. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - userErrors: [CartUserError!]! + cursor: String! """ - A list of warnings that occurred during the mutation. + The item at the end of AppEdge. """ - warnings: [CartWarning!]! + node: App! } """ -Return type for `cartDeliveryAddressesUpdate` mutation. +Reports the status of shops and their resources and displays this information +within Shopify admin. AppFeedback is used to notify merchants about steps they need to take +to set up an app on their store. """ -type CartDeliveryAddressesUpdatePayload { +type AppFeedback { """ - The updated cart. + The application associated to the feedback. """ - cart: Cart + app: App! """ - The list of errors that occurred from executing the mutation. + The date and time when the app feedback was generated. + """ + feedbackGeneratedAt: DateTime! + + """ + A link to where merchants can resolve errors. """ - userErrors: [CartUserError!]! + link: Link """ - A list of warnings that occurred during the mutation. + The feedback message presented to the merchant. """ - warnings: [CartWarning!]! + messages: [UserError!]! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! } """ -Preferred location used to find the closest pick up point based on coordinates. +An app installed on a shop. Each installation tracks the permissions granted to the app through [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) objects, along with billing subscriptions and [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. + +The installation provides metafields that only the owning [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) can access. These metafields store app-specific configuration that merchants and other apps can't modify. The installation also provides URLs for launching and uninstalling the app, along with any active [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) objects or [`AppPurchaseOneTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppPurchaseOneTime) purchases. """ -type CartDeliveryCoordinatesPreference { +type AppInstallation implements HasMetafields & Node { """ - The two-letter code for the country of the preferred location. - - For example, US. + The access scopes granted to the application by a merchant during installation. """ - countryCode: CountryCode! + accessScopes: [AccessScope!]! """ - The geographic latitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + The active application subscriptions billed to the shop on a recurring basis. """ - latitude: Float! + activeSubscriptions: [AppSubscription!]! """ - The geographic longitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + All subscriptions created for a shop. """ - longitude: Float! -} + allSubscriptions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppSubscriptionSortKeys = CREATED_AT): AppSubscriptionConnection! -""" -Preferred location used to find the closest pick up point based on coordinates. -""" -input CartDeliveryCoordinatesPreferenceInput { """ - The geographic latitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + Application which is installed. """ - latitude: Float! + app: App! """ - The geographic longitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + Channel associated with the installed application. """ - longitude: Float! + channel: Channel @deprecated(reason: "Use the root-level `channels` query instead.") """ - The two-letter code for the country of the preferred location. - - For example, US. + Credits that can be used towards future app purchases. """ - countryCode: CountryCode! -} - -""" -Groups cart line items that share the same delivery destination. Each group provides the available [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) choices for that address, along with the customer's selected option. + credits("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppTransactionSortKeys = CREATED_AT): AppCreditConnection! -Access through the [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) object's `deliveryGroups` field. Items are grouped by merchandise type (one-time purchase vs subscription), allowing different delivery methods for each. -""" -type CartDeliveryGroup { """ - A list of cart lines for the delivery group. + A globally-unique ID. """ - cartLines("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): BaseCartLineConnection! + id: ID! """ - The destination address for the delivery group. + The URL to launch the application. """ - deliveryAddress: MailingAddress! + launchUrl: URL! """ - The delivery options available for the delivery group. + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. """ - deliveryOptions: [CartDeliveryOption!]! + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield """ - The type of merchandise in the delivery group. + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. """ - groupType: CartDeliveryGroupType! + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! """ - The ID for the delivery group. + One-time purchases to a shop. """ - id: ID! + oneTimePurchases("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppTransactionSortKeys = CREATED_AT): AppPurchaseOneTimeConnection! """ - The selected delivery option for the delivery group. + The publication associated with the installed application. """ - selectedDeliveryOption: CartDeliveryOption -} + publication: Publication @deprecated(reason: "Use the root-level `publications` query instead.") -""" -An auto-generated type for paginating through multiple CartDeliveryGroups. -""" -type CartDeliveryGroupConnection { """ - A list of edges. + The records that track the externally-captured revenue for the app. The records are used for revenue attribution purposes. """ - edges: [CartDeliveryGroupEdge!]! + revenueAttributionRecords("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppRevenueAttributionRecordSortKeys = CREATED_AT): AppRevenueAttributionRecordConnection! """ - A list of the nodes contained in CartDeliveryGroupEdge. + Subscriptions charge to a shop on a recurring basis. """ - nodes: [CartDeliveryGroup!]! + subscriptions: [AppSubscription!]! @deprecated(reason: "Use `activeSubscriptions` instead.") """ - Information to aid in pagination. + The URL to uninstall the application. """ - pageInfo: PageInfo! + uninstallUrl: URL } """ -An auto-generated type which holds one CartDeliveryGroup and a cursor during pagination. +The possible categories of an app installation, based on their purpose +or the environment they can run in. """ -type CartDeliveryGroupEdge { +enum AppInstallationCategory { """ - A cursor for use in pagination. + Apps that serve as channels through which sales are made, such as the online store. """ - cursor: String! + CHANNEL """ - The item at the end of CartDeliveryGroupEdge. + Apps that can be used in the POS mobile client. """ - node: CartDeliveryGroup! + POS_EMBEDDED } """ -Defines what type of merchandise is in the delivery group. +An auto-generated type for paginating through multiple AppInstallations. """ -enum CartDeliveryGroupType { +type AppInstallationConnection { """ - The delivery group only contains subscription merchandise. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - SUBSCRIPTION + edges: [AppInstallationEdge!]! """ - The delivery group only contains merchandise that is either a one time purchase or a first delivery of - subscription merchandise. + A list of nodes that are contained in AppInstallationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - ONE_TIME_PURCHASE -} + nodes: [AppInstallation!]! -""" -The input fields for the cart's delivery properties. -""" -input CartDeliveryInput { """ - Selectable addresses to present to the buyer on the cart. - - The input must not contain more than `250` values. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - addresses: [CartSelectableAddressInput!] + pageInfo: PageInfo! } """ -A shipping or delivery choice available to customers during checkout. Each option includes a title, estimated cost, and delivery method type such as shipping or local pickup. - -Returned by the [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) object's [`deliveryOptions`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.deliveryOptions) field and [`selectedDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.selectedDeliveryOption) field. +An auto-generated type which holds one AppInstallation and a cursor during pagination. """ -type CartDeliveryOption { +type AppInstallationEdge { """ - The code of the delivery option. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - code: String + cursor: String! """ - The method for the delivery option. + The item at the end of AppInstallationEdge. """ - deliveryMethodType: DeliveryMethodType! + node: AppInstallation! +} - """ - The description of the delivery option. - """ - description: String +""" +The levels of privacy of an app installation. +""" +enum AppInstallationPrivacy { + PUBLIC + PRIVATE +} + +""" +The set of valid sort keys for the AppInstallation query. +""" +enum AppInstallationSortKeys { """ - The estimated cost for the delivery option. + Sort by the `app_title` value. """ - estimatedCost: MoneyV2! + APP_TITLE """ - The unique identifier of the delivery option. + Sort by the `id` value. """ - handle: String! + ID """ - The title of the delivery option. + Sort by the `installed_at` value. """ - title: String + INSTALLED_AT } """ -A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. -Preferences are not synced back to the cart if they are overwritten. +The pricing model for the app subscription. +The pricing model input can be either `appRecurringPricingDetails` or `appUsagePricingDetails`. """ -type CartDeliveryPreference { +input AppPlanInput { """ - Preferred location used to find the closest pick up point based on coordinates. + The pricing details for usage-based billing. """ - coordinates: CartDeliveryCoordinatesPreference + appUsagePricingDetails: AppUsagePricingInput """ - The preferred delivery methods such as shipping, local pickup or through pickup points. + The pricing details for recurring billing. """ - deliveryMethod: [PreferenceDeliveryMethodType!]! + appRecurringPricingDetails: AppRecurringPricingInput +} + +""" +Contains the pricing details for the app plan that a merchant has subscribed to within their current billing arrangement. + +This simplified object focuses on the essential pricing information merchants need to understand their current subscription costs and billing structure. +Details about subscription management and pricing strategies are available in the [app billing documentation](https://shopify.dev/docs/apps/launch/billing). +""" +type AppPlanV2 { """ - The pickup handle prefills checkout fields with the location for either local pickup or pickup points delivery methods. - It accepts both location ID for local pickup and external IDs for pickup points. + The plan billed to a shop on a recurring basis. """ - pickupHandle: [String!]! + pricingDetails: AppPricingDetails! } """ -Delivery preferences can be used to prefill the delivery section at checkout. +The information about the price that's charged to a shop every plan period. +The concrete type can be `AppRecurringPricing` for recurring billing or `AppUsagePricing` for usage-based billing. """ -input CartDeliveryPreferenceInput { - """ - The preferred delivery methods such as shipping, local pickup or through pickup points. - - The input must not contain more than `250` values. - """ - deliveryMethod: [PreferenceDeliveryMethodType!] +union AppPricingDetails = AppRecurringPricing|AppUsagePricing +""" +The frequency at which the shop is billed for an app subscription. +""" +enum AppPricingInterval { """ - The pickup handle prefills checkout fields with the location for either local pickup or pickup points delivery methods. - It accepts both location ID for local pickup and external IDs for pickup points. - - The input must not contain more than `250` values. + The app subscription bills the shop annually. """ - pickupHandle: [String!] + ANNUAL """ - The coordinates of a delivery location in order of preference. + The app subscription bills the shop every 30 days. """ - coordinates: CartDeliveryCoordinatesPreferenceInput + EVERY_30_DAYS } """ -The input fields for submitting direct payment method information for checkout. +The public-facing category for an app. """ -input CartDirectPaymentMethodInput { +enum AppPublicCategory { """ - The customer's billing address. + The app's public category is [private](https://shopify.dev/apps/distribution#deprecated-app-types). """ - billingAddress: MailingAddressInput! + PRIVATE """ - The session ID for the direct payment method used to create the payment. + The app's public category is [public](https://shopify.dev/apps/distribution#capabilities-and-requirements). """ - sessionId: String! + PUBLIC """ - The source of the credit card payment. + The app's public category is [custom](https://shopify.dev/apps/distribution#capabilities-and-requirements). """ - cardSource: CartCardSource + CUSTOM """ - Indicates if the customer has accepted the subscription terms. Defaults to false. + The app's public category is other. An app is in this category if it's not classified under any of the other app types (private, public, or custom). """ - acceptedSubscriptionTerms: Boolean = false + OTHER } """ -A common interface for querying discount allocations regardless of how the discount was applied ([automatic](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), or custom). Each implementation represents a different discount source. - -Tracks how a discount distributes across [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Each allocation includes the [`CartDiscountApplication`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountApplication) details, the discounted amount, and whether the discount targets line items or shipping. +Services and features purchased once by the store. """ -interface CartDiscountAllocation { +interface AppPurchase { """ - The discount that have been applied on the cart line. + The date and time when the app purchase occurred. """ - discountApplication: CartDiscountApplication! @deprecated(reason: "Use `sourceDiscountApplication` instead.") + createdAt: DateTime! """ - The discounted amount that has been applied to the cart line. + The name of the app purchase. """ - discountedAmount: MoneyV2! + name: String! """ - The type of line that the discount is applicable towards. + The amount to be charged to the store for the app purchase. """ - targetType: DiscountApplicationTargetType! + price: MoneyV2! + + """ + The status of the app purchase. + """ + status: AppPurchaseStatus! + + """ + Whether the app purchase is a test transaction. + """ + test: Boolean! } """ -Captures the intent of a discount source at the time it was applied to a cart. This includes the discount value, how it's allocated across entitled items, and which line types it targets. +Represents a one-time purchase of app services or features by a merchant, tracking the transaction details and status throughout the billing lifecycle. This object captures essential information about non-recurring charges, including price and merchant acceptance status. + +One-time purchases are particularly valuable for apps offering premium features, professional services, or digital products that don't require ongoing subscriptions. For instance, a photography app might sell premium filters as one-time purchases, while a marketing app could charge for individual campaign setups or advanced analytics reports. + +Use the `AppPurchaseOneTime` object to: +- Track the status of individual feature purchases and service charges +- Track payment status for premium content or digital products +- Access purchase details to enable or disable features based on payment status -The actual discounted amounts on specific cart lines are represented by [`CartDiscountAllocation`](https://shopify.dev/docs/api/storefront/current/interfaces/CartDiscountAllocation) objects, which reference this application. +The purchase status indicates whether the charge is pending merchant approval, has been accepted and processed, or was declined. This status tracking is crucial for apps that need to conditionally enable features based on successful payment completion. + +Purchase records include creation timestamps, pricing details, and test flags to distinguish between production charges and development testing. The test flag ensures that development and staging environments don't generate actual charges while maintaining realistic billing flow testing. + +For detailed implementation patterns and billing best practices, see the [one-time-charges page](https://shopify.dev/docs/apps/launch/billing/one-time-charges). """ -type CartDiscountApplication { +type AppPurchaseOneTime implements AppPurchase & Node { """ - The method by which the discount's value is allocated to its entitled items. + The date and time when the app purchase occurred. """ - allocationMethod: DiscountApplicationAllocationMethod! + createdAt: DateTime! """ - Which lines of targetType that the discount is allocated over. + A globally-unique ID. """ - targetSelection: DiscountApplicationTargetSelection! + id: ID! """ - The type of line that the discount is applicable towards. + The name of the app purchase. """ - targetType: DiscountApplicationTargetType! + name: String! """ - The value of the discount application. + The amount to be charged to the store for the app purchase. """ - value: PricingValue! -} - -""" -A discount code applied to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartDiscountCodesUpdate) mutation. + price: MoneyV2! -The [`applicable`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountCode#field-CartDiscountCode.fields.applicable) field indicates whether the code applies to the cart's current contents, which might change as items are added or removed. -""" -type CartDiscountCode { """ - Whether the discount code is applicable to the cart's current contents. + The status of the app purchase. """ - applicable: Boolean! + status: AppPurchaseStatus! """ - The code for the discount. + Whether the app purchase is a test transaction. """ - code: String! + test: Boolean! } """ -Return type for `cartDiscountCodesUpdate` mutation. +An auto-generated type for paginating through multiple AppPurchaseOneTimes. """ -type CartDiscountCodesUpdatePayload { +type AppPurchaseOneTimeConnection { """ - The updated cart. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - cart: Cart + edges: [AppPurchaseOneTimeEdge!]! """ - The list of errors that occurred from executing the mutation. + A list of nodes that are contained in AppPurchaseOneTimeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - userErrors: [CartUserError!]! + nodes: [AppPurchaseOneTime!]! """ - A list of warnings that occurred during the mutation. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - warnings: [CartWarning!]! + pageInfo: PageInfo! } """ -Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/current/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields. +Return type for `appPurchaseOneTimeCreate` mutation. """ -enum CartErrorCode { +type AppPurchaseOneTimeCreatePayload { """ - The input value is invalid. + The newly created app one-time purchase. """ - INVALID + appPurchaseOneTime: AppPurchaseOneTime """ - The input value should be less than the maximum value allowed. - """ - LESS_THAN + The URL that the merchant can access to approve or decline the newly created app one-time purchase. - """ - Merchandise line was not found in cart. - """ - INVALID_MERCHANDISE_LINE + If the merchant declines, then the merchant is redirected to the app and receives a notification message stating that the charge was declined. + If the merchant approves and they're successfully invoiced, then the state of the charge changes from `pending` to `active`. + You get paid after the charge is activated. """ - Item cannot be purchased as configured. - """ - MERCHANDISE_NOT_APPLICABLE + confirmationUrl: URL """ - Missing discount code. + The list of errors that occurred from executing the mutation. """ - MISSING_DISCOUNT_CODE + userErrors: [UserError!]! +} +""" +An auto-generated type which holds one AppPurchaseOneTime and a cursor during pagination. +""" +type AppPurchaseOneTimeEdge { """ - Missing note. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - MISSING_NOTE + cursor: String! """ - The note length must be below the specified maximum. + The item at the end of AppPurchaseOneTimeEdge. """ - NOTE_TOO_LONG + node: AppPurchaseOneTime! +} - """ - Delivery group was not found in cart. - """ - INVALID_DELIVERY_GROUP +""" +The approval status of the app purchase. - """ - Delivery option was not valid. - """ - INVALID_DELIVERY_OPTION +The merchant is charged for the purchase immediately after approval, and the status changes to `active`. +If the payment fails, then the app purchase remains `pending`. +Purchases start as `pending` and can change to: `active`, `declined`, `expired`. After a purchase changes, it +remains in that final state. +""" +enum AppPurchaseStatus { """ - The delivery group is in a pending state. + The app purchase has been approved by the merchant and is ready to be activated by the app. App purchases created through the GraphQL Admin API are activated upon approval. """ - PENDING_DELIVERY_GROUPS + ACCEPTED @deprecated(reason: "When a merchant accepts an app purchase, the status immediately changes from `pending` to `active`.") """ - The payment wasn't valid. + The app purchase was approved by the merchant and has been activated by the app. Active app purchases are charged to the merchant and are paid out to the partner. """ - INVALID_PAYMENT + ACTIVE """ - The payment method is not supported. + The app purchase was declined by the merchant. """ - PAYMENT_METHOD_NOT_SUPPORTED + DECLINED """ - The payment method is not applicable. + The app purchase was not accepted within two days of being created. """ - PAYMENT_METHOD_NOT_APPLICABLE + EXPIRED """ - The payment is invalid. Deferred payment is required. + The app purchase is pending approval by the merchant. """ - INVALID_PAYMENT_DEFERRED_PAYMENT_REQUIRED + PENDING +} +""" +The pricing information about a subscription app. +The object contains an interval (the frequency at which the shop is billed for an app subscription) and +a price (the amount to be charged to the subscribing shop at each interval). +""" +type AppRecurringPricing { """ - Cannot update payment on an empty cart + The discount applied to the subscription for a given number of billing intervals. """ - INVALID_PAYMENT_EMPTY_CART + discount: AppSubscriptionDiscount """ - Validation failed. + The frequency at which the subscribing shop is billed for an app subscription. """ - VALIDATION_CUSTOM + interval: AppPricingInterval! """ - The metafields were not valid. + The app store pricing plan handle. """ - INVALID_METAFIELDS + planHandle: String """ - The customer access token is required when setting a company location. + The amount and currency to be charged to the subscribing shop every billing interval. """ - MISSING_CUSTOMER_ACCESS_TOKEN + price: MoneyV2! +} +""" +Instructs the app subscription to generate a fixed charge on a recurring basis. The frequency is specified by the billing interval. +""" +input AppRecurringPricingInput { """ - Company location not found or not allowed. + How often the app subscription generates a charge. """ - INVALID_COMPANY_LOCATION + interval: AppPricingInterval = EVERY_30_DAYS """ - The quantity must be a multiple of the specified increment. + The amount to be charged to the store every billing interval. """ - INVALID_INCREMENT + price: MoneyInput! """ - The quantity must be above the specified minimum for the item. + The discount applied to the subscription for a given number of billing intervals. """ - MINIMUM_NOT_MET + discount: AppSubscriptionDiscountInput +} - """ - The quantity must be below the specified maximum for the item. - """ - MAXIMUM_EXCEEDED +""" +Tracks revenue that was captured outside of Shopify's billing system but needs to be attributed to the app for comprehensive revenue reporting and partner analytics. This object enables accurate revenue tracking when apps process payments through external systems while maintaining visibility into total app performance. - """ - Too many delivery addresses on Cart. - """ - TOO_MANY_DELIVERY_ADDRESSES +External revenue attribution is essential for apps that offer multiple payment channels or process certain transactions outside Shopify's billing infrastructure. For example, an enterprise app might process large custom contracts through external payment processors, or a marketplace app could handle direct merchant-to-merchant transactions that still generate app commissions. - """ - Only one delivery address can be selected. - """ - ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED +Use the `AppRevenueAttributionRecord` object to: +- Report revenue from external payment processors and billing systems +- Track commission-based earnings from marketplace or referral activities +- Maintain comprehensive revenue analytics across multiple payment channels +- Ensure accurate partner revenue sharing and commission calculations +- Generate complete financial reports that include all app-generated revenue streams +- Support compliance requirements for external revenue documentation - """ - The delivery address was not found. - """ - INVALID_DELIVERY_ADDRESS_ID +Each attribution record includes the captured amount, external transaction timestamp, and idempotency keys to prevent duplicate reporting. The record type field categorizes different revenue streams, enabling detailed analytics and reporting segmentation. - """ - Buyer cannot purchase for company location. - """ - BUYER_CANNOT_PURCHASE_FOR_COMPANY_LOCATION - - """ - Bundles and addons cannot be mixed. - """ - BUNDLES_AND_ADDONS_CANNOT_BE_MIXED +Revenue attribution records are particularly important for apps participating in Shopify's partner program, as they ensure accurate revenue sharing calculations and comprehensive performance metrics. The captured timestamp reflects when the external payment was processed, not when the attribution record was created in Shopify. +For detailed revenue attribution values, see the [AppRevenueAttributionType enum](https://shopify.dev/docs/api/admin-graphql/latest/enums/AppRevenueAttributionType). +""" +type AppRevenueAttributionRecord implements Node { """ - Cannot reference existing parent lines by variant_id. + The financial amount captured in this attribution. """ - PARENT_LINE_INVALID_REFERENCE + amount: MoneyV2! """ - Parent line not found. + The timestamp when the financial amount was captured. """ - PARENT_LINE_NOT_FOUND + capturedAt: DateTime! """ - Parent line nesting is too deep or circular. + The timestamp at which this revenue attribution was issued. """ - PARENT_LINE_NESTING_TOO_DEEP + createdAt: DateTime! """ - Nested cartlines are blocked due to an incompatibility. + A globally-unique ID. """ - PARENT_LINE_OPERATION_BLOCKED + id: ID! """ - The specified gift card recipient is invalid. + The unique value submitted during the creation of the app revenue attribution record. + For more information, refer to + [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). """ - GIFT_CARD_RECIPIENT_INVALID + idempotencyKey: String! """ - The specified address field is required. + Indicates whether this is a test submission. """ - ADDRESS_FIELD_IS_REQUIRED + test: Boolean! """ - The specified address field is too long. + The type of revenue attribution. """ - ADDRESS_FIELD_IS_TOO_LONG + type: AppRevenueAttributionType! +} +""" +An auto-generated type for paginating through multiple AppRevenueAttributionRecords. +""" +type AppRevenueAttributionRecordConnection { """ - The specified address field contains emojis. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - ADDRESS_FIELD_CONTAINS_EMOJIS + edges: [AppRevenueAttributionRecordEdge!]! """ - The specified address field contains HTML tags. + A list of nodes that are contained in AppRevenueAttributionRecordEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - ADDRESS_FIELD_CONTAINS_HTML_TAGS + nodes: [AppRevenueAttributionRecord!]! """ - The specified address field contains a URL. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - ADDRESS_FIELD_CONTAINS_URL + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one AppRevenueAttributionRecord and a cursor during pagination. +""" +type AppRevenueAttributionRecordEdge { """ - The specified address field does not match the expected pattern. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN + cursor: String! """ - The given zip code is invalid for the provided province. + The item at the end of AppRevenueAttributionRecordEdge. """ - INVALID_ZIP_CODE_FOR_PROVINCE + node: AppRevenueAttributionRecord! +} +""" +The set of valid sort keys for the AppRevenueAttributionRecord query. +""" +enum AppRevenueAttributionRecordSortKeys { """ - The given zip code is invalid for the provided country. + Sort by the `created_at` value. """ - INVALID_ZIP_CODE_FOR_COUNTRY + CREATED_AT """ - The given zip code is unsupported. + Sort by the `id` value. """ - ZIP_CODE_NOT_SUPPORTED + ID +} +""" +Represents the billing types of revenue attribution. +""" +enum AppRevenueAttributionType { """ - The given province cannot be found. + App purchase related revenue collection. """ - PROVINCE_NOT_FOUND + APPLICATION_PURCHASE """ - A general error occurred during address validation. + App subscription revenue collection. """ - UNSPECIFIED_ADDRESS_ERROR + APPLICATION_SUBSCRIPTION """ - Credit card has expired. + App usage-based revenue collection. """ - PAYMENTS_CREDIT_CARD_BASE_EXPIRED + APPLICATION_USAGE """ - Credit card gateway is not supported. + Other app revenue collection type. """ - PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED + OTHER +} +""" +Represents an error that happens while revoking a granted scope. +""" +type AppRevokeAccessScopesAppRevokeScopeError implements DisplayableError { """ - Credit card error. + The error code. """ - PAYMENTS_CREDIT_CARD_GENERIC + code: AppRevokeAccessScopesAppRevokeScopeErrorCode """ - Credit card month is invalid. + The path to the input field that caused the error. """ - PAYMENTS_CREDIT_CARD_MONTH_INCLUSION + field: [String!] """ - Credit card number is invalid. + The error message. """ - PAYMENTS_CREDIT_CARD_NUMBER_INVALID + message: String! +} +""" +Possible error codes that can be returned by `AppRevokeAccessScopesAppRevokeScopeError`. +""" +enum AppRevokeAccessScopesAppRevokeScopeErrorCode { """ - Credit card number format is invalid. + No app found on the access token. """ - PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT + MISSING_SOURCE_APP """ - Credit card verification value is blank. + The application cannot be found. """ - PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK + APPLICATION_CANNOT_BE_FOUND """ - Credit card verification value is invalid for card type. + The requested list of scopes to revoke includes invalid handles. """ - PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE + UNKNOWN_SCOPES """ - Credit card has expired. + Required scopes cannot be revoked. """ - PAYMENTS_CREDIT_CARD_YEAR_EXPIRED + CANNOT_REVOKE_REQUIRED_SCOPES """ - Credit card expiry year is invalid. + Already granted implied scopes cannot be revoked. """ - PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR + CANNOT_REVOKE_IMPLIED_SCOPES """ - Variant can only be purchased with a selling plan. + Cannot revoke optional scopes that haven't been declared. """ - VARIANT_REQUIRES_SELLING_PLAN + CANNOT_REVOKE_UNDECLARED_SCOPES """ - Selling plan is not applicable. + App is not installed on shop. """ - SELLING_PLAN_NOT_APPLICABLE + APP_NOT_INSTALLED +} +""" +Return type for `appRevokeAccessScopes` mutation. +""" +type AppRevokeAccessScopesPayload { """ - An error occurred while saving the cart. + The list of scope handles that have been revoked. """ - SERVICE_UNAVAILABLE + revoked: [AccessScope!] """ - The cart is too large to save. + The list of errors that occurred from executing the mutation. """ - CART_TOO_LARGE + userErrors: [AppRevokeAccessScopesAppRevokeScopeError!]! } """ -The estimated costs that the buyer pays at checkout. Uses [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity) to determine [international pricing](https://shopify.dev/docs/custom-storefronts/internationalization/international-pricing). +A recurring billing agreement that associates an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) with a merchant's shop. Each subscription contains one or more [`AppSubscriptionLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscriptionLineItem) objects that define the pricing structure. The pricing structure can include recurring charges, usage-based pricing, or both. + +The subscription tracks billing details including the current period end date, trial days, and [`AppSubscriptionStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/AppSubscriptionStatus). -Includes the subtotal, total amount, duties, and taxes. The [`checkoutChargeAmount`](https://shopify.dev/docs/api/storefront/current/objects/CartEstimatedCost#field-CartEstimatedCost.fields.checkoutChargeAmount) field excludes deferred payments that are charged later, making it useful for displaying what the customer pays immediately. +Merchants must approve subscriptions through a [confirmation URL](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate#returns-confirmationUrl) before billing begins. Test subscriptions allow developers to verify billing flows without actual charges. + +Learn more about [subscription billing](https://shopify.dev/docs/apps/launch/billing/subscription-billing) and [testing charges](https://shopify.dev/docs/apps/launch/billing/managed-pricing#test-charges). """ -type CartEstimatedCost { +type AppSubscription implements Node { """ - The estimated amount, before taxes and discounts, for the customer to pay at checkout. The checkout charge amount doesn't include any deferred payments that'll be paid at a later date. If the cart has no deferred payments, then the checkout charge amount is equivalent to`subtotal_amount`. + The date and time when the app subscription was created. """ - checkoutChargeAmount: MoneyV2! + createdAt: DateTime! """ - The estimated amount, before taxes and discounts, for the customer to pay. + The date and time when the current app subscription period ends. Returns `null` if the subscription isn't active. """ - subtotalAmount: MoneyV2! + currentPeriodEnd: DateTime """ - The estimated total amount for the customer to pay. + A globally-unique ID. """ - totalAmount: MoneyV2! + id: ID! """ - The estimated duty amount for the customer to pay at checkout. + The plans attached to the app subscription. """ - totalDutyAmount: MoneyV2 + lineItems: [AppSubscriptionLineItem!]! """ - The estimated tax amount for the customer to pay at checkout. + The name of the app subscription. """ - totalTaxAmount: MoneyV2 -} + name: String! -""" -The input fields for submitting a billing address without a selected payment method. -""" -input CartFreePaymentMethodInput { """ - The customer's billing address. + The URL that the merchant is redirected to after approving the app subscription. """ - billingAddress: MailingAddressInput! -} + returnUrl: URL! -""" -Return type for `cartGiftCardCodesAdd` mutation. -""" -type CartGiftCardCodesAddPayload { """ - The updated cart. + The status of the app subscription. """ - cart: Cart + status: AppSubscriptionStatus! """ - The list of errors that occurred from executing the mutation. + Specifies whether the app subscription is a test transaction. """ - userErrors: [CartUserError!]! + test: Boolean! """ - A list of warnings that occurred during the mutation. + The number of free trial days, starting at the subscription's creation date, by which billing is delayed. """ - warnings: [CartWarning!]! + trialDays: Int! } """ -Return type for `cartGiftCardCodesRemove` mutation. +Return type for `appSubscriptionCancel` mutation. """ -type CartGiftCardCodesRemovePayload { +type AppSubscriptionCancelPayload { """ - The updated cart. + The cancelled app subscription. """ - cart: Cart + appSubscription: AppSubscription """ The list of errors that occurred from executing the mutation. """ - userErrors: [CartUserError!]! - - """ - A list of warnings that occurred during the mutation. - """ - warnings: [CartWarning!]! + userErrors: [UserError!]! } """ -Return type for `cartGiftCardCodesUpdate` mutation. +An auto-generated type for paginating through multiple AppSubscriptions. """ -type CartGiftCardCodesUpdatePayload { +type AppSubscriptionConnection { """ - The updated cart. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - cart: Cart + edges: [AppSubscriptionEdge!]! """ - The list of errors that occurred from executing the mutation. + A list of nodes that are contained in AppSubscriptionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - userErrors: [CartUserError!]! + nodes: [AppSubscription!]! """ - A list of warnings that occurred during the mutation. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - warnings: [CartWarning!]! + pageInfo: PageInfo! } """ -The input fields for creating a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. - -Accepts merchandise lines, discount codes, gift card codes, and a note. You can also set custom attributes, metafields, buyer identity for international pricing, and delivery addresses. +Return type for `appSubscriptionCreate` mutation. """ -input CartInput { +type AppSubscriptionCreatePayload { """ - An array of key-value pairs that contains additional information about the cart. - - The input must not contain more than `250` values. + The newly-created app subscription. """ - attributes: [AttributeInput!] + appSubscription: AppSubscription """ - A list of merchandise lines to add to the cart. - - The input must not contain more than `250` values. + The URL pointing to the page where the merchant approves or declines the charges for an app subscription. """ - lines: [CartLineInput!] + confirmationUrl: URL """ - The case-insensitive discount codes that the customer added at checkout. - - The input must not contain more than `250` values. + The list of errors that occurred from executing the mutation. """ - discountCodes: [String!] + userErrors: [UserError!]! +} +""" +Discount applied to the recurring pricing portion of a subscription. +""" +type AppSubscriptionDiscount { """ - The case-insensitive gift card codes. - - The input must not contain more than `250` values. + The total number of billing intervals to which the discount will be applied. + The discount will be applied to an indefinite number of billing intervals if this value is blank. """ - giftCardCodes: [String!] + durationLimitInIntervals: Int """ - A note that's associated with the cart. For example, the note can be a personalized message to the buyer. + The price of the subscription after the discount is applied. """ - note: String + priceAfterDiscount: MoneyV2! """ - The customer associated with the cart. Used to determine [international pricing] - (https://shopify.dev/custom-storefronts/internationalization/international-pricing). - Buyer identity should match the customer's shipping address. + The remaining number of billing intervals to which the discount will be applied. """ - buyerIdentity: CartBuyerIdentityInput + remainingDurationInIntervals: Int """ - The delivery-related fields for the cart. + The value of the discount applied every billing interval. """ - delivery: CartDeliveryInput + value: AppSubscriptionDiscountValue! +} +""" +The fixed amount value of a discount. +""" +type AppSubscriptionDiscountAmount { """ - The metafields to associate with this cart. - - The input must not contain more than `250` values. + The fixed amount value of a discount. """ - metafields: [CartInputMetafieldInput!] + amount: MoneyV2! } """ -The input fields for a cart metafield value to set. - -Cart metafields will be copied to order metafields at order creation time if there is a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. +The input fields to specify a discount to the recurring pricing portion of a subscription over a number of billing intervals. """ -input CartInputMetafieldInput { +input AppSubscriptionDiscountInput { """ - The key name of the metafield. + The value to be discounted every billing interval. """ - key: String! + value: AppSubscriptionDiscountValueInput """ - The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. + The total number of billing intervals to which the discount will be applied. Must be greater than 0. + The discount will be applied to an indefinite number of billing intervals if this value is left blank. """ - value: String! + durationLimitInIntervals: Int +} +""" +The percentage value of a discount. +""" +type AppSubscriptionDiscountPercentage { """ - The type of data that the cart metafield stores. - The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). + The percentage value of a discount. """ - type: String! + percentage: Float! } """ -An item in a customer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts. +The value of the discount. +""" +union AppSubscriptionDiscountValue = AppSubscriptionDiscountAmount|AppSubscriptionDiscountPercentage -Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a [`SellingPlanAllocation`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) for purchase options like subscriptions, pre-orders, or try-before-you-buy. The [`instructions`](https://shopify.dev/docs/api/storefront/current/objects/CartLine#field-CartLine.fields.instructions) field indicates whether the line can be removed or have its quantity updated. """ -type CartLine implements BaseCartLine & Node { +The input fields to specify the value discounted every billing interval. +""" +input AppSubscriptionDiscountValueInput { """ - An attribute associated with the cart line. + The percentage value of a discount. """ - attribute("The key of the attribute." key: String!): Attribute + percentage: Float """ - The attributes associated with the cart line. Attributes are represented as key-value pairs. + The monetary value of a discount. """ - attributes: [Attribute!]! + amount: Decimal +} +""" +An auto-generated type which holds one AppSubscription and a cursor during pagination. +""" +type AppSubscriptionEdge { """ - The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - cost: CartLineCost! + cursor: String! """ - The discounts that have been applied to the cart line. + The item at the end of AppSubscriptionEdge. """ - discountAllocations: [CartDiscountAllocation!]! + node: AppSubscription! +} - """ - The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. - """ - estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") +""" +Represents a component of an app subscription that contains pricing details for either recurring fees or usage-based charges. Each subscription has exactly 1 or 2 line items - one for recurring fees and/or one for usage fees. - """ - A globally-unique ID. - """ - id: ID! +If a subscription has both recurring and usage pricing, there will be 2 line items. If it only has one type of pricing, the subscription will have a single line item for that pricing model. - """ - The instructions for the line item. - """ - instructions: CartLineInstructions! +Use the `AppSubscriptionLineItem` object to: +- View the pricing terms a merchant has agreed to +- Distinguish between recurring and usage fee components +- Access detailed billing information for each pricing component - """ - The merchandise that the buyer intends to purchase. - """ - merchandise: Merchandise! +This read-only object provides visibility into the subscription's pricing structure without allowing modifications. +Read about subscription pricing models in the [billing architecture guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). +""" +type AppSubscriptionLineItem { """ - The parent of the line item. + A globally-unique ID. """ - parentRelationship: CartLineParentRelationship + id: ID! """ - The quantity of the merchandise that the customer intends to purchase. + The pricing model for the app subscription. """ - quantity: Int! + plan: AppPlanV2! """ - The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + A list of the store's usage records for a usage pricing plan. """ - sellingPlanAllocation: SellingPlanAllocation + usageRecords("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppUsageRecordSortKeys = CREATED_AT): AppUsageRecordConnection! } """ -Cost breakdown for a single line item in a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). Includes the per-unit price, the subtotal before line-level discounts, and the final total amount the buyer pays. - -The [`compareAtAmountPerQuantity`](https://shopify.dev/docs/api/storefront/current/objects/CartLineCost#field-CartLineCost.fields.compareAtAmountPerQuantity) field shows the original price when the item is on sale, enabling the display of savings to customers. +The input fields to add more than one pricing plan to an app subscription. """ -type CartLineCost { - """ - The amount of the merchandise line. - """ - amountPerQuantity: MoneyV2! - - """ - The compare at amount of the merchandise line. - """ - compareAtAmountPerQuantity: MoneyV2 - +input AppSubscriptionLineItemInput { """ - The cost of the merchandise line before line-level discounts. + The pricing model for the app subscription. """ - subtotalAmount: MoneyV2! - - """ - The total cost of the merchandise line. - """ - totalAmount: MoneyV2! + plan: AppPlanInput! } """ -The estimated cost of the merchandise line that the buyer will pay at checkout. +Return type for `appSubscriptionLineItemUpdate` mutation. """ -type CartLineEstimatedCost { - """ - The amount of the merchandise line. - """ - amount: MoneyV2! - +type AppSubscriptionLineItemUpdatePayload { """ - The compare at amount of the merchandise line. + The updated app subscription. """ - compareAtAmount: MoneyV2 + appSubscription: AppSubscription """ - The estimated cost of the merchandise line before discounts. + The URL where the merchant approves or declines the updated app subscription line item. """ - subtotalAmount: MoneyV2! + confirmationUrl: URL """ - The estimated total cost of the merchandise line. + The list of errors that occurred from executing the mutation. """ - totalAmount: MoneyV2! + userErrors: [UserError!]! } """ -The input fields for adding a merchandise line to a cart. Each line represents a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) the buyer intends to purchase, along with the quantity and optional [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) for subscriptions. - -Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation when creating a cart with initial items, and the [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesAdd) mutation when adding items to an existing cart. +The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. """ -input CartLineInput { - """ - An array of key-value pairs that contains additional information about the merchandise line. - - The input must not contain more than `250` values. - """ - attributes: [AttributeInput!] - - """ - The quantity of the merchandise. - """ - quantity: Int = 1 - +enum AppSubscriptionReplacementBehavior { """ - The ID of the merchandise that the buyer intends to purchase. + Cancels the merchant's current app subscription immediately and replaces it with the newly created app subscription. """ - merchandiseId: ID! + APPLY_IMMEDIATELY """ - The ID of the selling plan that the merchandise is being purchased with. + Defers canceling the merchant's current app subscription and applying the newly created app subscription until the start of the next billing cycle. This value is ignored if the new app subscription is using a different currency than the current app subscription, in which case the new app subscription is applied immediately. """ - sellingPlanId: ID + APPLY_ON_NEXT_BILLING_CYCLE """ - The parent line item of the cart line. + Cancels the merchant's current app subscription immediately and replaces it with the newly created app subscription, with the exception of + the following scenarios where replacing the current app subscription will be deferred until the start of the next billing cycle. + 1) The current app subscription is annual and the newly created app subscription is annual, using the same currency, but is of a lesser value. + 2) The current app subscription is annual and the newly created app subscription is monthly and using the same currency. + 3) The current app subscription and the newly created app subscription are identical except for the `discount` value. """ - parent: CartLineParentInput + STANDARD } """ -Represents instructions for a cart line item. +The set of valid sort keys for the AppSubscription query. """ -type CartLineInstructions { +enum AppSubscriptionSortKeys { """ - Whether the line item can be removed from the cart. + Sort by the `created_at` value. """ - canRemove: Boolean! + CREATED_AT """ - Whether the line item quantity can be updated. + Sort by the `id` value. """ - canUpdateQuantity: Boolean! + ID } """ -The parent line item of the cart line. +The status of the app subscription. """ -input CartLineParentInput @oneOf { +enum AppSubscriptionStatus { """ - The id of the parent line item. + The app subscription is pending approval by the merchant. """ - lineId: ID + PENDING """ - The ID of the parent line merchandise. + The app subscription has been approved by the merchant and is ready to be activated by the app. """ - merchandiseId: ID -} + ACCEPTED @deprecated(reason: "When a merchant approves an app subscription, the status immediately transitions from `pending` to `active`.") -""" -Represents the parent relationship of a cart line. -""" -type CartLineParentRelationship { """ - The parent cart line. + The app subscription has been approved by the merchant. Active app subscriptions are billed to the shop. After payment, partners receive payouts. """ - parent: CartLine! -} + ACTIVE -""" -The input fields for updating a merchandise line in a cart. Used by the [`cartLinesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate) mutation. - -Specify the line item's [`id`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineUpdateInput#fields-id) along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan. -""" -input CartLineUpdateInput { """ - The ID of the merchandise line. + The app subscription was declined by the merchant. This is a terminal state. """ - id: ID! + DECLINED """ - The quantity of the line item. + The app subscription wasn't approved by the merchant within two days of being created. This is a terminal state. """ - quantity: Int + EXPIRED """ - The ID of the merchandise for the line item. + The app subscription is on hold due to non-payment. The subscription re-activates after payments resume. """ - merchandiseId: ID + FROZEN """ - An array of key-value pairs that contains additional information about the merchandise line. - - The input must not contain more than `250` values. - """ - attributes: [AttributeInput!] - + The app subscription was cancelled by the app. This could be caused by the app being uninstalled, a new app subscription being activated, or a direct cancellation by the app. This is a terminal state. """ - The ID of the selling plan that the merchandise is being purchased with. - """ - sellingPlanId: ID + CANCELLED } """ -Return type for `cartLinesAdd` mutation. +Return type for `appSubscriptionTrialExtend` mutation. """ -type CartLinesAddPayload { +type AppSubscriptionTrialExtendPayload { """ - The updated cart. + The app subscription that had its trial extended. """ - cart: Cart + appSubscription: AppSubscription """ The list of errors that occurred from executing the mutation. """ - userErrors: [CartUserError!]! - - """ - A list of warnings that occurred during the mutation. - """ - warnings: [CartWarning!]! + userErrors: [AppSubscriptionTrialExtendUserError!]! } """ -Return type for `cartLinesRemove` mutation. +An error that occurs during the execution of `AppSubscriptionTrialExtend`. """ -type CartLinesRemovePayload { +type AppSubscriptionTrialExtendUserError implements DisplayableError { """ - The updated cart. + The error code. """ - cart: Cart + code: AppSubscriptionTrialExtendUserErrorCode """ - The list of errors that occurred from executing the mutation. + The path to the input field that caused the error. """ - userErrors: [CartUserError!]! + field: [String!] """ - A list of warnings that occurred during the mutation. + The error message. """ - warnings: [CartWarning!]! + message: String! } """ -Return type for `cartLinesUpdate` mutation. +Possible error codes that can be returned by `AppSubscriptionTrialExtendUserError`. """ -type CartLinesUpdatePayload { +enum AppSubscriptionTrialExtendUserErrorCode { """ - The updated cart. + The app subscription wasn't found. """ - cart: Cart + SUBSCRIPTION_NOT_FOUND """ - The list of errors that occurred from executing the mutation. + The trial isn't active. """ - userErrors: [CartUserError!]! + TRIAL_NOT_ACTIVE """ - A list of warnings that occurred during the mutation. + The app subscription isn't active. """ - warnings: [CartWarning!]! + SUBSCRIPTION_NOT_ACTIVE } """ -The input fields to delete a cart metafield. +The set of valid sort keys for the AppTransaction query. """ -input CartMetafieldDeleteInput { +enum AppTransactionSortKeys { """ - The ID of the cart resource. + Sort by the `created_at` value. """ - ownerId: ID! + CREATED_AT """ - The key name of the cart metafield. Can either be a composite key (`namespace.key`) or a simple key - that relies on the default app-reserved namespace. + Sort by the `id` value. """ - key: String! + ID } """ -Return type for `cartMetafieldDelete` mutation. +Represents an error that happens while uninstalling an app. """ -type CartMetafieldDeletePayload { +type AppUninstallAppUninstallError implements DisplayableError { """ - The ID of the deleted cart metafield. + The error code. """ - deletedId: ID + code: AppUninstallAppUninstallErrorCode """ - The list of errors that occurred from executing the mutation. + The path to the input field that caused the error. """ - userErrors: [MetafieldDeleteUserError!]! + field: [String!] + + """ + The error message. + """ + message: String! } """ -The input fields for a cart metafield value to set. +Possible error codes that can be returned by `AppUninstallAppUninstallError`. """ -input CartMetafieldsSetInput { +enum AppUninstallAppUninstallErrorCode { """ - The ID of the cart resource. + The app cannot be found. """ - ownerId: ID! + APP_NOT_FOUND """ - The key name of the cart metafield. This can either be a composite key (`namespace.key`) or a simple key - that relies on the default app-reserved namespace. + The app is not installed. """ - key: String! + APP_NOT_INSTALLED """ - The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. + User does not have sufficient permissions to uninstall this app. """ - value: String! + USER_PERMISSIONS_INSUFFICIENT """ - The type of data that the cart metafield stores. - The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). + An error occurred while uninstalling the app. """ - type: String! + APP_UNINSTALL_ERROR } """ -Return type for `cartMetafieldsSet` mutation. +Return type for `appUninstall` mutation. """ -type CartMetafieldsSetPayload { +type AppUninstallPayload { """ - The list of cart metafields that were set. + The uninstalled app. """ - metafields: [Metafield!] + app: App """ The list of errors that occurred from executing the mutation. """ - userErrors: [MetafieldsSetUserError!]! + userErrors: [AppUninstallAppUninstallError!]! } """ -Return type for `cartNoteUpdate` mutation. +Defines usage-based pricing terms for app subscriptions where merchants pay based on their actual consumption of app features or services. This pricing model provides flexibility for merchants who want to pay only for what they use rather than fixed monthly fees. + +For example, an email marketing app might charge variable pricing per email sent, with a monthly cap of variable pricing, allowing small merchants to pay minimal amounts while protecting larger merchants from excessive charges. + +Use the `AppUsagePricing` object to: +- View consumption-based billing for variable app usage +- See spending caps that protect merchants from unexpected charges + +The balance and capped amount fields provide apps with data about current usage costs and remaining budget within the billing period, which apps can present to merchants to promote transparency in variable pricing. + +For implementation guidance, see the [usage billing documentation](https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-usage-based-subscriptions). """ -type CartNoteUpdatePayload { +type AppUsagePricing { """ - The updated cart. + The total usage records for interval. """ - cart: Cart + balanceUsed: MoneyV2! """ - The list of errors that occurred from executing the mutation. + The capped amount prevents the merchant from being charged for any usage over that amount during a billing period. + This prevents billing from exceeding a maximum threshold over the duration of the billing period. + For the merchant to continue using the app after exceeding a capped amount, they would need to agree to a new usage charge. + """ + cappedAmount: MoneyV2! + """ - userErrors: [CartUserError!]! + The frequency with which the app usage records are billed. + """ + interval: AppPricingInterval! """ - A list of warnings that occurred during the mutation. + The terms and conditions for app usage pricing. + Must be present in order to create usage charges. + The terms are presented to the merchant when they approve an app's usage charges. """ - warnings: [CartWarning!]! + terms: String! } """ -An error occurred during the cart operation. +The input fields to issue arbitrary charges for app usage associated with a subscription. """ -type CartOperationError { +input AppUsagePricingInput { """ - The error code. + The maximum amount of usage charges that can be incurred within a subscription billing interval. """ - code: String! + cappedAmount: MoneyInput! """ - The error message. + The terms and conditions for app usage. These terms stipulate the pricing model for the charges that an app creates. """ - message: String + terms: String! } """ -The input fields for updating the payment method that will be used to checkout. +Store usage for app subscriptions with usage pricing. """ -input CartPaymentInput { +type AppUsageRecord implements Node { """ - The amount that the customer will be charged at checkout. + The date and time when the usage record was created. """ - amount: MoneyInput! + createdAt: DateTime! """ - An ID of the order placed on the originating platform. - Note that this value doesn't correspond to the Shopify Order ID. + The description of the app usage record. """ - sourceIdentifier: String + description: String! """ - The input fields to use to checkout a cart without providing a payment method. - Use this payment method input if the total cost of the cart is 0. + A globally-unique ID. """ - freePaymentMethod: CartFreePaymentMethodInput + id: ID! + + """ + A unique key generated by the client to avoid duplicate charges. + """ + idempotencyKey: String """ - The input fields to use when checking out a cart with a direct payment method (like a credit card). + The price of the usage record. """ - directPaymentMethod: CartDirectPaymentMethodInput + price: MoneyV2! """ - The input fields to use when checking out a cart with a wallet payment method (like Shop Pay or Apple Pay). + Defines the usage pricing plan the merchant is subscribed to. """ - walletPaymentMethod: CartWalletPaymentMethodInput + subscriptionLineItem: AppSubscriptionLineItem! } """ -Return type for `cartPaymentUpdate` mutation. +An auto-generated type for paginating through multiple AppUsageRecords. """ -type CartPaymentUpdatePayload { +type AppUsageRecordConnection { """ - The updated cart. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - cart: Cart + edges: [AppUsageRecordEdge!]! """ - The list of errors that occurred from executing the mutation. + A list of nodes that are contained in AppUsageRecordEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - userErrors: [CartUserError!]! + nodes: [AppUsageRecord!]! """ - A list of warnings that occurred during the mutation. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - warnings: [CartWarning!]! + pageInfo: PageInfo! } """ -A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. -Preferences are not synced back to the cart if they are overwritten. +Return type for `appUsageRecordCreate` mutation. """ -type CartPreferences { +type AppUsageRecordCreatePayload { """ - Delivery preferences can be used to prefill the delivery section in at checkout. + The newly created app usage record. """ - delivery: CartDeliveryPreference + appUsageRecord: AppUsageRecord """ - Wallet preferences are used to populate relevant payment fields in the checkout flow. - Accepted value: `["shop_pay"]`. + The list of errors that occurred from executing the mutation. """ - wallet: [String!] + userErrors: [UserError!]! } """ -The input fields represent preferences for the buyer that is interacting with the cart. +An auto-generated type which holds one AppUsageRecord and a cursor during pagination. """ -input CartPreferencesInput { +type AppUsageRecordEdge { """ - Delivery preferences can be used to prefill the delivery section in at checkout. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - delivery: CartDeliveryPreferenceInput + cursor: String! """ - Wallet preferences are used to populate relevant payment fields in the checkout flow. - Accepted value: `["shop_pay"]`. - - The input must not contain more than `250` values. + The item at the end of AppUsageRecordEdge. """ - wallet: [String!] + node: AppUsageRecord! } """ -Return type for `cartPrepareForCompletion` mutation. +The set of valid sort keys for the AppUsageRecord query. """ -type CartPrepareForCompletionPayload { +enum AppUsageRecordSortKeys { """ - The result of cart preparation for completion. + Sort by the `created_at` value. """ - result: CartPrepareForCompletionResult + CREATED_AT """ - The list of errors that occurred from executing the mutation. + Sort by the `id` value. """ - userErrors: [CartUserError!]! + ID } """ -The result of cart preparation. -""" -union CartPrepareForCompletionResult = CartStatusNotReady|CartStatusReady|CartThrottled - -""" -Return type for `cartRemovePersonalData` mutation. +The Apple mobile platform application. """ -type CartRemovePersonalDataPayload { +type AppleApplication { """ - The updated cart. + The iOS App Clip application ID. """ - cart: Cart + appClipApplicationId: String """ - The list of errors that occurred from executing the mutation. + Whether iOS App Clips are enabled for this app. """ - userErrors: [CartUserError!]! + appClipsEnabled: Boolean! """ - A list of warnings that occurred during the mutation. - """ - warnings: [CartWarning!]! -} - -""" -A selectable delivery address for a cart. -""" -type CartSelectableAddress { - """ - The delivery address. + The iOS App ID. """ - address: CartAddress! + appId: String """ - A unique identifier for the address, specific to this cart. + A globally-unique ID. """ id: ID! """ - This delivery address will not be associated with the buyer after a successful checkout. + Whether iOS shared web credentials are enabled for this app. """ - oneTimeUse: Boolean! + sharedWebCredentialsEnabled: Boolean! """ - Sets exactly one address as pre-selected for the buyer. + Whether iOS Universal Links are supported by this app. """ - selected: Boolean! + universalLinksEnabled: Boolean! } """ -The input fields for a selectable delivery address to present to the buyer. Used by [`CartDeliveryInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartDeliveryInput) when creating a cart with the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. +An article that contains content, author information, and metadata. Articles belong to a [`Blog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog) and can include HTML-formatted body text, summary text, and an associated image. Merchants publish articles to share content, drive traffic, and engage customers. -You can pre-select an address for the buyer, mark it as one-time use so it isn't saved after checkout, and specify how strictly the address should be validated. +Articles can be organized with tags and published immediately or scheduled for future publication using the [`publishedAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article#field-Article.fields.publishedAt) timestamp. The API manages comments on articles when the blog's comment policy enables them. """ -input CartSelectableAddressInput { +type Article implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { """ - Exactly one kind of delivery address. + The name of the author of the article. """ - address: CartAddressInput! + author: ArticleAuthor """ - Sets exactly one address as pre-selected for the buyer. + The blog containing the article. """ - selected: Boolean + blog: Blog! """ - When true, this delivery address will not be associated with the buyer after a successful checkout. + The text of the article's body, complete with HTML markup. """ - oneTimeUse: Boolean + body: HTML! """ - Defines what kind of address validation is requested. + List of the article's comments. """ - validationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY -} + comments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the comment was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| published_at | time | Filter by the date and time when the comment was published. | | | - `published_at:>'2020-10-21T23:39:20Z'`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter by published status | - `any`
- `published`
- `unpublished` | | - `published_status:any`
- `published_status:published`
- `published_status:unpublished` |\n| status | string |\n| updated_at | time | Filter by the date and time when the comment was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CommentConnection! -""" -The input fields to update a line item on a cart. -""" -input CartSelectableAddressUpdateInput { """ - The id of the selectable address. + Count of comments. Limited to a maximum of 10000 by default. """ - id: ID! + commentsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the comment was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| published_at | time | Filter by the date and time when the comment was published. | | | - `published_at:>'2020-10-21T23:39:20Z'`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter by published status | - `any`
- `published`
- `unpublished` | | - `published_status:any`
- `published_status:published`
- `published_status:unpublished` |\n| status | string |\n| updated_at | time | Filter by the date and time when the comment was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count """ - Exactly one kind of delivery address. + The date and time (ISO 8601 format) when the article was created. """ - address: CartAddressInput + createdAt: DateTime! """ - Sets exactly one address as pre-selected for the buyer. + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. """ - selected: Boolean + defaultCursor: String! """ - When true, this delivery address will not be associated with the buyer after a successful checkout. + The paginated list of events associated with the host subject. """ - oneTimeUse: Boolean + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! """ - Defines what kind of address validation is requested. + A unique, human-friendly string for the article that's automatically generated from the article's title. + The handle is used in the article's URL. """ - validationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY -} + handle: String! -""" -The input fields for updating the selected delivery options for a delivery group. -""" -input CartSelectedDeliveryOptionInput { """ - The ID of the cart delivery group. + A globally-unique ID. """ - deliveryGroupId: ID! + id: ID! """ - The handle of the selected delivery option. + The image associated with the article. """ - deliveryOptionHandle: String! -} + image: Image -""" -Return type for `cartSelectedDeliveryOptionsUpdate` mutation. -""" -type CartSelectedDeliveryOptionsUpdatePayload { """ - The updated cart. + Whether or not the article is visible. """ - cart: Cart + isPublished: Boolean! """ - The list of errors that occurred from executing the mutation. + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. """ - userErrors: [CartUserError!]! + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield """ - A list of warnings that occurred during the mutation. + List of metafield definitions. """ - warnings: [CartWarning!]! -} + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") -""" -Cart is not ready for payment update and completion. -""" -type CartStatusNotReady { """ - The result of cart preparation for completion. + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. """ - cart: Cart + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! """ - The list of errors that caused the cart to not be ready for payment update and completion. + The date and time (ISO 8601 format) when the article became or will become visible. + Returns null when the article isn't visible. """ - errors: [CartOperationError!]! -} + publishedAt: DateTime -""" -Cart is ready for payment update and completion. -""" -type CartStatusReady { """ - The result of cart preparation for completion. + A summary of the article, which can include HTML markup. + The summary is used by the online store theme to display the article on other pages, such as the home page or the main blog page. """ - cart: Cart -} + summary: HTML -""" -Return type for `cartSubmitForCompletion` mutation. -""" -type CartSubmitForCompletionPayload { """ - The result of cart submission for completion. + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. """ - result: CartSubmitForCompletionResult + tags: [String!]! """ - The list of errors that occurred from executing the mutation. + The name of the template an article is using if it's using an alternate template. + If an article is using the default `article.liquid` template, then the value returned is `null`. """ - userErrors: [CartUserError!]! -} + templateSuffix: String -""" -The result of cart submit completion. -""" -union CartSubmitForCompletionResult = SubmitAlreadyAccepted|SubmitFailed|SubmitSuccess|SubmitThrottled + """ + The title of the article. + """ + title: String! -""" -Response signifying that the access to cart request is currently being throttled. -The client can retry after `poll_after`. -""" -type CartThrottled { """ - The result of cart preparation for completion. + The published translations associated with the resource. """ - cart: Cart + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! """ - The polling delay. + The date and time (ISO 8601 format) when the article was last updated. """ - pollAfter: DateTime! + updatedAt: DateTime } """ -Represents an error that happens during execution of a cart mutation. +Represents the author of an article. This object provides the author's full name for attribution purposes. + +The `ArticleAuthor` is a simple object that contains only the author's name field. When articles are created or updated, the author information is stored and can be displayed alongside the article content. + +Use the `ArticleAuthor` object to: +- Retrieve the author's name for display in article bylines +- Show author attribution in article listings +- Display who wrote specific content + +Note: This object only contains the author's full name. It does not include additional author details like bio, email, or social media links. """ -type CartUserError implements DisplayableError { +type ArticleAuthor { """ - The error code. + The author's full name. """ - code: CartErrorCode + name: String! +} +""" +An auto-generated type for paginating through multiple ArticleAuthors. +""" +type ArticleAuthorConnection { """ - The path to the input field that caused the error. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - field: [String!] + edges: [ArticleAuthorEdge!]! """ - The error message. + A list of nodes that are contained in ArticleAuthorEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - message: String! + nodes: [ArticleAuthor!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! } """ -The input fields for submitting wallet payment method information for checkout. +An auto-generated type which holds one ArticleAuthor and a cursor during pagination. """ -input CartWalletPaymentMethodInput { +type ArticleAuthorEdge { """ - The payment method information for the Apple Pay wallet. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - applePayWalletContent: ApplePayWalletContentInput + cursor: String! """ - The payment method information for the Shop Pay wallet. + The item at the end of ArticleAuthorEdge. """ - shopPayWalletContent: ShopPayWalletContentInput + node: ArticleAuthor! } """ -A non-blocking issue that occurred during a cart mutation. Unlike errors, warnings don't prevent the mutation from completing but indicate potential problems that may affect the buyer's experience. +The input fields of a blog when an article is created or updated. +""" +input ArticleBlogInput { + """ + The title of the blog. + """ + title: String! +} -Each warning includes a code identifying the issue type, a human-readable message, and a target ID pointing to the affected resource. """ -type CartWarning { +An auto-generated type for paginating through multiple Articles. +""" +type ArticleConnection { """ - The code of the warning. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - code: CartWarningCode! + edges: [ArticleEdge!]! """ - The message text of the warning. + A list of nodes that are contained in ArticleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - message: String! + nodes: [Article!]! """ - The target of the warning. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - target: ID! + pageInfo: PageInfo! } """ -The code for the cart warning. +The input fields to create an article. """ -enum CartWarningCode { +input ArticleCreateInput { """ - The merchandise does not have enough stock. + The ID of the blog containing the article. """ - MERCHANDISE_NOT_ENOUGH_STOCK + blogId: ID """ - The merchandise is out of stock. + A unique, human-friendly string for the article that's automatically generated from the article's title. + The handle is used in the article's URL. """ - MERCHANDISE_OUT_OF_STOCK + handle: String """ - Gift cards are not available as a payment method. + The text of the article's body, complete with HTML markup. """ - PAYMENTS_GIFT_CARDS_UNAVAILABLE + body: HTML """ - A delivery address with the same details already exists on this cart. + A summary of the article, which can include HTML markup. + The summary is used by the online store theme to display the article on other pages, such as the home page or the main blog page. """ - DUPLICATE_DELIVERY_ADDRESS + summary: HTML """ - The discount code cannot be honored. + Whether or not the article should be visible. """ - DISCOUNT_CODE_NOT_HONOURED + isPublished: Boolean """ - The discount was not found. + The date and time (ISO 8601 format) when the article should become visible. """ - DISCOUNT_NOT_FOUND + publishDate: DateTime """ - The discount is currently inactive. + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default article template is used. """ - DISCOUNT_CURRENTLY_INACTIVE + templateSuffix: String """ - The discount usage limit has been reached. + The input fields to create or update a metafield. """ - DISCOUNT_USAGE_LIMIT_REACHED + metafields: [MetafieldInput!] """ - The customer's discount usage limit has been reached. + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. """ - DISCOUNT_CUSTOMER_USAGE_LIMIT_REACHED + tags: [String!] """ - The customer is not eligible for this discount. + The image associated with the article. """ - DISCOUNT_CUSTOMER_NOT_ELIGIBLE + image: ArticleImageInput """ - An eligible customer is missing for this discount. + The title of the article. """ - DISCOUNT_ELIGIBLE_CUSTOMER_MISSING + title: String! """ - The quantity is not in range for this discount. + The name of the author of the article. """ - DISCOUNT_QUANTITY_NOT_IN_RANGE + author: AuthorInput! +} +""" +Return type for `articleCreate` mutation. +""" +type ArticleCreatePayload { """ - The purchase is not in range for this discount. + The article that was created. """ - DISCOUNT_PURCHASE_NOT_IN_RANGE + article: Article """ - There are no entitled line items for this discount. + The list of errors that occurred from executing the mutation. """ - DISCOUNT_NO_ENTITLED_LINE_ITEMS + userErrors: [ArticleCreateUserError!]! +} +""" +An error that occurs during the execution of `ArticleCreate`. +""" +type ArticleCreateUserError implements DisplayableError { """ - There are no entitled shipping lines for this discount. + The error code. """ - DISCOUNT_NO_ENTITLED_SHIPPING_LINES + code: ArticleCreateUserErrorCode """ - The purchase type is incompatible with this discount. + The path to the input field that caused the error. """ - DISCOUNT_INCOMPATIBLE_PURCHASE_TYPE + field: [String!] """ - Only one-time purchase is available for B2B orders. + The error message. """ - MERCHANDISE_SELLING_PLAN_NOT_APPLICABLE_ON_COMPANY_LOCATION + message: String! } """ -A filter used to view a subset of products in a collection matching a specific category value. +Possible error codes that can be returned by `ArticleCreateUserError`. """ -input CategoryFilter { +enum ArticleCreateUserErrorCode { """ - The id of the category to filter on. + Can't create an article author if both author name and user ID are supplied. """ - id: String! -} + AMBIGUOUS_AUTHOR -""" -A group of products [organized by a merchant](https://help.shopify.com/manual/products/collections) to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria. + """ + Can't create a blog from input if a blog ID is supplied. + """ + AMBIGUOUS_BLOG -Query a collection's products with [filtering options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) like availability, price range, vendor, and tags. Each collection includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, an optional [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image), and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). -""" -type Collection implements HasMetafields & Node & OnlineStorePublishable & Trackable { """ - Stripped description of the collection, single line with HTML tags removed. + Can't create an article if both author name and user ID are blank. """ - description("Truncates a string after the given length." truncateAt: Int): String! + AUTHOR_FIELD_REQUIRED """ - The description of the collection, complete with HTML formatting. + User must exist if a user ID is supplied. """ - descriptionHtml: HTML! + AUTHOR_MUST_EXIST """ - A human-friendly unique string for the collection automatically generated from its title. - Limit of 255 characters. + Can’t set isPublished to true and also set a future publish date. """ - handle: String! + INVALID_PUBLISH_DATE """ - A globally-unique ID. + Must reference or create a blog when creating an article. """ - id: ID! + BLOG_REFERENCE_REQUIRED """ - Image associated with the collection. + Image upload failed. """ - image: Image + UPLOAD_FAILED """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The input value is blank. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + BLANK """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The record with the ID used as the input value couldn't be found. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + NOT_FOUND """ - The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + The input value is too long. """ - onlineStoreUrl: URL + TOO_LONG """ - List of products in the collection. + The input value is already taken. """ - products("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT, "Returns a subset of products matching all product filters.\n\nThe input must not contain more than `250` values." filters: [ProductFilter!]): ProductConnection! + TAKEN """ - The collection's SEO information. + The input value is invalid. """ - seo: SEO! + INVALID """ - The collection’s name. Limit of 255 characters. + The value is invalid for the metafield type or for the definition options. """ - title: String! + INVALID_VALUE + + """ + The metafield type is invalid. + """ + INVALID_TYPE +} +""" +Return type for `articleDelete` mutation. +""" +type ArticleDeletePayload { """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + The ID of the deleted article. """ - trackingParameters: String + deletedArticleId: ID """ - The date and time when the collection was last modified. + The list of errors that occurred from executing the mutation. """ - updatedAt: DateTime! + userErrors: [ArticleDeleteUserError!]! } """ -An auto-generated type for paginating through multiple Collections. +An error that occurs during the execution of `ArticleDelete`. """ -type CollectionConnection { +type ArticleDeleteUserError implements DisplayableError { """ - A list of edges. + The error code. """ - edges: [CollectionEdge!]! + code: ArticleDeleteUserErrorCode """ - A list of the nodes contained in CollectionEdge. + The path to the input field that caused the error. """ - nodes: [Collection!]! + field: [String!] """ - Information to aid in pagination. + The error message. """ - pageInfo: PageInfo! + message: String! +} +""" +Possible error codes that can be returned by `ArticleDeleteUserError`. +""" +enum ArticleDeleteUserErrorCode { """ - The total count of Collections. + The record with the ID used as the input value couldn't be found. """ - totalCount: UnsignedInt64! + NOT_FOUND } """ -An auto-generated type which holds one Collection and a cursor during pagination. +An auto-generated type which holds one Article and a cursor during pagination. """ -type CollectionEdge { +type ArticleEdge { """ - A cursor for use in pagination. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ cursor: String! """ - The item at the end of CollectionEdge. + The item at the end of ArticleEdge. """ - node: Collection! + node: Article! } """ -The set of valid sort keys for the Collection query. +The input fields for an image associated with an article. """ -enum CollectionSortKeys { +input ArticleImageInput { """ - Sort by the `title` value. + A word or phrase to share the nature or contents of an image. """ - TITLE + altText: String """ - Sort by the `updated_at` value. + The URL of the image. """ - UPDATED_AT + url: String +} +""" +The set of valid sort keys for the Article query. +""" +enum ArticleSortKeys { """ - Sort by the `id` value. + Sort by the `author` value. """ - ID + AUTHOR """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + Sort by the `blog_title` value. """ - RELEVANCE -} - -""" -A string containing a hexadecimal representation of a color. - -For example, "#6A8D48". -""" -scalar Color + BLOG_TITLE -""" -A comment on an article. -""" -type Comment implements Node { """ - The comment’s author. + Sort by the `id` value. """ - author: CommentAuthor! + ID """ - Stripped content of the comment, single line with HTML tags removed. + Sort by the `published_at` value. """ - content("Truncates a string after the given length." truncateAt: Int): String! + PUBLISHED_AT """ - The content of the comment, complete with HTML formatting. + Sort by the `title` value. """ - contentHtml: HTML! + TITLE """ - A globally-unique ID. + Sort by the `updated_at` value. """ - id: ID! + UPDATED_AT } """ -The author of a comment. +Possible sort of tags. """ -type CommentAuthor { +enum ArticleTagSort { """ - The author's email. + Sort alphabetically.. """ - email: String! + ALPHABETICAL """ - The author’s name. + Sort by popularity, starting with the most popular tag. """ - name: String! + POPULAR } """ -An auto-generated type for paginating through multiple Comments. +The input fields to update an article. """ -type CommentConnection { +input ArticleUpdateInput { """ - A list of edges. + The ID of the blog containing the article. """ - edges: [CommentEdge!]! + blogId: ID """ - A list of the nodes contained in CommentEdge. + A unique, human-friendly string for the article that's automatically generated from the article's title. + The handle is used in the article's URL. """ - nodes: [Comment!]! + handle: String """ - Information to aid in pagination. + The text of the article's body, complete with HTML markup. """ - pageInfo: PageInfo! -} + body: HTML -""" -An auto-generated type which holds one Comment and a cursor during pagination. -""" -type CommentEdge { """ - A cursor for use in pagination. + A summary of the article, which can include HTML markup. + The summary is used by the online store theme to display the article on other pages, such as the home page or the main blog page. """ - cursor: String! + summary: HTML """ - The item at the end of CommentEdge. + Whether or not the article should be visible. """ - node: Comment! -} + isPublished: Boolean -""" -A B2B organization that purchases from the shop. In the Storefront API, company information is accessed through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object on [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity), which provides the associated location and contact for the current purchasing context. + """ + The date and time (ISO 8601 format) when the article should become visible. + """ + publishDate: DateTime -You can store custom data using [metafields](https://shopify.dev/docs/apps/build/metafields). -""" -type Company implements HasMetafields & Node { """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify. + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default article template is used. """ - createdAt: DateTime! + templateSuffix: String """ - A unique externally-supplied ID for the company. + The input fields to create or update a metafield. """ - externalId: String + metafields: [MetafieldInput!] """ - A globally-unique ID. + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. """ - id: ID! + tags: [String!] """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The image associated with the article. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + image: ArticleImageInput """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The title of the article. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + title: String """ - The name of the company. + The name of the author of the article. """ - name: String! + author: AuthorInput """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. """ - updatedAt: DateTime! + redirectNewHandle: Boolean = false } """ -A company's main point of contact. +Return type for `articleUpdate` mutation. """ -type CompanyContact implements Node { +type ArticleUpdatePayload { """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was created in Shopify. + The article that was updated. """ - createdAt: DateTime! + article: Article """ - A globally-unique ID. + The list of errors that occurred from executing the mutation. """ - id: ID! + userErrors: [ArticleUpdateUserError!]! +} +""" +An error that occurs during the execution of `ArticleUpdate`. +""" +type ArticleUpdateUserError implements DisplayableError { """ - The company contact's locale (language). + The error code. """ - locale: String + code: ArticleUpdateUserErrorCode """ - The company contact's job title. + The path to the input field that caused the error. """ - title: String + field: [String!] """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was last modified. + The error message. """ - updatedAt: DateTime! + message: String! } """ -A branch or office of a [`Company`](https://shopify.dev/docs/api/storefront/current/objects/Company) where B2B customers can place orders. When a B2B customer selects a location after logging in, the Storefront API contextualizes product queries to return location-specific pricing and quantity rules. - -Access through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object, which associates the location with the buyer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). +Possible error codes that can be returned by `ArticleUpdateUserError`. """ -type CompanyLocation implements HasMetafields & Node { +enum ArticleUpdateUserErrorCode { """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was created in Shopify. + Can't update an article author if both author name and user ID are supplied. """ - createdAt: DateTime! + AMBIGUOUS_AUTHOR """ - A unique externally-supplied ID for the company. + Can't create a blog from input if a blog ID is supplied. """ - externalId: String + AMBIGUOUS_BLOG """ - A globally-unique ID. + User must exist if a user ID is supplied. """ - id: ID! + AUTHOR_MUST_EXIST """ - The preferred locale of the company location. + Can’t set isPublished to true and also set a future publish date. """ - locale: String + INVALID_PUBLISH_DATE """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Image upload failed. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + UPLOAD_FAILED """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The input value is blank. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + BLANK """ - The name of the company location. + The record with the ID used as the input value couldn't be found. """ - name: String! + NOT_FOUND """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was last modified. + The input value is too long. """ - updatedAt: DateTime! -} + TOO_LONG -""" -The action for the 3DS payment redirect. -""" -type CompletePaymentChallenge { """ - The URL for the 3DS payment redirect. + The input value is already taken. + """ + TAKEN + + """ + The input value is invalid. + """ + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The metafield type is invalid. """ - redirectUrl: URL + INVALID_TYPE } """ -An error that occurred during a cart completion attempt. +A custom property. Attributes are used to store additional information about a Shopify resource, such as +products, customers, or orders. Attributes are stored as key-value pairs. + +For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`), +whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date +(`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any +notes provided by the customer (`"customer_notes": "Please leave at the front door"`). """ -type CompletionError { +type Attribute { """ - The error code. + The key or name of the attribute. For example, `"customer_first_order"`. """ - code: CompletionErrorCode! + key: String! """ - The error message. + The value of the attribute. For example, `"true"`. """ - message: String + value: String } """ -The code of the error that occurred during a cart completion attempt. +The input fields for an attribute. """ -enum CompletionErrorCode { - ERROR - - INVENTORY_RESERVATION_ERROR - - PAYMENT_ERROR - - PAYMENT_TRANSIENT_ERROR - - PAYMENT_AMOUNT_TOO_SMALL - - PAYMENT_GATEWAY_NOT_ENABLED_ERROR - - PAYMENT_INSUFFICIENT_FUNDS - - PAYMENT_INVALID_PAYMENT_METHOD - - PAYMENT_INVALID_CURRENCY - - PAYMENT_INVALID_CREDIT_CARD - - PAYMENT_INVALID_BILLING_ADDRESS - - PAYMENT_CARD_DECLINED +input AttributeInput { + """ + Key or name of the attribute. + """ + key: String! - PAYMENT_CALL_ISSUER + """ + Value of the attribute. + """ + value: String! } """ -Represents information about the grouped merchandise in the cart. +The intended audience for the order status page. """ -type ComponentizableCartLine implements BaseCartLine & Node { +enum Audience { """ - An attribute associated with the cart line. + Intended for customer notifications. """ - attribute("The key of the attribute." key: String!): Attribute + CUSTOMERVIEW """ - The attributes associated with the cart line. Attributes are represented as key-value pairs. + Intended for merchant wanting to preview the order status page. Should be used immediately after querying. """ - attributes: [Attribute!]! + MERCHANTVIEW +} +""" +The input fields for an author. Either the `name` or `user_id` fields can be supplied, but never both. +""" +input AuthorInput { """ - The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. + The author's full name. """ - cost: CartLineCost! + name: String """ - The discounts that have been applied to the cart line. + The ID of a staff member's account. """ - discountAllocations: [CartDiscountAllocation!]! + userId: ID +} +""" +Automatic discount applications capture the intentions of a discount that was automatically applied. +""" +type AutomaticDiscountApplication implements DiscountApplication { """ - The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. + The method by which the discount's value is applied to its entitled items. """ - estimatedCost: CartLineEstimatedCost! @deprecated(reason: "Use `cost` instead.") + allocationMethod: DiscountApplicationAllocationMethod! """ - A globally-unique ID. + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. """ - id: ID! + index: Int! """ - The components of the line item. + How the discount amount is distributed on the discounted lines. """ - lineComponents: [CartLine!]! + targetSelection: DiscountApplicationTargetSelection! """ - The merchandise that the buyer intends to purchase. + Whether the discount is applied on line items or shipping lines. """ - merchandise: Merchandise! + targetType: DiscountApplicationTargetType! """ - The quantity of the merchandise that the customer intends to purchase. + The title of the discount application. """ - quantity: Int! + title: String! """ - The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. + The value of the discount application. """ - sellingPlanAllocation: SellingPlanAllocation + value: PricingValue! } """ -Details for count of elements. +The set of valid sort keys for the AutomaticDiscount query. """ -type Count { +enum AutomaticDiscountSortKeys { """ - Count of elements. + Sort by the `created_at` value. """ - count: Int! + CREATED_AT """ - Precision of count, how exact is the value. + Sort by the `id` value. """ - precision: CountPrecision! + ID } """ -The precision of the value returned by a count field. +Represents an object containing all information for channels available to a shop. """ -enum CountPrecision { +type AvailableChannelDefinitionsByChannel { """ - The count is exactly the value. + The channel definitions for channels installed on a shop. """ - EXACT + channelDefinitions: [ChannelDefinition!]! """ - The count is at least the value. A limit was reached. + The name of the channel. """ - AT_LEAST + channelName: String! } """ -A country with localization settings for a storefront. Includes the country's currency, available languages, default language, and unit system (metric or imperial). +The input fields for updating a backup region with exactly one required option. +""" +input BackupRegionUpdateInput { + """ + A country code for the backup region. + """ + countryCode: CountryCode! +} -Access countries through the [localization](https://shopify.dev/docs/api/storefront/current/queries/localization) query, which returns both the list of available countries and the currently active country. Use the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to change the active country context. """ -type Country { +Return type for `backupRegionUpdate` mutation. +""" +type BackupRegionUpdatePayload { """ - The languages available for the country. + Returns the updated backup region. """ - availableLanguages: [Language!]! + backupRegion: MarketRegion """ - The currency of the country. + The list of errors that occurred from executing the mutation. """ - currency: Currency! + userErrors: [MarketUserError!]! +} +""" +The possible types for a badge. +""" +enum BadgeType { """ - The default language for the country. + This badge has type `default`. """ - defaultLanguage: Language! + DEFAULT """ - The ISO code of the country. + This badge has type `success`. """ - isoCode: CountryCode! + SUCCESS """ - The market that includes this country. + This badge has type `attention`. """ - market: Market @deprecated(reason: "This `market` field will be removed in a future version of the API.") + ATTENTION """ - The name of the country. + This badge has type `warning`. """ - name: String! + WARNING """ - The unit system used in the country. + This badge has type `info`. """ - unitSystem: UnitSystem! + INFO + + """ + This badge has type `critical`. + """ + CRITICAL } """ -The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. -If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision -of another country. For example, the territories associated with Spain are represented by the country code `ES`, -and the territories associated with the United States of America are represented by the country code `US`. +The set of valid sort keys for the BalanceTransaction query. """ -enum CountryCode { +enum BalanceTransactionSortKeys { """ - Afghanistan. + Sort by the `amount` value. """ - AF + AMOUNT """ - Åland Islands. + Sort by the `fee` value. """ - AX + FEE """ - Albania. + Sort by the `id` value. """ - AL + ID """ - Algeria. + Sort by the `net` value. """ - DZ + NET """ - Andorra. + Sort by the `order_name` value. """ - AD + ORDER_NAME """ - Angola. + Sort by the `payment_method_name` value. """ - AO + PAYMENT_METHOD_NAME """ - Anguilla. + Sort by the `payout_date` value. """ - AI + PAYOUT_DATE """ - Antigua & Barbuda. + Sort by the `payout_status` value. """ - AG + PAYOUT_STATUS """ - Argentina. + Sort by the `processed_at` value. """ - AR + PROCESSED_AT """ - Armenia. + Sort by the `transaction_type` value. """ - AM + TRANSACTION_TYPE +} +""" +Represents a bank account payment instrument. +""" +type BankAccount { """ - Aruba. + The type of account holder. """ - AW + accountHolderType: BankAccountHolderType! """ - Ascension Island. + The type of bank account. """ - AC + accountType: BankAccountType! """ - Australia. + The name of the bank. """ - AU + bankName: String! """ - Austria. + The billing address associated with the bank account. """ - AT + billingAddress: CustomerPaymentInstrumentBillingAddress """ - Azerbaijan. + The last four digits of the account number. """ - AZ + lastDigits: String! +} +""" +The type of bank account holder. +""" +enum BankAccountHolderType { """ - Bahamas. + A company account holder. """ - BS + COMPANY """ - Bahrain. + An individual account holder. """ - BH + INDIVIDUAL +} +""" +The type of bank account. +""" +enum BankAccountType { """ - Bangladesh. + A checking account. """ - BD + CHECKING """ - Barbados. + A savings account. """ - BB + SAVINGS +} +""" +The valid types of actions a user should be able to perform in an financial app. +""" +enum BankingFinanceAppAccess { """ - Belarus. + Read access in the financial app. """ - BY + READ_ACCESS """ - Belgium. + Ability to perform actions that moves money. """ - BE + MOVE_MONEY """ - Belize. + Indication that the user has restricted money movement. """ - BZ + MONEY_MOVEMENT_RESTRICTED """ - Benin. + Indication that the user has blocked money movement due to MFA disabled. """ - BJ + MONEY_MOVEMENT_BLOCKED_MFA +} +""" +Generic payment details that are related to a transaction. +""" +interface BasePaymentDetails { """ - Bermuda. + The name of payment method used by the buyer. """ - BM + paymentMethodName: String +} - """ - Bhutan. - """ - BT +""" +Basic events chronicle resource activities such as the creation of an article, the fulfillment of an order, or +the addition of a product. + +### General events + +| Action | Description | +|---|---| +| `create` | The item was created. | +| `destroy` | The item was destroyed. | +| `published` | The item was published. | +| `unpublished` | The item was unpublished. | +| `update` | The item was updated. | + +### Order events +Order events can be divided into the following categories: + +- *Authorization*: Includes whether the authorization succeeded, failed, or is pending. +- *Capture*: Includes whether the capture succeeded, failed, or is pending. +- *Email*: Includes confirmation or cancellation of the order, as well as shipping. +- *Fulfillment*: Includes whether the fulfillment succeeded, failed, or is pending. Also includes cancellation, restocking, and fulfillment updates. +- *Order*: Includess the placement, confirmation, closing, re-opening, and cancellation of the order. +- *Refund*: Includes whether the refund succeeded, failed, or is pending. +- *Sale*: Includes whether the sale succeeded, failed, or is pending. +- *Void*: Includes whether the void succeeded, failed, or is pending. + +| Action | Message | Description | +|---|---|---| +| `authorization_failure` | The customer, unsuccessfully, tried to authorize: `{money_amount}`. | Authorization failed. The funds cannot be captured. | +| `authorization_pending` | Authorization for `{money_amount}` is pending. | Authorization pending. | +| `authorization_success` | The customer successfully authorized us to capture: `{money_amount}`. | Authorization was successful and the funds are available for capture. | +| `cancelled` | Order was cancelled by `{shop_staff_name}`. | The order was cancelled. | +| `capture_failure` | We failed to capture: `{money_amount}`. | The capture failed. The funds cannot be transferred to the shop. | +| `capture_pending` | Capture for `{money_amount}` is pending. | The capture is in process. The funds are not yet available to the shop. | +| `capture_success` | We successfully captured: `{money_amount}` | The capture was successful and the funds are now available to the shop. | +| `closed` | Order was closed. | The order was closed. | +| `confirmed` | Received a new order: `{order_number}` by `{customer_name}`. | The order was confirmed. | +| `fulfillment_cancelled` | We cancelled `{number_of_line_items}` from being fulfilled by the third party fulfillment service. | Fulfillment for one or more of the line_items failed. | +| `fulfillment_pending` | We submitted `{number_of_line_items}` to the third party service. | One or more of the line_items has been assigned to a third party service for fulfillment. | +| `fulfillment_success` | We successfully fulfilled line_items. | Fulfillment was successful for one or more line_items. | +| `mail_sent` | `{message_type}` email was sent to the customer. | An email was sent to the customer. | +| `placed` | Order was placed. | An order was placed by the customer. | +| `re_opened` | Order was re-opened. | An order was re-opened. | +| `refund_failure` | We failed to refund `{money_amount}`. | The refund failed. The funds are still with the shop. | +| `refund_pending` | Refund of `{money_amount}` is still pending. | The refund is in process. The funds are still with shop. | +| `refund_success` | We successfully refunded `{money_amount}`. | The refund was successful. The funds have been transferred to the customer. | +| `restock_line_items` | We restocked `{number_of_line_items}`. | One or more of the order's line items have been restocked. | +| `sale_failure` | The customer failed to pay `{money_amount}`. | The sale failed. The funds are not available to the shop. | +| `sale_pending` | The `{money_amount}` is pending. | The sale is in process. The funds are not yet available to the shop. | +| `sale_success` | We successfully captured `{money_amount}`. | The sale was successful. The funds are now with the shop. | +| `update` | `{order_number}` was updated. | The order was updated. | +| `void_failure` | We failed to void the authorization. | Voiding the authorization failed. The authorization is still valid. | +| `void_pending` | Authorization void is pending. | Voiding the authorization is in process. The authorization is still valid. | +| `void_success` | We successfully voided the authorization. | Voiding the authorization was successful. The authorization is no longer valid. | +""" +type BasicEvent implements Event & Node { """ - Bolivia. + The action that occured. """ - BO + action: String! """ - Bosnia & Herzegovina. + Provides additional content for collapsible timeline events. """ - BA + additionalContent: JSON """ - Botswana. + Provides additional data for event consumers. """ - BW + additionalData: JSON """ - Bouvet Island. + The name of the app that created the event. """ - BV + appTitle: String """ - Brazil. + Refers to a certain event and its resources. """ - BR + arguments: JSON """ - British Indian Ocean Territory. + Whether the event was created by an app. """ - IO + attributeToApp: Boolean! """ - Brunei. + Whether the event was caused by an admin user. """ - BN + attributeToUser: Boolean! """ - Bulgaria. + The entity which performed the action that generated the event. """ - BG + author: String """ - Burkina Faso. + The date and time when the event was created. """ - BF + createdAt: DateTime! """ - Burundi. + Whether the event is critical. """ - BI + criticalAlert: Boolean! """ - Cambodia. + Whether this event has additional content. """ - KH + hasAdditionalContent: Boolean! """ - Canada. + A globally-unique ID. """ - CA + id: ID! """ - Cape Verde. + Human readable text that describes the event. """ - CV + message: FormattedString! """ - Caribbean Netherlands. + Human readable text that supports the event message. """ - BQ + secondaryMessage: FormattedString """ - Cayman Islands. + The resource that generated the event. To see a list of possible types, + refer to [HasEvents](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasEvents#implemented-in). """ - KY + subject: HasEvents """ - Central African Republic. + The ID of the resource that generated the event. """ - CF + subjectId: ID! """ - Chad. + The type of the resource that generated the event. """ - TD + subjectType: EventSubjectType! +} + +""" +Represents non-fractional signed whole numeric values. Since the value may exceed the size of a 32-bit integer, it's encoded as a string. +""" +scalar BigInt +""" +Represents an error that happens during the execution of a billing attempt mutation. +""" +type BillingAttemptUserError implements DisplayableError { """ - Chile. + The error code. """ - CL + code: BillingAttemptUserErrorCode """ - China. + The path to the input field that caused the error. """ - CN + field: [String!] """ - Christmas Island. + The error message. """ - CX + message: String! +} +""" +Possible error codes that can be returned by `BillingAttemptUserError`. +""" +enum BillingAttemptUserErrorCode { """ - Cocos (Keeling) Islands. + The input value is invalid. """ - CC + INVALID """ - Colombia. + The input value is blank. """ - CO + BLANK """ - Comoros. + Subscription contract does not exist. """ - KM + CONTRACT_NOT_FOUND """ - Congo - Brazzaville. + Origin time cannot be before the contract creation time. """ - CG + ORIGIN_TIME_BEFORE_CONTRACT_CREATION """ - Congo - Kinshasa. + Billing cycle selector cannot select upcoming billing cycle past limit. """ - CD + UPCOMING_CYCLE_LIMIT_EXCEEDED """ - Cook Islands. + Billing cycle selector cannot select billing cycle outside of index range. """ - CK + CYCLE_INDEX_OUT_OF_RANGE """ - Costa Rica. + Billing cycle selector cannot select billing cycle outside of start date range. """ - CR + CYCLE_START_DATE_OUT_OF_RANGE """ - Croatia. + Origin time needs to be within the selected billing cycle's start and end at date. """ - HR + ORIGIN_TIME_OUT_OF_RANGE """ - Cuba. + Billing cycle charge attempt made more than 24 hours before the billing cycle `billingAttemptExpectedDate`. """ - CU + BILLING_CYCLE_CHARGE_BEFORE_EXPECTED_DATE """ - Curaçao. + Billing cycle must not be skipped. """ - CW + BILLING_CYCLE_SKIPPED """ - Cyprus. + Subscription contract is under review, origin order is high risk and unfulfilled. """ - CY + CONTRACT_UNDER_REVIEW """ - Czechia. + Subscription contract cannot be billed once terminated. """ - CZ + CONTRACT_TERMINATED """ - Côte d’Ivoire. + Subscription contract cannot be billed if paused. """ - CI + CONTRACT_PAUSED """ - Denmark. + Billing attempt rate limit exceeded - try later. """ - DK + THROTTLED """ - Djibouti. + Failed to process the billing attempt. """ - DJ + PROCESSING_FAILED +} + +""" +A blog for publishing articles in the online store. Stores can have multiple blogs to organize content by topic or purpose. +Each blog contains articles with their associated comments, tags, and metadata. The comment policy controls whether readers can post comments and whether moderation is required. Blogs use customizable URL handles and can apply alternate templates for specialized layouts. +""" +type Blog implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { """ - Dominica. + List of the blog's articles. """ - DM + articles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ArticleConnection! """ - Dominican Republic. + Count of articles. Limited to a maximum of 10000 by default. """ - DO + articlesCount("The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count """ - Ecuador. + Indicates whether readers can post comments to the blog and if comments are moderated or not. """ - EC + commentPolicy: CommentPolicy! """ - Egypt. + The date and time when the blog was created. """ - EG + createdAt: DateTime! """ - El Salvador. + The paginated list of events associated with the host subject. """ - SV + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! """ - Equatorial Guinea. + FeedBurner provider details. Any blogs that aren't already integrated with FeedBurner can't use the service. """ - GQ + feed: BlogFeed """ - Eritrea. + A unique, human-friendly string for the blog. If no handle is specified, a handle will be generated automatically from the blog title. + The handle is customizable and is used by the Liquid templating language to refer to the blog. """ - ER + handle: String! """ - Estonia. + A globally-unique ID. """ - EE + id: ID! """ - Eswatini. + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. """ - SZ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield """ - Ethiopia. + List of metafield definitions. """ - ET + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") """ - Falkland Islands. + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. """ - FK + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! """ - Faroe Islands. + A list of tags associated with the 200 most recent blog articles. """ - FO + tags: [String!]! """ - Fiji. + The name of the template a blog is using if it's using an alternate template. + Returns `null` if a blog is using the default blog.liquid template. """ - FJ + templateSuffix: String """ - Finland. + The title of the blog. """ - FI + title: String! """ - France. + The published translations associated with the resource. """ - FR + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! """ - French Guiana. + The date and time when the blog was update. """ - GF + updatedAt: DateTime +} +""" +An auto-generated type for paginating through multiple Blogs. +""" +type BlogConnection { """ - French Polynesia. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - PF + edges: [BlogEdge!]! """ - French Southern Territories. + A list of nodes that are contained in BlogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - TF + nodes: [Blog!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a blog. +""" +input BlogCreateInput { + """ + A unique, human-friendly string for the blog. If no handle is specified, a handle will be generated automatically from the blog title. + The handle is customizable and is used by the Liquid templating language to refer to the blog. + """ + handle: String + + """ + The name of the template a blog is using if it's using an alternate template. + Returns `null` if a blog is using the default blog.liquid template. + """ + templateSuffix: String + + """ + Attaches additional metadata to a store's resources. + """ + metafields: [MetafieldInput!] + + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """ + The title of the blog. + """ + title: String! +} + +""" +Return type for `blogCreate` mutation. +""" +type BlogCreatePayload { + """ + The blog that was created. + """ + blog: Blog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogCreateUserError!]! +} + +""" +An error that occurs during the execution of `BlogCreate`. +""" +type BlogCreateUserError implements DisplayableError { + """ + The error code. + """ + code: BlogCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogCreateUserError`. +""" +enum BlogCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The metafield type is invalid. + """ + INVALID_TYPE +} + +""" +Return type for `blogDelete` mutation. +""" +type BlogDeletePayload { + """ + The ID of the deleted blog. + """ + deletedBlogId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogDeleteUserError!]! +} + +""" +An error that occurs during the execution of `BlogDelete`. +""" +type BlogDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: BlogDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogDeleteUserError`. +""" +enum BlogDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Blog and a cursor during pagination. +""" +type BlogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of BlogEdge. + """ + node: Blog! +} + +""" +RSS feed provider details for blog syndication. This object contains the location and path information for external feed services that were previously integrated with the blog. + +The `BlogFeed` object maintains the feed URL and path to ensure existing feed subscriptions continue working. + +Use the `BlogFeed` object to: +- Access RSS feed provider configuration +- Retrieve feed location and path information +- Maintain existing feed syndication settings + +> Note: +> This is a legacy feature. New integrations with external feed services are not supported. +""" +type BlogFeed { + """ + Blog feed provider url. + """ + location: URL! + + """ + Blog feed provider path. + """ + path: String! +} + +""" +The set of valid sort keys for the Blog query. +""" +enum BlogSortKeys { + """ + Sort by the `handle` value. + """ + HANDLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +The input fields to update a blog. +""" +input BlogUpdateInput { + """ + A unique, human-friendly string for the blog. If no handle is specified, a handle will be generated automatically from the blog title. + The handle is customizable and is used by the Liquid templating language to refer to the blog. + """ + handle: String + + """ + The name of the template a blog is using if it's using an alternate template. + Returns `null` if a blog is using the default blog.liquid template. + """ + templateSuffix: String + + """ + Attaches additional metadata to a store's resources. + """ + metafields: [MetafieldInput!] + + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """ + The title of the blog. + """ + title: String + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false + + """ + Whether to redirect blog posts automatically. + """ + redirectArticles: Boolean = false +} + +""" +Return type for `blogUpdate` mutation. +""" +type BlogUpdatePayload { + """ + The blog that was updated. + """ + blog: Blog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogUpdateUserError!]! +} + +""" +An error that occurs during the execution of `BlogUpdate`. +""" +type BlogUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: BlogUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogUpdateUserError`. +""" +enum BlogUpdateUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is blank. + """ + BLANK + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value isn't included in the list. + """ + INCLUSION +} + +""" +Represents `true` or `false` values. +""" +scalar Boolean + +""" +Possible error codes that can be returned by `BulkMutationUserError`. +""" +enum BulkMutationErrorCode { + """ + The operation did not run because another bulk mutation is already running. [Wait for the operation to finish](https://shopify.dev/api/usage/bulk-operations/imports#wait-for-the-operation-to-finish) before retrying this operation. + """ + OPERATION_IN_PROGRESS + + """ + The operation did not run because the mutation is invalid. Check your mutation syntax and try again. + """ + INVALID_MUTATION + + """ + The JSONL file submitted via the `stagedUploadsCreate` mutation is invalid. Update the file and try again. + """ + INVALID_STAGED_UPLOAD_FILE + + """ + The JSONL file could not be found. Try [uploading the file](https://shopify.dev/api/usage/bulk-operations/imports#generate-the-uploaded-url-and-parameters) again, and check that you've entered the URL correctly for the `stagedUploadPath` mutation argument. + """ + NO_SUCH_FILE + + """ + There was a problem reading the JSONL file. This error might be intermittent, so you can try performing the same query again. + """ + INTERNAL_FILE_SERVER_ERROR + + """ + Bulk operations limit reached. Please try again later. + """ + LIMIT_REACHED +} + +""" +Represents an error that happens during execution of a bulk mutation. +""" +type BulkMutationUserError implements DisplayableError { + """ + The error code. + """ + code: BulkMutationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An asynchronous operation that exports large datasets or imports data in bulk. Create bulk operations using [bulkOperationRunQuery](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunQuery) to export data or [bulkOperationRunMutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunMutation) to import data. + +After creation, check the [`status`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.status) field to track progress. When completed, the [`url`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.url) field contains a link to download results in [JSONL](http://jsonlines.org/) format. The [`objectCount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.objectCount) field shows the running total of processed objects, while [`rootObjectCount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.rootObjectCount) tracks only root-level objects in nested queries. + +If an operation fails but retrieves partial data, then the [`partialDataUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.partialDataUrl) field provides access to incomplete results. + +> Note: `url` and `partialDataUrl` values expire after seven days. + +Learn more about [exporting](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [importing](https://shopify.dev/docs/api/usage/bulk-operations/imports) data in bulk. +""" +type BulkOperation implements Node { + """ + When the bulk operation was successfully completed. + """ + completedAt: DateTime + + """ + When the bulk operation was created. + """ + createdAt: DateTime! + + """ + Error code for failed operations. + """ + errorCode: BulkOperationErrorCode + + """ + File size in bytes of the file in the `url` field. + """ + fileSize: UnsignedInt64 + + """ + A globally-unique ID. + """ + id: ID! + + """ + A running count of all the objects processed. + For example, when fetching all the products and their variants, this field counts both products and variants. + This field can be used to track operation progress. + """ + objectCount: UnsignedInt64! + + """ + The URL that points to the partial or incomplete response data (in [JSONL](http://jsonlines.org/) format) that was returned by a failed operation. + The URL expires 7 days after the operation fails. Returns `null` when there's no data available. + """ + partialDataUrl: URL + + """ + GraphQL query document specified in `bulkOperationRunQuery`. + """ + query: String! + + """ + A running count of all the objects that are processed at the root of the query. + For example, when fetching all the products and their variants, this field only counts products. + This field can be used to track operation progress. + """ + rootObjectCount: UnsignedInt64! + + """ + Status of the bulk operation. + """ + status: BulkOperationStatus! + + """ + The bulk operation's type. + """ + type: BulkOperationType! + + """ + The URL that points to the response data in [JSONL](http://jsonlines.org/) format. + The URL expires 7 days after the operation completes. + """ + url: URL +} + +""" +Return type for `bulkOperationCancel` mutation. +""" +type BulkOperationCancelPayload { + """ + The bulk operation to be canceled. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple BulkOperations. +""" +type BulkOperationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [BulkOperationEdge!]! + + """ + A list of nodes that are contained in BulkOperationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [BulkOperation!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one BulkOperation and a cursor during pagination. +""" +type BulkOperationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of BulkOperationEdge. + """ + node: BulkOperation! +} + +""" +Error codes for failed bulk operations. +""" +enum BulkOperationErrorCode { + """ + The provided operation `query` returned access denied due to missing + [access scopes](https://shopify.dev/api/usage/access-scopes). + Review the requested object permissions and execute the query as a normal non-bulk GraphQL request to see more details. + """ + ACCESS_DENIED + + """ + The operation resulted in partial or incomplete data due to internal server errors during execution. + These errors might be intermittent, so you can try performing the same query again. + """ + INTERNAL_SERVER_ERROR + + """ + The operation resulted in partial or incomplete data due to query timeouts during execution. + In some cases, timeouts can be avoided by modifying your `query` to select fewer fields. + """ + TIMEOUT +} + +""" +Return type for `bulkOperationRunMutation` mutation. +""" +type BulkOperationRunMutationPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkMutationUserError!]! +} + +""" +Return type for `bulkOperationRunQuery` mutation. +""" +type BulkOperationRunQueryPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkOperationUserError!]! +} + +""" +The valid values for the status of a bulk operation. +""" +enum BulkOperationStatus { + """ + The bulk operation has been canceled. + """ + CANCELED + + """ + Cancelation has been initiated on the bulk operation. There may be a short delay from when a cancelation + starts until the operation is actually canceled. + """ + CANCELING + + """ + The bulk operation has successfully completed. + """ + COMPLETED + + """ + The bulk operation has been created. + """ + CREATED + + """ + The bulk operation URL has expired. + """ + EXPIRED + + """ + The bulk operation has failed. For information on why the operation failed, use + [BulkOperation.errorCode](https://shopify.dev/api/admin-graphql/latest/enums/bulkoperationerrorcode). + """ + FAILED + + """ + The bulk operation is running. + """ + RUNNING +} + +""" +The valid values for the bulk operation's type. +""" +enum BulkOperationType { + """ + The bulk operation is a query. + """ + QUERY + + """ + The bulk operation is a mutation. + """ + MUTATION +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing. +""" +type BulkOperationUserError implements DisplayableError { + """ + The error code. + """ + code: BulkOperationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BulkOperationUserError`. +""" +enum BulkOperationUserErrorCode { + """ + A bulk operation is already in progress. + """ + OPERATION_IN_PROGRESS + + """ + The input value is invalid. + """ + INVALID + + """ + Bulk operations limit reached. Please try again later. + """ + LIMIT_REACHED +} + +""" +The set of valid sort keys for the BulkOperations query. +""" +enum BulkOperationsSortKeys { + """ + Sort by the `completed_at` value. + """ + COMPLETED_AT + + """ + Sort by the `created_at` value. + """ + CREATED_AT +} + +""" +Return type for `bulkProductResourceFeedbackCreate` mutation. +""" +type BulkProductResourceFeedbackCreatePayload { + """ + The feedback that's created. + """ + feedback: [ProductResourceFeedback!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkProductResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `BulkProductResourceFeedbackCreate`. +""" +type BulkProductResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: BulkProductResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BulkProductResourceFeedbackCreateUserError`. +""" +enum BulkProductResourceFeedbackCreateUserErrorCode { + """ + The operation was attempted on too many feedback objects. The maximum number of feedback objects that you can operate on is 50. + """ + MAXIMUM_FEEDBACK_LIMIT_EXCEEDED + + """ + The feedback for a later version of this resource was already accepted. + """ + OUTDATED_FEEDBACK + + """ + The product wasn't found or isn't available to the channel. + """ + PRODUCT_NOT_FOUND + + """ + The channel was not found or does not belong to this app. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is blank. + """ + BLANK + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO +} + +""" +The input fields representing the components of a bundle line item. +""" +input BundlesDraftOrderBundleLineItemComponentInput { + """ + The ID of the product variant corresponding to the bundle component. + """ + variantId: ID + + """ + The quantity of the bundle component. + """ + quantity: Int! + + """ + The UUID of the bundle component. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String +} + +""" +Represents the Bundles feature configuration for the shop. +""" +type BundlesFeature { + """ + Whether a shop is configured properly to sell bundles. + """ + eligibleForBundles: Boolean! + + """ + The reason why a shop is not eligible for bundles. + """ + ineligibilityReason: String + + """ + Whether a shop has any fixed bundle products or has a cartTransform function installed. + """ + sellsBundles: Boolean! +} + +""" +Possible error codes that can be returned by `BusinessCustomerUserError`. +""" +enum BusinessCustomerErrorCode { + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The resource wasn't found. + """ + RESOURCE_NOT_FOUND + + """ + Deleting the resource failed. + """ + FAILED_TO_DELETE + + """ + Missing a required field. + """ + REQUIRED + + """ + The input is empty. + """ + NO_INPUT + + """ + The input is invalid. + """ + INVALID_INPUT + + """ + Unexpected type. + """ + UNEXPECTED_TYPE + + """ + The field value is too long. + """ + TOO_LONG + + """ + The number of resources exceeded the limit. + """ + LIMIT_REACHED + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is blank. + """ + BLANK + + """ + The input value is already taken. + """ + TAKEN +} + +""" +An error that happens during the execution of a business customer mutation. +""" +type BusinessCustomerUserError implements DisplayableError { + """ + The error code. + """ + code: BusinessCustomerErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A legal entity through which a merchant operates. Each business entity contains its own [`BusinessEntityAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntityAddress), company information, and can be associated with its own [`ShopifyPaymentsAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsAccount). [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) objects can be assigned to a business entity to determine payment processing and [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) attribution. + +Every shop must have one primary business entity. Additional entities enable international operations by establishing legal presence in multiple countries. + +Learn more about [managing multiple legal entities](https://shopify.dev/docs/apps/build/markets/multiple-entities). +""" +type BusinessEntity implements Node { + """ + The address of the merchant's Business Entity. + """ + address: BusinessEntityAddress! + + """ + Whether the Business Entity is archived from the shop. + """ + archived: Boolean! + + """ + The name of the company associated with the merchant's Business Entity. + """ + companyName: String + + """ + The display name of the merchant's Business Entity. + """ + displayName: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether it's the merchant's primary Business Entity. + """ + primary: Boolean! + + """ + Returns the Shopify Payments account information for the shop. Includes current balances across all currencies, payout schedules, and bank account configurations. + + The account includes [`ShopifyPaymentsBalanceTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction) records showing charges, refunds, and adjustments that affect your balance. Also includes [`ShopifyPaymentsDispute`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsDispute) records and [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) history between the account and connected [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount) configurations. + """ + shopifyPaymentsAccount: ShopifyPaymentsAccount +} + +""" +Represents the address of a merchant's Business Entity. +""" +type BusinessEntityAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The country code of the merchant's Business Entity. + """ + countryCode: CountryCode! + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Settings describing the behavior of checkout for a B2B buyer. +""" +type BuyerExperienceConfiguration { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean! + + """ + The portion required to be paid at checkout. + """ + deposit: DepositConfiguration + + """ + Whether to allow customers to use editable shipping addresses. + """ + editableShippingAddress: Boolean! + + """ + Whether a buyer must pay at checkout or they can also choose to pay + later using net terms. + """ + payNowOnly: Boolean! @deprecated(reason: "Please use `checkoutToDraft`(must be false) and `paymentTermsTemplate`(must be nil) to derive this instead.") + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplate: PaymentTermsTemplate +} + +""" +The input fields specifying the behavior of checkout for a B2B buyer. +""" +input BuyerExperienceConfigurationInput { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplateId: ID + + """ + Whether to allow customers to edit their shipping address at checkout. + """ + editableShippingAddress: Boolean + + """ + The input fields configuring the deposit a B2B buyer. + """ + deposit: DepositInput +} + +""" +The input fields for a buyer signal. +""" +input BuyerSignalInput { + """ + The country code of the buyer. + """ + countryCode: CountryCode! +} + +""" +The input fields for exchange line items on a calculated return. +""" +input CalculateExchangeLineItemInput { + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID + + """ + The quantity of the item to be added. + """ + quantity: Int! + + """ + The discount to be applied to the exchange line item. + """ + appliedDiscount: ExchangeLineItemAppliedDiscountInput +} + +""" +The input fields to calculate return amounts associated with an order. +""" +input CalculateReturnInput { + """ + The ID of the order that will be returned. + """ + orderId: ID! + + """ + The line items from the order to include in the return. + """ + returnLineItems: [CalculateReturnLineItemInput!] = [] + + """ + The exchange line items to add to the order. + """ + exchangeLineItems: [CalculateExchangeLineItemInput!] = [] + + """ + The return shipping fee associated with the return. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for return line items on a calculated return. +""" +input CalculateReturnLineItemInput { + """ + The ID of the fulfillment line item to be returned. + """ + fulfillmentLineItemId: ID! + + """ + The restocking fee for the return line item. + """ + restockingFee: RestockingFeeInput + + """ + The quantity of the item to be returned. + """ + quantity: Int! +} + +""" +A discount that is automatically applied to an order that is being edited. +""" +type CalculatedAutomaticDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An amount discounting the line that has been allocated by an associated discount application. +""" +type CalculatedDiscountAllocation { + """ + The money amount that's allocated by the discount application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount that the allocated amount originated from. + """ + discountApplication: CalculatedDiscountApplication! +} + +""" +A [discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/discountapplication) involved in order editing that might be newly added or have new changes applied. +""" +interface CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An auto-generated type for paginating through multiple CalculatedDiscountApplications. +""" +type CalculatedDiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedDiscountApplicationEdge!]! + + """ + A list of nodes that are contained in CalculatedDiscountApplicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CalculatedDiscountApplication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedDiscountApplication and a cursor during pagination. +""" +type CalculatedDiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedDiscountApplicationEdge. + """ + node: CalculatedDiscountApplication! +} + +""" +A discount code that is applied to an order that is being edited. +""" +type CalculatedDiscountCodeApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Calculated pricing, taxes, and discounts for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder). Includes the complete financial breakdown with line items, discounts, shipping costs, tax calculations, and totals in both shop and presentment currencies. + +Available [`ShippingRate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingRate) options are included when a valid shipping address and line items are present. + +> Note: +> Returns alerts and warnings when issues occur during calculation, such as insufficient inventory or incompatible discounts. +""" +type CalculatedDraftOrder { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + The list of alerts raised while calculating. + """ + alerts: [ResourceAlert!]! + + """ + Whether all variant prices have been overridden. + """ + allVariantPricesOverridden: Boolean! + + """ + Whether any variant prices have been overridden. + """ + anyVariantPricesOverridden: Boolean! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The available shipping rates. + Requires a customer with a valid shipping address and at least one line item. + """ + availableShippingRates: [ShippingRate!]! + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The list of the line items in the calculated draft order. + """ + lineItems: [CalculatedDraftOrderLineItem!]! + + """ + A subtotal of the line items and corresponding discounts, + excluding shipping charges, shipping discounts, taxes, or order discounts. + """ + lineItemsSubtotalPrice: MoneyBag! + + """ + The name of the selected market. + """ + marketName: String! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The selected country code that determines the pricing. + """ + marketRegionCountryCode: CountryCode! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The subtotal, in shop currency, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The calculated line item for a draft order. +""" +type CalculatedDraftOrderLineItem { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The bundle components of the draft order line item. + """ + bundleComponents: [CalculatedDraftOrderLineItem!]! @deprecated(reason: "Use `components` instead.") + + """ + The components of the draft order line item. + """ + components: [CalculatedDraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """ + The total price with discounts applied. + """ + discountedTotal: MoneyV2! + + """ + The total price with discounts applied. + """ + discountedTotalSet: MoneyBag! + + """ + The unit price with discounts applied. + """ + discountedUnitPrice: MoneyV2! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + The unit price with discounts applied. + """ + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The image associated with the draft order line item. + """ + image: Image + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The name of the product. + """ + name: String! + + """ + The total price, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: MoneyV2! + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """ + The line item price without any discounts applied. + """ + originalUnitPrice: MoneyV2! + + """ + The price without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The original custom line item input price. + """ + originalUnitPriceWithCurrency: MoneyV2 + + """ + The price override for the line item. + """ + priceOverride: MoneyV2 + + """ + The product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total value of the discount. + """ + totalDiscount: MoneyV2! + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +A calculated exchange line item. +""" +type CalculatedExchangeLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + The unit price of the exchange line item after discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID + + """ + The original unit price of the exchange line item before discounts. + """ + originalUnitPriceSet: MoneyBag! + + """ + The quantity being exchanged. + """ + quantity: Int! + + """ + The calculated subtotal set of the exchange line item, including discounts. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the exchange line item. + """ + totalTaxSet: MoneyBag! + + """ + The variant being exchanged. + """ + variant: ProductVariant +} + +""" +A line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! @deprecated(reason: "Use `calculatedDiscountAllocations` instead.") + + """ + The price of a single quantity of the line item with line item discounts applied, in shop and presentment currencies. Discounts applied to the entire order aren't included in this price. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The total number of items that can be edited. + """ + editableQuantity: Int! + + """ + The editable quantity prior to any changes made in the current edit. + """ + editableQuantityBeforeChanges: Int! + + """ + The total price of editable lines in shop and presentment currencies. + """ + editableSubtotalSet: MoneyBag! + + """ + Whether the calculated line item has a staged discount. + """ + hasStagedLineItemDiscount: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image object associated to the line item's variant. + """ + image: Image + + """ + The variant unit price in shop and presentment currencies, without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The total number of items. + """ + quantity: Int! + + """ + Whether the line item can be restocked or not. + """ + restockable: Boolean! + + """ + Whether the changes on the line item will result in a restock. + """ + restocking: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + A list of changes that affect this line item. + """ + stagedChanges: [OrderStagedChange!]! + + """ + The title of the product. + """ + title: String! + + """ + The total price of uneditable lines in shop and presentment currencies. + """ + uneditableSubtotalSet: MoneyBag! + + """ + The product variant associated with this line item. The value is null for custom line items and items where + the variant has been deleted. + """ + variant: ProductVariant + + """ + The title of the variant. + """ + variantTitle: String +} + +""" +An auto-generated type for paginating through multiple CalculatedLineItems. +""" +type CalculatedLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedLineItemEdge!]! + + """ + A list of nodes that are contained in CalculatedLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CalculatedLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedLineItem and a cursor during pagination. +""" +type CalculatedLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedLineItemEdge. + """ + node: CalculatedLineItem! +} + +""" +Represents a discount that was manually created for an order that is being edited. +""" +type CalculatedManualDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An order during an active edit session with all proposed changes applied but not yet committed. When you begin editing an order with the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) mutation, the system creates a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) that shows how the [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) will look after your changes. The calculated order tracks the original order state and all staged modifications (added or removed [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects, quantity adjustments, discount changes, and [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine) updates). Use the calculated order to preview the financial impact of edits before committing them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + +Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). +""" +type CalculatedOrder implements Node { + """ + Returns only the new discount applications being added to the order in the current edit. + """ + addedDiscountApplications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CalculatedDiscountApplicationConnection! + + """ + Returns only the new line items being added to the order during the current edit. + """ + addedLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CalculatedLineItemConnection! + + """ + Amount of the order-level discount (doesn't contain any line item discounts) in shop and presentment currencies. + """ + cartDiscountAmountSet: MoneyBag + + """ + Whether the changes have been applied and saved to the order. + """ + committed: Boolean! @deprecated(reason: "CalculatedOrder for committed order edits is being deprecated, and this field will also be removed in a future version. See [changelog](https://shopify.dev/changelog/deprecation-notice-calculatedorder-for-committed-order-edits) for more details.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + Returns all items on the order that existed before starting the edit. + Will include any changes that have been made. + Will not include line items added during the current edit. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| editable | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CalculatedLineItemConnection! + + """ + The HTML of the customer notification for the order edit. + """ + notificationPreviewHtml: HTML + + """ + The customer notification title. + """ + notificationPreviewTitle: String! + + """ + The order without any changes applied. + """ + originalOrder: Order! + + """ + Returns the shipping lines on the order that existed before starting the edit. + Will include any changes that have been made as well as shipping lines added during the current edit. + Returns only the first 250 shipping lines. + """ + shippingLines: [CalculatedShippingLine!]! + + """ + List of changes made to the order during the current edit. + """ + stagedChanges("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderStagedChangeConnection! + + """ + The sum of the quantities for the line items that contribute to the order's subtotal. + """ + subtotalLineItemsQuantity: Int! + + """ + The subtotal of the line items, in shop and presentment currencies, after all the discounts are applied. The subtotal doesn't include shipping. The subtotal includes taxes for taxes-included orders and excludes taxes for taxes-excluded orders. + """ + subtotalPriceSet: MoneyBag + + """ + Taxes charged for the line item. + """ + taxLines: [TaxLine!]! + + """ + Total price of the order less the total amount received from the customer in shop and presentment currencies. + """ + totalOutstandingSet: MoneyBag! + + """ + Total amount of the order (includes taxes and discounts) in shop and presentment currencies. + """ + totalPriceSet: MoneyBag! +} + +""" +The calculated costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type CalculatedRestockingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +A calculated return. +""" +type CalculatedReturn { + """ + A list of calculated exchange line items. + """ + exchangeLineItems: [CalculatedExchangeLineItem!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of calculated return line items. + """ + returnLineItems: [CalculatedReturnLineItem!]! + + """ + The calculated return shipping fee. + """ + returnShippingFee: CalculatedReturnShippingFee +} + +""" +A calculated return fee. +""" +interface CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A calculated return line item. +""" +type CalculatedReturnLineItem { + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The restocking fee of the return line item. + """ + restockingFee: CalculatedRestockingFee + + """ + The subtotal of the return line item before order discounts. + """ + subtotalBeforeOrderDiscountsSet: MoneyBag! + + """ + The subtotal of the return line item. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the return line item. + """ + totalTaxSet: MoneyBag! +} + +""" +The calculated cost of the return shipping. +""" +type CalculatedReturnShippingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A discount created by a Shopify script for an order that is being edited. +""" +type CalculatedScriptDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A shipping line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedShippingLine { + """ + A globally-unique ID. + """ + id: ID + + """ + The price of the shipping line when sold and before applying discounts. This field includes taxes if `Order.taxesIncluded` is true. Otherwise, this field doesn't include taxes for the shipping line. + """ + price: MoneyBag! + + """ + The staged status of the shipping line. + """ + stagedStatus: CalculatedShippingLineStagedStatus! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Represents the staged status of a CalculatedShippingLine on a CalculatedOrder. +""" +enum CalculatedShippingLineStagedStatus { + """ + The shipping line has no staged changes associated with it. + """ + NONE + + """ + The shipping line was added as part of the current order edit. + """ + ADDED + + """ + The shipping line was removed as part of the current order edit. + """ + REMOVED +} + +""" +Credit card payment information captured during a transaction. Includes cardholder details, card metadata, verification response codes, and the [`DigitalWallet`](https://shopify.dev/docs/api/admin-graphql/latest/enums/DigitalWallet#valid-values) when used. +""" +type CardPaymentDetails implements BasePaymentDetails { + """ + The response code from the address verification system (AVS). The code is always a single letter. + """ + avsResultCode: String + + """ + The issuer identification number (IIN), formerly known as bank identification number (BIN) of the customer's credit card. This is made up of the first few digits of the credit card number. + """ + bin: String + + """ + The name of the company that issued the customer's credit card. + """ + company: String + + """ + The response code from the credit card company indicating whether the customer entered the card security code, or card verification value, correctly. The code is a single letter or empty string. + """ + cvvResultCode: String + + """ + The month in which the used credit card expires. + """ + expirationMonth: Int + + """ + The year in which the used credit card expires. + """ + expirationYear: Int + + """ + The holder of the credit card. + """ + name: String + + """ + The customer's credit card number, with most of the leading digits redacted. + """ + number: String + + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String + + """ + Digital wallet used for the payment. + """ + wallet: DigitalWallet +} + +""" +Return type for `carrierServiceCreate` mutation. +""" +type CarrierServiceCreatePayload { + """ + The created carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceCreateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceCreate`. +""" +type CarrierServiceCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceCreateUserError`. +""" +enum CarrierServiceCreateUserErrorCode { + """ + Carrier service creation failed. + """ + CARRIER_SERVICE_CREATE_FAILED +} + +""" +Return type for `carrierServiceDelete` mutation. +""" +type CarrierServiceDeletePayload { + """ + The ID of the deleted carrier service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceDelete`. +""" +type CarrierServiceDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceDeleteUserError`. +""" +enum CarrierServiceDeleteUserErrorCode { + """ + Carrier service deletion failed. + """ + CARRIER_SERVICE_DELETE_FAILED +} + +""" +The set of valid sort keys for the CarrierService query. +""" +enum CarrierServiceSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `carrierServiceUpdate` mutation. +""" +type CarrierServiceUpdatePayload { + """ + The updated carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceUpdate`. +""" +type CarrierServiceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceUpdateUserError`. +""" +enum CarrierServiceUpdateUserErrorCode { + """ + Carrier service update failed. + """ + CARRIER_SERVICE_UPDATE_FAILED +} + +""" +A deployed cart transformation function that actively modifies how products appear and behave in customer carts. Cart transforms enable sophisticated merchandising strategies by programmatically merging, expanding, or updating cart line items based on custom business logic. + +Use the `CartTransform` object to: +- Monitor active bundling and cart modification logic +- Track transform function deployment status and configuration +- Manage error handling behavior for cart processing failures +- Coordinate multiple transforms when running complex merchandising strategies +- Analyze transform performance and customer interaction patterns + +Each cart transform links to a specific [Shopify Function](https://shopify.dev/docs/apps/build/functions) that contains the actual cart modification logic. The `blockOnFailure` setting determines whether cart processing should halt when the transform encounters errors, or whether it should allow customers to proceed with unmodified carts. This flexibility ensures merchants can balance feature richness with checkout reliability. + +Transform functions operate during cart updates, product additions, and checkout initiation, providing multiple touchpoints to enhance the shopping experience. They integrate seamlessly with existing cart APIs while extending functionality beyond standard product catalog capabilities. + +The function ID connects to your deployed function code, while the configuration settings control how the transform behaves in different scenarios. Multiple transforms can work together, processing cart modifications in sequence to support complex merchandising workflows. + +Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle), and about the [Cart Transform Function API](https://shopify.dev/docs/api/functions/latest/cart-transform). +""" +type CartTransform implements HasMetafields & Node { + """ + Whether a run failure will block cart and checkout operations. + """ + blockOnFailure: Boolean! + + """ + The ID for the Cart Transform function. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple CartTransforms. +""" +type CartTransformConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CartTransformEdge!]! + + """ + A list of nodes that are contained in CartTransformEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CartTransform!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `cartTransformCreate` mutation. +""" +type CartTransformCreatePayload { + """ + The newly created cart transform function. + """ + cartTransform: CartTransform + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformCreateUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformCreate`. +""" +type CartTransformCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformCreateUserError`. +""" +enum CartTransformCreateUserErrorCode { + """ + Failed to create cart transform due to invalid input. + """ + INPUT_INVALID + + """ + No Shopify Function found for provided function_id. + """ + FUNCTION_NOT_FOUND + + """ + A cart transform function already exists for the provided function_id. + """ + FUNCTION_ALREADY_REGISTERED + + """ + Function does not implement the required interface for this cart_transform function. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Could not create or update metafields. + """ + INVALID_METAFIELDS + + """ + The maximum number of cart transforms per shop has been reached. + """ + MAXIMUM_CART_TRANSFORMS + + """ + Only one of function_id or function_handle can be provided, not both. + """ + MULTIPLE_FUNCTION_IDENTIFIERS + + """ + Either function_id or function_handle must be provided. + """ + MISSING_FUNCTION_IDENTIFIER +} + +""" +Return type for `cartTransformDelete` mutation. +""" +type CartTransformDeletePayload { + """ + The globally-unique ID for the deleted cart transform. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformDelete`. +""" +type CartTransformDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformDeleteUserError`. +""" +enum CartTransformDeleteUserErrorCode { + """ + Could not find cart transform for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +An auto-generated type which holds one CartTransform and a cursor during pagination. +""" +type CartTransformEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CartTransformEdge. + """ + node: CartTransform! +} + +""" +Controls which cart transformation operations apps can perform in your store. This lets you define exactly what types of cart modifications are allowed based on your checkout setup and business needs. + +The eligible operations determine what cart transform functions can accomplish, providing a clear boundary for app capabilities within the store's ecosystem. + +Learn more about [cart transform operations](https://shopify.dev/docs/api/functions/latest/cart-transform#multiple-operations). +""" +type CartTransformEligibleOperations { + """ + The shop is eligible for expand operations. + """ + expandOperation: Boolean! + + """ + The shop is eligible for merge operations. + """ + mergeOperation: Boolean! + + """ + The shop is eligible for update operations. + """ + updateOperation: Boolean! +} + +""" +Provides access to the cart transform feature configuration for the merchant's store. This wrapper object indicates whether cart transformation capabilities are enabled and what operations are available. + +For example, when checking if your app can deploy customized bundle features, you would query this object to confirm cart transforms are supported and review the eligible operations. + +The feature configuration helps apps determine compatibility before attempting to create transform functions. + +Learn more about [cart transformation](https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransform). +""" +type CartTransformFeature { + """ + The cart transform operations eligible for the shop. + """ + eligibleOperations: CartTransformEligibleOperations! +} + +""" +The rounding adjustment applied to total payment or refund received for an Order involving cash payments. +""" +type CashRoundingAdjustment { + """ + The rounding adjustment that can be applied to totalReceived for an Order involving cash payments in shop and presentment currencies. Could be a positive or negative value. Value is 0 if there's no rounding, or for non-cash payments. + """ + paymentSet: MoneyBag! + + """ + The rounding adjustment that can be applied to totalRefunded for an Order involving cash payments in shop and presentment currencies. Could be a positive or negative value. Value is 0 if there's no rounding, or for non-cash refunds. + """ + refundSet: MoneyBag! +} + +""" +Tracks an adjustment to the cash in a cash tracking session for a point of sale device over the course of a shift. +""" +type CashTrackingAdjustment implements Node { + """ + The amount of cash being added or removed. + """ + cash: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The note entered when the adjustment was made. + """ + note: String + + """ + The staff member who made the adjustment. + """ + staffMember: StaffMember! + + """ + The time when the adjustment was made. + """ + time: DateTime! +} + +""" +An auto-generated type for paginating through multiple CashTrackingAdjustments. +""" +type CashTrackingAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingAdjustmentEdge!]! + + """ + A list of nodes that are contained in CashTrackingAdjustmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CashTrackingAdjustment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingAdjustment and a cursor during pagination. +""" +type CashTrackingAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingAdjustmentEdge. + """ + node: CashTrackingAdjustment! +} + +""" +Tracks the balance in a cash drawer for a point of sale device over the course of a shift. +""" +type CashTrackingSession implements Node { + """ + The adjustments made to the cash drawer during this session. + """ + adjustments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AdjustmentsSortKeys = TIME): CashTrackingAdjustmentConnection! + + """ + Whether this session is tracking cash payments. + """ + cashTrackingEnabled: Boolean! + + """ + The cash transactions made during this session. + """ + cashTransactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CashTrackingSessionTransactionsSortKeys = PROCESSED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| kind | string |\n| processed_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): OrderTransactionConnection! + + """ + The counted cash balance when the session was closed. + """ + closingBalance: MoneyV2 + + """ + The note entered when the session was closed. + """ + closingNote: String + + """ + The user who closed the session. + """ + closingStaffMember: StaffMember + + """ + When the session was closed. + """ + closingTime: DateTime + + """ + The expected balance at the end of the session or the expected current balance for sessions that are still open. + """ + expectedBalance: MoneyV2! + + """ + The amount that was expected to be in the cash drawer at the end of the session, calculated after the session was closed. + """ + expectedClosingBalance: MoneyV2 + + """ + The amount expected to be in the cash drawer based on the previous session. + """ + expectedOpeningBalance: MoneyV2 + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location of the point of sale device during this session. + """ + location: Location + + """ + The net cash sales made for the duration of this cash tracking session. + """ + netCashSales: MoneyV2! + + """ + The counted cash balance when the session was opened. + """ + openingBalance: MoneyV2! + + """ + The note entered when the session was opened. + """ + openingNote: String + + """ + The user who opened the session. + """ + openingStaffMember: StaffMember + + """ + When the session was opened. + """ + openingTime: DateTime! + + """ + The register name for the point of sale device that this session is tracking cash for. + """ + registerName: String! + + """ + The sum of all adjustments made during the session, excluding the final adjustment. + """ + totalAdjustments: MoneyV2 + + """ + The sum of all cash refunds for the duration of this cash tracking session. + """ + totalCashRefunds: MoneyV2! + + """ + The sum of all cash sales for the duration of this cash tracking session. + """ + totalCashSales: MoneyV2! + + """ + The total discrepancy for the session including starting and ending. + """ + totalDiscrepancy: MoneyV2 +} + +""" +An auto-generated type for paginating through multiple CashTrackingSessions. +""" +type CashTrackingSessionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingSessionEdge!]! + + """ + A list of nodes that are contained in CashTrackingSessionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CashTrackingSession!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingSession and a cursor during pagination. +""" +type CashTrackingSessionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingSessionEdge. + """ + node: CashTrackingSession! +} + +""" +The set of valid sort keys for the CashTrackingSessionTransactions query. +""" +enum CashTrackingSessionTransactionsSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `processed_at` value. + """ + PROCESSED_AT +} + +""" +The set of valid sort keys for the CashTrackingSessions query. +""" +enum CashTrackingSessionsSortKeys { + """ + Sort by the `closing_time_asc` value. + """ + CLOSING_TIME_ASC + + """ + Sort by the `closing_time_desc` value. + """ + CLOSING_TIME_DESC + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `opening_time_asc` value. + """ + OPENING_TIME_ASC + + """ + Sort by the `opening_time_desc` value. + """ + OPENING_TIME_DESC + + """ + Sort by the `total_discrepancy_asc` value. + """ + TOTAL_DISCREPANCY_ASC + + """ + Sort by the `total_discrepancy_desc` value. + """ + TOTAL_DISCREPANCY_DESC +} + +""" +A list of products with publishing and pricing information. +A catalog can be associated with a specific context, such as a [`Market`](https://shopify.dev/api/admin-graphql/current/objects/market), [`CompanyLocation`](https://shopify.dev/api/admin-graphql/current/objects/companylocation), or [`App`](https://shopify.dev/api/admin-graphql/current/objects/app). + +Catalogs can optionally include a publication to control product visibility and a price list to customize pricing. When a publication isn't associated with a catalog, product availability is determined by the sales channel. +""" +interface Catalog implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Catalogs. +""" +type CatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CatalogEdge!]! + + """ + A list of nodes that are contained in CatalogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Catalog!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for the context in which the catalog's publishing and pricing rules apply. +""" +input CatalogContextInput { + """ + The IDs of the markets to associate to the catalog. + """ + marketIds: [ID!] + + """ + The IDs of the company locations to associate to the catalog. + """ + companyLocationIds: [ID!] +} + +""" +Return type for `catalogContextUpdate` mutation. +""" +type CatalogContextUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +The input fields required to create a catalog. +""" +input CatalogCreateInput { + """ + The name of the catalog. + """ + title: String! + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The context associated with the catalog. + """ + context: CatalogContextInput! + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. Only include this if you need to control which products are visible in the catalog. When omitted, product availability is determined by the sales channel. + """ + publicationId: ID +} + +""" +Return type for `catalogCreate` mutation. +""" +type CatalogCreatePayload { + """ + The newly created catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +A catalog csv operation represents a CSV file import. +""" +type CatalogCsvOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Return type for `catalogDelete` mutation. +""" +type CatalogDeletePayload { + """ + The ID of the deleted catalog. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +An auto-generated type which holds one Catalog and a cursor during pagination. +""" +type CatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CatalogEdge. + """ + node: Catalog! +} + +""" +The set of valid sort keys for the Catalog query. +""" +enum CatalogSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `type` value. + """ + TYPE +} + +""" +The state of a catalog. +""" +enum CatalogStatus { + """ + The catalog is active. + """ + ACTIVE + + """ + The catalog is archived. + """ + ARCHIVED + + """ + The catalog is in draft. + """ + DRAFT +} + +""" +The associated catalog's type. +""" +enum CatalogType { + """ + Not associated to a catalog. + """ + NONE + + """ + Catalogs belonging to apps. + """ + APP + + """ + Catalogs belonging to company locations. + """ + COMPANY_LOCATION + + """ + Catalogs belonging to markets. + """ + MARKET +} + +""" +The input fields used to update a catalog. +""" +input CatalogUpdateInput { + """ + The name of the catalog. + """ + title: String + + """ + The status of the catalog. + """ + status: CatalogStatus + + """ + The context associated with the catalog. + """ + context: CatalogContextInput + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. + """ + publicationId: ID +} + +""" +Return type for `catalogUpdate` mutation. +""" +type CatalogUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +Defines errors encountered while managing a catalog. +""" +type CatalogUserError implements DisplayableError { + """ + The error code. + """ + code: CatalogUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CatalogUserError`. +""" +enum CatalogUserErrorCode { + """ + An app catalog cannot be assigned to a price list. + """ + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + Catalog failed to save. + """ + CATALOG_FAILED_TO_SAVE + + """ + The catalog wasn't found. + """ + CATALOG_NOT_FOUND + + """ + A price list cannot be assigned to the primary market. + """ + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + Quantity price breaks can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_PRICE_BREAKS + + """ + The catalog can't be associated with more than one market. + """ + CANNOT_ADD_MORE_THAN_ONE_MARKET + + """ + A company location catalog outside of a supported plan can only have an archived status. + """ + COMPANY_LOCATION_CATALOG_STATUS_PLAN + + """ + Context driver already assigned to this catalog. + """ + CONTEXT_ALREADY_ASSIGNED_TO_CATALOG + + """ + Cannot save the catalog because the catalog limit for the context was reached. + """ + CONTEXT_CATALOG_LIMIT_REACHED + + """ + The company location could not be found. + """ + COMPANY_LOCATION_NOT_FOUND + + """ + The arguments `contextsToAdd` and `contextsToRemove` must match existing catalog context type. + """ + CONTEXT_DRIVER_MISMATCH + + """ + A country catalog cannot be assigned to a price list. + """ + COUNTRY_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + A country price list cannot be assigned to a catalog. + """ + COUNTRY_PRICE_LIST_ASSIGNMENT + + """ + The catalog context type is invalid. + """ + INVALID_CATALOG_CONTEXT_TYPE + + """ + A market catalog must have an active status. + """ + MARKET_CATALOG_STATUS + + """ + Market not found. + """ + MARKET_NOT_FOUND + + """ + The catalog's market and price list currencies do not match. + """ + MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH + + """ + Market already belongs to another catalog. + """ + MARKET_TAKEN + + """ + The managed country belongs to another catalog. + """ + MANAGED_COUNTRY_BELONGS_TO_ANOTHER_CATALOG + + """ + Must provide exactly one context type. + """ + MUST_PROVIDE_EXACTLY_ONE_CONTEXT_TYPE + + """ + Price list failed to save. + """ + PRICE_LIST_FAILED_TO_SAVE + + """ + Price list not found. + """ + PRICE_LIST_NOT_FOUND + + """ + The price list is currently being modified. Please try again later. + """ + PRICE_LIST_LOCKED + + """ + The catalog context is currently being modified. Please try again later. + """ + CATALOG_CONTEXT_LOCKED + + """ + Publication not found. + """ + PUBLICATION_NOT_FOUND + + """ + Must have `contexts_to_add` or `contexts_to_remove` argument. + """ + REQUIRES_CONTEXTS_TO_ADD_OR_REMOVE + + """ + Can't perform this action on a catalog of this type. + """ + UNSUPPORTED_CATALOG_ACTION + + """ + Cannot create a catalog for an app. + """ + CANNOT_CREATE_APP_CATALOG + + """ + Cannot modify a catalog for an app. + """ + CANNOT_MODIFY_APP_CATALOG + + """ + Cannot delete a catalog for an app. + """ + CANNOT_DELETE_APP_CATALOG + + """ + Cannot create a catalog for a market. + """ + CANNOT_CREATE_MARKET_CATALOG + + """ + Cannot modify a catalog for a market. + """ + CANNOT_MODIFY_MARKET_CATALOG + + """ + Cannot delete a catalog for a market. + """ + CANNOT_DELETE_MARKET_CATALOG + + """ + Managing this catalog is not supported by your plan. + """ + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is blank. + """ + BLANK + + """ + Cannot change context to specified type. + """ + INVALID_CONTEXT_CHANGE +} + +""" +A connection between a Shopify shop and an external selling platform that supports product syndication and optionally order ingestion. Each channel binds a merchant's account on a specific platform — such as Amazon, eBay, Google, or a point-of-sale system — to the shop, establishing the publishing destination for product feeds. + +Sales Channel applications use [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) to establish channels after merchant authentication, and can manage multiple channel connections per app. Each channel is bound to a channel specification that declares the platform's regional coverage, capabilities, and requirements. + +Use channels to manage where catalog items are syndicated, track publication status across platforms, and control [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) visibility for different selling destinations. +""" +type Channel implements Node { + """ + The underlying app used by the channel. + """ + app: App! + + """ + The list of collection publications. Each record represents information about the publication of a collection. + """ + collectionPublicationsV3("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The list of collections published to the channel. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + + """ + A unique, human-readable identifier for the channel within the shop. Set during [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) or auto-generated from the specification handle and account ID. Use with [`channelByHandle`](https://shopify.dev/docs/api/admin-graphql/latest/queries/channelByHandle) for lookups. + """ + handle: String! + + """ + Whether the collection is available to the channel. + """ + hasCollection("The collection ID to check." id: ID!): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the channel. + """ + name: String! + + """ + The menu items for the channel, which also appear as submenu items in the left navigation sidebar in the Shopify admin. + """ + navigationItems: [NavigationItem!]! @deprecated(reason: "Use [AppInstallation.navigationItems](\n https://shopify.dev/api/admin-graphql/current/objects/AppInstallation#field-appinstallation-navigationitems) instead.") + + """ + Home page for the channel. + """ + overviewPath: URL @deprecated(reason: "Use [AppInstallation.launchUrl](\n https://shopify.dev/api/admin-graphql/current/objects/AppInstallation#field-appinstallation-launchurl) instead.") + + """ + The product publications for the products published to the channel. + """ + productPublications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductPublicationConnection! @deprecated(reason: "Use `productPublicationsV3` instead.") + + """ + The list of product publication records for products published to this channel. + """ + productPublicationsV3("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The list of products published to the channel. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductConnection! + + """ + Retrieves the total count of [`products`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) published to a specific sales channel. Limited to a maximum of 10000 by default. + """ + productsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Whether the channel supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Channels. +""" +type ChannelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ChannelEdge!]! + + """ + A list of nodes that are contained in ChannelEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Channel!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A specific selling surface within a [sales channel](https://shopify.dev/docs/apps/build/sales-channels) platform. A channel definition identifies where products can be sold. Definitions can represent entire platforms (like Facebook or TikTok) or specific sales channels within those platforms, such as Instagram Shops, Instagram Shopping, or TikTok Live. + +Each definition includes the parent [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) name and subchannel name to indicate the selling surface hierarchy. +""" +type ChannelDefinition implements Node { + """ + Name of the channel that this sub channel belongs to. + """ + channelName: String! + + """ + Unique string used as a public identifier for the channel definition. + """ + handle: String! + + """ + The unique ID for the channel definition. + """ + id: ID! + + """ + Whether this channel definition represents a marketplace. + """ + isMarketplace: Boolean! + + """ + Name of the sub channel (e.g. Online Store, Instagram Shopping, TikTok Live). + """ + subChannelName: String! + + """ + Icon displayed when showing the channel in admin. + """ + svgIcon: String @deprecated(reason: "Use App.icon instead") +} + +""" +An auto-generated type which holds one Channel and a cursor during pagination. +""" +type ChannelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ChannelEdge. + """ + node: Channel! +} + +""" +Identifies the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) and [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) from which an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) originated. Provides attribution details such as the specific platform (Facebook Marketplace, Instagram Shopping) or marketplace where the order was placed. + +Links to the app that manages the channel and optional [`ChannelDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelDefinition) details that specify the exact sub-channel or selling surface. +""" +type ChannelInformation implements Node { + """ + The app associated with the channel. + """ + app: App! + + """ + The channel definition associated with the channel. + """ + channelDefinition: ChannelDefinition + + """ + The unique ID for the channel. + """ + channelId: ID! + + """ + The publishing destination display name or channel name. + """ + displayName: String + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Creates a unified visual identity for your checkout that keeps customers engaged and reinforces your brand throughout the purchase process. This comprehensive branding system lets you control every visual aspect of checkout, from colors and fonts to layouts and imagery, so your checkout feels like a natural extension of your store. + +For example, a luxury fashion retailer can configure their checkout with custom color palettes, premium typography, rounded corners for a softer feel, and branded imagery that matches their main website aesthetic. + +Use the `Branding` object to: +- Configure comprehensive checkout visual identity +- Coordinate color schemes across all checkout elements +- Apply consistent typography and spacing standards +- Manage background imagery and layout customizations +- Control visibility of various checkout components + +The branding configuration includes design system foundations like color roles, typography scales, and spacing units, plus specific customizations for sections, dividers, and interactive elements. This allows merchants to create cohesive checkout experiences that reinforce their brand identity while maintaining usability standards. + +Different color schemes can be defined for various contexts, ensuring optimal contrast and accessibility across different checkout states and customer preferences. +""" +type CheckoutBranding { + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizations + + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystem +} + +""" +The container background style. +""" +enum CheckoutBrandingBackground { + """ + The Base background style. + """ + BASE + + """ + The Subdued background style. + """ + SUBDUED + + """ + The Transparent background style. + """ + TRANSPARENT +} + +""" +Possible values for the background style. +""" +enum CheckoutBrandingBackgroundStyle { + """ + The Solid background style. + """ + SOLID + + """ + The None background style. + """ + NONE +} + +""" +Possible values for the border. +""" +enum CheckoutBrandingBorder { + """ + The None border. + """ + NONE + + """ + The Block End border. + """ + BLOCK_END + + """ + The Full border. + """ + FULL +} + +""" +The container border style. +""" +enum CheckoutBrandingBorderStyle { + """ + The Base border style. + """ + BASE + + """ + The Dashed border style. + """ + DASHED + + """ + The Dotted border style. + """ + DOTTED +} + +""" +The container border width. +""" +enum CheckoutBrandingBorderWidth { + """ + The Base border width. + """ + BASE + + """ + The Large 100 border width. + """ + LARGE_100 + + """ + The Large 200 border width. + """ + LARGE_200 + + """ + The Large border width. + """ + LARGE +} + +""" +The buttons customizations. +""" +type CheckoutBrandingButton { + """ + The background style used for buttons. + """ + background: CheckoutBrandingBackgroundStyle + + """ + The block padding used for buttons. + """ + blockPadding: CheckoutBrandingSpacing + + """ + The border used for buttons. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The inline padding used for buttons. + """ + inlinePadding: CheckoutBrandingSpacing + + """ + The typography used for buttons. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +Defines the color palette specifically for button elements within checkout branding, including hover states. These color roles ensure buttons maintain proper contrast and visual hierarchy throughout the checkout experience. + +For example, a sports brand might configure bright accent colors for primary action buttons, with darker hover states and contrasting text colors that maintain accessibility standards. + +Use the `ButtonColorRoles` object to: +- Define button color schemes for different states +- Ensure proper contrast for accessibility compliance +- Coordinate button colors with overall brand palette + +Button color roles include background, border, text, icon, accent (for focused states), and decorative elements, plus specific hover state colors that provide clear interactive feedback to customers. +""" +type CheckoutBrandingButtonColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The colors of the button on hover. + """ + hover: CheckoutBrandingColorRoles + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields to set colors for buttons. +""" +input CheckoutBrandingButtonColorRolesInput { + """ + The color of the background. + """ + background: String + + """ + The color of text. + """ + text: String + + """ + The color of borders. + """ + border: String + + """ + The color of icons. + """ + icon: String + + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The colors of the button on hover. + """ + hover: CheckoutBrandingColorRolesInput +} + +""" +The input fields used to update the buttons customizations. +""" +input CheckoutBrandingButtonInput { + """ + The background style used for buttons. + """ + background: CheckoutBrandingBackgroundStyle + + """ + The border used for buttons. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The block padding used for buttons. + """ + blockPadding: CheckoutBrandingSpacing + + """ + The inline padding used for buttons. + """ + inlinePadding: CheckoutBrandingSpacing + + """ + The typography style used for buttons. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +Controls the visibility settings for checkout breadcrumb navigation that shows customers their progress through the purchase journey. This simple customization allows merchants to show or hide the breadcrumb trail based on their checkout flow preferences. + +For example, a single-page checkout experience might hide breadcrumbs to create a more streamlined appearance, while multi-step checkouts can display them to help customers understand their progress. + +The visibility setting provides merchants flexibility in how they present checkout navigation to match their specific user experience strategy. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingBuyerJourney { + """ + An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. +""" +input CheckoutBrandingBuyerJourneyInput { + """ + The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Controls the visibility of cart links displayed during checkout. These links allow customers to return to their cart or continue shopping. + +For example, an electronics store might hide cart links during final checkout steps to reduce distractions, or show them prominently to encourage customers to add accessories before completing their purchase. + +The `CartLink` object provides visibility settings to control when and how these navigation elements appear based on the merchant's checkout flow strategy. +""" +type CheckoutBrandingCartLink { + """ + Whether the cart link is visible at checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Possible values for the cart link content type for the header. +""" +enum CheckoutBrandingCartLinkContentType { + """ + The checkout header content type icon value. + """ + ICON + + """ + The checkout header content type image value. + """ + IMAGE + + """ + The checkout header content type text value. + """ + TEXT +} + +""" +The input fields for updating the cart link customizations at checkout. +""" +input CheckoutBrandingCartLinkInput { + """ + The input to update the visibility of cart links in checkout. This hides the cart icon on one-page and the cart link in the breadcrumbs/buyer journey on three-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Defines the visual styling for checkbox elements throughout the checkout interface, focusing on corner radius customization. This allows merchants to align checkbox appearance with their overall design aesthetic. + +For example, a modern minimalist brand might prefer sharp, square checkboxes while a friendly consumer brand could opt for rounded corners to create a softer, more approachable feel. + +The corner radius setting ensures checkboxes integrate seamlessly with the overall checkout design language and brand identity. +""" +type CheckoutBrandingCheckbox { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields used to update the checkboxes customizations. +""" +input CheckoutBrandingCheckboxInput { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +Controls spacing customization for the grouped variant of choice list components in checkout forms. + +The `ChoiceList` object contains settings specifically for the 'group' variant styling through the [`ChoiceListGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceListGroup) field, which determines the spacing between choice options. +""" +type CheckoutBrandingChoiceList { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroup +} + +""" +Controls the spacing between options in the 'group' variant of [`ChoiceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceList) components. + +This setting adjusts the vertical spacing between choice options to improve readability and visual organization. The spacing value helps create clear separation between options, making it easier for customers to scan and select from available choices. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingChoiceListGroup { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to update the settings that apply to the 'group' variant of ChoiceList. +""" +input CheckoutBrandingChoiceListGroupInput { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to use to update the choice list customizations. +""" +input CheckoutBrandingChoiceListInput { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroupInput +} + +""" +Defines the global color roles for checkout branding. These semantic colors maintain consistency across all checkout elements and provide the foundation for the checkout's visual design system. + +Use global colors to: +- Set brand colors for primary actions and buttons +- Define accent colors for links and interactive elements +- Configure semantic colors for success, warning, and error states +- Apply decorative colors for visual highlights + +For example, a merchant might set their brand blue for primary buttons, green for success messages, amber for warnings, and red for critical errors, creating a consistent color language throughout checkout. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingColorGlobal { + """ + A color used for interaction, like links and focus states. + """ + accent: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, for example **Pay now**, and secondary buttons, for example **Buy again**. + """ + brand: String + + """ + A semantic color used for components that communicate critical content. For example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String + + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires attention. For example, something that might be wrong, but not blocking. + """ + warning: String +} + +""" +The input fields to customize the overall look and feel of the checkout. +""" +input CheckoutBrandingColorGlobalInput { + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires attention. For example, something that might be wrong, but not blocking. + """ + warning: String + + """ + A semantic color used for components that communicate critical content. For example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, such as **Pay now**, and secondary buttons, such as **Buy again**. + """ + brand: String + + """ + A color used for interaction, like links and focus states. + """ + accent: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String +} + +""" +A group of colors used together on a surface. +""" +type CheckoutBrandingColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields for a group of colors used together on a surface. +""" +input CheckoutBrandingColorRolesInput { + """ + The color of the background. + """ + background: String + + """ + The color of text. + """ + text: String + + """ + The color of borders. + """ + border: String + + """ + The color of icons. + """ + icon: String + + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String +} + +""" +A base set of color customizations that's applied to an area of Checkout, from which every component +pulls its colors. +""" +type CheckoutBrandingColorScheme { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRoles + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRoles + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRoles + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRoles +} + +""" +The input fields for a base set of color customizations that's applied to an area of Checkout, from which +every component pulls its colors. +""" +input CheckoutBrandingColorSchemeInput { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRolesInput + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRolesInput + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRolesInput + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRolesInput +} + +""" +The possible color schemes. +""" +enum CheckoutBrandingColorSchemeSelection { + """ + The TRANSPARENT color scheme selection. + """ + TRANSPARENT + + """ + The COLOR_SCHEME1 color scheme selection. + """ + COLOR_SCHEME1 + + """ + The COLOR_SCHEME2 color scheme selection. + """ + COLOR_SCHEME2 + + """ + The COLOR_SCHEME3 color scheme selection. + """ + COLOR_SCHEME3 + + """ + The COLOR_SCHEME4 color scheme selection. + """ + COLOR_SCHEME4 +} + +""" +The color schemes. +""" +type CheckoutBrandingColorSchemes { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorScheme + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorScheme +} + +""" +The input fields for the color schemes. +""" +input CheckoutBrandingColorSchemesInput { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorSchemeInput + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorSchemeInput +} + +""" +The possible colors. +""" +enum CheckoutBrandingColorSelection { + """ + Transparent color selection. + """ + TRANSPARENT +} + +""" +The color settings for global colors and color schemes. +""" +type CheckoutBrandingColors { + """ + A group of global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobal + + """ + A set of color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemes +} + +""" +The input fields used to update the color settings for global colors and color schemes. +""" +input CheckoutBrandingColorsInput { + """ + The input to update global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobalInput + + """ + The input to define color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemesInput +} + +""" +The container's divider customizations. +""" +type CheckoutBrandingContainerDivider { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update a container's divider customizations. +""" +input CheckoutBrandingContainerDividerInput { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The content container customizations. +""" +type CheckoutBrandingContent { + """ + The content container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider +} + +""" +The input fields used to update the content container customizations. +""" +input CheckoutBrandingContentInput { + """ + Divider style and visibility on the content container. + """ + divider: CheckoutBrandingContainerDividerInput +} + +""" +The form controls customizations. +""" +type CheckoutBrandingControl { + """ + The border used for form controls. + """ + border: CheckoutBrandingSimpleBorder + + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls inherit colors from their scheme settings (for example, the main section inherits from `design_system.colors.schemes.scheme1.control` by default). Note that usage of the `customizations.control.color` setting to customize the form control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """ + The corner radius used for form controls. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The label position used for form controls. + """ + labelPosition: CheckoutBrandingLabelPosition +} + +""" +Colors for form controls. +""" +type CheckoutBrandingControlColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The colors of selected controls. + """ + selected: CheckoutBrandingColorRoles + + """ + The color of text. + """ + text: String +} + +""" +The input fields to define colors for form controls. +""" +input CheckoutBrandingControlColorRolesInput { + """ + The color of the background. + """ + background: String + + """ + The color of text. + """ + text: String + + """ + The color of borders. + """ + border: String + + """ + The color of icons. + """ + icon: String + + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The colors of selected controls. + """ + selected: CheckoutBrandingColorRolesInput +} + +""" +The input fields used to update the form controls customizations. +""" +input CheckoutBrandingControlInput { + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls inherit colors from their scheme settings (for example, the main section inherits from `design_system.colors.schemes.scheme1.control` by default). Note that usage of the `customizations.control.color` setting to customize the form control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """ + The corner radius used for form controls. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The border used for form controls. + """ + border: CheckoutBrandingSimpleBorder + + """ + The label position used for form controls. + """ + labelPosition: CheckoutBrandingLabelPosition +} + +""" +The options for customizing the corner radius of checkout-related objects. Examples include the primary +button, the name text fields and the sections within the main area (if they have borders). +Refer to this complete [list](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius#fieldswith) +for objects with customizable corner radii. + +The design system defines the corner radius pixel size for each option. Modify the defaults by setting the +[designSystem.cornerRadius](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingDesignSystemInput#field-checkoutbrandingdesignsysteminput-cornerradius) +input fields. +""" +enum CheckoutBrandingCornerRadius { + """ + The 0px corner radius (square corners). + """ + NONE + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.small. + """ + SMALL + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.base. + """ + BASE + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.large. + """ + LARGE +} + +""" +Define the pixel size of corner radius options. +""" +type CheckoutBrandingCornerRadiusVariables { + """ + The value in pixels for base corner radii. Example: 5. + """ + base: Int + + """ + The value in pixels for large corner radii. Example: 10. + """ + large: Int + + """ + The value in pixels for small corner radii. Example: 3. + """ + small: Int +} + +""" +The input fields used to update the corner radius variables. +""" +input CheckoutBrandingCornerRadiusVariablesInput { + """ + The value in pixels for small corner radii. It should be greater than zero. Example: 3. + """ + small: Int + + """ + The value in pixels for base corner radii. It should be greater than zero. Example: 5. + """ + base: Int + + """ + The value in pixels for large corner radii. It should be greater than zero. Example: 10. + """ + large: Int +} + +""" +A custom font. +""" +type CheckoutBrandingCustomFont implements CheckoutBrandingFont { + """ + Globally unique ID reference to the custom font file. + """ + genericFileId: ID + + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields required to update a custom font group. +""" +input CheckoutBrandingCustomFontGroupInput { + """ + The base font. + """ + base: CheckoutBrandingCustomFontInput! + + """ + The bold font. + """ + bold: CheckoutBrandingCustomFontInput! + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +""" +The input fields required to update a font. +""" +input CheckoutBrandingCustomFontInput { + """ + The font weight. Its value should be between 100 and 900. + """ + weight: Int! + + """ + A globally-unique ID for a font file uploaded via the Files api. + Allowed font types are .woff and .woff2. + """ + genericFileId: ID! +} + +""" +The customizations that apply to specific components or areas of the user interface. +""" +type CheckoutBrandingCustomizations { + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourney + + """ + The checkout cart link customizations. For example, by setting the visibility field to `HIDDEN`, you can hide the cart icon in the header for one-page checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLink + + """ + The checkboxes customizations. + """ + checkbox: CheckoutBrandingCheckbox + + """ + The choice list customizations. + """ + choiceList: CheckoutBrandingChoiceList + + """ + The content container customizations. + """ + content: CheckoutBrandingContent + + """ + The form controls customizations. + """ + control: CheckoutBrandingControl + + """ + The customizations for the page, content, main, and order summary dividers. For example, by setting the borderStyle to `DOTTED`, you can make these dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyle + + """ + The express checkout customizations. + """ + expressCheckout: CheckoutBrandingExpressCheckout + + """ + The favicon image. + """ + favicon: CheckoutBrandingImage + + """ + The footer customizations. + """ + footer: CheckoutBrandingFooter + + """ + The global customizations. + """ + global: CheckoutBrandingGlobal + + """ + The header customizations. + """ + header: CheckoutBrandingHeader + + """ + The Heading Level 1 customizations. + """ + headingLevel1: CheckoutBrandingHeadingLevel + + """ + The Heading Level 2 customizations. + """ + headingLevel2: CheckoutBrandingHeadingLevel + + """ + The Heading Level 3 customizations. + """ + headingLevel3: CheckoutBrandingHeadingLevel + + """ + The main area customizations. + """ + main: CheckoutBrandingMain + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnail + + """ + The order summary customizations. + """ + orderSummary: CheckoutBrandingOrderSummary + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutBrandingButton + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutBrandingButton + + """ + The selects customizations. + """ + select: CheckoutBrandingSelect + + """ + The text fields customizations. + """ + textField: CheckoutBrandingTextField +} + +""" +The input fields used to update the components customizations. +""" +input CheckoutBrandingCustomizationsInput { + """ + The global customizations. + """ + global: CheckoutBrandingGlobalInput + + """ + The header customizations. + """ + header: CheckoutBrandingHeaderInput + + """ + The Heading Level 1 customizations. + """ + headingLevel1: CheckoutBrandingHeadingLevelInput + + """ + The Heading Level 2 customizations. + """ + headingLevel2: CheckoutBrandingHeadingLevelInput + + """ + The Heading Level 3 customizations. + """ + headingLevel3: CheckoutBrandingHeadingLevelInput + + """ + The footer customizations. + """ + footer: CheckoutBrandingFooterInput + + """ + The main area customizations. + """ + main: CheckoutBrandingMainInput + + """ + The order summary customizations. + """ + orderSummary: CheckoutBrandingOrderSummaryInput + + """ + The form controls customizations. + """ + control: CheckoutBrandingControlInput + + """ + The text fields customizations. + """ + textField: CheckoutBrandingTextFieldInput + + """ + The checkboxes customizations. + """ + checkbox: CheckoutBrandingCheckboxInput + + """ + The selects customizations. + """ + select: CheckoutBrandingSelectInput + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutBrandingButtonInput + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutBrandingButtonInput + + """ + The favicon image (must be of PNG format). + """ + favicon: CheckoutBrandingImageInput + + """ + The choice list customizations. + """ + choiceList: CheckoutBrandingChoiceListInput + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnailInput + + """ + The express checkout customizations. + """ + expressCheckout: CheckoutBrandingExpressCheckoutInput + + """ + The content container customizations. + """ + content: CheckoutBrandingContentInput + + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourneyInput + + """ + The input for checkout cart link customizations. For example, by setting the visibility field to `HIDDEN`, you can hide the cart icon in the header for one-page checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLinkInput + + """ + The input for the page, content, main, and order summary dividers customizations. For example, by setting the borderStyle to `DOTTED`, you can make these dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyleInput +} + +""" +The design system allows you to set values that represent specific attributes +of your brand like color and font. These attributes are used throughout the user +interface. This brings consistency and allows you to easily make broad design changes. +""" +type CheckoutBrandingDesignSystem { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColors + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariables + + """ + The typography. + """ + typography: CheckoutBrandingTypography +} + +""" +The input fields used to update the design system. +""" +input CheckoutBrandingDesignSystemInput { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColorsInput + + """ + The typography. + """ + typography: CheckoutBrandingTypographyInput + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariablesInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutBrandingDividerStyle { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The input fields used to update the page, content, main and order summary dividers customizations. +""" +input CheckoutBrandingDividerStyleInput { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The Express Checkout customizations. +""" +type CheckoutBrandingExpressCheckout { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButton +} + +""" +The Express Checkout button customizations. +""" +type CheckoutBrandingExpressCheckoutButton { + """ + The corner radius used for the Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the express checkout customizations. +""" +input CheckoutBrandingExpressCheckoutButtonInput { + """ + The corner radius used for Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the Express Checkout customizations. +""" +input CheckoutBrandingExpressCheckoutInput { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButtonInput +} + +""" +A font. +""" +interface CheckoutBrandingFont { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +A font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +type CheckoutBrandingFontGroup { + """ + The base font. + """ + base: CheckoutBrandingFont + + """ + The bold font. + """ + bold: CheckoutBrandingFont + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy + + """ + The font group name. + """ + name: String +} + +""" +The input fields used to update a font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +input CheckoutBrandingFontGroupInput { + """ + A Shopify font group. + """ + shopifyFontGroup: CheckoutBrandingShopifyFontGroupInput + + """ + A custom font group. + """ + customFontGroup: CheckoutBrandingCustomFontGroupInput +} + +""" +The font loading strategy determines how a font face is displayed after it is loaded or failed to load. +For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display. +""" +enum CheckoutBrandingFontLoadingStrategy { + """ + The font display strategy is defined by the browser user agent. + """ + AUTO + + """ + Gives the font face a short block period and an infinite swap period. + """ + BLOCK + + """ + Gives the font face an extremely small block period and an infinite swap period. + """ + SWAP + + """ + Gives the font face an extremely small block period and a short swap period. + """ + FALLBACK + + """ + Gives the font face an extremely small block period and no swap period. + """ + OPTIONAL +} + +""" +The font size. +""" +type CheckoutBrandingFontSize { + """ + The base font size. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. + """ + ratio: Float +} + +""" +The input fields used to update the font size. +""" +input CheckoutBrandingFontSizeInput { + """ + The base font size. Its value should be between 12.0 and 18.0. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. Its value should be between 1.0 and 1.4. + """ + ratio: Float +} + +""" +A container for the footer section customizations. +""" +type CheckoutBrandingFooter { + """ + The footer alignment. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The selected color scheme of the footer container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The footer content settings. + """ + content: CheckoutBrandingFooterContent + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The footer position. + """ + position: CheckoutBrandingFooterPosition +} + +""" +Possible values for the footer alignment. +""" +enum CheckoutBrandingFooterAlignment { + """ + The checkout footer alignment Start value. + """ + START + + """ + The checkout footer alignment Center value. + """ + CENTER + + """ + The checkout footer alignment End value. + """ + END +} + +""" +The footer content customizations. +""" +type CheckoutBrandingFooterContent { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for footer content customizations. +""" +input CheckoutBrandingFooterContentInput { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields when mutating the checkout footer settings. +""" +input CheckoutBrandingFooterInput { + """ + The input field for setting the footer position customizations. + """ + position: CheckoutBrandingFooterPosition + + """ + The divided setting. + """ + divided: Boolean + + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The input field for setting the footer content customizations. + """ + content: CheckoutBrandingFooterContentInput + + """ + The selected color scheme of the footer container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The padding of the footer container. + """ + padding: CheckoutBrandingSpacingKeyword +} + +""" +Possible values for the footer position. +""" +enum CheckoutBrandingFooterPosition { + """ + The End footer position. + """ + END + + """ + The Inline footer position. + """ + INLINE +} + +""" +The global customizations. +""" +type CheckoutBrandingGlobal { + """ + The global corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobal +} + +""" +Possible choices to override corner radius customizations on all applicable objects. Note that this selection +can only be used to set the override to `NONE` (0px). + +For more customizations options, set the [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) +selection on specific objects while leaving the global corner radius unset. +""" +enum CheckoutBrandingGlobalCornerRadius { + """ + Set the global corner radius override to 0px (square corners). + """ + NONE +} + +""" +The input fields used to update the global customizations. +""" +input CheckoutBrandingGlobalInput { + """ + Select a global corner radius setting that overrides all other [corner radii](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobalInput +} + +""" +The header customizations. +""" +type CheckoutBrandingHeader { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The background image of the header. + """ + banner: CheckoutBrandingImage + + """ + The cart link customizations for 1-page checkout. This field allows to customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLink + + """ + The selected color scheme of the header container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutBrandingLogo + + """ + The padding of the header container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutBrandingHeaderPosition +} + +""" +The possible header alignments. +""" +enum CheckoutBrandingHeaderAlignment { + """ + Start alignment. + """ + START + + """ + Center alignment. + """ + CENTER + + """ + End alignment. + """ + END +} + +""" +The header cart link customizations. +""" +type CheckoutBrandingHeaderCartLink { + """ + The content type for the header back to cart link in 1-page checkout. Setting this to image will render the custom image provided using the image field on the header cart_link object. If no image is provided, the default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The image that's used for the header back to cart link in 1-page checkout when the content type is set to image. + """ + image: Image +} + +""" +The input fields for header cart link customizations. +""" +input CheckoutBrandingHeaderCartLinkInput { + """ + The input for the content type for the header back to cart link in 1-page checkout. Setting this to image will render the custom image provided using the image field on the header cart_link object. If no image is provided, the default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The input for the image that's used for the header back to cart link in 1-page checkout when the content type is set to image. + """ + image: CheckoutBrandingImageInput +} + +""" +The input fields used to update the header customizations. +""" +input CheckoutBrandingHeaderInput { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The header position. + """ + position: CheckoutBrandingHeaderPosition + + """ + The store logo. + """ + logo: CheckoutBrandingLogoInput + + """ + The background image of the header (must not be of SVG format). + """ + banner: CheckoutBrandingImageInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The input for cart link customizations for 1-page checkout. This field allows to customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLinkInput + + """ + The selected color scheme of the header container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The padding of the header container. + """ + padding: CheckoutBrandingSpacingKeyword +} + +""" +The possible header positions. +""" +enum CheckoutBrandingHeaderPosition { + """ + Inline position. + """ + INLINE + + """ + Secondary inline position. + """ + INLINE_SECONDARY + + """ + Start position. + """ + START +} + +""" +The heading level customizations. +""" +type CheckoutBrandingHeadingLevel { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields for heading level customizations. +""" +input CheckoutBrandingHeadingLevelInput { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +A checkout branding image. +""" +type CheckoutBrandingImage { + """ + The image details. + """ + image: Image +} + +""" +The input fields used to update a checkout branding image uploaded via the Files API. +""" +input CheckoutBrandingImageInput { + """ + A globally-unique ID. + """ + mediaImageId: ID +} + +""" +The input fields used to upsert the checkout branding settings. +""" +input CheckoutBrandingInput { + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystemInput + + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizationsInput +} + +""" +Possible values for the label position. +""" +enum CheckoutBrandingLabelPosition { + """ + The Inside label position. + """ + INSIDE + + """ + The Outside label position. + """ + OUTSIDE +} + +""" +The store logo customizations. +""" +type CheckoutBrandingLogo { + """ + The logo image. + """ + image: Image + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update the logo customizations. +""" +input CheckoutBrandingLogoInput { + """ + The logo image (must not be of SVG format). + """ + image: CheckoutBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The main container customizations. +""" +type CheckoutBrandingMain { + """ + The background image of the main container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the main container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The main container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the main sections. + """ + section: CheckoutBrandingMainSection +} + +""" +The input fields used to update the main container customizations. +""" +input CheckoutBrandingMainInput { + """ + The selected color scheme for the main container of the checkout. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background image of the main container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """ + Divider style and visibility on the main container. + """ + divider: CheckoutBrandingContainerDividerInput + + """ + The settings for the main sections. + """ + section: CheckoutBrandingMainSectionInput +} + +""" +The main sections customizations. +""" +type CheckoutBrandingMainSection { + """ + The background style of the main sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the main sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the main sections customizations. +""" +input CheckoutBrandingMainSectionInput { + """ + The selected color scheme for the main sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background style of the main sections. + """ + background: CheckoutBrandingBackground + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The border for the main sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The shadow of the main sections. + """ + shadow: CheckoutBrandingShadow + + """ + The padding of the main sections. + """ + padding: CheckoutBrandingSpacingKeyword +} + +""" +The merchandise thumbnails customizations. +""" +type CheckoutBrandingMerchandiseThumbnail { + """ + The settings for the merchandise thumbnail badge. + """ + badge: CheckoutBrandingMerchandiseThumbnailBadge + + """ + The border used for merchandise thumbnails. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for merchandise thumbnails. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutBrandingObjectFit +} + +""" +The merchandise thumbnail badges customizations. +""" +type CheckoutBrandingMerchandiseThumbnailBadge { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The merchandise thumbnail badge background. +""" +enum CheckoutBrandingMerchandiseThumbnailBadgeBackground { + """ + The Accent background. + """ + ACCENT + + """ + The Base background. + """ + BASE +} + +""" +The input fields used to update the merchandise thumbnail badges customizations. +""" +input CheckoutBrandingMerchandiseThumbnailBadgeInput { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The input fields used to update the merchandise thumbnails customizations. +""" +input CheckoutBrandingMerchandiseThumbnailInput { + """ + The border used for merchandise thumbnails. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for merchandise thumbnails. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutBrandingObjectFit + + """ + The settings for the merchandise thumbnail badge. + """ + badge: CheckoutBrandingMerchandiseThumbnailBadgeInput +} + +""" +Possible values for object fit. +""" +enum CheckoutBrandingObjectFit { + """ + The Contain value for fit. The image is scaled to maintain its aspect ratio while fitting within the containing box. The entire image is made to fill the box, while preserving its aspect ratio, so the image will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box. This is the default value. + """ + CONTAIN + + """ + The Cover value for fit. The image is sized to maintain its aspect ratio while filling the entire containing box. If the image’s aspect ratio does not match the aspect ratio of the containing box, then the object will be clipped to fit. + """ + COVER +} + +""" +The order summary customizations. +""" +type CheckoutBrandingOrderSummary { + """ + The background image of the order summary container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the order summary container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The order summary container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the order summary sections. + """ + section: CheckoutBrandingOrderSummarySection +} + +""" +The input fields used to update the order summary container customizations. +""" +input CheckoutBrandingOrderSummaryInput { + """ + The selected color scheme for the order summary container of the checkout. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background image of the order summary container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """ + Divider style and visibility on the order summary container. + """ + divider: CheckoutBrandingContainerDividerInput + + """ + The settings for the order summary sections. + """ + section: CheckoutBrandingOrderSummarySectionInput +} + +""" +The order summary sections customizations. +""" +type CheckoutBrandingOrderSummarySection { + """ + The background style of the order summary sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the order summary sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the order summary sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the order summary sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the order summary sections customizations. +""" +input CheckoutBrandingOrderSummarySectionInput { + """ + The selected color scheme for the order summary sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background style of the order summary sections. + """ + background: CheckoutBrandingBackground + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The border for the order summary sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutBrandingShadow + + """ + The padding of the order summary sections. + """ + padding: CheckoutBrandingSpacingKeyword +} + +""" +The selects customizations. +""" +type CheckoutBrandingSelect { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the selects customizations. +""" +input CheckoutBrandingSelectInput { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The container shadow. +""" +enum CheckoutBrandingShadow { + """ + The Small 200 shadow. + """ + SMALL_200 + + """ + The Small 100 shadow. + """ + SMALL_100 + + """ + The Base shadow. + """ + BASE + + """ + The Large 100 shadow. + """ + LARGE_100 + + """ + The Large 200 shadow. + """ + LARGE_200 +} + +""" +A Shopify font. +""" +type CheckoutBrandingShopifyFont implements CheckoutBrandingFont { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields used to update a Shopify font group. +""" +input CheckoutBrandingShopifyFontGroupInput { + """ + The Shopify font name from [the list of available fonts](https://shopify.dev/themes/architecture/settings/fonts#available-fonts), such as `Alegreya Sans` or `Anonymous Pro`. + """ + name: String! + + """ + The base font weight. + """ + baseWeight: Int + + """ + The bold font weight. + """ + boldWeight: Int + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +""" +Possible values for the simple border. +""" +enum CheckoutBrandingSimpleBorder { + """ + The None simple border. + """ + NONE + + """ + The Full simple border. + """ + FULL +} + +""" +Possible values for the spacing. +""" +enum CheckoutBrandingSpacing { + """ + The None spacing. + """ + NONE + + """ + The Extra Tight spacing. + """ + EXTRA_TIGHT + + """ + The Tight spacing. + """ + TIGHT + + """ + The Base spacing. + """ + BASE + + """ + The Loose spacing. + """ + LOOSE + + """ + The Extra Loose spacing. + """ + EXTRA_LOOSE +} + +""" +The spacing between UI elements. +""" +enum CheckoutBrandingSpacingKeyword { + """ + The None spacing. + """ + NONE + + """ + The Base spacing. + """ + BASE + + """ + The Small spacing. + """ + SMALL + + """ + The Small 100 spacing. + """ + SMALL_100 + + """ + The Small 200 spacing. + """ + SMALL_200 + + """ + The Small 300 spacing. + """ + SMALL_300 + + """ + The Small 400 spacing. + """ + SMALL_400 + + """ + The Small 500 spacing. + """ + SMALL_500 + + """ + The Large spacing. + """ + LARGE + + """ + The Large 100 spacing. + """ + LARGE_100 + + """ + The Large 200 spacing. + """ + LARGE_200 + + """ + The Large 300 spacing. + """ + LARGE_300 + + """ + The Large 400 spacing. + """ + LARGE_400 + + """ + The Large 500 spacing. + """ + LARGE_500 +} + +""" +The text fields customizations. +""" +type CheckoutBrandingTextField { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the text fields customizations. +""" +input CheckoutBrandingTextFieldInput { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The typography settings used for checkout-related text. Use these settings to customize the +font family and size for primary and secondary text elements. + +Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for further information on typography customization. +""" +type CheckoutBrandingTypography { + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroup + + """ + A font group used for heading components by default. + """ + secondary: CheckoutBrandingFontGroup + + """ + The font size design system (base size in pixels and scaling between different sizes). + """ + size: CheckoutBrandingFontSize +} + +""" +The font selection. +""" +enum CheckoutBrandingTypographyFont { + """ + The primary font. + """ + PRIMARY + + """ + The secondary font. + """ + SECONDARY +} + +""" +The input fields used to update the typography. Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information on how to set these fields. +""" +input CheckoutBrandingTypographyInput { + """ + The font size. + """ + size: CheckoutBrandingFontSizeInput + + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroupInput + + """ + A font group used for heading components by default. + """ + secondary: CheckoutBrandingFontGroupInput +} + +""" +Possible values for the typography kerning. +""" +enum CheckoutBrandingTypographyKerning { + """ + Base or default kerning. + """ + BASE + + """ + Loose kerning, leaving more space than the default in between characters. + """ + LOOSE + + """ + Extra loose kerning, leaving even more space in between characters. + """ + EXTRA_LOOSE +} + +""" +Possible values for the typography letter case. +""" +enum CheckoutBrandingTypographyLetterCase { + """ + All letters are is lower case. + """ + LOWER + + """ + No letter casing applied. + """ + NONE + + """ + Capitalize the first letter of each word. + """ + TITLE + + """ + All letters are uppercase. + """ + UPPER +} + +""" +Possible choices for the font size. + +Note that the value in pixels of these settings can be customized with the +[typography size](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingFontSizeInput) +object. Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information. +""" +enum CheckoutBrandingTypographySize { + """ + The extra small font size. Example: 10px. + """ + EXTRA_SMALL + + """ + The small font size. Example: 12px. + """ + SMALL + + """ + The base font size. Example: 14px. + """ + BASE + + """ + The medium font size. Example: 16px. + """ + MEDIUM + + """ + The large font size. Example: 19px. + """ + LARGE + + """ + The extra large font size. Example: 21px. + """ + EXTRA_LARGE + + """ + The extra extra large font size. Example: 24px. + """ + EXTRA_EXTRA_LARGE +} + +""" +The typography customizations. +""" +type CheckoutBrandingTypographyStyle { + """ + The font. + """ + font: CheckoutBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutBrandingTypographyWeight +} + +""" +The global typography customizations. +""" +type CheckoutBrandingTypographyStyleGlobal { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the global typography customizations. +""" +input CheckoutBrandingTypographyStyleGlobalInput { + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning +} + +""" +The input fields used to update the typography customizations. +""" +input CheckoutBrandingTypographyStyleInput { + """ + The font. + """ + font: CheckoutBrandingTypographyFont + + """ + The font size. + """ + size: CheckoutBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutBrandingTypographyWeight + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning +} + +""" +Possible values for the font weight. +""" +enum CheckoutBrandingTypographyWeight { + """ + The base weight. + """ + BASE + + """ + The bold weight. + """ + BOLD +} + +""" +Return type for `checkoutBrandingUpsert` mutation. +""" +type CheckoutBrandingUpsertPayload { + """ + Returns the new checkout branding settings. + """ + checkoutBranding: CheckoutBranding + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CheckoutBrandingUpsertUserError!]! +} + +""" +An error that occurs during the execution of `CheckoutBrandingUpsert`. +""" +type CheckoutBrandingUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: CheckoutBrandingUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CheckoutBrandingUpsertUserError`. +""" +enum CheckoutBrandingUpsertUserErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +Possible visibility states. +""" +enum CheckoutBrandingVisibility { + """ + The Hidden visibility setting. + """ + HIDDEN + + """ + The Visible visibility setting. + """ + VISIBLE +} + +""" +A checkout profile defines the branding settings and the UI extensions for a store's checkout. A checkout profile could be published or draft. A store might have at most one published checkout profile, which is used to render their live checkout. The store could also have multiple draft profiles that were created, previewed, and published using the admin checkout editor. +""" +type CheckoutProfile implements Node { + """ + The date and time when the checkout profile was created. + """ + createdAt: DateTime! + + """ + The date and time when the checkout profile was last edited. + """ + editedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the checkout profile is published or not. + """ + isPublished: Boolean! + + """ + The profile name. + """ + name: String! + + """ + Whether the checkout profile Thank You Page and Order Status Page are actively using extensibility or not. + """ + typOspPagesActive: Boolean! + + """ + The date and time when the checkout profile was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CheckoutProfiles. +""" +type CheckoutProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CheckoutProfileEdge!]! + + """ + A list of nodes that are contained in CheckoutProfileEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CheckoutProfile!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CheckoutProfile and a cursor during pagination. +""" +type CheckoutProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CheckoutProfileEdge. + """ + node: CheckoutProfile! +} + +""" +The set of valid sort keys for the CheckoutProfile query. +""" +enum CheckoutProfileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `edited_at` value. + """ + EDITED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `is_published` value. + """ + IS_PUBLISHED + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields for adding products to the Combined Listing. +""" +input ChildProductRelationInput { + """ + The ID of the child product. + """ + childProductId: ID! + + """ + The parent option values. + """ + selectedParentOptionValues: [SelectedVariantOptionInput!]! +} + +""" +The set of valid sort keys for the CodeDiscount query. +""" +enum CodeDiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The `Collection` object represents a group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that merchants can organize to make their stores easier to browse and help customers find related products. +Collections serve as the primary way to categorize and display products across +[online stores](https://shopify.dev/docs/apps/build/online-store), +[sales channels](https://shopify.dev/docs/apps/build/sales-channels), and marketing campaigns. + +The `Collection` object provides information to: + +- Organize products by category, season, or promotion. +- Automate product grouping using rules (for example, by tag, type, or price). +- Configure product sorting and display order (for example, alphabetical, best-selling, price, or manual). +- Manage collection visibility and publication across sales channels. +- Add rich descriptions, images, and metadata to enhance discovery. + +> Note: +> Collections are unpublished by default. To make them available to customers, +use the [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish) +mutation after creation. + +Collections can be displayed in a store with Shopify's theme system through [Liquid templates](https://shopify.dev/docs/storefronts/themes/architecture/templates/collection) +and can be customized with [template suffixes](https://shopify.dev/docs/storefronts/themes/architecture/templates/alternate-templates) +for unique layouts. They also support advanced features like translated content, resource feedback, +and contextual publication for location-based catalogs. + +Learn about [using metafields with collection conditions](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). +""" +type Collection implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & Publishable { + """ + Collection duplicate operations involving this collection, either as a source (copying products from this collection to another) or a target (copying products to this collection from another). + """ + activeOperations: CollectionOperations! + + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + A single-line, text-only description of the collection, stripped of any HTML tags and formatting that were included in the description. + """ + description("Truncates a string after the given length." truncateAt: Int): String! + + """ + The description of the collection, including any HTML tags and formatting. This content is typically displayed to customers, such as on an online store, depending on the theme. + """ + descriptionHtml: HTML! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + Information about the collection that's provided through resource feedback. + """ + feedback: ResourceFeedback + + """ + A unique string that identifies the collection. If a handle isn't specified when a collection is created, it's automatically generated from the collection's original title, and typically includes words from the title separated by hyphens. For example, a collection that was created with the title `Summer Catalog 2022` might have the handle `summer-catalog-2022`. + + If the title is changed, the handle doesn't automatically change. + + The handle can be used in themes by the Liquid templating language to refer to the collection, but using the ID is preferred because it never changes. + """ + handle: String! + + """ + Whether the collection includes the specified product. + """ + hasProduct("The ID of the product to check." id: ID!): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the collection. + """ + image("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The products that are included in the collection. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT): ProductConnection! + + """ + The number of products in the collection. + """ + productsCount: Count + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + publicationCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + The channels where the collection is published. + """ + publications("Whether or not to return only the collection publications that are published." onlyPublished: Boolean = true, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel("The ID of the channel to check." channelId: ID!): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication("The ID of the publication to check. For example, `id: \"gid://shopify/Publication/123\"`." publicationId: ID!): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled to be published." onlyPublished: Boolean = true, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + resourcePublicationsCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + By default, only publications to `APP` catalog types are returned. + For `Product` and `ProductVariant`, use the `catalogType` argument to retrieve + publications for other catalog types, such as `COMPANY_LOCATION` (B2B) or `MARKET`. + `Collection` only supports publications to `APP` catalog types. + """ + resourcePublicationsV2("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled or staged to be published." onlyPublished: Boolean = true, "Filter publications by catalog type. When not specified, defaults to APP. Has no effect on Collection, which only supports APP." catalogType: CatalogType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationV2Connection! + + """ + Specifies the rules that determine whether a product is included. + """ + ruleSet: CollectionRuleSet + + """ + If the default SEO fields for page title and description have been modified, contains the modified information. + """ + seo: SEO! + + """ + The order in which the products in the collection are displayed by default in the Shopify admin and in sales channels, such as an online store. + """ + sortOrder: CollectionSortOrder! + + """ + The Storefront GraphQL API ID of the `Collection`. + + As of the `2022-04` version release, the Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + The suffix of the Liquid template being used to show the collection in an online store. For example, if the value is `custom`, then the collection is using the `collection.custom.liquid` template. If the value is `null`, then the collection is using the default `collection.liquid` template. + """ + templateSuffix: String + + """ + The name of the collection. It's displayed in the Shopify admin and is typically displayed in sales channels, such as an online store. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PublicationConnection! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the collection was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `collectionAddProducts` mutation. +""" +type CollectionAddProductsPayload { + """ + The updated collection. Returns `null` if an error is raised. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionAddProductsV2` mutation. +""" +type CollectionAddProductsV2Payload { + """ + The asynchronous job adding the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionAddProductsV2UserError!]! +} + +""" +An error that occurs during the execution of `CollectionAddProductsV2`. +""" +type CollectionAddProductsV2UserError implements DisplayableError { + """ + The error code. + """ + code: CollectionAddProductsV2UserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionAddProductsV2UserError`. +""" +enum CollectionAddProductsV2UserErrorCode { + """ + Can't manually add products to a smart collection. + """ + CANT_ADD_TO_SMART_COLLECTION + + """ + Collection doesn't exist. + """ + COLLECTION_DOES_NOT_EXIST +} + +""" +An auto-generated type for paginating through multiple Collections. +""" +type CollectionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionEdge!]! + + """ + A list of nodes that are contained in CollectionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Collection!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `collectionCreate` mutation. +""" +type CollectionCreatePayload { + """ + The collection that has been created. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the collection to delete. +""" +input CollectionDeleteInput { + """ + The ID of the collection to be deleted. + """ + id: ID! +} + +""" +Return type for `collectionDelete` mutation. +""" +type CollectionDeletePayload { + """ + The ID of the collection that was deleted. Returns `null` if the collection doesn't exist. + """ + deletedCollectionId: ID + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for duplicating a collection. +""" +input CollectionDuplicateInput { + """ + The ID of the collection to be duplicated. + """ + collectionId: ID! + + """ + The new title of the collection. + """ + newTitle: String! + + """ + Whether to duplicate the collection's publications (channel availability). When `true` (default), the duplicated collection will be published to the same channels as the original. When `false`, the duplicated collection will be unpublished on all channels. + """ + copyPublications: Boolean = true +} + +""" +Represents an in-progress collection duplication operation. Collection duplication is a synchronous operation for simple collections, and an asynchronous operation for collections containing too many products to process synchronously. +""" +type CollectionDuplicateOperation { + """ + Whether the collection is the source that products are being duplicated from, or the target collection that products are being duplicated onto. + """ + collectionRole: CollectionDuplicateOperationRole! + + """ + The background job performing the duplication. + """ + job: Job! +} + +""" +The role a collection plays in a duplication operation. +""" +enum CollectionDuplicateOperationRole { + """ + Products are being duplicated from this collection. + """ + SOURCE + + """ + Products are being duplicated onto this collection. + """ + TARGET +} + +""" +Return type for `collectionDuplicate` mutation. +""" +type CollectionDuplicatePayload { + """ + The newly created duplicate collection. Will contain all data if duplication completed synchronously. + If async processing is required, the collection will be created but products will be added in the background + and can be tracked via the job field or the collection's active_operations field. + """ + collection: Collection + + """ + The background job copying manually included products onto the target collection. Only returned if async processing is required, otherwise products will be copied synchronously when the collection is created. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionDuplicateUserError!]! +} + +""" +Errors related to collection duplication. +""" +type CollectionDuplicateUserError implements DisplayableError { + """ + The error code. + """ + code: CollectionDuplicateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionDuplicateUserError`. +""" +enum CollectionDuplicateUserErrorCode { + """ + The collection was not found. Please check the collection ID and try again. + """ + COLLECTION_NOT_FOUND +} + +""" +An auto-generated type which holds one Collection and a cursor during pagination. +""" +type CollectionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionEdge. + """ + node: Collection! +} + +""" +The input fields for identifying a collection. +""" +input CollectionIdentifierInput @oneOf { + """ + The ID of the collection. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the collection. + """ + customId: UniqueMetafieldValueInput + + """ + The handle of the collection. + """ + handle: String +} + +""" +The input fields required to create a collection. +""" +input CollectionInput { + """ + The description of the collection, in HTML format. + """ + descriptionHtml: String + + """ + A unique human-friendly string for the collection. Automatically generated from the collection's title. + """ + handle: String + + """ + Specifies the collection to update or create a new collection if absent. Required for updating a collection. + """ + id: ID + + """ + The image associated with the collection. + """ + image: ImageInput + + """ + Initial list of collection products. Only valid with `collectionCreate`. + """ + products: [ID!] + + """ + Initial list of collection publications. Only valid with `collectionCreate`. + """ + publications: [CollectionPublicationInput!] @deprecated(reason: "Use PublishablePublish instead.") + + """ + The rules used to assign products to the collection. This is the legacy smart-collection model; + use `sources` with `conditions` instead. Each `ruleSet` rule has an equivalent `condition`. + """ + ruleSet: CollectionRuleSetInput + + """ + The theme template used when viewing the collection in a store. + """ + templateSuffix: String + + """ + The order in which the collection's products are sorted. + """ + sortOrder: CollectionSortOrder + + """ + The title of the collection. Required for creating a new collection. + """ + title: String + + """ + The metafields to associate with the collection. + """ + metafields: [MetafieldInput!] + + """ + SEO information for the collection. + """ + seo: SEOInput + + """ + Indicates whether a redirect is required after a new handle has been provided. + If true, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false +} + +""" +Represents operations involving a collection. +""" +type CollectionOperations { + """ + Collection duplicate operations. + """ + duplicate: [CollectionDuplicateOperation!]! +} + +""" +Represents the publication status and settings for a collection across different sales channels. This tracks where collections are published, when they were published, and any channel-specific configuration. + +For example, a "Holiday Gifts" collection might be published to the online store and Facebook Shop but not to the POS channel, with different publication dates for each channel based on marketing strategy. + +Use `CollectionPublication` to: +- Track collection visibility across multiple sales channels +- Manage channel-specific collection settings and availability +- Monitor publication history and timing for collections +- Control where collections appear in customer-facing channels +- Implement channel-specific collection management workflows + +Each publication record includes the channel information, publication status, and timing details. This enables merchants to control collection visibility strategically across their sales channels. + +Collections can have different publication settings per channel, allowing for targeted marketing and inventory management. For instance, wholesale collections might only be published to B2B channels while retail collections appear in consumer-facing channels. + +The publication system integrates with Shopify's broader channel management, ensuring collections appear consistently across the merchant's sales ecosystem while respecting channel-specific rules and permissions. + +Learn more about [sales channel management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). +""" +type CollectionPublication { + """ + The channel where the collection will be published. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + The collection to be published on the publication. + """ + collection: Collection! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The publication where the collection will be published. + """ + publication: Publication! + + """ + The date that the publication was or is going to be published. + """ + publishDate: DateTime! +} + +""" +An auto-generated type for paginating through multiple CollectionPublications. +""" +type CollectionPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionPublicationEdge!]! + + """ + A list of nodes that are contained in CollectionPublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CollectionPublication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CollectionPublication and a cursor during pagination. +""" +type CollectionPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionPublicationEdge. + """ + node: CollectionPublication! +} + +""" +The input fields for publications to which a collection will be published. +""" +input CollectionPublicationInput { + """ + The ID of the publication. + """ + publicationId: ID + + """ + The ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + channelHandle: String @deprecated(reason: "Use publicationId instead.") +} + +""" +The input fields for specifying a collection to publish and the sales channels to publish it to. +""" +input CollectionPublishInput { + """ + The collection to create or update publications for. + """ + id: ID! + + """ + The channels where the collection will be published. + """ + collectionPublications: [CollectionPublicationInput!]! +} + +""" +Return type for `collectionPublish` mutation. +""" +type CollectionPublishPayload { + """ + The published collection. + """ + collection: Collection + + """ + The channels where the collection has been published. + """ + collectionPublications: [CollectionPublication!] + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionRemoveProducts` mutation. +""" +type CollectionRemoveProductsPayload { + """ + The asynchronous job removing the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionReorderProducts` mutation. +""" +type CollectionReorderProductsPayload { + """ + The asynchronous job reordering the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionReorderProductsUserError!]! +} + +""" +Errors related to order customer removal. +""" +type CollectionReorderProductsUserError implements DisplayableError { + """ + The error code. + """ + code: CollectionReorderProductsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionReorderProductsUserError`. +""" +enum CollectionReorderProductsUserErrorCode { + """ + Products are currently being reordered. Please try again later. + """ + TOO_MANY_ATTEMPTS_TO_REORDER_PRODUCTS + + """ + The collection was not found. Please check the collection ID and try again. + """ + COLLECTION_NOT_FOUND + + """ + The collection is not manually sorted. Can't reorder products unless collection is manually sorted. + """ + MANUALLY_SORTED_COLLECTION + + """ + The move is invalid. + """ + INVALID_MOVE +} + +""" +Represents at rule that's used to assign products to a collection. +""" +type CollectionRule { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The value that the operator is applied to. For example, `Hats`. + """ + condition: String! + + """ + The value that the operator is applied to. + """ + conditionObject: CollectionRuleConditionObject + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! +} + +""" +Specifies the taxonomy category to used for the condition. +""" +type CollectionRuleCategoryCondition { + """ + The taxonomy category used as condition. + """ + value: TaxonomyCategory! +} + +""" +Specifies the attribute of a product being used to populate the collection. +""" +enum CollectionRuleColumn { + """ + The [`tag`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.tags) attribute. + """ + TAG + + """ + The [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.title) attribute. + """ + TITLE + + """ + The [`type`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productType) attribute. + """ + TYPE + + """ + The [`product_taxonomy_node_id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productCategory) attribute. + """ + PRODUCT_TAXONOMY_NODE_ID + + """ + This rule type is designed to dynamically include products in a collection based on their category id. + When a specific product category is set as a condition, this rule will match products that are directly assigned to the specified category. + """ + PRODUCT_CATEGORY_ID + + """ + This rule type is designed to dynamically include products in a collection based on their category id. + When a specific product category is set as a condition, this rule will not only match products that are + directly assigned to the specified category but also include any products categorized under any descendant of that category. + """ + PRODUCT_CATEGORY_ID_WITH_DESCENDANTS + + """ + The [`vendor`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.vendor) attribute. + """ + VENDOR + + """ + The [`variant_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.price) attribute. + """ + VARIANT_PRICE + + """ + An attribute evaluated based on the `compare_at_price` attribute of the product's variants. + With `is_set` relation, the rule matches products with at least one variant with `compare_at_price` set. + With `is_not_set` relation, the rule matches matches products with at least one variant with `compare_at_price` not set. + """ + IS_PRICE_REDUCED + + """ + The [`variant_compare_at_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.compareAtPrice) attribute. + """ + VARIANT_COMPARE_AT_PRICE + + """ + The [`variant_weight`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryItem.measurement.weight) attribute. + """ + VARIANT_WEIGHT + + """ + The [`variant_inventory`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryQuantity) attribute. + """ + VARIANT_INVENTORY + + """ + The [`variant_title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.title) attribute. + """ + VARIANT_TITLE + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + PRODUCT_METAFIELD_DEFINITION + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + VARIANT_METAFIELD_DEFINITION +} + +""" +Specifies object for the condition of the rule. +""" +union CollectionRuleConditionObject = CollectionRuleCategoryCondition|CollectionRuleMetafieldCondition|CollectionRuleProductCategoryCondition|CollectionRuleTextCondition + +""" +Defines the available columns and relationships that can be used when creating rules for collections. This provides the schema for building automated collection logic based on product attributes. + +For example, merchants can create rules like "product type equals 'Shirts'" or "vendor contains 'Nike'" using the conditions defined in this object to automatically populate collections. + +Use `CollectionRuleConditions` to: +- Discovering valid field options for collection rule interfaces +- Understanding which conditions are available for automated collections +- Exploring available product attributes for collection automation +- Learning about proper field relationships for rule implementation + +The conditions define which product fields can be used in collection rules and what types of comparisons are allowed for each field. + +Learn more about [collections with conditions](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). +""" +type CollectionRuleConditions { + """ + Allowed relations of the rule. + """ + allowedRelations: [CollectionRuleRelation!]! + + """ + Most commonly used relation for this rule. + """ + defaultRelation: CollectionRuleRelation! + + """ + Additional attributes defining the rule. + """ + ruleObject: CollectionRuleConditionsRuleObject + + """ + Type of the rule. + """ + ruleType: CollectionRuleColumn! +} + +""" +Specifies object with additional rule attributes. +""" +union CollectionRuleConditionsRuleObject = CollectionRuleMetafieldCondition + +""" +The input fields for a rule to associate with a collection. +""" +input CollectionRuleInput { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! + + """ + The value that the operator is applied to. For example, `Hats`. + """ + condition: String! + + """ + The object ID that points to additional attributes for the collection rule. + This is only required when using metafield definition rules. + """ + conditionObjectId: ID +} + +""" +Identifies a metafield definition used as a rule for the collection. +""" +type CollectionRuleMetafieldCondition { + """ + The metafield definition associated with the condition. + """ + metafieldDefinition: MetafieldDefinition! +} + +""" +Specifies the condition for a Product Category field. +""" +type CollectionRuleProductCategoryCondition { + """ + The value of the condition. + """ + value: ProductTaxonomyNode! +} + +""" +Specifies the relationship between the `column` and the `condition`. +""" +enum CollectionRuleRelation { + """ + The attribute contains the condition. + """ + CONTAINS + + """ + The attribute ends with the condition. + """ + ENDS_WITH + + """ + The attribute is equal to the condition. + """ + EQUALS + + """ + The attribute is greater than the condition. + """ + GREATER_THAN + + """ + The attribute is not set (equal to `null`). + """ + IS_NOT_SET + + """ + The attribute is set (not equal to `null`). + """ + IS_SET + + """ + The attribute is less than the condition. + """ + LESS_THAN + + """ + The attribute does not contain the condition. + """ + NOT_CONTAINS + + """ + The attribute does not equal the condition. + """ + NOT_EQUALS + + """ + The attribute starts with the condition. + """ + STARTS_WITH +} + +""" +The set of rules that are used to determine which products are included in the collection. +""" +type CollectionRuleSet { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRule!]! +} + +""" +The input fields for a rule set of the collection. +""" +input CollectionRuleSetInput { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRuleInput!] +} + +""" +Specifies the condition for a text field. +""" +type CollectionRuleTextCondition { + """ + The value of the condition. + """ + value: String! +} + +""" +The set of valid sort keys for the Collection query. +""" +enum CollectionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Specifies the sort order for the products in the collection. +""" +enum CollectionSortOrder { + """ + Alphabetically, in ascending order (A - Z). + """ + ALPHA_ASC + + """ + Alphabetically, in descending order (Z - A). + """ + ALPHA_DESC + + """ + By best-selling products. + """ + BEST_SELLING + + """ + By date created, in ascending order (oldest - newest). + """ + CREATED + + """ + By date created, in descending order (newest - oldest). + """ + CREATED_DESC + + """ + In the order set manually by the merchant. + """ + MANUAL + + """ + By price, in ascending order (lowest - highest). + """ + PRICE_ASC + + """ + By price, in descending order (highest - lowest). + """ + PRICE_DESC +} + +""" +The input fields for specifying the collection to unpublish and the sales channels to remove it from. +""" +input CollectionUnpublishInput { + """ + The collection to create or update publications for. + """ + id: ID! + + """ + The channels where the collection is published. + """ + collectionPublications: [CollectionPublicationInput!]! +} + +""" +Return type for `collectionUnpublish` mutation. +""" +type CollectionUnpublishPayload { + """ + The collection that has been unpublished. + """ + collection: Collection + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionUpdate` mutation. +""" +type CollectionUpdatePayload { + """ + The updated collection. + """ + collection: Collection + + """ + The asynchronous job updating the products based on the new rule set. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a hexadecimal representation of a color. + +For example, "#6A8D48". +""" +scalar Color + +""" +The data type of a column. +""" +enum ColumnDataType { + """ + Represents an unspecified data type. + """ + UNSPECIFIED + + """ + Represents a monetary value. + """ + MONEY + + """ + Represents a percentage value. + """ + PERCENT + + """ + Represents an integer value. + """ + INTEGER + + """ + Represents a floating point value. + """ + FLOAT + + """ + Represents a decimal value. + """ + DECIMAL + + """ + Represents a string value. + """ + STRING + + """ + Represents a boolean value. + """ + BOOLEAN + + """ + Represents a timestamp value in seconds. + """ + TIMESTAMP + + """ + Represents a minute-level timestamp value. + """ + MINUTE_TIMESTAMP + + """ + Represents a hour-level timestamp value. + """ + HOUR_TIMESTAMP + + """ + Represents a day-level timestamp value. + """ + DAY_TIMESTAMP + + """ + Represents a week-level timestamp value. + """ + WEEK_TIMESTAMP + + """ + Represents a month-level timestamp value. + """ + MONTH_TIMESTAMP + + """ + Represents a quarter-level timestamp value. + """ + QUARTER_TIMESTAMP + + """ + Represents a year-level timestamp value. + """ + YEAR_TIMESTAMP + + """ + Represents a day of week value. + """ + DAY_OF_WEEK + + """ + Represents an hour of day value. + """ + HOUR_OF_DAY + + """ + Represents an identity value. + """ + IDENTITY + + """ + Represents a month of year value. + """ + MONTH_OF_YEAR + + """ + Represents a week of year value. + """ + WEEK_OF_YEAR + + """ + Represents a second-level timestamp value. + """ + SECOND_TIMESTAMP + + """ + Represents an array of values. + """ + ARRAY + + """ + Represents a duration in milliseconds. + """ + MILLISECOND_DURATION + + """ + Represents a duration in seconds. + """ + SECOND_DURATION + + """ + Represents a duration in minutes. + """ + MINUTE_DURATION + + """ + Represents a duration in hours. + """ + HOUR_DURATION + + """ + Represents a duration in days. + """ + DAY_DURATION +} + +""" +A combined listing of products. +""" +type CombinedListing { + """ + A list of child products in the combined listing. + """ + combinedListingChildren("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CombinedListingChildConnection! + + """ + The parent product. + """ + parentProduct: Product! +} + +""" +A child of a combined listing. +""" +type CombinedListingChild { + """ + The parent variant. + """ + parentVariant: ProductVariant! + + """ + The child product. + """ + product: Product! +} + +""" +An auto-generated type for paginating through multiple CombinedListingChildren. +""" +type CombinedListingChildConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CombinedListingChildEdge!]! + + """ + A list of nodes that are contained in CombinedListingChildEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CombinedListingChild!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CombinedListingChild and a cursor during pagination. +""" +type CombinedListingChildEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CombinedListingChildEdge. + """ + node: CombinedListingChild! +} + +""" +Return type for `combinedListingUpdate` mutation. +""" +type CombinedListingUpdatePayload { + """ + The parent product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CombinedListingUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CombinedListingUpdate`. +""" +type CombinedListingUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CombinedListingUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CombinedListingUpdateUserError`. +""" +enum CombinedListingUpdateUserErrorCode { + """ + Unable to add duplicated products. + """ + CANNOT_HAVE_DUPLICATED_PRODUCTS + + """ + Unable to add a product that is a parent. + """ + CANNOT_HAVE_PARENT_AS_CHILD + + """ + Option values cannot be repeated. + """ + CANNOT_HAVE_REPEATED_OPTION_VALUES + + """ + Unable to add products with repeated options. + """ + CANNOT_HAVE_REPEATED_OPTIONS + + """ + Unable to add options values that are already in use. + """ + CANT_ADD_OPTIONS_VALUES_IF_ALREADY_EXISTS + + """ + Combined listings feature is not enabled. + """ + COMBINED_LISTINGS_NOT_ENABLED + + """ + Cannot perform edit and remove on same products. + """ + EDIT_AND_REMOVE_ON_SAME_PRODUCTS + + """ + Unable to add products. + """ + FAILED_TO_ADD_PRODUCTS + + """ + Unable to remove products. + """ + FAILED_TO_REMOVE_PRODUCTS + + """ + Unable to update products. + """ + FAILED_TO_UPDATE_PRODUCTS + + """ + An option linked to a metafield cannot be linked to a different metafield. + """ + LINKED_METAFIELD_CANNOT_BE_CHANGED + + """ + Linked metafield value missing from `optionsAndValues` field. + """ + LINKED_METAFIELD_VALUE_MISSING + + """ + The same metafield cannot be linked to multiple options. + """ + LINKED_METAFIELDS_CANNOT_BE_REPEATED + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + The optionsAndValues field is required for this operation. + """ + MISSING_OPTION_VALUES + + """ + Selected option values cannot be empty. + """ + MUST_HAVE_SELECTED_OPTION_VALUES + + """ + Unable to add products with blank option names. + """ + OPTION_NAME_CANNOT_BE_BLANK + + """ + Option name contains invalid characters. + """ + OPTION_NAME_CONTAINS_INVALID_CHARACTERS + + """ + Option does not exist. + """ + OPTION_NOT_FOUND + + """ + All child products must include the same options. + """ + OPTIONS_MUST_BE_EQUAL_TO_THE_OTHER_COMPONENTS + + """ + Unable to update options with blank option values. + """ + OPTION_VALUES_CANNOT_BE_BLANK + + """ + Unable to update options with no option values. + """ + OPTION_VALUES_CANNOT_BE_EMPTY + + """ + The options_and_values field must contain all option values used in the combined listing. + """ + OPTION_VALUES_MUST_BE_COMPLETE + + """ + Parent product cannot be a combined listing child. + """ + PARENT_PRODUCT_CANNOT_BE_COMBINED_LISTING_CHILD + + """ + Unable to update components for a product that isn't a combined listing. + """ + PARENT_PRODUCT_MUST_BE_A_COMBINED_LISTING + + """ + The combined listing parent product must have a product category to use linked metafield options. + """ + PARENT_PRODUCT_MUST_HAVE_CATEGORY + + """ + Parent product not found. + """ + PARENT_PRODUCT_NOT_FOUND + + """ + Unable to add a product that is already a child. + """ + PRODUCT_IS_ALREADY_A_CHILD + + """ + Failed to remove mebmership due to invalid input. + """ + PRODUCT_MEMBERSHIP_NOT_FOUND + + """ + Unable to add products that do not exist. + """ + PRODUCT_NOT_FOUND + + """ + The title cannot be longer than 255 characters. + """ + TITLE_TOO_LONG + + """ + You have reached the maximum number of variants across all products for an individual combined listing. + """ + TOO_MANY_VARIANTS + + """ + You have reached the maximum number of products that can be added to an individual combined listing. + """ + TOO_MANY_PRODUCTS + + """ + An unexpected error occurred. + """ + UNEXPECTED_ERROR +} + +""" +The role of the combined listing. +""" +enum CombinedListingsRole { + """ + The product is the parent of a combined listing. + """ + PARENT + + """ + The product is the child of a combined listing. + """ + CHILD +} + +""" +A comment on an article. +""" +type Comment implements HasEvents & Node { + """ + The article associated with the comment. + """ + article: Article + + """ + The comment’s author. + """ + author: CommentAuthor! + + """ + The content of the comment. + """ + body: String! + + """ + The content of the comment, complete with HTML formatting. + """ + bodyHtml: HTML! + + """ + The date and time when the comment was created. + """ + createdAt: DateTime! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The IP address of the commenter. + """ + ip: String + + """ + Whether or not the comment is published. + """ + isPublished: Boolean! + + """ + The date and time when the comment was published. + """ + publishedAt: DateTime + + """ + The status of the comment. + """ + status: CommentStatus! + + """ + The date and time when the comment was last updated. + """ + updatedAt: DateTime + + """ + The user agent of the commenter. + """ + userAgent: String +} + +""" +Return type for `commentApprove` mutation. +""" +type CommentApprovePayload { + """ + The comment that was approved. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentApproveUserError!]! +} + +""" +An error that occurs during the execution of `CommentApprove`. +""" +type CommentApproveUserError implements DisplayableError { + """ + The error code. + """ + code: CommentApproveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentApproveUserError`. +""" +enum CommentApproveUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The author of a comment on a blog article, containing the commenter's name and email address. This information helps merchants moderate comments and potentially engage with their community. + +For example, when reviewing pending comments, merchants can see the commenter's name and email to help with moderation decisions or to enable follow-up communication if needed. + +Use the `CommentAuthor` object to: +- Display comment attribution +- Support comment moderation workflows +- Enable merchant-to-reader communication +""" +type CommentAuthor { + """ + The author's email. + """ + email: String! + + """ + The author’s name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple Comments. +""" +type CommentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CommentEdge!]! + + """ + A list of nodes that are contained in CommentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Comment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `commentDelete` mutation. +""" +type CommentDeletePayload { + """ + The ID of the comment that was deleted. + """ + deletedCommentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CommentDelete`. +""" +type CommentDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CommentDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentDeleteUserError`. +""" +enum CommentDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Comment and a cursor during pagination. +""" +type CommentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CommentEdge. + """ + node: Comment! +} + +""" +A comment that staff members add to the timeline of [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer), [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company), [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation), or [`PriceRule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRule) objects. Staff use comments to document internal notes, communicate with team members, and track important information about these types. + +The comment includes information like the [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) who authored it, when it was created, and whether it's editable or deletable. Comments can have file attachments and reference related objects like [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects through embeds. +""" +type CommentEvent implements Event & Node { + """ + The action that occured. + """ + action: String! + + """ + The name of the app that created the event. + """ + appTitle: String + + """ + The attachments associated with the comment event. + """ + attachments: [CommentEventAttachment!]! + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The name of the user that authored the comment event. + """ + author: StaffMember! + + """ + Whether the comment event can be deleted. If true, then the comment event can be deleted. + """ + canDelete: Boolean! + + """ + Whether the comment event can be edited. If true, then the comment event can be edited. + """ + canEdit: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + Whether the comment event has been edited. If true, then the comment event has been edited. + """ + edited: Boolean! + + """ + The object reference associated with the comment event. For example, a product or discount). + """ + embed: CommentEventEmbed + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! + + """ + The raw body of the comment event. + """ + rawMessage: String! + + """ + The parent subject to which the comment event belongs. + """ + subject: CommentEventSubject +} + +""" +A file attachment associated to a comment event. +""" +type CommentEventAttachment { + """ + The file extension of the comment event attachment, indicating the file format. + """ + fileExtension: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image attached to the comment event. + """ + image("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image + + """ + The filename of the comment event attachment. + """ + name: String! + + """ + The size of the attachment. + """ + size: Int! + + """ + The URL of the attachment. + """ + url: URL! +} + +""" +The main embed of a comment event. +""" +union CommentEventEmbed = Customer|DraftOrder|InventoryTransfer|Order|Product|ProductVariant + +""" +The subject line of a comment event. +""" +interface CommentEventSubject { + """ + Whether the timeline subject has a timeline comment. If true, then a timeline comment exists. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Return type for `commentNotSpam` mutation. +""" +type CommentNotSpamPayload { + """ + The comment that was marked as not spam. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentNotSpamUserError!]! +} + +""" +An error that occurs during the execution of `CommentNotSpam`. +""" +type CommentNotSpamUserError implements DisplayableError { + """ + The error code. + """ + code: CommentNotSpamUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentNotSpamUserError`. +""" +enum CommentNotSpamUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Possible comment policies for a blog. +""" +enum CommentPolicy { + """ + Readers can post comments to blog articles without moderation. + """ + AUTO_PUBLISHED + + """ + Readers cannot post comments to blog articles. + """ + CLOSED + + """ + Readers can post comments to blog articles, but comments must be moderated before they appear. + """ + MODERATED +} + +""" +The set of valid sort keys for the Comment query. +""" +enum CommentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Return type for `commentSpam` mutation. +""" +type CommentSpamPayload { + """ + The comment that was marked as spam. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentSpamUserError!]! +} + +""" +An error that occurs during the execution of `CommentSpam`. +""" +type CommentSpamUserError implements DisplayableError { + """ + The error code. + """ + code: CommentSpamUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentSpamUserError`. +""" +enum CommentSpamUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The status of a comment. +""" +enum CommentStatus { + """ + The comment is marked as spam. + """ + SPAM + + """ + The comment has been removed. + """ + REMOVED + + """ + The comment is published. + """ + PUBLISHED + + """ + The comment is unapproved. + """ + UNAPPROVED + + """ + The comment is pending approval. + """ + PENDING +} + +""" +Return type for `companiesDelete` mutation. +""" +type CompaniesDeletePayload { + """ + A list of IDs of the deleted companies. + """ + deletedCompanyIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A business entity that purchases from the shop as part of B2B commerce. Companies organize multiple locations and contacts who can place orders on behalf of the organization. [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) objects can have custom pricing through [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) and [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) configurations. +""" +type Company implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Navigable & Node { + """ + The number of contacts that belong to the company. + """ + contactCount: Int! @deprecated(reason: "Use `contactsCount` instead.") + + """ + The list of roles for the company contacts. + """ + contactRoles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyContactRoleSortKeys = ID): CompanyContactRoleConnection! + + """ + The list of contacts in the company. + """ + contacts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyContactSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_id | id |\n| company_location_id | id |\n| created_at | time |\n| email | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_name | string |\n| name | string |\n| role_name | string |\n| status | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyContactConnection! + + """ + The number of contacts that belong to the company. + """ + contactsCount: Count + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify. + """ + createdAt: DateTime! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company became the customer. + """ + customerSince: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The role proposed by default for a contact at the company. + """ + defaultRole: CompanyContactRole + + """ + The list of the company's draft orders. + """ + draftOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DraftOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| customer_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| source | string |\n| status | string |\n| tag | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DraftOrderConnection! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A unique externally-supplied ID for the company. + """ + externalId: String + + """ + Whether the merchant added a timeline comment to the company. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The lifetime duration of the company, since it became a customer of the shop. Examples: `2 days`, `3 months`, `1 year`. + """ + lifetimeDuration: String! + + """ + The list of locations in the company. + """ + locations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyLocationSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_id | id |\n| created_at | time |\n| external_id | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| ids | string |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyLocationConnection! + + """ + The number of locations that belong to the company. + """ + locationsCount: Count + + """ + The main contact for the company. + """ + mainContact: CompanyContact + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The name of the company. + """ + name: String! + + """ + A note about the company. + """ + note: String + + """ + The list of the company's orders. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = ID): OrderConnection! + + """ + The total number of orders placed for this company, across all its locations. + """ + ordersCount: Count + + """ + The total amount spent by this company, across all its locations. + """ + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + """ + updatedAt: DateTime! +} + +""" +Represents a billing or shipping address for a company location. +""" +type CompanyAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String! + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company. + """ + companyName: String! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company address was created. + """ + createdAt: DateTime! + + """ + The first name of the recipient. + """ + firstName: String + + """ + The formatted version of the address. + """ + formattedAddress("Whether to include the recipient's name in the formatted address." withName: Boolean = false, "Whether to include the company name in the formatted address." withCompanyName: Boolean = true): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the recipient. + """ + lastName: String + + """ + A unique phone number for the customer. + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The identity of the recipient e.g. 'Receiving Department'. + """ + recipient: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company address was last updated. + """ + updatedAt: DateTime! + + """ + The zip or postal code of the address. + """ + zip: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + zoneCode: String +} + +""" +Return type for `companyAddressDelete` mutation. +""" +type CompanyAddressDeletePayload { + """ + The ID of the deleted address. + """ + deletedAddressId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields to create or update the address of a company location. +""" +input CompanyAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The zip or postal code of the address. + """ + zip: String + + """ + The identity of the recipient e.g. 'Receiving Department'. + """ + recipient: String + + """ + The first name of the recipient. + """ + firstName: String + + """ + The last name of the recipient. + """ + lastName: String + + """ + A phone number for the recipient. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The alphanumeric code for the region of the address, such as the province, state, or district. For example, `ON` for Ontario, Canada. + """ + zoneCode: String + + """ + The two-letter code ([ISO 3166-1 alpha-2]](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format) for the country of the address. For example, `US`` for the United States. + """ + countryCode: CountryCode +} + +""" +The valid values for the address type of a company. +""" +enum CompanyAddressType { + """ + The address is a billing address. + """ + BILLING + + """ + The address is a shipping address. + """ + SHIPPING +} + +""" +Return type for `companyAssignCustomerAsContact` mutation. +""" +type CompanyAssignCustomerAsContactPayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyAssignMainContact` mutation. +""" +type CompanyAssignMainContactPayload { + """ + The company for which the main contact is assigned. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple Companies. +""" +type CompanyConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyEdge!]! + + """ + A list of nodes that are contained in CompanyEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Company!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A person who acts on behalf of a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) to make B2B purchases. Company contacts are associated with [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) accounts and can place orders on behalf of their company. + +Each contact can be assigned to one or more [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) objects with specific roles that determine their permissions and access to catalogs, pricing, and payment terms configured for those locations. +""" +type CompanyContact implements Node { + """ + The company to which the contact belongs. + """ + company: Company! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was created at Shopify. + """ + createdAt: DateTime! + + """ + The customer associated to this contact. + """ + customer: Customer! + + """ + The list of draft orders for the company contact. + """ + draftOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DraftOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| customer_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| source | string |\n| status | string |\n| tag | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DraftOrderConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the contact is the main contact of the company. + """ + isMainContact: Boolean! + + """ + The lifetime duration of the company contact, since its creation date on Shopify. Examples: `1 year`, `2 months`, `3 days`. + """ + lifetimeDuration: String! + + """ + The company contact's locale (language). + """ + locale: String + + """ + The list of orders for the company contact. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = ID): OrderConnection! + + """ + The list of roles assigned to this company contact. + """ + roleAssignments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyContactRoleAssignmentSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_contact_id | id |\n| company_contact_role_id | id |\n| company_id | id |\n| company_location_id | id |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_name | string |\n| role_name | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyContactRoleAssignmentConnection! + + """ + The company contact's job title. + """ + title: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company contact was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `companyContactAssignRole` mutation. +""" +type CompanyContactAssignRolePayload { + """ + The company contact role assignment. + """ + companyContactRoleAssignment: CompanyContactRoleAssignment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactAssignRoles` mutation. +""" +type CompanyContactAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple CompanyContacts. +""" +type CompanyContactConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactEdge!]! + + """ + A list of nodes that are contained in CompanyContactEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyContact!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyContactCreate` mutation. +""" +type CompanyContactCreatePayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactDelete` mutation. +""" +type CompanyContactDeletePayload { + """ + The ID of the deleted company contact. + """ + deletedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyContact and a cursor during pagination. +""" +type CompanyContactEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactEdge. + """ + node: CompanyContact! +} + +""" +The input fields for company contact attributes when creating or updating a company contact. +""" +input CompanyContactInput { + """ + The company contact's first name. + """ + firstName: String + + """ + The company contact's last name. + """ + lastName: String + + """ + The unique email address of the company contact. + """ + email: String + + """ + The title of the company contact. + """ + title: String + + """ + The contact's locale. + """ + locale: String + + """ + The phone number of the company contact. + """ + phone: String +} + +""" +Return type for `companyContactRemoveFromCompany` mutation. +""" +type CompanyContactRemoveFromCompanyPayload { + """ + The ID of the removed company contact. + """ + removedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRole` mutation. +""" +type CompanyContactRevokeRolePayload { + """ + The role assignment that was revoked. + """ + revokedCompanyContactRoleAssignmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRoles` mutation. +""" +type CompanyContactRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company contact. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The role for a [company contact](https://shopify.dev/api/admin-graphql/latest/objects/companycontact). +""" +type CompanyContactRole implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of a role. For example, `admin` or `buyer`. + """ + name: String! + + """ + A note for the role. + """ + note: String +} + +""" +The input fields for the role and location to assign to a company contact. +""" +input CompanyContactRoleAssign { + """ + The role ID. + """ + companyContactRoleId: ID! + + """ + The location. + """ + companyLocationId: ID! +} + +""" +The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. +""" +type CompanyContactRoleAssignment implements Node { + """ + The company this role assignment belongs to. + """ + company: Company! + + """ + The company contact for whom this role is assigned. + """ + companyContact: CompanyContact! + + """ + The company location to which the role is assigned. + """ + companyLocation: CompanyLocation! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The role that's assigned to the company contact. + """ + role: CompanyContactRole! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoleAssignments. +""" +type CompanyContactRoleAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleAssignmentEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyContactRoleAssignment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination. +""" +type CompanyContactRoleAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleAssignmentEdge. + """ + node: CompanyContactRoleAssignment! +} + +""" +The set of valid sort keys for the CompanyContactRoleAssignment query. +""" +enum CompanyContactRoleAssignmentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location_name` value. + """ + LOCATION_NAME + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoles. +""" +type CompanyContactRoleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyContactRole!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRole and a cursor during pagination. +""" +type CompanyContactRoleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleEdge. + """ + node: CompanyContactRole! +} + +""" +The set of valid sort keys for the CompanyContactRole query. +""" +enum CompanyContactRoleSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyContactSendWelcomeEmail` mutation. +""" +type CompanyContactSendWelcomeEmailPayload { + """ + The company contact to whom a welcome email was sent. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the CompanyContact query. +""" +enum CompanyContactSortKeys { + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `name_email` value. + """ + NAME_EMAIL + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyContactUpdate` mutation. +""" +type CompanyContactUpdatePayload { + """ + The updated company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactsDelete` mutation. +""" +type CompanyContactsDeletePayload { + """ + The list of IDs of the deleted company contacts. + """ + deletedCompanyContactIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields and values for creating a company and its associated resources. +""" +input CompanyCreateInput { + """ + The attributes for the company. + """ + company: CompanyInput! + + """ + The attributes for the company contact. + """ + companyContact: CompanyContactInput + + """ + The attributes for the company location. + """ + companyLocation: CompanyLocationInput +} + +""" +Return type for `companyCreate` mutation. +""" +type CompanyCreatePayload { + """ + The created company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyDelete` mutation. +""" +type CompanyDeletePayload { + """ + The ID of the deleted company. + """ + deletedCompanyId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one Company and a cursor during pagination. +""" +type CompanyEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyEdge. + """ + node: Company! +} + +""" +The input fields for company attributes when creating or updating a company. +""" +input CompanyInput { + """ + The name of the company. + """ + name: String + + """ + A note about the company. + """ + note: String + + """ + A unique externally-supplied ID for the company. + """ + externalId: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at + which the company became the customer. + """ + customerSince: DateTime +} + +""" +A location or branch of a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) that's a customer of the shop. Company locations enable B2B customers to manage multiple branches with distinct billing and shipping addresses, tax settings, and checkout configurations. + +Each location can have its own [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) objects that determine which products are published and their pricing. The [`BuyerExperienceConfiguration`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration) determines checkout behavior including [`PaymentTerms`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms), and whether orders require merchant review. B2B customers select which location they're purchasing for, which determines the applicable catalogs, pricing, [`TaxExemption`](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption) values, and checkout settings for their [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) objects. +""" +type CompanyLocation implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & HasStoreCreditAccounts & Navigable & Node { + """ + The address used as billing address for the location. + """ + billingAddress: CompanyAddress + + """ + The configuration for the buyer's B2B checkout. + """ + buyerExperienceConfiguration: BuyerExperienceConfiguration + + """ + The list of catalogs associated with the company location. + """ + catalogs("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CatalogConnection! + + """ + The number of catalogs associated with the company location. Limited to a maximum of 10000 by default. + """ + catalogsCount("The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The company that the company location belongs to. + """ + company: Company! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was created in Shopify. + """ + createdAt: DateTime! + + """ + The location's currency based on the shipping address. If the shipping address is empty, then the value is the shop's primary market. + """ + currency: CurrencyCode! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The list of draft orders for the company location. + """ + draftOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DraftOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| customer_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| source | string |\n| status | string |\n| tag | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DraftOrderConnection! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + Whether the merchant added a timeline comment to the company location. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the company location is assigned a specific catalog. + """ + inCatalog("The ID of the catalog." catalogId: ID!): Boolean! + + """ + The preferred locale of the company location. + """ + locale: String + + """ + The market that includes the location's shipping address. If the shipping address is empty, then the value is the shop's primary market. + """ + market: Market! @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The name of the company location. + """ + name: String! + + """ + A note about the company location. + """ + note: String + + """ + The total number of orders placed for the location. + """ + orderCount: Int! @deprecated(reason: "Use `ordersCount` instead.") + + """ + The list of orders for the company location. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = ID): OrderConnection! + + """ + The total number of orders placed for the location. + """ + ordersCount: Count + + """ + The phone number of the company location. + """ + phone: String + + """ + The list of roles assigned to the company location. + """ + roleAssignments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyContactRoleAssignmentSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_contact_id | id |\n| company_contact_role_id | id |\n| company_id | id |\n| company_location_id | id |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_name | string |\n| role_name | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyContactRoleAssignmentConnection! + + """ + The address used as shipping address for the location. + """ + shippingAddress: CompanyAddress + + """ + The list of staff members assigned to the company location. + """ + staffMemberAssignments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyLocationStaffMemberAssignmentSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| company_location_id | id |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| staff_member_id | id |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyLocationStaffMemberAssignmentConnection! + + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| currency_code | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): StoreCreditAccountConnection! + + """ + The list of tax exemptions applied to the location. + """ + taxExemptions: [TaxExemption!]! @deprecated(reason: "Use `taxSettings` instead.") + + """ + The tax registration ID for the company location. + """ + taxRegistrationId: String @deprecated(reason: "Use `taxSettings` instead.") + + """ + The tax settings for the company location. + """ + taxSettings: CompanyLocationTaxSettings! + + """ + The total amount spent by the location. + """ + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company location was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `companyLocationAssignAddress` mutation. +""" +type CompanyLocationAssignAddressPayload { + """ + The list of updated addresses on the company location. + """ + addresses: [CompanyAddress!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignRoles` mutation. +""" +type CompanyLocationAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignStaffMembers` mutation. +""" +type CompanyLocationAssignStaffMembersPayload { + """ + The list of created staff member assignments. + """ + companyLocationStaffMemberAssignments: [CompanyLocationStaffMemberAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignTaxExemptions` mutation. +""" +type CompanyLocationAssignTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A list of products with publishing and pricing information associated with company locations. + +Company location catalogs can include an optional publication to control product visibility and a price list to customize pricing. When a publication isn't associated with the catalog, product availability is determined by the sales channel. +""" +type CompanyLocationCatalog implements Catalog & Node { + """ + The company locations associated with the catalog. + """ + companyLocations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyLocationSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_id | id |\n| created_at | time |\n| external_id | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| ids | string |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyLocationConnection! + + """ + The number of company locations associated with the catalog. + """ + companyLocationsCount: Count + + """ + A globally-unique ID. + """ + id: ID! + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple CompanyLocations. +""" +type CompanyLocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationEdge!]! + + """ + A list of nodes that are contained in CompanyLocationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyLocation!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyLocationCreate` mutation. +""" +type CompanyLocationCreatePayload { + """ + The created company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationCreateTaxRegistration` mutation. +""" +type CompanyLocationCreateTaxRegistrationPayload { + """ + The company location with the created tax registration. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationDelete` mutation. +""" +type CompanyLocationDeletePayload { + """ + The ID of the deleted company location. + """ + deletedCompanyLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyLocation and a cursor during pagination. +""" +type CompanyLocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyLocationEdge. + """ + node: CompanyLocation! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationInput { + """ + The name of the company location. + """ + name: String + + """ + The phone number of the company location. + """ + phone: String + + """ + The preferred locale of the company location. + """ + locale: String + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + A note about the company location. + """ + note: String + + """ + The configuration for the buyer's checkout at the company location. + """ + buyerExperienceConfiguration: BuyerExperienceConfigurationInput + + """ + The input fields to create or update the billing address for a company location. + """ + billingAddress: CompanyAddressInput + + """ + The input fields to create or update the shipping address for a company location. + """ + shippingAddress: CompanyAddressInput + + """ + Whether the billing address is the same as the shipping address. If the value is true, then the input for `billingAddress` is ignored. + """ + billingSameAsShipping: Boolean + + """ + The tax registration ID of the company location. + """ + taxRegistrationId: String + + """ + The list of tax exemptions to apply to the company location. + """ + taxExemptions: [TaxExemption!] + + """ + Whether the location is exempt from taxes. + """ + taxExempt: Boolean +} + +""" +Return type for `companyLocationRemoveStaffMembers` mutation. +""" +type CompanyLocationRemoveStaffMembersPayload { + """ + The list of IDs of the deleted staff member assignment. + """ + deletedCompanyLocationStaffMemberAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeRoles` mutation. +""" +type CompanyLocationRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company location. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxExemptions` mutation. +""" +type CompanyLocationRevokeTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxRegistration` mutation. +""" +type CompanyLocationRevokeTaxRegistrationPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for the role and contact to assign on a location. +""" +input CompanyLocationRoleAssign { + """ + The role ID. + """ + companyContactRoleId: ID! + + """ + The company contact ID.. + """ + companyContactId: ID! +} + +""" +The set of valid sort keys for the CompanyLocation query. +""" +enum CompanyLocationSortKeys { + """ + Sort by the `company_and_location_name` value. + """ + COMPANY_AND_LOCATION_NAME + + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +A representation of store's staff member who is assigned to a [company location](https://shopify.dev/api/admin-graphql/latest/objects/CompanyLocation) of the shop. The staff member's actions will be limited to objects associated with the assigned company location. +""" +type CompanyLocationStaffMemberAssignment implements Node { + """ + The company location the staff member is assigned to. + """ + companyLocation: CompanyLocation! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Represents the data of a staff member who's assigned to a company location. + """ + staffMember: StaffMember! +} + +""" +An auto-generated type for paginating through multiple CompanyLocationStaffMemberAssignments. +""" +type CompanyLocationStaffMemberAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationStaffMemberAssignmentEdge!]! + + """ + A list of nodes that are contained in CompanyLocationStaffMemberAssignmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyLocationStaffMemberAssignment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyLocationStaffMemberAssignment and a cursor during pagination. +""" +type CompanyLocationStaffMemberAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyLocationStaffMemberAssignmentEdge. + """ + node: CompanyLocationStaffMemberAssignment! +} + +""" +The set of valid sort keys for the CompanyLocationStaffMemberAssignment query. +""" +enum CompanyLocationStaffMemberAssignmentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Represents the tax settings for a company location. +""" +type CompanyLocationTaxSettings { + """ + Whether the location is exempt from taxes. + """ + taxExempt: Boolean! + + """ + The list of tax exemptions applied to the location. + """ + taxExemptions: [TaxExemption!]! + + """ + The tax registration ID for the company location. + """ + taxRegistrationId: String +} + +""" +Return type for `companyLocationTaxSettingsUpdate` mutation. +""" +type CompanyLocationTaxSettingsUpdatePayload { + """ + The company location with the updated tax settings. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationUpdateInput { + """ + The name of the company location. + """ + name: String + + """ + The phone number of the company location. + """ + phone: String + + """ + The preferred locale of the company location. + """ + locale: String + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + A note about the company location. + """ + note: String + + """ + The configuration for the buyer's checkout at the company location. + """ + buyerExperienceConfiguration: BuyerExperienceConfigurationInput +} + +""" +Return type for `companyLocationUpdate` mutation. +""" +type CompanyLocationUpdatePayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A condition checking the company location a visitor is purchasing for. +""" +type CompanyLocationsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The company locations that comprise the market. + """ + companyLocations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CompanyLocationConnection! +} + +""" +Return type for `companyLocationsDelete` mutation. +""" +type CompanyLocationsDeletePayload { + """ + A list of IDs of the deleted company locations. + """ + deletedCompanyLocationIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyRevokeMainContact` mutation. +""" +type CompanyRevokeMainContactPayload { + """ + The company from which the main contact is revoked. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the Company query. +""" +enum CompanySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `order_count` value. + """ + ORDER_COUNT + + """ + Sort by the `since_date` value. + """ + SINCE_DATE + + """ + Sort by the `total_spent` value. + """ + TOTAL_SPENT + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyUpdate` mutation. +""" +type CompanyUpdatePayload { + """ + The updated company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An option on the bundle parent product that is consolidated from multiple different components. +""" +type ComponentizedProductsBundleConsolidatedOption { + """ + The name of the consolidated option. + """ + name: String! + + """ + The selections of the consolidated option. + """ + selections: [ComponentizedProductsBundleConsolidatedOptionSelection!]! +} + +""" +An option selection for a bundle consolidated option. +""" +type ComponentizedProductsBundleConsolidatedOptionSelection { + """ + The component values that are included in the consolidated option selection. + """ + components: [ComponentizedProductsBundleConsolidatedOptionSelectionComponent!]! + + """ + The value of the consolidated option on the bundle parent. + """ + value: String! +} + +""" +A component that's included in a bundle consolidated option selection. +""" +type ComponentizedProductsBundleConsolidatedOptionSelectionComponent { + """ + The ID of the component's option that's included in this consolidated option selection. + """ + optionId: ID! + + """ + The value of the component's option value that's included in this consolidated option selection. + """ + value: String! +} + +""" +A consent policy describes the level of consent that the merchant requires from the user before actually +collecting and processing the data. +""" +type ConsentPolicy implements Node { + """ + Whether consent is required for the region. + """ + consentRequired: Boolean + + """ + The `ISO 3166` country code for which the policy applies. + """ + countryCode: PrivacyCountryCode + + """ + Whether data sale opt-out is required for the region. + """ + dataSaleOptOutRequired: Boolean + + """ + The global ID of the consent policy. IDs prefixed with `SD-` are system default policies. + """ + id: ID! + + """ + The `ISO 3166` region code for which the policy applies. + """ + regionCode: String + + """ + The global ID of the shop that owns the policy. + """ + shopId: ID! +} + +""" +The errors encountered while performing mutations on consent policies. +""" +type ConsentPolicyError implements DisplayableError { + """ + The error code. + """ + code: ConsentPolicyErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ConsentPolicyError`. +""" +enum ConsentPolicyErrorCode { + """ + Country code is required. + """ + COUNTRY_CODE_REQUIRED + + """ + Region code is required for countries with existing regional policies. + """ + REGION_CODE_REQUIRED + + """ + Region code must match the country code. + """ + REGION_CODE_MUST_MATCH_COUNTRY_CODE + + """ + Shopify's cookie banner must be disabled. + """ + SHOPIFY_COOKIE_BANNER_NOT_DISABLED + + """ + Unsupported consent policy. + """ + UNSUPORTED_CONSENT_POLICY +} + +""" +The input fields for a consent policy to be updated or created. +""" +input ConsentPolicyInput { + """ + The `ISO 3166` country code for which the policy applies. + """ + countryCode: PrivacyCountryCode + + """ + The `ISO 3166` region code for which the policy applies. + """ + regionCode: String + + """ + Whether consent is required for the region. + """ + consentRequired: Boolean + + """ + Whether data sale opt-out is required for the region. + """ + dataSaleOptOutRequired: Boolean +} + +""" +A country or region code. +""" +type ConsentPolicyRegion { + """ + The `ISO 3166` country code for which the policy applies. + """ + countryCode: PrivacyCountryCode + + """ + The `ISO 3166` region code for which the policy applies. + """ + regionCode: String +} + +""" +Return type for `consentPolicyUpdate` mutation. +""" +type ConsentPolicyUpdatePayload { + """ + All updated and created consent policies. The consent policies that haven't been modified as part of the mutation aren't returned. + """ + updatedPolicies: [ConsentPolicy!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ConsentPolicyError!]! +} + +""" +The input fields for the context data that determines the pricing of a variant. Refer to [Product](https://shopify.dev/docs/api/admin-graphql/latest/queries/product?example=Get+the+price+range+for+a+product+for+buyers+from+Canada)for more information on how to use this input object. +""" +input ContextualPricingContext { + """ + The country code used to fetch country-specific prices. + """ + country: CountryCode + + """ + The CompanyLocation ID used to fetch company location specific prices. + """ + companyLocationId: ID + + """ + The Location ID used to fetch location specific prices. + """ + locationId: ID +} + +""" +The context data that determines the publication status of a product. +""" +input ContextualPublicationContext { + """ + The country code used to fetch country-specific publication. + """ + country: CountryCode + + """ + The company location ID used to fetch company-specific publication. + """ + companyLocationId: ID + + """ + The Location ID used to fetch the publication status of a product. + """ + locationId: ID +} + +""" +A shop's banner settings. +""" +type CookieBanner implements HasPublishedTranslations { + """ + Indicates if the banner is auto managed. + """ + autoManaged: Boolean! + + """ + Indicates if the banner is enabled. + """ + enabled: Boolean! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +A numeric count with precision information indicating whether the count is exact or an estimate. +""" +type Count { + """ + The count of elements. + """ + count: Int! + + """ + The count's precision, or the exactness of the value. + """ + precision: CountPrecision! +} + +""" +The precision of the value returned by a count field. +""" +enum CountPrecision { + """ + The count is exactly the value. A write may not be reflected instantaneously. + """ + EXACT + + """ + The count is at least the value. A limit was imposed and reached. + """ + AT_LEAST +} + +""" +The list of all the countries from the combined shipping zones for the shop. +""" +type CountriesInShippingZones { + """ + The list of all the countries from all the combined shipping zones. + """ + countryCodes: [CountryCode!]! + + """ + Whether 'Rest of World' has been defined in any of the shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. +If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision +of another country. For example, the territories associated with Spain are represented by the country code `ES`, +and the territories associated with the United States of America are represented by the country code `US`. +""" +enum CountryCode { + """ + Afghanistan. + """ + AF + + """ + Åland Islands. + """ + AX + + """ + Albania. + """ + AL + + """ + Algeria. + """ + DZ + + """ + Andorra. + """ + AD + + """ + Angola. + """ + AO + + """ + Anguilla. + """ + AI + + """ + Antigua & Barbuda. + """ + AG + + """ + Argentina. + """ + AR + + """ + Armenia. + """ + AM + + """ + Aruba. + """ + AW + + """ + Ascension Island. + """ + AC + + """ + Australia. + """ + AU + + """ + Austria. + """ + AT + + """ + Azerbaijan. + """ + AZ + + """ + Bahamas. + """ + BS + + """ + Bahrain. + """ + BH + + """ + Bangladesh. + """ + BD + + """ + Barbados. + """ + BB + + """ + Belarus. + """ + BY + + """ + Belgium. + """ + BE + + """ + Belize. + """ + BZ + + """ + Benin. + """ + BJ + + """ + Bermuda. + """ + BM + + """ + Bhutan. + """ + BT + + """ + Bolivia. + """ + BO + + """ + Bosnia & Herzegovina. + """ + BA + + """ + Botswana. + """ + BW + + """ + Bouvet Island. + """ + BV + + """ + Brazil. + """ + BR + + """ + British Indian Ocean Territory. + """ + IO + + """ + Brunei. + """ + BN + + """ + Bulgaria. + """ + BG + + """ + Burkina Faso. + """ + BF + + """ + Burundi. + """ + BI + + """ + Cambodia. + """ + KH + + """ + Canada. + """ + CA + + """ + Cape Verde. + """ + CV + + """ + Caribbean Netherlands. + """ + BQ + + """ + Cayman Islands. + """ + KY + + """ + Central African Republic. + """ + CF + + """ + Chad. + """ + TD + + """ + Chile. + """ + CL + + """ + China. + """ + CN + + """ + Christmas Island. + """ + CX + + """ + Cocos (Keeling) Islands. + """ + CC + + """ + Colombia. + """ + CO + + """ + Comoros. + """ + KM + + """ + Congo - Brazzaville. + """ + CG + + """ + Congo - Kinshasa. + """ + CD + + """ + Cook Islands. + """ + CK + + """ + Costa Rica. + """ + CR + + """ + Croatia. + """ + HR + + """ + Cuba. + """ + CU + + """ + Curaçao. + """ + CW + + """ + Cyprus. + """ + CY + + """ + Czechia. + """ + CZ + + """ + Côte d’Ivoire. + """ + CI + + """ + Denmark. + """ + DK + + """ + Djibouti. + """ + DJ + + """ + Dominica. + """ + DM + + """ + Dominican Republic. + """ + DO + + """ + Ecuador. + """ + EC + + """ + Egypt. + """ + EG + + """ + El Salvador. + """ + SV + + """ + Equatorial Guinea. + """ + GQ + + """ + Eritrea. + """ + ER + + """ + Estonia. + """ + EE + + """ + Eswatini. + """ + SZ + + """ + Ethiopia. + """ + ET + + """ + Falkland Islands. + """ + FK + + """ + Faroe Islands. + """ + FO + + """ + Fiji. + """ + FJ + + """ + Finland. + """ + FI + + """ + France. + """ + FR + + """ + French Guiana. + """ + GF + + """ + French Polynesia. + """ + PF + + """ + French Southern Territories. + """ + TF """ Gabon. """ - GA + GA + + """ + Gambia. + """ + GM + + """ + Georgia. + """ + GE + + """ + Germany. + """ + DE + + """ + Ghana. + """ + GH + + """ + Gibraltar. + """ + GI + + """ + Greece. + """ + GR + + """ + Greenland. + """ + GL + + """ + Grenada. + """ + GD + + """ + Guadeloupe. + """ + GP + + """ + Guatemala. + """ + GT + + """ + Guernsey. + """ + GG + + """ + Guinea. + """ + GN + + """ + Guinea-Bissau. + """ + GW + + """ + Guyana. + """ + GY + + """ + Haiti. + """ + HT + + """ + Heard & McDonald Islands. + """ + HM + + """ + Vatican City. + """ + VA + + """ + Honduras. + """ + HN + + """ + Hong Kong SAR. + """ + HK + + """ + Hungary. + """ + HU + + """ + Iceland. + """ + IS + + """ + India. + """ + IN + + """ + Indonesia. + """ + ID + + """ + Iran. + """ + IR + + """ + Iraq. + """ + IQ + + """ + Ireland. + """ + IE + + """ + Isle of Man. + """ + IM + + """ + Israel. + """ + IL + + """ + Italy. + """ + IT + + """ + Jamaica. + """ + JM + + """ + Japan. + """ + JP + + """ + Jersey. + """ + JE + + """ + Jordan. + """ + JO + + """ + Kazakhstan. + """ + KZ + + """ + Kenya. + """ + KE + + """ + Kiribati. + """ + KI + + """ + North Korea. + """ + KP + + """ + Kosovo. + """ + XK + + """ + Kuwait. + """ + KW + + """ + Kyrgyzstan. + """ + KG + + """ + Laos. + """ + LA + + """ + Latvia. + """ + LV + + """ + Lebanon. + """ + LB + + """ + Lesotho. + """ + LS + + """ + Liberia. + """ + LR + + """ + Libya. + """ + LY + + """ + Liechtenstein. + """ + LI + + """ + Lithuania. + """ + LT + + """ + Luxembourg. + """ + LU + + """ + Macao SAR. + """ + MO + + """ + Madagascar. + """ + MG + + """ + Malawi. + """ + MW + + """ + Malaysia. + """ + MY + + """ + Maldives. + """ + MV + + """ + Mali. + """ + ML + + """ + Malta. + """ + MT + + """ + Martinique. + """ + MQ + + """ + Mauritania. + """ + MR + + """ + Mauritius. + """ + MU + + """ + Mayotte. + """ + YT + + """ + Mexico. + """ + MX + + """ + Moldova. + """ + MD + + """ + Monaco. + """ + MC + + """ + Mongolia. + """ + MN + + """ + Montenegro. + """ + ME + + """ + Montserrat. + """ + MS + + """ + Morocco. + """ + MA + + """ + Mozambique. + """ + MZ + + """ + Myanmar (Burma). + """ + MM + + """ + Namibia. + """ + NA + + """ + Nauru. + """ + NR + + """ + Nepal. + """ + NP + + """ + Netherlands. + """ + NL + + """ + Netherlands Antilles. + """ + AN + + """ + New Caledonia. + """ + NC + + """ + New Zealand. + """ + NZ + + """ + Nicaragua. + """ + NI + + """ + Niger. + """ + NE + + """ + Nigeria. + """ + NG + + """ + Niue. + """ + NU + + """ + Norfolk Island. + """ + NF + + """ + North Macedonia. + """ + MK + + """ + Norway. + """ + NO + + """ + Oman. + """ + OM + + """ + Pakistan. + """ + PK + + """ + Palestinian Territories. + """ + PS + + """ + Panama. + """ + PA + + """ + Papua New Guinea. + """ + PG + + """ + Paraguay. + """ + PY + + """ + Peru. + """ + PE + + """ + Philippines. + """ + PH + + """ + Pitcairn Islands. + """ + PN + + """ + Poland. + """ + PL + + """ + Portugal. + """ + PT + + """ + Qatar. + """ + QA + + """ + Cameroon. + """ + CM + + """ + Réunion. + """ + RE + + """ + Romania. + """ + RO + + """ + Russia. + """ + RU + + """ + Rwanda. + """ + RW + + """ + St. Barthélemy. + """ + BL + + """ + St. Helena. + """ + SH + + """ + St. Kitts & Nevis. + """ + KN + + """ + St. Lucia. + """ + LC + + """ + St. Martin. + """ + MF + + """ + St. Pierre & Miquelon. + """ + PM + + """ + Samoa. + """ + WS + + """ + San Marino. + """ + SM + + """ + São Tomé & Príncipe. + """ + ST + + """ + Saudi Arabia. + """ + SA + + """ + Senegal. + """ + SN + + """ + Serbia. + """ + RS + + """ + Seychelles. + """ + SC + + """ + Sierra Leone. + """ + SL + + """ + Singapore. + """ + SG + + """ + Sint Maarten. + """ + SX + + """ + Slovakia. + """ + SK + + """ + Slovenia. + """ + SI + + """ + Solomon Islands. + """ + SB + + """ + Somalia. + """ + SO + + """ + South Africa. + """ + ZA + + """ + South Georgia & South Sandwich Islands. + """ + GS + + """ + South Korea. + """ + KR + + """ + South Sudan. + """ + SS + + """ + Spain. + """ + ES + + """ + Sri Lanka. + """ + LK + + """ + St. Vincent & Grenadines. + """ + VC + + """ + Sudan. + """ + SD + + """ + Suriname. + """ + SR + + """ + Svalbard & Jan Mayen. + """ + SJ + + """ + Sweden. + """ + SE + + """ + Switzerland. + """ + CH + + """ + Syria. + """ + SY + + """ + Taiwan. + """ + TW + + """ + Tajikistan. + """ + TJ + + """ + Tanzania. + """ + TZ + + """ + Thailand. + """ + TH + + """ + Timor-Leste. + """ + TL + + """ + Togo. + """ + TG + + """ + Tokelau. + """ + TK + + """ + Tonga. + """ + TO + + """ + Trinidad & Tobago. + """ + TT + + """ + Tristan da Cunha. + """ + TA + + """ + Tunisia. + """ + TN + + """ + Türkiye. + """ + TR + + """ + Turkmenistan. + """ + TM + + """ + Turks & Caicos Islands. + """ + TC + + """ + Tuvalu. + """ + TV + + """ + Uganda. + """ + UG + + """ + Ukraine. + """ + UA + + """ + United Arab Emirates. + """ + AE + + """ + United Kingdom. + """ + GB + + """ + United States. + """ + US + + """ + U.S. Outlying Islands. + """ + UM + + """ + Uruguay. + """ + UY + + """ + Uzbekistan. + """ + UZ + + """ + Vanuatu. + """ + VU + + """ + Venezuela. + """ + VE + + """ + Vietnam. + """ + VN + + """ + British Virgin Islands. + """ + VG + + """ + Wallis & Futuna. + """ + WF + + """ + Western Sahara. + """ + EH + + """ + Yemen. + """ + YE + + """ + Zambia. + """ + ZM + + """ + Zimbabwe. + """ + ZW + + """ + Unknown Region. + """ + ZZ +} + +""" +The country-specific harmonized system code and ISO country code for an inventory item. +""" +type CountryHarmonizedSystemCode { + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. + """ + countryCode: CountryCode! + + """ + The country-specific harmonized system code. These are usually longer than 6 digits. + """ + harmonizedSystemCode: String! +} + +""" +An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes. +""" +type CountryHarmonizedSystemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CountryHarmonizedSystemCodeEdge!]! + + """ + A list of nodes that are contained in CountryHarmonizedSystemCodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CountryHarmonizedSystemCode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination. +""" +type CountryHarmonizedSystemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CountryHarmonizedSystemCodeEdge. + """ + node: CountryHarmonizedSystemCode! +} + +""" +The input fields required to specify a harmonized system code. +""" +input CountryHarmonizedSystemCodeInput { + """ + Country specific harmonized system code. + """ + harmonizedSystemCode: String! + + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. Represents global harmonized system code when set to null. + """ + countryCode: CountryCode +} + +""" +The input fields required to create a media object. +""" +input CreateMediaInput { + """ + The original source of the media object. This might be an external URL or a staged upload URL. + """ + originalSource: String! + + """ + The alt text associated with the media. + """ + alt: String + + """ + The media content type. + """ + mediaContentType: MediaContentType! +} + +""" +The part of the image that should remain after cropping. +""" +enum CropRegion { + """ + Keep the center of the image. + """ + CENTER + + """ + Keep the top of the image. + """ + TOP + + """ + Keep the bottom of the image. + """ + BOTTOM + + """ + Keep the left of the image. + """ + LEFT + + """ + Keep the right of the image. + """ + RIGHT +} + +""" +The currency codes that represent the world currencies throughout the Admin API. Currency codes include +[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes, +digital currency codes. +""" +enum CurrencyCode { + """ + United States Dollars (USD). + """ + USD + + """ + Euro (EUR). + """ + EUR + + """ + United Kingdom Pounds (GBP). + """ + GBP + + """ + Canadian Dollars (CAD). + """ + CAD + + """ + Afghan Afghani (AFN). + """ + AFN + + """ + Albanian Lek (ALL). + """ + ALL + + """ + Algerian Dinar (DZD). + """ + DZD + + """ + Angolan Kwanza (AOA). + """ + AOA + + """ + Argentine Pesos (ARS). + """ + ARS + + """ + Armenian Dram (AMD). + """ + AMD + + """ + Aruban Florin (AWG). + """ + AWG + + """ + Australian Dollars (AUD). + """ + AUD + + """ + Barbadian Dollar (BBD). + """ + BBD + + """ + Azerbaijani Manat (AZN). + """ + AZN + + """ + Bangladesh Taka (BDT). + """ + BDT + + """ + Bahamian Dollar (BSD). + """ + BSD + + """ + Bahraini Dinar (BHD). + """ + BHD + + """ + Burundian Franc (BIF). + """ + BIF + + """ + Belarusian Ruble (BYN). + """ + BYN + + """ + Belize Dollar (BZD). + """ + BZD + + """ + Bermudian Dollar (BMD). + """ + BMD + + """ + Bhutanese Ngultrum (BTN). + """ + BTN + + """ + Bosnia and Herzegovina Convertible Mark (BAM). + """ + BAM + + """ + Brazilian Real (BRL). + """ + BRL + + """ + Bolivian Boliviano (BOB). + """ + BOB + + """ + Botswana Pula (BWP). + """ + BWP + + """ + Brunei Dollar (BND). + """ + BND + + """ + Bulgarian Lev (BGN). + """ + BGN + + """ + Burmese Kyat (MMK). + """ + MMK + + """ + Cambodian Riel. + """ + KHR + + """ + Cape Verdean escudo (CVE). + """ + CVE + + """ + Cayman Dollars (KYD). + """ + KYD + + """ + Central African CFA Franc (XAF). + """ + XAF + + """ + Chilean Peso (CLP). + """ + CLP + + """ + Chinese Yuan Renminbi (CNY). + """ + CNY + + """ + Colombian Peso (COP). + """ + COP + + """ + Comorian Franc (KMF). + """ + KMF + + """ + Congolese franc (CDF). + """ + CDF + + """ + Costa Rican Colones (CRC). + """ + CRC + + """ + Croatian Kuna (HRK). + """ + HRK + + """ + Czech Koruny (CZK). + """ + CZK + + """ + Danish Kroner (DKK). + """ + DKK + + """ + Djiboutian Franc (DJF). + """ + DJF + + """ + Dominican Peso (DOP). + """ + DOP + + """ + East Caribbean Dollar (XCD). + """ + XCD + + """ + Egyptian Pound (EGP). + """ + EGP + + """ + Eritrean Nakfa (ERN). + """ + ERN + + """ + Ethiopian Birr (ETB). + """ + ETB + + """ + Falkland Islands Pounds (FKP). + """ + FKP + + """ + CFP Franc (XPF). + """ + XPF + + """ + Fijian Dollars (FJD). + """ + FJD + + """ + Gibraltar Pounds (GIP). + """ + GIP + + """ + Gambian Dalasi (GMD). + """ + GMD + + """ + Ghanaian Cedi (GHS). + """ + GHS + + """ + Guatemalan Quetzal (GTQ). + """ + GTQ + + """ + Guyanese Dollar (GYD). + """ + GYD + + """ + Georgian Lari (GEL). + """ + GEL + + """ + Guinean Franc (GNF). + """ + GNF + + """ + Haitian Gourde (HTG). + """ + HTG + + """ + Honduran Lempira (HNL). + """ + HNL + + """ + Hong Kong Dollars (HKD). + """ + HKD + + """ + Hungarian Forint (HUF). + """ + HUF + + """ + Icelandic Kronur (ISK). + """ + ISK + + """ + Indian Rupees (INR). + """ + INR + + """ + Indonesian Rupiah (IDR). + """ + IDR + + """ + Israeli New Shekel (NIS). + """ + ILS + + """ + Iranian Rial (IRR). + """ + IRR + + """ + Iraqi Dinar (IQD). + """ + IQD + + """ + Jamaican Dollars (JMD). + """ + JMD + + """ + Japanese Yen (JPY). + """ + JPY + + """ + Jersey Pound. + """ + JEP + + """ + Jordanian Dinar (JOD). + """ + JOD + + """ + Kazakhstani Tenge (KZT). + """ + KZT + + """ + Kenyan Shilling (KES). + """ + KES + + """ + Kiribati Dollar (KID). + """ + KID + + """ + Kuwaiti Dinar (KWD). + """ + KWD + + """ + Kyrgyzstani Som (KGS). + """ + KGS + + """ + Laotian Kip (LAK). + """ + LAK + + """ + Latvian Lati (LVL). + """ + LVL + + """ + Lebanese Pounds (LBP). + """ + LBP + + """ + Lesotho Loti (LSL). + """ + LSL + + """ + Liberian Dollar (LRD). + """ + LRD + + """ + Libyan Dinar (LYD). + """ + LYD + + """ + Lithuanian Litai (LTL). + """ + LTL + + """ + Malagasy Ariary (MGA). + """ + MGA + + """ + Macedonia Denar (MKD). + """ + MKD + + """ + Macanese Pataca (MOP). + """ + MOP + + """ + Malawian Kwacha (MWK). + """ + MWK + + """ + Maldivian Rufiyaa (MVR). + """ + MVR + + """ + Mauritanian Ouguiya (MRU). + """ + MRU + + """ + Mexican Pesos (MXN). + """ + MXN + + """ + Malaysian Ringgits (MYR). + """ + MYR + + """ + Mauritian Rupee (MUR). + """ + MUR + + """ + Moldovan Leu (MDL). + """ + MDL + + """ + Moroccan Dirham. + """ + MAD + + """ + Mongolian Tugrik. + """ + MNT + + """ + Mozambican Metical. + """ + MZN + + """ + Namibian Dollar. + """ + NAD + + """ + Nepalese Rupee (NPR). + """ + NPR + + """ + Netherlands Antillean Guilder. + """ + ANG + + """ + New Zealand Dollars (NZD). + """ + NZD + + """ + Nicaraguan Córdoba (NIO). + """ + NIO + + """ + Nigerian Naira (NGN). + """ + NGN + + """ + Norwegian Kroner (NOK). + """ + NOK + + """ + Omani Rial (OMR). + """ + OMR + + """ + Panamian Balboa (PAB). + """ + PAB + + """ + Pakistani Rupee (PKR). + """ + PKR + + """ + Papua New Guinean Kina (PGK). + """ + PGK + + """ + Paraguayan Guarani (PYG). + """ + PYG + + """ + Peruvian Nuevo Sol (PEN). + """ + PEN + + """ + Philippine Peso (PHP). + """ + PHP + + """ + Polish Zlotych (PLN). + """ + PLN + + """ + Qatari Rial (QAR). + """ + QAR + + """ + Romanian Lei (RON). + """ + RON + + """ + Russian Rubles (RUB). + """ + RUB + + """ + Rwandan Franc (RWF). + """ + RWF + + """ + Samoan Tala (WST). + """ + WST + + """ + Saint Helena Pounds (SHP). + """ + SHP + + """ + Saudi Riyal (SAR). + """ + SAR + + """ + Serbian dinar (RSD). + """ + RSD + + """ + Seychellois Rupee (SCR). + """ + SCR + + """ + Sierra Leonean Leone (SLL). + """ + SLL + + """ + Singapore Dollars (SGD). + """ + SGD + + """ + Sudanese Pound (SDG). + """ + SDG + + """ + Somali Shilling (SOS). + """ + SOS + + """ + Syrian Pound (SYP). + """ + SYP + + """ + South African Rand (ZAR). + """ + ZAR + + """ + South Korean Won (KRW). + """ + KRW + + """ + South Sudanese Pound (SSP). + """ + SSP + + """ + Solomon Islands Dollar (SBD). + """ + SBD + + """ + Sri Lankan Rupees (LKR). + """ + LKR + + """ + Surinamese Dollar (SRD). + """ + SRD + + """ + Swazi Lilangeni (SZL). + """ + SZL + + """ + Swedish Kronor (SEK). + """ + SEK + + """ + Swiss Francs (CHF). + """ + CHF + + """ + Taiwan Dollars (TWD). + """ + TWD + + """ + Thai baht (THB). + """ + THB + + """ + Tajikistani Somoni (TJS). + """ + TJS + + """ + Tanzanian Shilling (TZS). + """ + TZS + + """ + Tongan Pa'anga (TOP). + """ + TOP + + """ + Trinidad and Tobago Dollars (TTD). + """ + TTD + + """ + Tunisian Dinar (TND). + """ + TND + + """ + Turkish Lira (TRY). + """ + TRY + + """ + Turkmenistani Manat (TMT). + """ + TMT + + """ + Ugandan Shilling (UGX). + """ + UGX + + """ + Ukrainian Hryvnia (UAH). + """ + UAH + + """ + United Arab Emirates Dirham (AED). + """ + AED + + """ + Uruguayan Pesos (UYU). + """ + UYU + + """ + Uzbekistan som (UZS). + """ + UZS + + """ + Vanuatu Vatu (VUV). + """ + VUV + + """ + Venezuelan Bolivares Soberanos (VES). + """ + VES + + """ + Vietnamese đồng (VND). + """ + VND + + """ + West African CFA franc (XOF). + """ + XOF + + """ + Yemeni Rial (YER). + """ + YER + + """ + Zambian Kwacha (ZMW). + """ + ZMW + + """ + United States Dollars Coin (USDC). + """ + USDC + + """ + Belarusian Ruble (BYR). + """ + BYR @deprecated(reason: "Use `BYN` instead.") + + """ + Sao Tome And Principe Dobra (STD). + """ + STD @deprecated(reason: "Use `STN` instead.") + + """ + Sao Tome And Principe Dobra (STN). + """ + STN + + """ + Venezuelan Bolivares (VED). + """ + VED + + """ + Venezuelan Bolivares (VEF). + """ + VEF @deprecated(reason: "Use `VES` instead.") + + """ + Unrecognized currency. + """ + XXX +} + +""" +Represents a currency exchange adjustment applied to an order transaction. +""" +type CurrencyExchangeAdjustment implements Node { + """ + The adjustment amount in both shop and presentment currencies. + """ + adjustment: MoneyV2! + + """ + The final amount in both shop and presentment currencies after the adjustment. + """ + finalAmountSet: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The original amount in both shop and presentment currencies before the adjustment. + """ + originalAmountSet: MoneyV2! +} + +""" +Currency formats configured for the merchant. These formats are available to use within Liquid. +""" +type CurrencyFormats { + """ + Money without currency in HTML. + """ + moneyFormat: FormattedString! + + """ + Money without currency in emails. + """ + moneyInEmailsFormat: String! + + """ + Money with currency in HTML. + """ + moneyWithCurrencyFormat: FormattedString! + + """ + Money with currency in emails. + """ + moneyWithCurrencyInEmailsFormat: String! +} + +""" +A setting for a presentment currency. +""" +type CurrencySetting { + """ + The currency's ISO code. + """ + currencyCode: CurrencyCode! + + """ + The full name of the currency. + """ + currencyName: String! + + """ + Whether the currency is enabled or not. An enabled currency setting is visible to buyers and allows orders to be generated with that currency as presentment. + """ + enabled: Boolean! + + """ + The manual rate, if enabled, that applies to this currency when converting from shop currency. This rate is specific to the associated market's currency setting. + """ + manualRate: Decimal + + """ + The date and time when the active exchange rate for the currency was last modified. It can be the automatic rate's creation date, or the manual rate's last updated at date if active. + """ + rateUpdatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple CurrencySettings. +""" +type CurrencySettingConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CurrencySettingEdge!]! + + """ + A list of nodes that are contained in CurrencySettingEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CurrencySetting!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CurrencySetting and a cursor during pagination. +""" +type CurrencySettingEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CurrencySettingEdge. + """ + node: CurrencySetting! +} + +""" +The input fields for a custom shipping package used to pack shipment. +""" +input CustomShippingPackageInput { + """ + Weight of the empty shipping package. + """ + weight: WeightInput + + """ + Outside dimensions of the empty shipping package. + """ + dimensions: ObjectDimensionsInput + + """ + The default package is the one used to calculate shipping costs on checkout. + """ + default: Boolean = false + + """ + Descriptive name for the package. + """ + name: String + + """ + Type of package. + """ + type: ShippingPackageType +} + +""" +Information about a customer of the shop, such as the customer's contact details, purchase history, and marketing preferences. + +Tracks the customer's total spending through the [`amountSpent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-amountSpent) field and provides access to associated data such as payment methods and subscription contracts. + +> Caution: +> Only use this data if it's required for your app's functionality. Shopify will restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a legitimate use for the associated data. +""" +type Customer implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & HasStoreCreditAccounts & LegacyInteroperability & Node { + """ + A list of addresses associated with the customer. Limited to 250 addresses. Use `addressesV2` for paginated access to all addresses. + """ + addresses("Truncate the array result to this size." first: Int): [MailingAddress!]! @deprecated(reason: "Limited to 250 addresses. Use `addressesV2` for paginated access to all addresses.") + + """ + The addresses associated with the customer. + """ + addressesV2("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MailingAddressConnection! + + """ + The total amount that the customer has spent on orders in their lifetime. + """ + amountSpent: MoneyV2! + + """ + Whether the merchant can delete the customer from their store. + + A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an + order, they can't be deleted from a store. + """ + canDelete: Boolean! + + """ + A list of the customer's company contact profiles. + """ + companyContactProfiles: [CompanyContact!]! + + """ + The date and time when the customer was added to the store. + """ + createdAt: DateTime! + + """ + Whether the customer has opted out of having their data sold. + """ + dataSaleOptOut: Boolean! + + """ + The default address associated with the customer. + """ + defaultAddress: MailingAddress + + """ + The customer's default email address. + """ + defaultEmailAddress: CustomerEmailAddress + + """ + The customer's default phone number. + """ + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the customer, based on the values for first_name and last_name. If the first_name and + last_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number. + """ + displayName: String! + + """ + The customer's email address. + """ + email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") + + """ + The current email marketing state for the customer. + If the customer doesn't have an email address, then this property is `null`. + """ + emailMarketingConsent: CustomerEmailMarketingConsentState @deprecated(reason: "Use `defaultEmailAddress.marketingState`, `defaultEmailAddress.marketingOptInLevel`, `defaultEmailAddress.marketingUpdatedAt`, and `defaultEmailAddress.sourceLocation` instead.") + + """ + A list of events associated with the customer. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + The customer's first name. + """ + firstName: String + + """ + Whether the merchant has added timeline comments about the customer on the customer's page. + """ + hasTimelineComment: Boolean! @deprecated(reason: "To query for comments on the timeline, use the `events` connection and a 'query' argument containing `verb:comment`, or look for a 'CommentEvent' in the `__typename` of `events`.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the customer. + """ + image("Image width and height (1 - 2048 pixels)." size: Int @deprecated(reason: "Use `maxWidth` or `maxHeight` on `Image.transformedSrc` instead.")): Image! + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's last order. + """ + lastOrder: Order + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The amount of time since the customer was first added to the store. + + Example: 'about 12 years'. + """ + lifetimeDuration: String! + + """ + The customer's locale. + """ + locale: String! + + """ + The market that includes the customer’s default address. + """ + market: Market @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + Whether the customer can be merged with another customer. + """ + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A unique identifier for the customer that's used with Multipass login. + """ + multipassIdentifier: String + + """ + A note about the customer. + """ + note: String + + """ + The number of orders that the customer has made at the store in their lifetime. + """ + numberOfOrders: UnsignedInt64! + + """ + A list of the customer's orders. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| cart_token | string | Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. | | | - `cart_token:abc123` |\n| channel | string | Filter by the order attribution [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/OrderAttribution#field-OrderAttribution.fields.handle) (`Order.attribution.handle`) field. The legacy channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) (`ChannelInformation.channelDefinition.handle`) field is deprecated but remains supported during the deprecation period. | | | - `channel:web`
- `channel:web,pos` |\n| channel_id | id | Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) field. | | | - `channel_id:123` |\n| chargeback_status | string | Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. | - `accepted`
- `charge_refunded`
- `lost`
- `needs_response`
- `under_review`
- `won` | | - `chargeback_status:accepted` |\n| checkout_token | string | Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. | | | - `checkout_token:abc123` |\n| confirmation_number | string | Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. | | | - `confirmation_number:ABC123` |\n| created_at | time | Filter by the date and time when the order was created in Shopify's system. | | | - `created_at:2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| credit_card_last4 | string | Filter by the last four digits of the payment card that was used to pay for the order. This filter matches only the last four digits of the card for heightened security. | | | - `credit_card_last4:1234` |\n| current_total_price | float | Filter by the current total price of the order in the shop currency, including any returns/refunds/removals. This filter supports both exact values and ranges. | | | - `current_total_price:10`
- `current_total_price:>=5.00 current_total_price:<=20.99` |\n| customer_id | id | Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. | | | - `customer_id:123` |\n| delivery_method | string | Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) field. | - `shipping`
- `pick-up`
- `retail`
- `local`
- `pickup-point`
- `none` | | - `delivery_method:shipping` |\n| discount_code | string | Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. | | | - `discount_code:ABC123` |\n| email | string | Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. | | | - `email:example@shopify.com` |\n| financial_status | string | Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) field. | - `paid`
- `pending`
- `authorized`
- `partially_paid`
- `partially_refunded`
- `refunded`
- `voided`
- `expired` | | - `financial_status:authorized` |\n| fraud_protection_level | string | Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. | - `fully_protected`
- `partially_protected`
- `not_protected`
- `pending`
- `not_eligible`
- `not_available` | | - `fraud_protection_level:fully_protected` |\n| fulfillment_location_id | id | Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) (`Fulfillment.location.id`) field. | | | - `fulfillment_location_id:123` |\n| fulfillment_status | string | Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) field to prioritize shipments or monitor order processing. | - `unshipped`
- `shipped`
- `fulfilled`
- `partial`
- `scheduled`
- `on_hold`
- `unfulfilled`
- `request_declined` | | - `fulfillment_status:fulfilled` |\n| gateway | string | Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. | | | - `gateway:shopify_payments` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_id | id | Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) that's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under **Settings** > **Locations**. If no ID is provided, then the primary location of the shop is returned. | | | - `location_id:123` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) field. | | | - `name:1001-A` |\n| payment_id | string | Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. | | | - `payment_id:abc123` |\n| payment_provider_id | id | Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. | | | - `payment_provider_id:123` |\n| po_number | string | Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) field. | | | - `po_number:P01001` |\n| processed_at | time | Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) field. | | | - `processed_at:2021-01-01T00:00:00Z` |\n| reference_location_id | id | Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. | | | - `reference_location_id:123` |\n| return_status | string | Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) to monitor returns processing and track which orders have active returns. | - `return_requested`
- `in_progress`
- `inspection_complete`
- `returned`
- `return_failed`
- `no_return` | | - `return_status:in_progress` |\n| risk_level | string | Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. | - `high`
- `medium`
- `low`
- `none`
- `pending` | | - `risk_level:high` |\n| sales_channel | string | Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. | | | - `sales_channel: some_sales_channel` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:ABC123` |\n| source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - `source_identifier:1234-12-1000` |\n| source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - `source_name:web`
- `source_name:shopify_draft_order` |\n| status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - `open`
- `closed`
- `cancelled`
- `not_closed` | | - `status:open` |\n| subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - `subtotal_line_items_quantity:10`
- `subtotal_line_items_quantity:5..20` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| test | boolean | Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. | | | - `test:true` |\n| total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - `total_weight:10.5kg`
- `total_weight:>=5g total_weight:<=20g`
- `total_weight:.5 lb` |\n| updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - `updated_at:2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): OrderConnection! + + """ + A list of the customer's payment methods. + """ + paymentMethods("Whether to show the customer's revoked payment method." showRevoked: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CustomerPaymentMethodConnection! + + """ + The customer's phone number. + """ + phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") + + """ + Possible subscriber states of a customer defined by their subscription contracts. + """ + productSubscriberStatus: CustomerProductSubscriberStatus! + + """ + The current SMS marketing state for the customer's phone number. + + If the customer does not have a phone number, then this property is `null`. + """ + smsMarketingConsent: CustomerSmsMarketingConsentState @deprecated(reason: "Use `defaultPhoneNumber.marketingState`, `defaultPhoneNumber.marketingOptInLevel`, `defaultPhoneNumber.marketingUpdatedAt`, `defaultPhoneNumber.marketingCollectedFrom`, and `defaultPhoneNumber.sourceLocation` instead.") + + """ + The state of the customer's account with the shop. + + Please note that this only meaningful when Classic Customer Accounts is active. + """ + state: CustomerState! + + """ + The statistics for a given customer. + """ + statistics: CustomerStatistics! + + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| currency_code | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): StoreCreditAccountConnection! + + """ + A list of the customer's subscription contracts. + """ + subscriptionContracts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionContractConnection! + + """ + A comma separated list of tags that have been added to the customer. + """ + tags: [String!]! + + """ + Whether the customer is exempt from being charged taxes on their orders. + """ + taxExempt: Boolean! + + """ + The list of tax exemptions applied to the customer. + """ + taxExemptions: [TaxExemption!]! + + """ + The URL to unsubscribe the customer from the mailing list. + """ + unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") + + """ + The date and time when the customer was last updated. + """ + updatedAt: DateTime! + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly and + belongs to an existing domain. This doesn't guarantee that + the email address actually exists. + """ + validEmailAddress: Boolean! @deprecated(reason: "Use `defaultEmailAddress.validFormat` instead.") + + """ + Whether the customer has verified their email address. Defaults to `true` if the customer is created through the Shopify admin or API. + """ + verifiedEmail: Boolean! +} + +""" +An app extension page for the customer account navigation menu. +""" +type CustomerAccountAppExtensionPage implements CustomerAccountPage & Navigable & Node { + """ + The UUID of the app extension. + """ + appExtensionUuid: String + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +A native page for the customer account navigation menu. +""" +type CustomerAccountNativePage implements CustomerAccountPage & Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The type of customer account native page. + """ + pageType: CustomerAccountNativePagePageType! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +The type of customer account native page. +""" +enum CustomerAccountNativePagePageType { + """ + An orders page type. + """ + NATIVE_ORDERS + + """ + A settings page type. + """ + NATIVE_SETTINGS + + """ + A profile page type. + """ + NATIVE_PROFILE + + """ + An unknown page type. Represents new page types that may be added in future versions. + """ + UNKNOWN +} + +""" +A customer account page. +""" +interface CustomerAccountPage implements Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple CustomerAccountPages. +""" +type CustomerAccountPageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerAccountPageEdge!]! + + """ + A list of nodes that are contained in CustomerAccountPageEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CustomerAccountPage!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerAccountPage and a cursor during pagination. +""" +type CustomerAccountPageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerAccountPageEdge. + """ + node: CustomerAccountPage! +} + +""" +Information about the shop's customer account-related settings. Includes the [customer account version](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-CustomerAccountsV2.fields.customerAccountsVersion) which indicates whether the merchant is using new customer accounts or legacy customer accounts, along with other account configuration such as login requirements. +""" +type CustomerAccountsV2 { + """ + Indicates which version of customer accounts the merchant is using in online store and checkout. + """ + customerAccountsVersion: CustomerAccountsVersion! + + """ + Login links are shown in online store and checkout. + """ + loginLinksVisibleOnStorefrontAndCheckout: Boolean! + + """ + Customers are required to log in to their account before checkout. + """ + loginRequiredAtCheckout: Boolean! + + """ + The root url for the customer accounts pages. + """ + url: URL +} + +""" +The login redirection target for customer accounts. +""" +enum CustomerAccountsVersion { + """ + The customer is redirected to the classic customer accounts login page. + """ + CLASSIC + + """ + The customer is redirected to the new customer accounts login page. + """ + NEW_CUSTOMER_ACCOUNTS +} + +""" +Return type for `customerAddTaxExemptions` mutation. +""" +type CustomerAddTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressCreate` mutation. +""" +type CustomerAddressCreatePayload { + """ + The created address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressDelete` mutation. +""" +type CustomerAddressDeletePayload { + """ + The ID of the address deleted from the customer. + """ + deletedAddressId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressUpdate` mutation. +""" +type CustomerAddressUpdatePayload { + """ + The updated address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerCancelDataErasureUserError`. +""" +enum CustomerCancelDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to cancel customer data erasure. + """ + FAILED_TO_CANCEL + + """ + Customer's data is not scheduled for erasure. + """ + NOT_BEING_ERASED + + """ + Only the original requester can cancel this data erasure. + """ + UNAUTHORIZED_CANCELLATION +} + +""" +Return type for `customerCancelDataErasure` mutation. +""" +type CustomerCancelDataErasurePayload { + """ + The ID of the customer whose pending data erasure has been cancelled. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerCancelDataErasureUserError!]! +} + +""" +An error that occurs when cancelling a customer data erasure request. +""" +type CustomerCancelDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerCancelDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An auto-generated type for paginating through multiple Customers. +""" +type CustomerConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerEdge!]! + + """ + A list of nodes that are contained in CustomerEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Customer!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The source that collected the customer's consent to receive marketing materials. +""" +enum CustomerConsentCollectedFrom { + """ + The customer consent was collected by Shopify. + """ + SHOPIFY + + """ + The customer consent was collected outside of Shopify. + """ + OTHER +} + +""" +Return type for `customerCreate` mutation. +""" +type CustomerCreatePayload { + """ + The created customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a card instrument for customer payment method. +""" +type CustomerCreditCard { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + The brand of the card. + """ + brand: String! + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + The card's BIN number. + """ + firstDigits: String + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! + + """ + The source of the card if coming from a wallet such as Apple Pay. + """ + source: String + + """ + The last 4 digits of the Device Account Number. + """ + virtualLastDigits: String +} + +""" +The billing address of a credit card payment instrument. +""" +type CustomerCreditCardBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The first name in the billing address. + """ + firstName: String + + """ + The last name in the billing address. + """ + lastName: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields to delete a customer. +""" +input CustomerDeleteInput { + """ + The ID of the customer to delete. + """ + id: ID! +} + +""" +Return type for `customerDelete` mutation. +""" +type CustomerDeletePayload { + """ + The ID of the deleted customer. + """ + deletedCustomerId: ID + + """ + The shop of the deleted customer. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Customer and a cursor during pagination. +""" +type CustomerEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerEdge. + """ + node: Customer! +} + +""" +A customer's email address with marketing consent. This includes the email address, marketing subscription status, and opt-in level according to [M3AAWG best practices guidelines](https://www.m3aawg.org/news/updated-m3aawg-best-practices-for-senders-urge-opt-in-only-mailings-address-sender-transparency). + +It also provides the timestamp of when customers last updated marketing consent and URLs for unsubscribing from marketing emails or opting in or out of email open tracking. The [`sourceLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-CustomerEmailAddress.fields.sourceLocation) field indicates where the customer consented to receive marketing material. +""" +type CustomerEmailAddress { + """ + The customer's default email address. + """ + emailAddress: String! + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + received when the marketing consent was updated. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + Whether the customer has subscribed to email marketing. + """ + marketingState: CustomerEmailAddressMarketingState! + + """ + The URL to unsubscribe a member from all mailing lists. + """ + marketingUnsubscribeUrl: URL! + + """ + The date and time at which the marketing consent was updated. + + No date is provided if the email address never updated its marketing consent. + """ + marketingUpdatedAt: DateTime + + """ + Whether the customer has opted in to having their opened emails tracked. + """ + openTrackingLevel: CustomerEmailAddressOpenTrackingLevel! + + """ + The URL that can be used to opt a customer in or out of email open tracking. + """ + openTrackingUrl: URL! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly. This doesn't guarantee that the email address + actually exists. + """ + validFormat: Boolean! +} + +""" +Possible marketing states for the customer’s email address. +""" +enum CustomerEmailAddressMarketingState { + """ + The customer’s email address marketing state is invalid. + """ + INVALID + + """ + The customer is not subscribed to email marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to email marketing. + """ + PENDING + + """ + The customer is subscribed to email marketing. + """ + SUBSCRIBED + + """ + The customer is not subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +The different levels related to whether a customer has opted in to having their opened emails tracked. +""" +enum CustomerEmailAddressOpenTrackingLevel { + """ + The customer has not specified whether they want to opt in or out of having their open emails tracked. + """ + UNKNOWN + + """ + The customer has opted in to having their open emails tracked. + """ + OPTED_IN + + """ + The customer has opted out of having their open emails tracked. + """ + OPTED_OUT +} + +""" +Information that describes when a customer consented to + receiving marketing material by email. +""" +input CustomerEmailMarketingConsentInput { + """ + The customer opt-in level at the time of subscribing to marketing material. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The marketing state to set. Accepted values: SUBSCRIBED, UNSUBSCRIBED, and PENDING. NOT_SUBSCRIBED, REDACTED, and INVALID are rejected if sent as input. + """ + marketingState: CustomerEmailMarketingState! + + """ + The latest date and time when the customer consented or objected to + receiving marketing material by email. + """ + consentUpdatedAt: DateTime + + """ + Identifies the location where the customer consented to receiving marketing material by email. + """ + sourceLocationId: ID +} + +""" +The record of when a customer consented to receive marketing material by email. +""" +type CustomerEmailMarketingConsentState { + """ + The date and time at which the customer consented to receive marketing material by email. + The customer's consent state reflects the consent record with the most recent `consent_updated_at` date. + If no date is provided, then the date and time at which the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + that the customer gave when they consented to receive marketing material by email. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The current email marketing state for the customer. + """ + marketingState: CustomerEmailMarketingState! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location +} + +""" +The input fields for the email consent information to update for a given customer ID. +""" +input CustomerEmailMarketingConsentUpdateInput { + """ + The ID of the customer for which to update the email marketing consent information. The customer must have a unique email address associated to the record. If not, add the email address using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by email. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput! +} + +""" +Return type for `customerEmailMarketingConsentUpdate` mutation. +""" +type CustomerEmailMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerEmailMarketingConsentUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CustomerEmailMarketingConsentUpdate`. +""" +type CustomerEmailMarketingConsentUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerEmailMarketingConsentUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerEmailMarketingConsentUpdateUserError`. +""" +enum CustomerEmailMarketingConsentUpdateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Missing a required argument. + """ + MISSING_ARGUMENT +} + +""" +The possible email marketing states for a customer. +""" +enum CustomerEmailMarketingState { + """ + Default state for customers who have never subscribed to email marketing. + This value cannot be set via the mutation; use UNSUBSCRIBED instead to indicate + a customer has opted out. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to email marketing. + """ + PENDING + + """ + The customer is subscribed to email marketing. + """ + SUBSCRIBED + + """ + The customer isn't currently subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED + + """ + The customer's personal data is erased. This value is internally-set and read-only. + """ + REDACTED + + """ + This value is internally-set and read-only. + """ + INVALID +} + +""" +Return type for `customerGenerateAccountActivationUrl` mutation. +""" +type CustomerGenerateAccountActivationUrlPayload { + """ + The generated account activation URL. + """ + accountActivationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for identifying a customer. +""" +input CustomerIdentifierInput @oneOf { + """ + The ID of the customer. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the customer. + """ + customId: UniqueMetafieldValueInput + + """ + The email address of the customer. + """ + emailAddress: String + + """ + The phone number of the customer. + """ + phoneNumber: String +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerInput { + """ + The addresses for a customer. + """ + addresses: [MailingAddressInput!] @deprecated(reason: "Use the dedicated address mutations (`customerAddressCreate`, `customerAddressUpdate`, `customerAddressDelete`) instead.\n") + + """ + The unique email address of the customer. + """ + email: String + + """ + The customer's first name. + """ + firstName: String + + """ + The ID of the customer to update. + """ + id: ID + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's locale. + """ + locale: String + + """ + Additional metafields to associate to the customer. + """ + metafields: [MetafieldInput!] + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number for the customer. + """ + phone: String + + """ + A list of tags to associate with the customer. Can be an array or a comma-separated list. Example values: `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"` + + Updating `tags` overwrites any existing tags that were previously added to the customer. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + Information that describes when the customer consented to receiving marketing + material by email. The `email` field is required when creating a customer with email marketing + consent information. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput + + """ + The marketing consent information when the customer consented to receiving marketing + material by SMS. The `phone` field is required when creating a customer with SMS + marketing consent information. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput + + """ + Whether the customer is exempt from paying taxes on their order. + """ + taxExempt: Boolean + + """ + The list of tax exemptions to apply to the customer. + """ + taxExemptions: [TaxExemption!] + + """ + A unique identifier for the customer that's used with Multipass login. + """ + multipassIdentifier: String +} + +""" +Tracks a customer's path to purchase through their online store visits. The journey captures key moments like shop sessions that led to the order, helping merchants understand customer behavior and marketing attribution within a 30-day window. Includes the first and last sessions before an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), the time between initial visit and conversion, and the customer's order position in their purchase history. +""" +type CustomerJourney { + """ + The position of the current order within the customer's order history. + """ + customerOrderIndex: Int! + + """ + The amount of days between first session and order creation date. First session represents first session since the last order, or first session within the 30 day attribution window, if more than 30 days has passed since the last order. + """ + daysToConversion: Int! + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit! + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + Events preceding a customer order, such as shop sessions. + """ + moments: [CustomerMoment!]! +} + +""" +A [`CustomerJourney`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerJourney) through the online store leading up to an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). Tracks session data, attribution sources, and the timeline from first visit to purchase conversion. + +The summary includes the customer's position in their order history, days between first visit and order creation, and details about their first and last sessions. Use the [`moments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerJourneySummary#field-moments) connection to access the complete timeline of customer interactions before the purchase. +""" +type CustomerJourneySummary { + """ + The position of the current order within the customer's order history. Test orders aren't included. + """ + customerOrderIndex: Int + + """ + The number of days between the first session and the order creation date. The first session represents the first session since the last order, or the first session within the 30 day attribution window, if more than 30 days have passed since the last order. + """ + daysToConversion: Int + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + The events preceding a customer's order, such as shop sessions. + """ + moments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CustomerMomentConnection + + """ + The total number of customer moments associated with this order. Returns null if the order is still in the process of being attributed. + """ + momentsCount: Count + + """ + Whether the attributed sessions for the order have been created yet. + """ + ready: Boolean! +} + +""" +The possible values for the marketing subscription opt-in level enabled at the time the customer consented to receive marketing information. + +The levels are defined by [the M3AAWG best practices guideline + document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf). +""" +enum CustomerMarketingOptInLevel { + """ + After providing their information, the customer receives marketing information without any + intermediate steps. + """ + SINGLE_OPT_IN + + """ + After providing their information, the customer receives a confirmation and is required to + perform a intermediate step before receiving marketing information. + """ + CONFIRMED_OPT_IN + + """ + The customer receives marketing information but how they were opted in is unknown. + """ + UNKNOWN +} + +""" +The error blocking a customer merge. +""" +type CustomerMergeError { + """ + The list of fields preventing the customer from being merged. + """ + errorFields: [CustomerMergeErrorFieldType!]! + + """ + The customer merge error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerMergeUserError`. +""" +enum CustomerMergeErrorCode { + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The customer cannot be merged. + """ + INVALID_CUSTOMER + + """ + The customer ID is invalid. + """ + INVALID_CUSTOMER_ID + + """ + The customer cannot be merged because it has associated gift cards. + """ + CUSTOMER_HAS_GIFT_CARDS + + """ + The customer is missing the attribute requested for override. + """ + MISSING_OVERRIDE_ATTRIBUTE + + """ + The override attribute is invalid. + """ + OVERRIDE_ATTRIBUTE_INVALID +} + +""" +The types of the hard blockers preventing a customer from being merged to another customer. +""" +enum CustomerMergeErrorFieldType { + """ + The customer does not exist. + """ + DELETED_AT + + """ + The customer has a pending or completed redaction. + """ + REDACTED_AT + + """ + The customer has a subscription history. + """ + SUBSCRIPTIONS + + """ + The customer has a merge in progress. + """ + MERGE_IN_PROGRESS + + """ + The customer has gift cards. + """ + GIFT_CARDS + + """ + The override fields are invalid. + """ + OVERRIDE_FIELDS + + """ + The customer has store credit. + """ + STORE_CREDIT + + """ + The customer is a company contact. + """ + COMPANY_CONTACT + + """ + The customer has payment methods. + """ + CUSTOMER_PAYMENT_METHODS + + """ + The customer has a pending data request. + """ + PENDING_DATA_REQUEST + + """ + The customer has a multipass identifier. + """ + MULTIPASS_IDENTIFIER +} + +""" +The input fields to override default customer merge rules. These overrides are field-specific; they don't +provide a general way to force a particular customer ID to survive the merge. +""" +input CustomerMergeOverrideFields { + """ + The ID of the customer whose first name will be kept. + """ + customerIdOfFirstNameToKeep: ID + + """ + The ID of the customer whose last name will be kept. + """ + customerIdOfLastNameToKeep: ID + + """ + The ID of the customer whose email will be kept. The selected customer must have an email address. When + this field is provided and valid, the selected customer is also the resulting customer after the merge. + """ + customerIdOfEmailToKeep: ID + + """ + The ID of the customer whose phone number will be kept. + """ + customerIdOfPhoneNumberToKeep: ID + + """ + The ID of the customer whose default address will be kept. + """ + customerIdOfDefaultAddressToKeep: ID + + """ + The note to keep. + """ + note: String + + """ + The tags to keep. + """ + tags: [String!] +} + +""" +Return type for `customerMerge` mutation. +""" +type CustomerMergePayload { + """ + The asynchronous job for merging the customers. + """ + job: Job + + """ + The ID of the customer that's kept after the merge. Treat this ID as authoritative. + """ + resultingCustomerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerMergeUserError!]! +} + +""" +A preview of the results of a customer merge request. Use `resultingCustomerId` to check which customer +would be kept before running `customerMerge`. +""" +type CustomerMergePreview { + """ + The fields that can be used to override the default fields. + """ + alternateFields: CustomerMergePreviewAlternateFields + + """ + The fields that will block the merge if the two customers are merged. + """ + blockingFields: CustomerMergePreviewBlockingFields + + """ + The errors blocking the customer merge. + """ + customerMergeErrors: [CustomerMergeError!] + + """ + The fields that will be kept if the two customers are merged. + """ + defaultFields: CustomerMergePreviewDefaultFields + + """ + The ID of the customer that would be kept if the two customers were merged. + """ + resultingCustomerId: ID +} + +""" +The fields that can be used to override the default fields. +""" +type CustomerMergePreviewAlternateFields { + """ + The default address of a customer. + """ + defaultAddress: MailingAddress + + """ + The email state of a customer. + """ + email: CustomerEmailAddress + + """ + The first name of a customer. + """ + firstName: String + + """ + The last name of a customer. + """ + lastName: String + + """ + The phone number state of a customer. + """ + phoneNumber: CustomerPhoneNumber +} + +""" +The blocking fields of a customer merge preview. These fields will block customer merge unless edited. +""" +type CustomerMergePreviewBlockingFields { + """ + The merged note resulting from a customer merge. The merged note is over the 5000 character limit and will block customer merge. + """ + note: String + + """ + The merged tags resulting from a customer merge. The merged tags are over the 250 limit and will block customer merge. + """ + tags: [String!]! +} + +""" +The fields that will be kept as part of a customer merge preview. +""" +type CustomerMergePreviewDefaultFields { + """ + The merged addresses resulting from a customer merge. + """ + addresses("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MailingAddressConnection! + + """ + The default address resulting from a customer merge. + """ + defaultAddress: MailingAddress + + """ + The total number of customer-specific discounts resulting from a customer merge. + """ + discountNodeCount: UnsignedInt64! + + """ + The merged customer-specific discounts resulting from a customer merge. + """ + discountNodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountSortKeys = CREATED_AT): DiscountNodeConnection! + + """ + The full name of the customer, based on the values for `first_name` and `last_name`. If `first_name` and `last_name` aren't available, then this field falls back to the customer's email address. If the customer's email isn't available, then this field falls back to the customer's phone number. + """ + displayName: String! + + """ + The total number of merged draft orders. + """ + draftOrderCount: UnsignedInt64! + + """ + The merged draft orders resulting from a customer merge. + """ + draftOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DraftOrderSortKeys = UPDATED_AT): DraftOrderConnection! + + """ + The email state of a customer. + """ + email: CustomerEmailAddress + + """ + The first name resulting from a customer merge. + """ + firstName: String + + """ + The total number of merged gift cards. + """ + giftCardCount: UnsignedInt64! + + """ + The merged gift cards resulting from a customer merge. + """ + giftCards("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: GiftCardSortKeys = CREATED_AT): GiftCardConnection! + + """ + The last name resulting from a customer merge. + """ + lastName: String + + """ + The total number of merged metafields. + """ + metafieldCount: UnsignedInt64! + + """ + The merged note resulting from a customer merge. + """ + note: String + + """ + The total number of merged orders. + """ + orderCount: UnsignedInt64! + + """ + The merged orders resulting from a customer merge. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = PROCESSED_AT): OrderConnection! + + """ + The phone number state of a customer. + """ + phoneNumber: CustomerPhoneNumber + + """ + The merged tags resulting from a customer merge. + """ + tags: [String!]! +} + +""" +A merge request for merging two customers. +""" +type CustomerMergeRequest { + """ + The merge errors that occurred during the customer merge request. + """ + customerMergeErrors: [CustomerMergeError!]! + + """ + The UUID of the merge job. + """ + jobId: ID + + """ + The ID of the customer that was kept after the merge. Treat this ID as authoritative. + """ + resultingCustomerId: ID! + + """ + The status of the customer merge request. + """ + status: CustomerMergeRequestStatus! +} + +""" +The status of the customer merge request. +""" +enum CustomerMergeRequestStatus { + """ + The customer merge request has been requested. + """ + REQUESTED + + """ + The customer merge request is currently in progress. + """ + IN_PROGRESS + + """ + The customer merge request has been completed. + """ + COMPLETED + + """ + The customer merge request has failed. + """ + FAILED +} + +""" +An error that occurs while merging two customers. +""" +type CustomerMergeUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerMergeErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An object that represents whether a customer can be merged with another customer. +""" +type CustomerMergeable { + """ + The list of fields preventing the customer from being merged. + """ + errorFields: [CustomerMergeErrorFieldType!]! + + """ + Whether the customer can be merged with another customer. + """ + isMergeable: Boolean! + + """ + The merge request if one is currently in progress. + """ + mergeInProgress: CustomerMergeRequest + + """ + The reason why the customer can't be merged with another customer. + """ + reason: String +} + +""" +Represents a session preceding an order, often used for building a timeline of events leading to an order. +""" +interface CustomerMoment { + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CustomerMoments. +""" +type CustomerMomentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerMomentEdge!]! + + """ + A list of nodes that are contained in CustomerMomentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CustomerMoment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerMoment and a cursor during pagination. +""" +type CustomerMomentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerMomentEdge. + """ + node: CustomerMoment! +} + +""" +All possible instruments for CustomerPaymentMethods. +""" +union CustomerPaymentInstrument = BankAccount|CustomerCreditCard|CustomerPaypalBillingAgreement|CustomerShopPayAgreement + +""" +The billing address of a payment instrument. +""" +type CustomerPaymentInstrumentBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The name of the buyer of the address. + """ + name: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +A customer's saved payment method. Stores the payment instrument details and billing information for recurring charges. + +The payment method supports types included in the [`CustomerPaymentInstrument`](https://shopify.dev/docs/api/admin-graphql/latest/unions/CustomerPaymentInstrument) union. +""" +type CustomerPaymentMethod implements Node { + """ + The customer to whom the payment method belongs. + """ + customer: Customer + + """ + The ID of this payment method. + """ + id: ID! + + """ + The instrument for this payment method. + """ + instrument: CustomerPaymentInstrument + + """ + The mandates associated with the payment method. + """ + mandates("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PaymentMandateResourceConnection! + + """ + The time that the payment method was revoked. + """ + revokedAt: DateTime + + """ + The revocation reason for this payment method. + """ + revokedReason: CustomerPaymentMethodRevocationReason + + """ + List Subscription Contracts. + """ + subscriptionContracts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionContractConnection! +} + +""" +An auto-generated type for paginating through multiple CustomerPaymentMethods. +""" +type CustomerPaymentMethodConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerPaymentMethodEdge!]! + + """ + A list of nodes that are contained in CustomerPaymentMethodEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CustomerPaymentMethod!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `customerPaymentMethodCreateFromDuplicationData` mutation. +""" +type CustomerPaymentMethodCreateFromDuplicationDataPayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodCreateFromDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodCreateFromDuplicationData`. +""" +type CustomerPaymentMethodCreateFromDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodCreateFromDuplicationDataUserError`. +""" +enum CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode { + """ + Too many requests. + """ + TOO_MANY_REQUESTS + + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + Invalid encrypted duplication data. + """ + INVALID_ENCRYPTED_DUPLICATION_DATA +} + +""" +Return type for `customerPaymentMethodCreditCardCreate` mutation. +""" +type CustomerPaymentMethodCreditCardCreatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodCreditCardUpdate` mutation. +""" +type CustomerPaymentMethodCreditCardUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination. +""" +type CustomerPaymentMethodEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerPaymentMethodEdge. + """ + node: CustomerPaymentMethod! +} + +""" +Return type for `customerPaymentMethodGetDuplicationData` mutation. +""" +type CustomerPaymentMethodGetDuplicationDataPayload { + """ + The encrypted data from the payment method to be duplicated. + """ + encryptedDuplicationData: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetDuplicationData`. +""" +type CustomerPaymentMethodGetDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetDuplicationDataUserError`. +""" +enum CustomerPaymentMethodGetDuplicationDataUserErrorCode { + """ + Payment method doesn't exist. + """ + PAYMENT_METHOD_DOES_NOT_EXIST + + """ + Invalid payment instrument. + """ + INVALID_INSTRUMENT + + """ + Too many requests. + """ + TOO_MANY_REQUESTS + + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + Target shop cannot be the same as the source. + """ + SAME_SHOP + + """ + Must be targeted to another shop in the same organization. + """ + INVALID_ORGANIZATION_SHOP +} + +""" +Return type for `customerPaymentMethodGetUpdateUrl` mutation. +""" +type CustomerPaymentMethodGetUpdateUrlPayload { + """ + The URL to redirect the customer to update the payment method. + """ + updatePaymentMethodUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetUpdateUrlUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetUpdateUrl`. +""" +type CustomerPaymentMethodGetUpdateUrlUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetUpdateUrlUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetUpdateUrlUserError`. +""" +enum CustomerPaymentMethodGetUpdateUrlUserErrorCode { + """ + Payment method doesn't exist. + """ + PAYMENT_METHOD_DOES_NOT_EXIST + + """ + Invalid payment instrument. + """ + INVALID_INSTRUMENT + + """ + Too many requests. + """ + TOO_MANY_REQUESTS + + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementCreate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementCreatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementUpdate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodRemoteCreate` mutation. +""" +type CustomerPaymentMethodRemoteCreatePayload { + """ + The customer payment method. Note that the returned payment method may initially be in an incomplete state. Developers should poll this payment method using the customerPaymentMethod query until all required payment details have been processed. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodRemoteUserError!]! +} + +""" +The input fields for a remote gateway payment method, only one remote reference permitted. +""" +input CustomerPaymentMethodRemoteInput { + """ + Input containing the fields for a remote stripe credit card. + """ + stripePaymentMethod: RemoteStripePaymentMethodInput + + """ + The input fields for a remote authorize net customer profile. + """ + authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput + + """ + The input fields for a remote Braintree customer profile. + """ + braintreePaymentMethod: RemoteBraintreePaymentMethodInput +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing. +""" +type CustomerPaymentMethodRemoteUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodRemoteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodRemoteUserError`. +""" +enum CustomerPaymentMethodRemoteUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN + + """ + Exactly one remote reference is required. + """ + EXACTLY_ONE_REMOTE_REFERENCE_REQUIRED + + """ + Authorize.net is not enabled for subscriptions. + """ + AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + Braintree is not enabled for subscriptions. + """ + BRAINTREE_NOT_ENABLED_FOR_SUBSCRIPTIONS +} + +""" +The revocation reason types for a customer payment method. +""" +enum CustomerPaymentMethodRevocationReason { + """ + The Authorize.net payment gateway is not enabled. + """ + AUTHORIZE_NET_GATEWAY_NOT_ENABLED + + """ + Authorize.net did not return any payment methods. Make sure that the correct Authorize.net account is linked. + """ + AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD + + """ + The credit card failed to update. + """ + FAILED_TO_UPDATE_CREDIT_CARD + + """ + Failed to contact the Stripe API. + """ + STRIPE_API_AUTHENTICATION_ERROR + + """ + Invalid request. Failed to retrieve payment method from Stripe. + """ + STRIPE_API_INVALID_REQUEST_ERROR + + """ + The Stripe payment gateway is not enabled. + """ + STRIPE_GATEWAY_NOT_ENABLED + + """ + Stripe did not return any payment methods. Make sure that the correct Stripe account is linked. + """ + STRIPE_RETURNED_NO_PAYMENT_METHOD + + """ + The Stripe payment method type should be card. + """ + STRIPE_PAYMENT_METHOD_NOT_CARD + + """ + Failed to contact Braintree API. + """ + BRAINTREE_API_AUTHENTICATION_ERROR + + """ + The Braintree payment gateway is not enabled. + """ + BRAINTREE_GATEWAY_NOT_ENABLED + + """ + Braintree returned no payment methods. Make sure the correct Braintree account is linked. + """ + BRAINTREE_RETURNED_NO_PAYMENT_METHOD + + """ + The Braintree payment method type should be a credit card or Apple Pay card. + """ + BRAINTREE_PAYMENT_METHOD_NOT_CARD + + """ + Verification of payment method failed. + """ + PAYMENT_METHOD_VERIFICATION_FAILED + + """ + Verification of the payment method failed due to 3DS not being supported. + """ + THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED + + """ + The payment method was manually revoked. + """ + MANUALLY_REVOKED + + """ + The billing address failed to retrieve. + """ + FAILED_TO_RETRIEVE_BILLING_ADDRESS + + """ + The payment method was replaced with an existing payment method. The associated contracts have been migrated to the other payment method. + """ + MERGED + + """ + The customer redacted their payment method. + """ + CUSTOMER_REDACTED + + """ + Too many consecutive failed attempts. + """ + TOO_MANY_CONSECUTIVE_FAILURES + + """ + CVV attempts limit exceeded. + """ + CVV_ATTEMPTS_LIMIT_EXCEEDED +} + +""" +Return type for `customerPaymentMethodRevoke` mutation. +""" +type CustomerPaymentMethodRevokePayload { + """ + The ID of the revoked customer payment method. + """ + revokedCustomerPaymentMethodId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodSendUpdateEmail` mutation. +""" +type CustomerPaymentMethodSendUpdateEmailPayload { + """ + The customer to whom an update payment method email was sent. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing. +""" +type CustomerPaymentMethodUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodUserError`. +""" +enum CustomerPaymentMethodUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Represents a PayPal instrument for customer payment method. +""" +type CustomerPaypalBillingAgreement { + """ + The billing address of this payment method. + """ + billingAddress: CustomerPaymentInstrumentBillingAddress + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean! + + """ + Whether the payment method can be revoked.The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The customers's PayPal account email address. + """ + paypalAccountEmail: String +} + +""" +A phone number. +""" +type CustomerPhoneNumber { + """ + The source from which the SMS marketing information for the customer was collected. + """ + marketingCollectedFrom: CustomerConsentCollectedFrom @deprecated(reason: "Use `smsMarketingConsent.collectedFrom` instead.") + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + received when the marketing consent was updated. + """ + marketingOptInLevel: CustomerMarketingOptInLevel @deprecated(reason: "Use `smsMarketingConsent.optInLevel` instead.") + + """ + Whether the customer has subscribed to SMS marketing material. + """ + marketingState: CustomerSmsMarketingState! @deprecated(reason: "Use `smsMarketingConsent.state` instead.") + + """ + The date and time at which the marketing consent was updated. + + No date is provided if the email address never updated its marketing consent. + """ + marketingUpdatedAt: DateTime @deprecated(reason: "Use `smsMarketingConsent.updatedAt` instead.") + + """ + A customer's phone number. + """ + phoneNumber: String! + + """ + The location where the customer consented to receive marketing material by SMS. + """ + sourceLocation: Location @deprecated(reason: "Use `smsMarketingConsent.sourceLocation` instead.") +} + +""" +The valid tiers for the predicted spend of a customer with a shop. +""" +enum CustomerPredictedSpendTier { + """ + The customer's spending is predicted to be in the top spending range for the shop in the following year. + """ + HIGH + + """ + The customer's spending is predicted to be in the normal spending range for the shop in the following year. + """ + MEDIUM + + """ + The customer's spending is predicted to be zero, or in the lowest spending range for the shop in the following year. + """ + LOW +} + +""" +The possible product subscription states for a customer, as defined by the customer's subscription contracts. +""" +enum CustomerProductSubscriberStatus { + """ + The customer has at least one active subscription contract. + """ + ACTIVE + + """ + The customer's last subscription contract was cancelled and there are no other active or paused + subscription contracts. + """ + CANCELLED + + """ + The customer's last subscription contract expired and there are no other active or paused + subscription contracts. + """ + EXPIRED + + """ + The customer's last subscription contract failed and there are no other active or paused + subscription contracts. + """ + FAILED + + """ + The customer has never had a subscription contract. + """ + NEVER_SUBSCRIBED + + """ + The customer has at least one paused subscription contract and there are no other active + subscription contracts. + """ + PAUSED +} + +""" +Return type for `customerRemoveTaxExemptions` mutation. +""" +type CustomerRemoveTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerReplaceTaxExemptions` mutation. +""" +type CustomerReplaceTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerRequestDataErasureUserError`. +""" +enum CustomerRequestDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to request customer data erasure. + """ + FAILED_TO_REQUEST +} + +""" +Return type for `customerRequestDataErasure` mutation. +""" +type CustomerRequestDataErasurePayload { + """ + The ID of the customer that will be erased. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerRequestDataErasureUserError!]! +} + +""" +An error that occurs when requesting a customer data erasure. +""" +type CustomerRequestDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerRequestDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The RFM (Recency, Frequency, Monetary) group for a customer. +""" +enum CustomerRfmGroup { + """ + Customers with very recent purchases, many orders, and the most spend. + """ + CHAMPIONS + + """ + Customers with recent purchases, many orders, and the most spend. + """ + LOYAL + + """ + Customers with recent purchases, some orders, and moderate spend. + """ + ACTIVE + + """ + Customers with very recent purchases, few orders, and low spend. + """ + NEW + + """ + Customers with recent purchases, few orders, and low spend. + """ + PROMISING + + """ + Customers with recent purchases, some orders, and moderate spend. + """ + NEEDS_ATTENTION + + """ + Customers without recent purchases, fewer orders, and with lower spend. + """ + ALMOST_LOST + + """ + Customers without recent purchases, but with a very strong history of orders and spend. + """ + PREVIOUSLY_LOYAL + + """ + Customers without recent purchases, but with a strong history of orders and spend. + """ + AT_RISK + + """ + Customers without recent orders, with infrequent orders, and with low spend. + """ + DORMANT + + """ + Customers with no orders yet. + """ + PROSPECTS +} + +""" +The set of valid sort keys for the CustomerSavedSearch query. +""" +enum CustomerSavedSearchSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The member of a segment. +""" +type CustomerSegmentMember implements HasMetafields { + """ + The total amount of money that the member has spent on orders. + """ + amountSpent: MoneyV2 + + """ + The member's default address. + """ + defaultAddress: MailingAddress + + """ + The member's default email address. + """ + defaultEmailAddress: CustomerEmailAddress + + """ + The member's default phone number. + """ + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the member, which is based on the values of the `first_name` and `last_name` fields. If the member's first name and last name aren't available, then the customer's email address is used. If the customer's email address isn't available, then the customer's phone number is used. + """ + displayName: String! + + """ + The member's first name. + """ + firstName: String + + """ + The member’s ID. + """ + id: ID! + + """ + The member's last name. + """ + lastName: String + + """ + The ID of the member's most recent order. + """ + lastOrderId: ID + + """ + Whether the customer can be merged with another customer. + """ + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A note about the member. + """ + note: String + + """ + The total number of orders that the member has made. + """ + numberOfOrders: UnsignedInt64 +} + +""" +The connection type for the `CustomerSegmentMembers` object. +""" +type CustomerSegmentMemberConnection { + """ + A list of edges. + """ + edges: [CustomerSegmentMemberEdge!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + The statistics for a given segment. + """ + statistics: SegmentStatistics! + + """ + The total number of members in a given segment. + """ + totalCount: Int! +} + +""" +An auto-generated type which holds one CustomerSegmentMember and a cursor during pagination. +""" +type CustomerSegmentMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerSegmentMemberEdge. + """ + node: CustomerSegmentMember! +} + +""" +A job to determine a list of members, such as customers, that are associated with an individual segment. +""" +type CustomerSegmentMembersQuery implements JobResult & Node { + """ + The current total number of members in a given segment. + """ + currentCount: Int! + + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Return type for `customerSegmentMembersQueryCreate` mutation. +""" +type CustomerSegmentMembersQueryCreatePayload { + """ + The newly created customer segment members query. + """ + customerSegmentMembersQuery: CustomerSegmentMembersQuery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSegmentMembersQueryUserError!]! +} + +""" +The input fields and values for creating a customer segment members query. +""" +input CustomerSegmentMembersQueryInput { + """ + The ID of the segment. + """ + segmentId: ID + + """ + The query that's used to filter the members. The query is composed of a combination of conditions on facts about customers such as `email_subscription_status = 'SUBSCRIBED'` with [this syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """ + Sort the list by a given key. + """ + sortKey: String +} + +""" +Represents a customer segment members query custom error. +""" +type CustomerSegmentMembersQueryUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSegmentMembersQueryUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSegmentMembersQueryUserError`. +""" +enum CustomerSegmentMembersQueryUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `customerSendAccountInviteEmail` mutation. +""" +type CustomerSendAccountInviteEmailPayload { + """ + The customer to whom an account invite email was sent. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSendAccountInviteEmailUserError!]! +} + +""" +Defines errors for customerSendAccountInviteEmail mutation. +""" +type CustomerSendAccountInviteEmailUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSendAccountInviteEmailUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSendAccountInviteEmailUserError`. +""" +enum CustomerSendAccountInviteEmailUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields required to identify a customer. +""" +input CustomerSetIdentifiers @oneOf { + """ + ID of customer to update. + """ + id: ID + + """ + Email address of the customer to upsert. + """ + email: String + + """ + Phone number of the customer to upsert. + """ + phone: String + + """ + Custom ID of customer to upsert. + """ + customId: UniqueMetafieldValueInput +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerSetInput { + """ + The addresses for a customer. + """ + addresses: [MailingAddressInput!] + + """ + The unique email address of the customer. + """ + email: String + + """ + The customer's first name. + """ + firstName: String + + """ + Specifies the customer to update. If absent, a new customer is created. + """ + id: ID @deprecated(reason: "To update a customer use `identifier` argument instead.") + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's locale. + """ + locale: String + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number for the customer. + """ + phone: String + + """ + A list of tags to associate with the customer. Can be an array or a comma-separated list. Example values: `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"` + + Updating `tags` overwrites any existing tags that were previously added to the customer. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + Whether the customer is exempt from paying taxes on their order. + """ + taxExempt: Boolean + + """ + The list of tax exemptions to apply to the customer. + """ + taxExemptions: [TaxExemption!] +} + +""" +Return type for `customerSet` mutation. +""" +type CustomerSetPayload { + """ + The created or updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSetUserError!]! +} + +""" +Defines errors for CustomerSet mutation. +""" +type CustomerSetUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSetUserError`. +""" +enum CustomerSetUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is blank. + """ + BLANK + + """ + The id field is not allowed if identifier is provided. + """ + ID_NOT_ALLOWED + + """ + The input field corresponding to the identifier is required. + """ + MISSING_FIELD_REQUIRED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """ + Resource matching the identifier was not found. + """ + NOT_FOUND + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH +} + +""" +Represents a Shop Pay card instrument for customer payment method. +""" +type CustomerShopPayAgreement { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + Whether the Shop Pay billing agreement is inactive. + """ + inactive: Boolean! + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! +} + +""" +An error that occurs during execution of an SMS marketing consent mutation. +""" +type CustomerSmsMarketingConsentError implements DisplayableError { + """ + The error code. + """ + code: CustomerSmsMarketingConsentErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSmsMarketingConsentError`. +""" +enum CustomerSmsMarketingConsentErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Missing a required argument. + """ + MISSING_ARGUMENT +} + +""" +The marketing consent information when the customer consented to + receiving marketing material by SMS. +""" +input CustomerSmsMarketingConsentInput { + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The current SMS marketing state for the customer. + """ + marketingState: CustomerSmsMarketingState! + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + Identifies the location where the customer consented to receiving marketing material by SMS. + """ + sourceLocationId: ID +} + +""" +The record of when a customer consented to receive marketing material by SMS. + +The customer's consent state reflects the record with the most recent date when consent was updated. +""" +type CustomerSmsMarketingConsentState { + """ + The source from which the SMS marketing information for the customer was collected. + """ + consentCollectedFrom: CustomerConsentCollectedFrom + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel! + + """ + The current SMS marketing state for the customer. + """ + marketingState: CustomerSmsMarketingState! + + """ + The location where the customer consented to receive marketing material by SMS. + """ + sourceLocation: Location +} + +""" +The input fields for updating SMS marketing consent information for a given customer ID. +""" +input CustomerSmsMarketingConsentUpdateInput { + """ + The ID of the customer to update the SMS marketing consent information for. The customer must have a unique phone number associated to the record. If not, add the phone number using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by SMS. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput! +} + +""" +Return type for `customerSmsMarketingConsentUpdate` mutation. +""" +type CustomerSmsMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSmsMarketingConsentError!]! +} + +""" +The valid SMS marketing states for a customer’s phone number. +""" +enum CustomerSmsMarketingState { + """ + The customer hasn't subscribed to SMS marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to SMS marketing. + """ + PENDING + + """ + The customer is subscribed to SMS marketing. + """ + SUBSCRIBED + + """ + The customer isn't currently subscribed to SMS marketing but was previously subscribed. + """ + UNSUBSCRIBED + + """ + The customer's personal data is erased. This value is internally-set and read-only. + """ + REDACTED +} + +""" +The set of valid sort keys for the Customer query. +""" +enum CustomerSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location` value. + """ + LOCATION + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid values for the state of a customer's account with a shop. +""" +enum CustomerState { + """ + The customer declined the email invite to create an account. + """ + DECLINED + + """ + The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. + """ + DISABLED + + """ + The customer has created an account. + """ + ENABLED + + """ + The customer has received an email invite to create an account. + """ + INVITED +} + +""" +A customer's computed statistics. +""" +type CustomerStatistics { + """ + The predicted spend tier of a customer with a shop. + """ + predictedSpendTier: CustomerPredictedSpendTier + + """ + The RFM (Recency, Frequency, Monetary) group of the customer. + """ + rfmGroup: CustomerRfmGroup +} + +""" +Return type for `customerUpdateDefaultAddress` mutation. +""" +type CustomerUpdateDefaultAddressPayload { + """ + The customer whose address was updated. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerUpdate` mutation. +""" +type CustomerUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A customer's session on the online store. Tracks how the [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) arrived at the store, including the landing page, referral source, and any associated marketing campaigns. + +The visit captures attribution data such as [`UTMParameters`](https://shopify.dev/docs/api/admin-graphql/latest/objects/UTMParameters), referral codes, and the [`MarketingEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketingEvent) that drove the session. This information helps merchants understand which marketing efforts successfully bring customers to their store. +""" +type CustomerVisit implements CustomerMoment & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + URL of the first page the customer landed on for the session. + """ + landingPage: URL + + """ + Landing page information with URL linked in HTML. For example, the first page the customer visited was store.myshopify.com/products/1. + """ + landingPageHtml: HTML + + """ + Represent actions taken by an app, on behalf of a merchant, + to market Shopify resources such as products, collections, and discounts. + """ + marketingEvent: MarketingEvent + + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! + + """ + Marketing referral code from the link that the customer clicked to visit the store. + Supports the following URL attributes: _ref_, _source_, or _r_. + For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2. + """ + referralCode: String + + """ + Referral information with URLs linked in HTML. + """ + referralInfoHtml: FormattedString! + + """ + Webpage where the customer clicked a link that sent them to the online store. + For example, _https://randomblog.com/page1_ or _android-app://com.google.android.gm_. + """ + referrerUrl: URL + + """ + Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, + a website domain, QR code, or unknown. + """ + source: String! + + """ + Describes the source explicitly for first or last session. + """ + sourceDescription: String + + """ + Type of marketing tactic. + """ + sourceType: MarketingTactic + + """ + A set of UTM parameters gathered from the URL parameters of the referrer. + """ + utmParameters: UTMParameters +} + +""" +This type returns the information about the product and product variant from a customer visit. +""" +type CustomerVisitProductInfo { + """ + The product information. If `null`, then the product was deleted from the store. + """ + product: Product + + """ + The quantity of the product that the customer requested. + """ + quantity: Int! + + """ + The product variant information, if the product variant exists. + """ + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple CustomerVisitProductInfos. +""" +type CustomerVisitProductInfoConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerVisitProductInfoEdge!]! + + """ + A list of nodes that are contained in CustomerVisitProductInfoEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CustomerVisitProductInfo!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerVisitProductInfo and a cursor during pagination. +""" +type CustomerVisitProductInfoEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerVisitProductInfoEdge. + """ + node: CustomerVisitProductInfo! +} + +""" +A shop's data sale opt out page. +""" +type DataSaleOptOutPage { + """ + If the data sale opt out page is auto managed. + """ + autoManaged: Boolean! +} + +""" +Return type for `dataSaleOptOut` mutation. +""" +type DataSaleOptOutPayload { + """ + The ID of the customer whose email address has been opted out of data sale. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DataSaleOptOutUserError!]! +} + +""" +An error that occurs during the execution of `DataSaleOptOut`. +""" +type DataSaleOptOutUserError implements DisplayableError { + """ + The error code. + """ + code: DataSaleOptOutUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DataSaleOptOutUserError`. +""" +enum DataSaleOptOutUserErrorCode { + """ + Data sale opt out failed. + """ + FAILED +} + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string. +For example, September 7, 2019 is represented as `"2019-07-16"`. +""" +scalar Date + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. +For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is +represented as `"2019-09-07T15:50:00Z`". +""" +scalar DateTime + +""" +Days of the week from Monday to Sunday. +""" +enum DayOfTheWeek { + """ + Monday. + """ + MONDAY + + """ + Tuesday. + """ + TUESDAY + + """ + Wednesday. + """ + WEDNESDAY + + """ + Thursday. + """ + THURSDAY + + """ + Friday. + """ + FRIDAY + + """ + Saturday. + """ + SATURDAY + + """ + Sunday. + """ + SUNDAY +} + +""" +A signed decimal number, which supports arbitrary precision and is serialized as a string. + +Example values: `"29.99"`, `"29.999"`. +""" +scalar Decimal + +""" +A token that delegates a set of scopes from the original permission. + +To learn more about creating delegate access tokens, refer to +[Delegate OAuth access tokens to subsystems](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/use-delegate-tokens). +""" +type DelegateAccessToken { + """ + The list of permissions associated with the token. + """ + accessScopes: [String!]! + + """ + The issued delegate access token. + """ + accessToken: String! + + """ + The date and time when the delegate access token was created. + """ + createdAt: DateTime! +} + +""" +Return type for `delegateAccessTokenCreate` mutation. +""" +type DelegateAccessTokenCreatePayload { + """ + The delegate access token. + """ + delegateAccessToken: DelegateAccessToken + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenCreateUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenCreate`. +""" +type DelegateAccessTokenCreateUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenCreateUserError`. +""" +enum DelegateAccessTokenCreateUserErrorCode { + """ + The access scope can't be empty. + """ + EMPTY_ACCESS_SCOPE + + """ + The parent access token can't be a delegate token. + """ + DELEGATE_ACCESS_TOKEN + + """ + The expires_in value must be greater than 0. + """ + NEGATIVE_EXPIRES_IN + + """ + The delegate token can't expire after the parent token. + """ + EXPIRES_AFTER_PARENT + + """ + The parent access token can't have a refresh token. + """ + REFRESH_TOKEN + + """ + Persistence failed. + """ + PERSISTENCE_FAILED + + """ + Unknown scopes. + """ + UNKNOWN_SCOPES +} + +""" +Return type for `delegateAccessTokenDestroy` mutation. +""" +type DelegateAccessTokenDestroyPayload { + """ + The user's shop. + """ + shop: Shop! + + """ + The status of the delegate access token destroy operation. Returns true if successful. + """ + status: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenDestroyUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenDestroy`. +""" +type DelegateAccessTokenDestroyUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenDestroyUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenDestroyUserError`. +""" +enum DelegateAccessTokenDestroyUserErrorCode { + """ + Persistence failed. + """ + PERSISTENCE_FAILED + + """ + Access token not found. + """ + ACCESS_TOKEN_NOT_FOUND + + """ + Cannot delete parent access token. + """ + CAN_ONLY_DELETE_DELEGATE_TOKENS + + """ + Access denied. + """ + ACCESS_DENIED +} + +""" +The input fields for a delegate access token. +""" +input DelegateAccessTokenInput { + """ + The list of scopes that will be delegated to the new access token. + """ + delegateAccessScope: [String!]! + + """ + The amount of time, in seconds, after which the delegate access token is no longer valid. + """ + expiresIn: Int +} + +""" +Deletion events chronicle the destruction of resources (e.g. products and collections). +Once deleted, the deletion event is the only trace of the original's existence, +as the resource itself has been removed and can no longer be accessed. +""" +type DeletionEvent { + """ + The date and time when the deletion event for the related resource was generated. + """ + occurredAt: DateTime! + + """ + The ID of the resource that was deleted. + """ + subjectId: ID! + + """ + The type of resource that was deleted. + """ + subjectType: DeletionEventSubjectType! +} + +""" +An auto-generated type for paginating through multiple DeletionEvents. +""" +type DeletionEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeletionEventEdge!]! + + """ + A list of nodes that are contained in DeletionEventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeletionEvent!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeletionEvent and a cursor during pagination. +""" +type DeletionEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeletionEventEdge. + """ + node: DeletionEvent! +} + +""" +The set of valid sort keys for the DeletionEvent query. +""" +enum DeletionEventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The supported subject types of deletion events. +""" +enum DeletionEventSubjectType { + COLLECTION + + PRODUCT +} + +""" +A shipping service and a list of countries that the service is available for. +""" +type DeliveryAvailableService { + """ + The countries the service provider ships to. + """ + countries: DeliveryCountryCodesOrRestOfWorld! + + """ + The name of the service. + """ + name: String! +} + +""" +Represents a branded promise presented to buyers. +""" +type DeliveryBrandedPromise { + """ + The handle of the branded promise. For example: `shop_promise`. + """ + handle: String! + + """ + The name of the branded promise. For example: `Shop Promise`. + """ + name: String! +} + +""" +A carrier service (also known as a carrier calculated service or shipping service) provides real-time shipping rates to Shopify. Some common carrier services include Canada Post, FedEx, UPS, and USPS. The term **carrier** is often used interchangeably with the terms **shipping company** and **rate provider**. + +Using the CarrierService resource, you can add a carrier service to a shop and then provide a list of applicable shipping rates at checkout. You can even use the cart data to adjust shipping rates and offer shipping discounts based on what is in the customer's cart. + +## Requirements for accessing the CarrierService resource +To access the CarrierService resource, add the `write_shipping` permission to your app's requested scopes. For more information, see [API access scopes](https://shopify.dev/docs/admin-api/access-scopes). + +Your app's request to create a carrier service will fail unless the store installing your carrier service meets one of the following requirements: +* It's on the Advanced Shopify plan or higher. +* It's on the Shopify plan with yearly billing, or the carrier service feature has been added to the store for a monthly fee. For more information, contact [Shopify Support](https://help.shopify.com/questions). +* It's a development store. + +> Note: +> If a store changes its Shopify plan, then the store's association with a carrier service is deactivated if the store no long meets one of the requirements above. + +## Providing shipping rates to Shopify +When adding a carrier service to a store, you need to provide a POST endpoint rooted in the `callbackUrl` property where Shopify can retrieve applicable shipping rates. The callback URL should be a public endpoint that expects these requests from Shopify. + +### Example shipping rate request sent to a carrier service + +```json +{ + "rate": { + "origin": { + "country": "CA", + "postal_code": "K2P1L4", + "province": "ON", + "city": "Ottawa", + "name": null, + "address1": "150 Elgin St.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": "Jamie D's Emporium" + }, + "destination": { + "country": "CA", + "postal_code": "K1M1M4", + "province": "ON", + "city": "Ottawa", + "name": "Bob Norman", + "address1": "24 Sussex Dr.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": null + }, + "items": [{ + "name": "Short Sleeve T-Shirt", + "sku": "", + "quantity": 1, + "grams": 1000, + "price": 1999, + "vendor": "Jamie D's Emporium", + "requires_shipping": true, + "taxable": true, + "fulfillment_service": "manual", + "properties": null, + "product_id": 48447225880, + "variant_id": 258644705304 + }], + "currency": "USD", + "locale": "en", + "order_totals": { + "subtotal_price": "1999", + "total_price": "2199", + "discount_amount": "150" + }, + "customer": { + "id": 207119551, + "tags": ["VIP", "wholesale"] + } + } +} +``` + +### Example response +```json +{ + "rates": [ + { + "service_name": "canadapost-overnight", + "service_code": "ON", + "total_price": "1295", + "description": "This is the fastest option by far", + "currency": "CAD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-2dayground", + "service_code": "2D", + "total_price": "2934", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-priorityovernight", + "service_code": "1D", + "total_price": "3587", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400", + "metafields": [ + { + "key": "tracking_url", + "value": "abc123", + "namespace": "carrier_service_metadata", + "type": "single_line_text_field" + } + ] + } + ] +} +``` + +The `address3`, `fax`, `address_type`, and `company_name` fields are returned by specific [ActiveShipping](https://github.com/Shopify/active_shipping) providers. For API-created carrier services, you should use only the following shipping address fields: +* `address1` +* `address2` +* `city` +* `zip` +* `province` +* `country` + +Other values remain as `null` and are not sent to the callback URL. + +### Response fields + +When Shopify requests shipping rates using your callback URL, the response object `rates` must be a JSON array of objects with the following fields. Required fields must be included in the response for the carrier service integration to work properly. + +| Field | Required | Description | +| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `service_name` | Yes | The name of the rate, which customers see at checkout. For example: `Expedited Mail`. | +| `description` | Yes | A description of the rate, which customers see at checkout. For example: `Includes tracking and insurance`. | +| `service_code` | Yes | A unique code associated with the rate that must be consistent across requests. For example: `expedited_mail`. | +| `currency` | Yes | The currency of the shipping rate. | +| `total_price` | Yes | The total price expressed in subunits. If the currency doesn't use subunits, then the value must be multiplied by 100. For example: `"total_price": 500` for 5.00 CAD, `"total_price": 100000` for 1000 JPY. | +| `phone_required` | No | Whether the customer must provide a phone number at checkout. | +| `min_delivery_date` | No | The earliest delivery date for the displayed rate. | +| `max_delivery_date` | No | The latest delivery date for the displayed rate to still be valid. | +| `metafields` | No | An array of metafield objects to attach custom metadata to the shipping rate. | + +### Special conditions + +* To indicate that this carrier service cannot handle this shipping request, return an empty array and any successful (20x) HTTP code. +* To force backup rates instead, return a 40x or 50x HTTP code with any content. A good choice is the regular 404 Not Found code. +* Redirects (30x codes) will only be followed for the same domain as the original callback URL. Attempting to redirect to a different domain will trigger backup rates. +* There is no retry mechanism. The response must be successful on the first try, within the time budget listed below. Timeouts or errors will trigger backup rates. +* The `service_code` must be stable and consistent across requests for the same shipping option. It should not contain dynamic values like session IDs, timestamps, or request-specific identifiers. Use metafields for passing dynamic or session-specific data. + +## Response Timeouts + +The read timeout for rate requests are dynamic, based on the number of requests per minute (RPM). These limits are applied to each shop-app pair. The timeout values are as follows. + +| RPM Range | Timeout | +| ------------- | ---------- | +| Under 1500 | 10s | +| 1500 to 3000 | 5s | +| Over 3000 | 3s | + +> Note: +> These values are upper limits and should not be interpretted as a goal to develop towards. Shopify is constantly evaluating the performance of the platform and working towards improving resilience as well as app capabilities. As such, these numbers may be adjusted outside of our normal versioning timelines. + +## Server-side caching of requests +Shopify provides server-side caching to reduce the number of requests it makes. Any shipping rate request that identically matches the following fields will be retrieved from Shopify's cache of the initial response: +* variant IDs +* default shipping box weight and dimensions +* variant quantities +* carrier service ID +* origin address +* destination address +* item weights and signatures + +If any of these fields differ, or if the cache has expired since the original request, then new shipping rates are requested. The cache expires 15 minutes after rates are successfully returned. If an error occurs, then the cache expires after 30 seconds. +""" +type DeliveryCarrierService implements Node { + """ + Whether the carrier service is active. + """ + active: Boolean! + + """ + The list of services offered for given destinations. + """ + availableServicesForCountries("The locations of the possible origins." origins: [ID!], "The country codes of the destinations." countryCodes: [CountryCode!], "Whether to use 'Rest of World' as the destination." restOfWorld: Boolean!): [DeliveryAvailableService!]! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. + """ + callbackUrl: URL + + """ + The properly formatted name of the shipping service provider, ready to display. + """ + formattedName: String + + """ + The logo of the service provider. + """ + icon: Image! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the shipping service provider. + """ + name: String + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! +} + +""" +Links a [`DeliveryCarrierService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCarrierService) with the associated shop [locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) where it can calculate shipping rates. Each pairing indicates the locations that can use a specific carrier service for real-time rate calculations during checkout. + +The carrier service provides the shipping rate calculation logic, while the locations represent physical or virtual fulfillment points that can ship orders using that service. +""" +type DeliveryCarrierServiceAndLocations { + """ + The carrier service. + """ + carrierService: DeliveryCarrierService! + + """ + The list of locations that support this carrier service. + """ + locations: [Location!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCarrierServices. +""" +type DeliveryCarrierServiceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCarrierServiceEdge!]! + + """ + A list of nodes that are contained in DeliveryCarrierServiceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryCarrierService!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a carrier service. +""" +input DeliveryCarrierServiceCreateInput { + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL! + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! + + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean! +} + +""" +An auto-generated type which holds one DeliveryCarrierService and a cursor during pagination. +""" +type DeliveryCarrierServiceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryCarrierServiceEdge. + """ + node: DeliveryCarrierService! +} + +""" +The input fields used to update a carrier service. +""" +input DeliveryCarrierServiceUpdateInput { + """ + The global ID of the carrier service to update. + """ + id: ID! + + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean + + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean +} + +""" +A condition that must pass for a delivery method definition to be applied to an order. +""" +type DeliveryCondition implements Node { + """ + The value (weight or price) that the condition field is compared to. + """ + conditionCriteria: DeliveryConditionCriteria! + + """ + The field to compare the criterion value against, using the operator. + """ + field: DeliveryConditionField! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The operator to compare the field and criterion value. + """ + operator: DeliveryConditionOperator! +} + +""" +The value (weight or price) that the condition field is compared to. +""" +union DeliveryConditionCriteria = MoneyV2|Weight + +""" +The field type that the condition will be applied to. +""" +enum DeliveryConditionField { + """ + The condition will check against the total weight of the order. + """ + TOTAL_WEIGHT + + """ + The condition will check against the total price of the order. + """ + TOTAL_PRICE +} + +""" +The operator to use to determine if the condition passes. +""" +enum DeliveryConditionOperator { + """ + The condition will check whether the field is greater than or equal to the criterion. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The condition will check if the field is less than or equal to the criterion. + """ + LESS_THAN_OR_EQUAL_TO +} + +""" +A country that is used to define a shipping zone. +""" +type DeliveryCountry implements Node { + """ + A two-letter country code in ISO 3166-1 alpha-2 standard. + It also includes a flag indicating whether the country should be + a part of the 'Rest Of World' shipping zone. + """ + code: DeliveryCountryCodeOrRestOfWorld! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the country. + """ + name: String! + + """ + The list of regions associated with this country. + """ + provinces: [DeliveryProvince!]! + + """ + The translated name of the country. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The country details and the associated shipping zone. +""" +type DeliveryCountryAndZone { + """ + The country details. + """ + country: DeliveryCountry! + + """ + The name of the shipping zone. + """ + zone: String! +} + +""" +The country code and whether the country is a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodeOrRestOfWorld { + """ + The country code in the ISO 3166-1 alpha-2 format. + """ + countryCode: CountryCode + + """ + Whether the country is a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The list of country codes and information whether the countries +are a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodesOrRestOfWorld { + """ + List of applicable country codes in the ISO 3166-1 alpha-2 format. + """ + countryCodes: [CountryCode!]! + + """ + Whether the countries are a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The input fields to specify a country. +""" +input DeliveryCountryInput { + """ + The country code of the country in the ISO 3166-1 alpha-2 format. + """ + code: CountryCode + + """ + Whether the country is a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean + + """ + The regions associated with this country. + """ + provinces: [DeliveryProvinceInput!] + + """ + Associate all available provinces with this country. + """ + includeAllProvinces: Boolean +} + +""" +A delivery customization. +""" +type DeliveryCustomization implements HasMetafieldDefinitions & HasMetafields & Node { + """ + The enabled status of the delivery customization. + """ + enabled: Boolean! + + """ + The error history on the most recent version of the delivery customization. + """ + errorHistory: FunctionsErrorHistory + + """ + The ID of the Shopify Function implementing the delivery customization. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The Shopify Function implementing the delivery customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the delivery customization. + """ + title: String! +} + +""" +Return type for `deliveryCustomizationActivation` mutation. +""" +type DeliveryCustomizationActivationPayload { + """ + The IDs of the updated delivery customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCustomizations. +""" +type DeliveryCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCustomizationEdge!]! + + """ + A list of nodes that are contained in DeliveryCustomizationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryCustomization!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryCustomizationCreate` mutation. +""" +type DeliveryCustomizationCreatePayload { + """ + Returns the created delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Return type for `deliveryCustomizationDelete` mutation. +""" +type DeliveryCustomizationDeletePayload { + """ + Returns the deleted delivery customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type which holds one DeliveryCustomization and a cursor during pagination. +""" +type DeliveryCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryCustomizationEdge. + """ + node: DeliveryCustomization! +} + +""" +An error that occurs during the execution of a delivery customization mutation. +""" +type DeliveryCustomizationError implements DisplayableError { + """ + The error code. + """ + code: DeliveryCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryCustomizationError`. +""" +enum DeliveryCustomizationErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + Function not found. + """ + FUNCTION_NOT_FOUND + + """ + Delivery customization not found. + """ + DELIVERY_CUSTOMIZATION_NOT_FOUND + + """ + Shop must be on a Shopify Plus plan to activate delivery customizations from a custom app. + """ + DELIVERY_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE + + """ + Maximum delivery customizations are already enabled. + """ + MAXIMUM_ACTIVE_DELIVERY_CUSTOMIZATIONS + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface for this delivery customization. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function is pending deletion. + """ + FUNCTION_PENDING_DELETION + + """ + Function ID cannot be changed. + """ + FUNCTION_ID_CANNOT_BE_CHANGED + + """ + Required input field must be present. + """ + REQUIRED_INPUT_FIELD + + """ + Could not create or update metafields. + """ + INVALID_METAFIELDS + + """ + Either function_id or function_handle must be provided. + """ + MISSING_FUNCTION_IDENTIFIER + + """ + Only one of function_id or function_handle can be provided, not both. + """ + MULTIPLE_FUNCTION_IDENTIFIERS +} + +""" +The input fields to create and update a delivery customization. +""" +input DeliveryCustomizationInput { + """ + The ID of the function providing the delivery customization. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Function handle scoped to your current app ID. Only finds functions within your app. + """ + functionHandle: String + + """ + The title of the delivery customization. + """ + title: String + + """ + The enabled status of the delivery customization. + """ + enabled: Boolean + + """ + Additional metafields to associate to the delivery customization. + """ + metafields: [MetafieldInput!] = [] +} + +""" +Return type for `deliveryCustomizationUpdate` mutation. +""" +type DeliveryCustomizationUpdatePayload { + """ + Returns the updated delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Whether the shop is blocked from converting to full multi-location delivery profiles mode. If the shop is blocked, then the blocking reasons are also returned. +""" +type DeliveryLegacyModeBlocked { + """ + Whether the shop can convert to full multi-location delivery profiles mode. + """ + blocked: Boolean! + + """ + The reasons why the shop is blocked from converting to full multi-location delivery profiles mode. + """ + reasons: [DeliveryLegacyModeBlockedReason!] +} + +""" +Reasons the shop is blocked from converting to full multi-location delivery profiles mode. +""" +enum DeliveryLegacyModeBlockedReason { + """ + Multi-Location mode is disabled. The shop can't convert to full multi-location delivery profiles mode. + """ + MULTI_LOCATION_DISABLED @deprecated(reason: "All shops are now using multi-location mode.") + + """ + There are no locations for this store that can fulfill online orders. + """ + NO_LOCATIONS_FULFILLING_ONLINE_ORDERS +} + +""" +Local pickup settings associated with a location. +""" +type DeliveryLocalPickupSettings { + """ + Additional instructions or information related to the local pickup. + """ + instructions: String! + + """ + The estimated pickup time to show customers at checkout. + """ + pickupTime: DeliveryLocalPickupTime! +} + +""" +Possible pickup time values that a location enabled for local pickup can have. +""" +enum DeliveryLocalPickupTime { + """ + Usually ready in 1 hour. + """ + ONE_HOUR + + """ + Usually ready in 2 hours. + """ + TWO_HOURS + + """ + Usually ready in 4 hours. + """ + FOUR_HOURS + + """ + Usually ready in 24 hours. + """ + TWENTY_FOUR_HOURS + + """ + Usually ready in 2-4 days. + """ + TWO_TO_FOUR_DAYS + + """ + Usually ready in 5+ days. + """ + FIVE_OR_MORE_DAYS + + """ + Custom pickup time. Unrecognized pickup time enum value. + """ + CUSTOM @deprecated(reason: "Custom pickup time is no longer supported.") +} + +""" +A location group is a collection of locations. They share zones and delivery methods across delivery +profiles. +""" +type DeliveryLocationGroup implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of all locations that are part of this location group. + """ + locations("Whether to include the legacy locations of fulfillment services." includeLegacy: Boolean = false, "Whether to include the locations that are deactivated." includeInactive: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: LocationSortKeys = NAME, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active | string |\n| address1 | string |\n| address2 | string |\n| city | string |\n| country | string |\n| created_at | time |\n| geolocated | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| legacy | boolean |\n| location_id | id |\n| name | string |\n| pickup_in_store | string | | - `enabled`
- `disabled` |\n| province | string |\n| zip | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): LocationConnection! + + """ + A count of all locations that are part of this location group. + """ + locationsCount: Count +} + +""" +Links a location group with a zone and the associated method definitions. +""" +type DeliveryLocationGroupZone { + """ + The number of method definitions for the zone. + """ + methodDefinitionCounts: DeliveryMethodDefinitionCounts! + + """ + The method definitions associated to a zone and location group. + """ + methodDefinitions("Return only eligible or ineligible method definitions." eligible: Boolean, "Return only merchant or participant method definitions." type: DeliveryMethodDefinitionType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MethodDefinitionSortKeys = ID): DeliveryMethodDefinitionConnection! + + """ + The zone associated to a location group. + """ + zone: DeliveryZone! +} + +""" +An auto-generated type for paginating through multiple DeliveryLocationGroupZones. +""" +type DeliveryLocationGroupZoneConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryLocationGroupZoneEdge!]! + + """ + A list of nodes that are contained in DeliveryLocationGroupZoneEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryLocationGroupZone!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination. +""" +type DeliveryLocationGroupZoneEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryLocationGroupZoneEdge. + """ + node: DeliveryLocationGroupZone! +} + +""" +The input fields for a delivery zone associated to a location group and profile. +""" +input DeliveryLocationGroupZoneInput { + """ + A globally-unique ID of the zone. + """ + id: ID + + """ + The name of the zone. + """ + name: String + + """ + A list of countries to associate with the zone. + """ + countries: [DeliveryCountryInput!] + + """ + A list of method definitions to create. + """ + methodDefinitionsToCreate: [DeliveryMethodDefinitionInput!] + + """ + A list of method definitions to update. + """ + methodDefinitionsToUpdate: [DeliveryMethodDefinitionInput!] +} + +""" +The input fields for a local pickup setting associated with a location. +""" +input DeliveryLocationLocalPickupEnableInput { + """ + The ID of the location associated with the location setting. + """ + locationId: ID! + + """ + The time of the local pickup. + """ + pickupTime: DeliveryLocalPickupTime! + + """ + The instructions for the local pickup. + """ + instructions: String +} + +""" +Represents an error that happened when changing local pickup settings for a location. +""" +type DeliveryLocationLocalPickupSettingsError implements DisplayableError { + """ + The error code. + """ + code: DeliveryLocationLocalPickupSettingsErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryLocationLocalPickupSettingsError`. +""" +enum DeliveryLocationLocalPickupSettingsErrorCode { + """ + Provided locationId is not for an active location belonging to this store. + """ + ACTIVE_LOCATION_NOT_FOUND + + """ + Custom pickup time is not allowed for local pickup settings. + """ + CUSTOM_PICKUP_TIME_NOT_ALLOWED + + """ + An error occurred while changing the local pickup settings. + """ + GENERIC_ERROR +} + +""" +Information about the delivery method selected for a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder). Includes the method type, expected delivery timeframe, and any additional information needed for delivery. + +The delivery method stores details from checkout such as the carrier, branded promises like Shop Promise, and the delivery option name shown to the buyer. Additional information like delivery instructions or contact phone numbers helps fulfill the [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) correctly. +""" +type DeliveryMethod implements Node { + """ + The Additional information to consider when performing the delivery. + """ + additionalInformation: DeliveryMethodAdditionalInformation + + """ + The branded promise that was presented to the buyer during checkout. For example: Shop Promise. + """ + brandedPromise: DeliveryBrandedPromise + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + maxDeliveryDateTime: DateTime + + """ + The type of the delivery method. + """ + methodType: DeliveryMethodType! + + """ + The earliest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + minDeliveryDateTime: DateTime + + """ + The name of the delivery option that was presented to the buyer during checkout. + """ + presentedName: String + + """ + A reference to the shipping method. + """ + serviceCode: String + + """ + Source reference is promise provider specific data associated with delivery promise. + """ + sourceReference: String +} + +""" +Additional information included on a delivery method that will help during the delivery process. +""" +type DeliveryMethodAdditionalInformation { + """ + The delivery instructions to follow when performing the delivery. + """ + instructions: String + + """ + The phone number to contact when performing the delivery. + """ + phone: String +} + +""" +A method definition contains the delivery rate and the conditions that must be met for the method to be +applied. +""" +type DeliveryMethodDefinition implements Node { + """ + Whether this method definition is active. + """ + active: Boolean! + + """ + The description of the method definition. Only available on shipping rates that are custom. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The method conditions that must pass for this method definition to be applied to an order. + """ + methodConditions: [DeliveryCondition!]! + + """ + The name of the method definition. + """ + name: String! + + """ + The provided rate for this method definition, from a rate definition or participant. + """ + rateProvider: DeliveryRateProvider! +} + +""" +An auto-generated type for paginating through multiple DeliveryMethodDefinitions. +""" +type DeliveryMethodDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryMethodDefinitionEdge!]! + + """ + A list of nodes that are contained in DeliveryMethodDefinitionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryMethodDefinition!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The number of method definitions for a zone, separated into merchant-owned and participant definitions. +""" +type DeliveryMethodDefinitionCounts { + """ + The number of participant method definitions for the specified zone. + """ + participantDefinitionsCount: Int! + + """ + The number of merchant-defined method definitions for the specified zone. + """ + rateDefinitionsCount: Int! +} + +""" +An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination. +""" +type DeliveryMethodDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryMethodDefinitionEdge. + """ + node: DeliveryMethodDefinition! +} + +""" +The input fields for a method definition. +""" +input DeliveryMethodDefinitionInput { + """ + A globally-unique ID of the method definition. Use only when updating a method definition. + """ + id: ID + + """ + The name of the method definition. + """ + name: String + + """ + The description of the method definition. + """ + description: String + + """ + Whether to use this method definition during rate calculation. + """ + active: Boolean + + """ + A rate definition to apply to the method definition. + """ + rateDefinition: DeliveryRateDefinitionInput + + """ + A participant to apply to the method definition. + """ + participant: DeliveryParticipantInput + + """ + A list of weight conditions on the method definition. + """ + weightConditionsToCreate: [DeliveryWeightConditionInput!] + + """ + A list of price conditions on the method definition. + """ + priceConditionsToCreate: [DeliveryPriceConditionInput!] + + """ + A list of conditions to update on the method definition. + """ + conditionsToUpdate: [DeliveryUpdateConditionInput!] +} + +""" +The different types of method definitions to filter by. +""" +enum DeliveryMethodDefinitionType { + """ + A static merchant-defined rate. + """ + MERCHANT + + """ + A dynamic participant rate. + """ + PARTICIPANT +} + +""" +Possible method types that a delivery method can have. +""" +enum DeliveryMethodType { + """ + The order is shipped. + """ + SHIPPING + + """ + The order is picked up by the customer. + """ + PICK_UP + + """ + Non-physical items, no delivery needed. + """ + NONE + + """ + In-store sale, no delivery needed. + """ + RETAIL + + """ + The order is delivered using a local delivery service. + """ + LOCAL + + """ + The order is delivered to a pickup point. + """ + PICKUP_POINT +} + +""" +A participant defines carrier-calculated rates for shipping services +with a possible merchant-defined fixed fee or a percentage-of-rate fee. +""" +type DeliveryParticipant implements Node { + """ + Whether to display new shipping services automatically to the customer when the service becomes available. + """ + adaptToNewServicesFlag: Boolean! + + """ + The carrier used for this participant. + """ + carrierService: DeliveryCarrierService! + + """ + The merchant-defined fixed fee for this participant. + """ + fixedFee: MoneyV2 + + """ + A globally-unique ID. + """ + id: ID! + + """ + The carrier-specific services offered by the participant, and whether each service is active. + """ + participantServices: [DeliveryParticipantService!]! + + """ + The merchant-defined percentage-of-rate fee for this participant. + """ + percentageOfRateFee: Float! +} + +""" +The input fields for a participant. +""" +input DeliveryParticipantInput { + """ + The ID of the participant. + """ + id: ID + + """ + The ID of the carrier service for this participant. + """ + carrierServiceId: ID + + """ + The fixed feed that's defined by the merchant for this participant. + """ + fixedFee: MoneyInput + + """ + The merchant-defined percentage-of-rate fee for this participant. + """ + percentageOfRateFee: Float + + """ + The list of shipping services offered by the participant. + """ + participantServices: [DeliveryParticipantServiceInput!] + + """ + Whether to automatically display new shipping services to the customer when a service becomes available. + """ + adaptToNewServices: Boolean +} + +""" +A mail service provided by the participant. +""" +type DeliveryParticipantService { + """ + Whether the service is active. + """ + active: Boolean! + + """ + The name of the service. + """ + name: String! +} + +""" +The input fields for a shipping service provided by a participant. +""" +input DeliveryParticipantServiceInput { + """ + The name of the service. + """ + name: String! + + """ + Whether the service is active. + """ + active: Boolean! +} + +""" +The input fields for a price-based condition of a delivery method definition. +""" +input DeliveryPriceConditionInput { + """ + The monetary value to compare the price of an order to. + """ + criteria: MoneyInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +How many product variants are in a profile. This count is capped at 500. +""" +type DeliveryProductVariantsCount { + """ + Whether the count has reached the cap of 500. + """ + capped: Boolean! + + """ + The product variant count. + """ + count: Int! +} + +""" +A shipping profile that defines shipping rates for specific [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. Delivery profiles determine which products can ship from which [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects to which zones, and at what rates. + +Profiles can associate with [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) objects to provide custom shipping rules for subscriptions, such as free shipping or restricted delivery zones. The default profile applies to all products that aren't assigned to other profiles. + +Learn more about [building delivery profiles](https://shopify.dev/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). +""" +type DeliveryProfile implements Node { + """ + The number of active shipping rates for the profile. + """ + activeMethodDefinitionsCount: Int! + + """ + Whether this is the default profile. + """ + default: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether this shop has enabled legacy compatibility mode for delivery profiles. + """ + legacyMode: Boolean! @deprecated(reason: "Legacy mode profiles are no longer supported. This will be removed in 2026-04.") + + """ + The number of locations without rates defined. + """ + locationsWithoutRatesCount: Int! + + """ + The name of the delivery profile. + """ + name: String! + + """ + The number of active origin locations for the profile. + """ + originLocationCount: Int! + + """ + How many product variants are in this profile. + """ + productVariantsCount: Count + + """ + How many product variants are in this profile. + """ + productVariantsCountV2: DeliveryProductVariantsCount! @deprecated(reason: "Use `productVariantsCount` instead.") + + """ + The products and variants associated with this profile. + """ + profileItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProfileItemSortKeys = ID @deprecated(reason: "Profile item sorting is no longer supported.")): DeliveryProfileItemConnection! + + """ + The location groups and associated zones using this profile. + """ + profileLocationGroups("Filter the location groups of the profile by location group ID." locationGroupId: ID): [DeliveryProfileLocationGroup!]! + + """ + Selling plan groups associated with the specified delivery profile. + """ + sellingPlanGroups("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanGroupConnection! + + """ + List of locations that haven't been assigned to a location group for this profile. + """ + unassignedLocations: [Location!]! + + """ + List of locations that have not been assigned to a location group for this profile. + """ + unassignedLocationsPaginated("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocationConnection! + + """ + The version of the delivery profile. + """ + version: Int! + + """ + The number of countries with active rates to deliver to. + """ + zoneCountryCount: Int! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfiles. +""" +type DeliveryProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryProfile!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryProfileCreate` mutation. +""" +type DeliveryProfileCreatePayload { + """ + The delivery profile that was created. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DeliveryProfile and a cursor during pagination. +""" +type DeliveryProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileEdge. + """ + node: DeliveryProfile! +} + +""" +The input fields for a delivery profile. +""" +input DeliveryProfileInput { + """ + The name of the delivery profile. + """ + name: String + + """ + The list of location groups associated with the delivery profile. + """ + profileLocationGroups: [DeliveryProfileLocationGroupInput!] + + """ + The list of location groups to be created in the delivery profile. + + **Note:** due to the potential complexity of the nested data, it is recommended to send no more than 5 location groups per each request. + """ + locationGroupsToCreate: [DeliveryProfileLocationGroupInput!] + + """ + The list of location groups to be updated in the delivery profile. + + **Note:** due to the potential complexity of the nested data, it is recommended to send no more than 5 location groups per each request. + """ + locationGroupsToUpdate: [DeliveryProfileLocationGroupInput!] + + """ + The list of location groups to be deleted from the delivery profile. + """ + locationGroupsToDelete: [ID!] + + """ + The list of product variant IDs to be associated with the delivery profile. + """ + variantsToAssociate: [ID!] + + """ + The list of product variant IDs to be dissociated from the delivery profile. + The dissociated product variants are moved back to the default delivery profile. + """ + variantsToDissociate: [ID!] + + """ + The list of zone IDs to delete. + """ + zonesToDelete: [ID!] + + """ + The list of method definition IDs to delete. + """ + methodDefinitionsToDelete: [ID!] + + """ + The list of condition IDs to delete. + """ + conditionsToDelete: [ID!] + + """ + The list of selling plan groups to be associated with the delivery profile. + """ + sellingPlanGroupsToAssociate: [ID!] + + """ + The list of selling plan groups to be dissociated with the delivery profile. + """ + sellingPlanGroupsToDissociate: [ID!] +} + +""" +A product and the subset of associated variants that are part of this delivery profile. +""" +type DeliveryProfileItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + A product associated with this profile. + """ + product: Product! + + """ + The product variants associated with this delivery profile. + """ + variants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductVariantSortKeys = ID @deprecated(reason: "Profile item variant sorting is no longer supported.")): ProductVariantConnection! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfileItems. +""" +type DeliveryProfileItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileItemEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryProfileItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination. +""" +type DeliveryProfileItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileItemEdge. + """ + node: DeliveryProfileItem! +} + +""" +Links a location group with zones. Both are associated to a delivery profile. +""" +type DeliveryProfileLocationGroup { + """ + The countries already selected in any zone for the specified location group. + """ + countriesInAnyZone: [DeliveryCountryAndZone!]! + + """ + The collection of locations that make up the specified location group. + """ + locationGroup: DeliveryLocationGroup! + + """ + The applicable zones associated to the specified location group. + """ + locationGroupZones("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DeliveryLocationGroupZoneConnection! +} + +""" +The input fields for a location group associated to a delivery profile. +""" +input DeliveryProfileLocationGroupInput { + """ + The globally-unique ID of the delivery profile location group. + """ + id: ID + + """ + The list of location IDs to be moved to this location group. + """ + locations: [ID!] + + """ + The list of location IDs to be added to this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToAdd: [ID!] + + """ + The list of location IDs to be removed from this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToRemove: [ID!] + + """ + The list of location group zones to create. + + **Note:** due to the potential complexity of the nested data, it is recommended to send no more than 5 zones per each request. + """ + zonesToCreate: [DeliveryLocationGroupZoneInput!] + + """ + The list of location group zones to update. + + **Note:** due to the potential complexity of the nested data, it is recommended to send no more than 5 zones per each request. + """ + zonesToUpdate: [DeliveryLocationGroupZoneInput!] +} + +""" +Return type for `deliveryProfileRemove` mutation. +""" +type DeliveryProfileRemovePayload { + """ + The delivery profile deletion job triggered by the mutation. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryProfileUpdate` mutation. +""" +type DeliveryProfileUpdatePayload { + """ + The delivery profile that was updated. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Returns enabled delivery promise participants. +""" +type DeliveryPromiseParticipant implements Node { + """ + The ID of the promise participant. + """ + id: ID! + + """ + The resource that the participant is attached to. + """ + owner: DeliveryPromiseParticipantOwner + + """ + The owner type of the participant. + """ + ownerType: DeliveryPromiseParticipantOwnerType! +} + +""" +An auto-generated type for paginating through multiple DeliveryPromiseParticipants. +""" +type DeliveryPromiseParticipantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryPromiseParticipantEdge!]! + + """ + A list of nodes that are contained in DeliveryPromiseParticipantEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DeliveryPromiseParticipant!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryPromiseParticipant and a cursor during pagination. +""" +type DeliveryPromiseParticipantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryPromiseParticipantEdge. + """ + node: DeliveryPromiseParticipant! +} + +""" +The object that the participant references. +""" +union DeliveryPromiseParticipantOwner = ProductVariant + +""" +The type of object that the participant is attached to. +""" +enum DeliveryPromiseParticipantOwnerType { + """ + A product variant. + """ + PRODUCTVARIANT +} + +""" +Return type for `deliveryPromiseParticipantsUpdate` mutation. +""" +type DeliveryPromiseParticipantsUpdatePayload { + """ + The promise participants that were added. + """ + promiseParticipants: [DeliveryPromiseParticipant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A delivery promise provider. Currently restricted to select approved delivery promise partners. +""" +type DeliveryPromiseProvider implements Node { + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean! + + """ + The number of seconds to add to the current time as a buffer when looking up delivery promises. Represents how long the shop requires before releasing an order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location associated with this delivery promise provider. + """ + location: Location! + + """ + The time zone to be used for interpreting day of week and cutoff times in delivery schedules when looking up delivery promises. + """ + timeZone: String! +} + +""" +Return type for `deliveryPromiseProviderUpsert` mutation. +""" +type DeliveryPromiseProviderUpsertPayload { + """ + The created or updated delivery promise provider. + """ + deliveryPromiseProvider: DeliveryPromiseProvider + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryPromiseProviderUpsertUserError!]! +} + +""" +An error that occurs during the execution of `DeliveryPromiseProviderUpsert`. +""" +type DeliveryPromiseProviderUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: DeliveryPromiseProviderUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryPromiseProviderUpsertUserError`. +""" +enum DeliveryPromiseProviderUpsertUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is too long. + """ + TOO_LONG + + """ + The location doesn't belong to the app. + """ + MUST_BELONG_TO_APP + + """ + The time zone is invalid. + """ + INVALID_TIME_ZONE +} + +""" +The delivery promise settings. +""" +type DeliveryPromiseSetting { + """ + Whether delivery dates is enabled. + """ + deliveryDatesEnabled: Boolean! + + """ + The number of business days required for processing the order before the package is handed off to the carrier. Expressed as an ISO8601 duration. + """ + processingTime: String +} + +""" +A region that is used to define a shipping zone. +""" +type DeliveryProvince implements Node { + """ + The code of the region. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the region. + """ + name: String! + + """ + The translated name of the region. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The input fields to specify a region. +""" +input DeliveryProvinceInput { + """ + The code of the region. + """ + code: String! +} + +""" +The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). +""" +type DeliveryRateDefinition implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The price of this rate. + """ + price: MoneyV2! +} + +""" +The input fields for a rate definition. +""" +input DeliveryRateDefinitionInput { + """ + A globally-unique ID of the rate definition. + """ + id: ID + + """ + The price of the rate definition. + """ + price: MoneyInput! +} + +""" +A rate provided by a merchant-defined rate or a participant. +""" +union DeliveryRateProvider = DeliveryParticipant|DeliveryRateDefinition + +""" +The `DeliverySetting` object enables you to manage shop-wide shipping settings. +""" +type DeliverySetting { + """ + Whether the shop is blocked from converting to full multi-location delivery profiles mode. If the shop is blocked, then the blocking reasons are also returned. Note: this field is effectively deprecated and will be removed in a future version of the API. + """ + legacyModeBlocked: DeliveryLegacyModeBlocked! + + """ + Enables legacy compatability mode for the multi-location delivery profiles feature. Note: this field is effectively deprecated and will be removed in a future version of the API. + """ + legacyModeProfiles: Boolean! +} + +""" +The input fields for shop-level delivery settings. +""" +input DeliverySettingInput { + """ + Whether legacy compatability mode is enabled for the multi-location delivery profiles feature. Note: this field is effectively deprecated and will be removed in a future version of the API. + """ + legacyModeProfiles: Boolean +} + +""" +Return type for `deliverySettingUpdate` mutation. +""" +type DeliverySettingUpdatePayload { + """ + The updated delivery shop level settings. + """ + setting: DeliverySetting + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryShippingOriginAssign` mutation. +""" +type DeliveryShippingOriginAssignPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for updating the condition of a delivery method definition. +""" +input DeliveryUpdateConditionInput { + """ + A globally-unique ID of the condition. + """ + id: ID! + + """ + The value that will be used in comparison. + """ + criteria: Float + + """ + The unit associated with the value that will be used in comparison. + """ + criteriaUnit: String + + """ + The property of an order that will be used in comparison. + """ + field: DeliveryConditionField + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +The input fields for a weight-based condition of a delivery method definition. +""" +input DeliveryWeightConditionInput { + """ + The weight value to compare the weight of an order to. + """ + criteria: WeightInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +A zone is a group of countries that have the same shipping rates. Customers can order products from a store only if they choose a shipping destination that's included in one of the store's zones. +""" +type DeliveryZone implements Node { + """ + The list of countries within the zone. + """ + countries: [DeliveryCountry!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the zone. + """ + name: String! +} + +""" +Configuration of the deposit. +""" +union DepositConfiguration = DepositPercentage + +""" +The input fields configuring the deposit requirement. +""" +input DepositInput { + """ + The percentage of the order total that should be paid as a deposit. Must be between 1 and 99, inclusive. + """ + percentage: Float! +} + +""" +A percentage deposit. +""" +type DepositPercentage { + """ + The percentage value of the deposit. + """ + percentage: Float! +} + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet { + """ + Apple Pay. + """ + APPLE_PAY + + """ + Android Pay. + """ + ANDROID_PAY + + """ + Google Pay. + """ + GOOGLE_PAY + + """ + Shopify Pay. + """ + SHOPIFY_PAY + + """ + Facebook Pay. + """ + FACEBOOK_PAY + + """ + Amazon Pay. + """ + AMAZON_PAY +} + +""" +A discount offers promotional value and can be applied by entering a code or automatically when conditions are met. Discounts can provide fixed amounts, percentage reductions, free shipping, or Buy X Get Y (BXGY) benefits on specific products or the entire order. For more complex scenarios, developers can use Function-backed discounts to create custom discount configurations. +""" +union Discount = DiscountAutomaticApp|DiscountAutomaticBasic|DiscountAutomaticBxgy|DiscountAutomaticFreeShipping|DiscountCodeApp|DiscountCodeBasic|DiscountCodeBxgy|DiscountCodeFreeShipping + +""" +The actual amount discounted on a line item or shipping line. While [`DiscountApplication`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DiscountApplication) captures the discount's intentions and rules, The `DiscountAllocation` object shows the final calculated discount amount applied to each line. + +The allocation includes the discounted amount in both shop and presentment currencies, with a reference to the originating discount application. +""" +type DiscountAllocation { + """ + The money amount that's allocated to a line based on the associated discount application. + """ + allocatedAmount: MoneyV2! @deprecated(reason: "Use `allocatedAmountSet` instead.") + + """ + The money amount that's allocated to a line based on the associated discount application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: DiscountApplication! +} + +""" +An auto-generated type for paginating through multiple DiscountAllocations. +""" +type DiscountAllocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAllocationEdge!]! + + """ + A list of nodes that are contained in DiscountAllocationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountAllocation!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAllocation and a cursor during pagination. +""" +type DiscountAllocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAllocationEdge. + """ + node: DiscountAllocation! +} + +""" +The fixed amount value of a discount, and whether the amount is applied to each entitled item or spread evenly across the entitled items. +""" +type DiscountAmount { + """ + The value of the discount. + """ + amount: MoneyV2! + + """ + If true, then the discount is applied to each of the entitled items. If false, then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean! +} + +""" +The input fields for the value of the discount and how it is applied. +""" +input DiscountAmountInput { + """ + The value of the discount. + """ + amount: Decimal + + """ + If true, then the discount is applied to each of the entitled items. If false, then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. + +Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +interface DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The method by which the discount's value is allocated onto its entitled lines. +""" +enum DiscountApplicationAllocationMethod { + """ + The value is spread across all entitled lines. + """ + ACROSS + + """ + The value is applied onto every entitled line. + """ + EACH + + """ + The value is specifically applied onto a particular line. + """ + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. +""" +type DiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountApplicationEdge!]! + + """ + A list of nodes that are contained in DiscountApplicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountApplication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. +""" +type DiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountApplicationEdge. + """ + node: DiscountApplication! +} + +""" +The level at which the discount's value is applied. +""" +enum DiscountApplicationLevel { + """ + The discount is applied at the order level. + Order level discounts are not factored into the discountedUnitPriceSet on line items. + """ + ORDER + + """ + The discount is applied at the line level. + Line level discounts are factored into the discountedUnitPriceSet on line items. + """ + LINE +} + +""" +The lines on the order to which the discount is applied, of the type defined by +the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of +`LINE_ITEM`, applies the discount on all line items that are entitled to the discount. +The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines. +""" +enum DiscountApplicationTargetSelection { + """ + The discount is allocated onto all the lines. + """ + ALL + + """ + The discount is allocated onto only the lines that it's entitled for. + """ + ENTITLED + + """ + The discount is allocated onto explicitly chosen lines. + """ + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +""" +enum DiscountApplicationTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The types of automatic discounts applied in the cart and at checkout when an order meets specific criteria. + +Includes [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) for custom logic using the [Discount Function API](https://shopify.dev/docs/api/functions/latest/discount), [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) for percentage or fixed amount reductions, [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) for Buy X Get Y promotions, and [`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) for delivery incentives. +""" +union DiscountAutomatic = DiscountAutomaticApp|DiscountAutomaticBasic|DiscountAutomaticBxgy|DiscountAutomaticFreeShipping + +""" +Return type for `discountAutomaticActivate` mutation. +""" +type DiscountAutomaticActivatePayload { + """ + The activated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticApp` object stores information about automatic discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountAutomaticApp`when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountCodeApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeApp) +object has similar functionality to the `DiscountAutomaticApp` object, with the exception that `DiscountCodeApp` +stores information about discount codes that are managed by an app using Shopify Functions. +> +> API versions prior to `2025-10` only return automatic discounts with `context` set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + Whether the discount applies on one-time purchases. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + for the discount. + """ + discountId: ID! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The [error history](https://shopify.dev/docs/apps/build/functions/monitoring-and-errors) + for the latest version of the discount type that the app provides. + """ + errorHistory: FunctionsErrorHistory + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticAppCreate` mutation. +""" +type DiscountAutomaticAppCreatePayload { + """ + The automatic discount that the app manages. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an automatic discount +that's managed by an app. + +Use these input fields when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountAutomaticAppInput { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + Determines which discount effects the discount can apply. + """ + discountClasses: [DiscountClass!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations. For app discounts using Admin UI Extensions, merchants can control POS eligibility when the context is set to ALL. + """ + context: DiscountContextInput + + """ + The ID of the function providing the discount. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + The handle of the function providing the discount. + """ + functionHandle: String + + """ + Additional metafields to associate to the discount. + [Metafields](https://shopify.dev/docs/apps/build/custom-data) + provide dynamic function configuration with + different parameters, such as `percentage` for a percentage discount. Merchants can set metafield values + in the Shopify admin, which makes the discount function more flexible and customizable. + """ + metafields: [MetafieldInput!] = [] + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean = true + + """ + Whether the discount applies on one-time purchases. + """ + appliesOnOneTimePurchase: Boolean = true + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int = 1 +} + +""" +Return type for `discountAutomaticAppUpdate` mutation. +""" +type DiscountAutomaticAppUpdatePayload { + """ + The updated automatic discount that the app provides. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are automatically applied on a cart and at checkout. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountAutomaticBasic` object stores information about automatic amount off discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic) +object has similar functionality to the `DiscountAutomaticBasic` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBasic { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") +} + +""" +Return type for `discountAutomaticBasicCreate` mutation. +""" +type DiscountAutomaticBasicCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an +[amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's automatically applied on a cart and at checkout. + +During creation the required fields are: + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountAutomaticBasicInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + Information about the qualifying items and their discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +""" +Return type for `discountAutomaticBasicUpdate` mutation. +""" +type DiscountAutomaticBasicUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticBulkDelete` mutation. +""" +type DiscountAutomaticBulkDeletePayload { + """ + The asynchronous job removing the automatic discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are automatically applied on a cart and at checkout. BXGY discounts incentivize customers by offering +them additional items at a discounted price or for free when they purchase a specified quantity of items. + +The `DiscountAutomaticBxgy` object stores information about automatic BXGY discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy) +object has similar functionality to the `DiscountAutomaticBxgy` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBxgy implements HasEvents & Node { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuys! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A legacy unique ID for the discount. + """ + id: ID! @deprecated(reason: "Use DiscountAutomaticNode.id instead.") + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountAutomaticBxgyCreate` mutation. +""" +type DiscountAutomaticBxgyCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's automatically applied on a cart and at checkout. + +When creating, required fields are: + - `customerBuys` + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountAutomaticBxgyInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: UnsignedInt64 + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuysInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput +} + +""" +Return type for `discountAutomaticBxgyUpdate` mutation. +""" +type DiscountAutomaticBxgyUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomatics. +""" +type DiscountAutomaticConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountAutomatic!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `discountAutomaticDeactivate` mutation. +""" +type DiscountAutomaticDeactivatePayload { + """ + The deactivated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticDelete` mutation. +""" +type DiscountAutomaticDeletePayload { + """ + The ID of the automatic discount that was deleted. + """ + deletedAutomaticDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type which holds one DiscountAutomatic and a cursor during pagination. +""" +type DiscountAutomaticEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticEdge. + """ + node: DiscountAutomatic! +} + +""" +The `DiscountAutomaticFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are automatically applied on a cart and at checkout. Free shipping discounts are promotional deals that +merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountAutomaticFreeShipping` object stores information about automatic free shipping discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping) +object has similar functionality to the `DiscountAutomaticFreeShipping` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The countries that qualify for the discount. + You can define + [a list of countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountries) + or specify [all countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountryAll) + to be eligible for the discount. + """ + destinationSelection: DiscountShippingDestinationSelection! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: ShippingDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticFreeShippingCreate` mutation. +""" +type DiscountAutomaticFreeShippingCreatePayload { + """ + The automatic free shipping discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's automatically applied on a cart and at checkout. + +When creating, required fields are: +- `startsAt` +- `title` +""" +input DiscountAutomaticFreeShippingInput { + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with the shipping discount. + """ + combinesWith: DiscountCombinesWithInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + A list of destinations where the discount will apply. + """ + destination: DiscountShippingDestinationSelectionInput + + """ + The maximum shipping price that qualifies for the discount. + """ + maximumShippingPrice: Decimal + + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +""" +Return type for `discountAutomaticFreeShippingUpdate` mutation. +""" +type DiscountAutomaticFreeShippingUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticNode` object enables you to manage [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts) that are applied when an order meets specific criteria. You can create amount off, free shipping, or buy X get Y automatic discounts. For example, you can offer customers a free shipping discount that applies when conditions are met. Or you can offer customers a buy X get Y discount that's automatically applied when customers spend a specified amount of money, or a specified quantity of products. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountAutomaticNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied automatically when an order meets specific criteria. Learn more about [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscount: DiscountAutomatic! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomaticNodes. +""" +type DiscountAutomaticNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticNodeEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticNodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountAutomaticNode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAutomaticNode and a cursor during pagination. +""" +type DiscountAutomaticNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticNodeEdge. + """ + node: DiscountAutomaticNode! +} + +""" +All buyers are eligible for the discount. +""" +enum DiscountBuyerSelection { + """ + All buyers are eligible for the discount. + """ + ALL +} + +""" +Indicates that a discount applies to all buyers without restrictions, enabling universal promotions that reach every customer. This selection removes buyer-specific limitations from discount eligibility. + +For example, a flash sale or grand opening promotion would target all buyers to maximize participation and store visibility. + +Learn more about [discount targeting](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountBuyerSelectionAll { + """ + All buyers are eligible for the discount. + """ + all: DiscountBuyerSelection! +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum DiscountClass { + """ + The discount is combined with a + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT + + """ + The discount is combined with an + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + ORDER + + """ + The discount is combined with a + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + SHIPPING +} + +""" +The type of discount associated with the discount code. For example, the discount code might offer a basic discount of a fixed percentage, or a fixed amount, on specific products or the order. Alternatively, the discount might offer the customer free shipping on their order. A third option is a Buy X, Get Y (BXGY) discount, which offers a customer discounts on select products if they add a specific product to their order. +""" +union DiscountCode = DiscountCodeApp|DiscountCodeBasic|DiscountCodeBxgy|DiscountCodeFreeShipping + +""" +Return type for `discountCodeActivate` mutation. +""" +type DiscountCodeActivatePayload { + """ + The activated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeApp` object stores information about code discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountCodeApp` when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) +object has similar functionality to the `DiscountCodeApp` object, with the exception that `DiscountAutomaticApp` +stores information about automatic discounts that are managed by an app using Shopify Functions. +""" +type DiscountCodeApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies to subscriptions items. + """ + appliesOnSubscription: Boolean! + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountRedeemCodeConnection! + + """ + The number of codes that a customer can use to redeem the discount. + """ + codesCount: Count + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelection! @deprecated(reason: "Use `context` instead.") + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + for the discount. + """ + discountId: ID! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The [error history](https://shopify.dev/docs/apps/build/functions/monitoring-and-errors) + for the latest version of the discount type that the app provides. + """ + errorHistory: FunctionsErrorHistory + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeAppCreate` mutation. +""" +type DiscountCodeAppCreatePayload { + """ + The discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a code discount, where the discount type is provided by an app extension that uses [Shopify Functions](https://shopify.dev/docs/apps/build/functions). + +Use these input fields when you need advanced or custom discount capabilities that aren't supported by [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountCodeAppInput { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + Determines which discount effects the discount can apply. + """ + discountClasses: [DiscountClass!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The ID of the function providing the discount. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + The handle of the function providing the discount. + """ + functionHandle: String + + """ + Whether the discount applies to subscriptions items. + """ + appliesOnSubscription: Boolean = true + + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean = true + + """ + The number of times a discount applies on recurring purchases (subscriptions). 0 will apply infinitely whereas 1 will only apply to the first checkout. + """ + recurringCycleLimit: Int = 1 + + """ + Additional metafields to associate to the discount. [Metafields](https://shopify.dev/docs/apps/build/custom-data) provide dynamic function configuration with different parameters, such as `percentage` for a percentage discount. Merchants can set metafield values in the Shopify admin, which makes the discount function more flexible and customizable. + """ + metafields: [MetafieldInput!] = [] +} + +""" +Return type for `discountCodeAppUpdate` mutation. +""" +type DiscountCodeAppUpdatePayload { + """ + The updated discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Discount code applications capture the intentions of a discount code at +the time that it is applied onto an order. + +Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type DiscountCodeApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The `DiscountCodeBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountCodeBasic` object stores information about amount off code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) +object has similar functionality to the `DiscountCodeBasic` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBasic { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountRedeemCodeConnection! + + """ + The number of codes that a customer can use to redeem the discount. + """ + codesCount: Count + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelection! @deprecated(reason: "Use `context` instead.") + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeBasicCreate` mutation. +""" +type DiscountCodeBasicCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountCodeBasicInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The number of billing cycles for which the discount can be applied, which is useful for subscription-based discounts. For example, if you set this field to `3`, then the discount only applies to the first three billing cycles of a subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +""" +Return type for `discountCodeBasicUpdate` mutation. +""" +type DiscountCodeBasicUpdatePayload { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkActivate` mutation. +""" +type DiscountCodeBulkActivatePayload { + """ + The asynchronous job that activates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDeactivate` mutation. +""" +type DiscountCodeBulkDeactivatePayload { + """ + The asynchronous job that deactivates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDelete` mutation. +""" +type DiscountCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers +by offering them additional items at a discounted price or for free when they purchase a specified quantity +of items. + +The `DiscountCodeBxgy` object stores information about BXGY code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) +object has similar functionality to the `DiscountCodeBxgy` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBxgy { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountRedeemCodeConnection! + + """ + The number of codes that a customer can use to redeem the discount. + """ + codesCount: Count + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuys! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelection! @deprecated(reason: "Use `context` instead.") + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountCodeBxgyCreate` mutation. +""" +type DiscountCodeBxgyCreatePayload { + """ + The code discount that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's applied on a cart and at checkout when a customer enters a code. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `customerBuys` + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountCodeBxgyInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuysInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountCodeBxgyUpdate` mutation. +""" +type DiscountCodeBxgyUpdatePayload { + """ + The code discount that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDeactivate` mutation. +""" +type DiscountCodeDeactivatePayload { + """ + The deactivated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDelete` mutation. +""" +type DiscountCodeDeletePayload { + """ + The ID of the code discount that was deleted. + """ + deletedCodeDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are +promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountCodeFreeShipping` object stores information about free shipping code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The +[`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) +object has similar functionality to the `DiscountCodeFreeShipping` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountRedeemCodeConnection! + + """ + The number of codes that a customer can use to redeem the discount. + """ + codesCount: Count + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelection! @deprecated(reason: "Use `context` instead.") + + """ + The countries that qualify for the discount. + You can define + [a list of countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountries) + or specify [all countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountryAll) + to be eligible for the discount. + """ + destinationSelection: DiscountShippingDestinationSelection! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: ShippingDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeFreeShippingCreate` mutation. +""" +type DiscountCodeFreeShippingCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) that's applied on a cart and at checkout when a customer enters a code. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `startsAt` + - `title` +""" +input DiscountCodeFreeShippingInput { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with the shipping discount. + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + The shipping destinations where the free shipping discount can be applied. You can specify whether the discount applies to all countries, or specify individual countries. + """ + destination: DiscountShippingDestinationSelectionInput + + """ + The maximum shipping price, in the shop's currency, that qualifies for free shipping. +

+ For example, if set to 20.00, then only shipping rates that cost $20.00 or less will be made free. To apply the discount to all shipping rates, specify `null`. + """ + maximumShippingPrice: Decimal + + """ + The number of billing cycles for which the discount can be applied, which is useful for subscription-based discounts. +

+ For example, if set to `3`, then the discount only applies to the first three billing cycles of a subscription. If set to `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + Whether the discount applies on one-time purchases. A one-time purchase is a transaction where you pay a single time for a product, without any ongoing commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) enable customers to purchase products on a recurring basis. + """ + appliesOnSubscription: Boolean +} + +""" +Return type for `discountCodeFreeShippingUpdate` mutation. +""" +type DiscountCodeFreeShippingUpdatePayload { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeNode` object enables you to manage [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) that are applied when customers enter a code at checkout. For example, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store. Or, you can offer discounts where customers have to enter a code to get free shipping. Merchants can create and share discount codes individually with customers. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountCodeNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + The underlying code discount object. + """ + codeDiscount: DiscountCode! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple DiscountCodeNodes. +""" +type DiscountCodeNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountCodeNodeEdge!]! + + """ + A list of nodes that are contained in DiscountCodeNodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountCodeNode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountCodeNode and a cursor during pagination. +""" +type DiscountCodeNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountCodeNodeEdge. + """ + node: DiscountCodeNode! +} + +""" +Return type for `discountCodeRedeemCodeBulkDelete` mutation. +""" +type DiscountCodeRedeemCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discount codes. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The set of valid sort keys for the DiscountCode query. +""" +enum DiscountCodeSortKeys { + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A list of collections that the discount can have as a prerequisite or a list of collections to which the discount can be applied. +""" +type DiscountCollections { + """ + The list of collections that the discount can have as a prerequisite or the list of collections to which the discount can be applied. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! +} + +""" +The input fields for collections attached to a discount. +""" +input DiscountCollectionsInput { + """ + Specifies list of collection ids to add. + """ + add: [ID!] + + """ + Specifies list of collection ids to remove. + """ + remove: [ID!] +} + +""" +The [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that you can use in combination with +[Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +type DiscountCombinesWith { + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean! + + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean! + + """ + Whether the discount combines with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean! +} + +""" +The input fields to determine which discount classes the discount can combine with. +""" +input DiscountCombinesWithInput { + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean = false + + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean = false + + """ + Whether the discount combines + with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean = false +} + +""" +The type used to define which buyers can use the discount. +""" +union DiscountContext = DiscountBuyerSelectionAll|DiscountCustomerSegments|DiscountCustomers + +""" +The input fields for the buyers who can use this discount. +""" +input DiscountContextInput @oneOf { + """ + All buyers are eligible for this discount. + """ + all: DiscountBuyerSelection + + """ + The list of customer IDs to add or remove from the list of customers. + """ + customers: DiscountCustomersInput + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput +} + +""" +Defines the geographic scope where a shipping discount can be applied based on customer shipping destinations. This configuration determines which countries are eligible for the promotional offer. + +For example, a "Free Shipping to EU" promotion would specify European Union countries, while a domestic-only sale might target just the store's home country. + +The object includes both specific country selections and an option to include all remaining countries not explicitly listed, providing flexible geographic targeting for international merchants. +""" +type DiscountCountries { + """ + The codes for the countries where the discount can be applied. + """ + countries: [CountryCode!]! + + """ + Whether the discount is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The input fields for a list of countries to add or remove from the free shipping discount. +""" +input DiscountCountriesInput { + """ + The country codes to add to the list of countries where the discount applies. + """ + add: [CountryCode!] + + """ + The country codes to remove from the list of countries where the discount applies. + """ + remove: [CountryCode!] + + """ + Whether the discount code is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean = false +} + +""" +Indicates that a shipping discount applies to all countries without restriction, enabling merchants to create truly global promotions. This object represents universal geographic eligibility for shipping discount offers. + +For example, an online store launching a "Worldwide Free Shipping" campaign would use this configuration to ensure customers from any country can benefit from the promotion. + +This setting simplifies international discount management by eliminating the need to manually select individual countries or regions, making it ideal for digital products or stores with comprehensive global shipping capabilities. +""" +type DiscountCountryAll { + """ + Whether the discount can be applied to all countries as shipping destination. This value is always `true`. + """ + allCountries: Boolean! +} + +""" +Creates the broadest possible discount reach by targeting all customers, regardless of their purchase history or segment membership. This gives merchants maximum flexibility to run store-wide promotions without worrying about customer eligibility restrictions. + +For example, a flash sale or grand opening promotion would target all customers to maximize participation and store visibility. + +Learn more about [customer targeting](https://help.shopify.com/manual/discounts/). +""" +type DiscountCustomerAll { + """ + Whether the discount can be applied by all customers. This value is always `true`. + """ + allCustomers: Boolean! +} + +""" +The prerequisite items and prerequisite value that a customer must have on the order for the discount to be applicable. +""" +type DiscountCustomerBuys { + """ + If the discount is applicable when a customer buys a one-time purchase. + """ + isOneTimePurchase: Boolean! + + """ + If the discount is applicable when a customer buys a subscription purchase. + """ + isSubscription: Boolean! + + """ + The items required for the discount to be applicable. + """ + items: DiscountItems! + + """ + The prerequisite value. + """ + value: DiscountCustomerBuysValue! +} + +""" +The input fields for prerequisite items and quantity for the discount. +""" +input DiscountCustomerBuysInput { + """ + The quantity of prerequisite items. + """ + value: DiscountCustomerBuysValueInput + + """ + The IDs of items that the customer buys. The items can be either collections or products. + """ + items: DiscountItemsInput + + """ + If the discount is applicable when a customer buys a one-time purchase. + """ + isOneTimePurchase: Boolean = true + + """ + If the discount is applicable when a customer buys a subscription purchase. + """ + isSubscription: Boolean = false +} + +""" +The prerequisite for the discount to be applicable. For example, the discount might require a customer to buy a minimum quantity of select items. Alternatively, the discount might require a customer to spend a minimum amount on select items. +""" +union DiscountCustomerBuysValue = DiscountPurchaseAmount|DiscountQuantity + +""" +The input fields for prerequisite quantity or minimum purchase amount required for the discount. +""" +input DiscountCustomerBuysValueInput { + """ + The quantity of prerequisite items. + """ + quantity: UnsignedInt64 + + """ + The prerequisite minimum purchase amount required for the discount to be applicable. + """ + amount: Decimal +} + +""" +The items in the order that qualify for the discount, their quantities, and the total value of the discount. +""" +type DiscountCustomerGets { + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The items to which the discount applies. + """ + items: DiscountItems! + + """ + Entitled quantity and the discount value. + """ + value: DiscountCustomerGetsValue! +} + +""" +Specifies the items that will be discounted, the quantity of items that will be discounted, and the value of discount. +""" +input DiscountCustomerGetsInput { + """ + The quantity of items discounted and the discount value. + """ + value: DiscountCustomerGetsValueInput + + """ + The IDs of the items that the customer gets. The items can be either collections or products. + """ + items: DiscountItemsInput + + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean +} + +""" +The type of the discount value and how it will be applied. For example, it might be a percentage discount on a fixed number of items. Alternatively, it might be a fixed amount evenly distributed across all items or on each individual item. A third example is a percentage discount on all items. +""" +union DiscountCustomerGetsValue = DiscountAmount|DiscountOnQuantity|DiscountPercentage + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountCustomerGetsValueInput { + """ + The quantity of the items that are discounted and the discount value. + """ + discountOnQuantity: DiscountOnQuantityInput + + """ + The percentage value of the discount. Value must be between 0.00 - 1.00. + + Note: BXGY doesn't support percentage. + """ + percentage: Float + + """ + The value of the discount. + + Note: BXGY doesn't support discountAmount. + """ + discountAmount: DiscountAmountInput +} + +""" +Represents customer segments that are eligible to receive a specific discount, allowing merchants to target promotions to defined groups of customers. This enables personalized marketing campaigns based on customer behavior and characteristics. + +For example, a "VIP Customer 15% Off" promotion might target a segment of high-value repeat customers, while a "New Customer Welcome" discount could focus on first-time buyers. + +Segment-based discounts help merchants create more relevant promotional experiences and improve conversion rates by showing the right offers to the right customers at the right time. +""" +type DiscountCustomerSegments { + """ + The list of customer segments who are eligible for the discount. + """ + segments: [Segment!]! +} + +""" +The input fields for which customer segments to add to or remove from the discount. +""" +input DiscountCustomerSegmentsInput { + """ + A list of customer segments to add to the current list of customer segments. + """ + add: [ID!] + + """ + A list of customer segments to remove from the current list of customer segments. + """ + remove: [ID!] +} + +""" +The type used for targeting a set of customers who are eligible for the discount. For example, the discount might be available to all customers or it might only be available to a specific set of customers. You can define the set of customers by targeting a list of customer segments, or by targeting a list of specific customers. +""" +union DiscountCustomerSelection = DiscountCustomerAll|DiscountCustomerSegments|DiscountCustomers + +""" +The input fields for the customers who can use this discount. +""" +input DiscountCustomerSelectionInput { + """ + Whether all customers can use this discount. + """ + all: Boolean + + """ + The list of customer IDs to add or remove from the list of customers. + """ + customers: DiscountCustomersInput + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput +} + +""" +Defines customer targeting for discounts through specific individual customers. This object allows merchants to create exclusive discounts that are only available to explicitly selected customers. + +For example, a VIP customer appreciation discount might target specific high-value customers by individually selecting them, or a beta program discount could be offered to selected early adopters. + +Use `DiscountCustomers` to: +- Target specific individual customers for exclusive promotions +- Create personalized discount experiences for selected customers +- Offer special discounts to VIP or loyal customers +- Provide exclusive access to promotions for specific individuals + +This targeting method requires you to add each customer who should be eligible for the discount. For broader targeting based on customer attributes or segments, use [`DiscountCustomerSegments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomerSegments) instead. + +Learn more about creating customer-specific discounts using [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) and [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate). +""" +type DiscountCustomers { + """ + The list of individual customers eligible for the discount. + """ + customers: [Customer!]! +} + +""" +The input fields for which customers to add to or remove from the discount. +""" +input DiscountCustomersInput { + """ + A list of customers to add to the current list of customers who can use the discount. + """ + add: [ID!] + + """ + A list of customers to remove from the current list of customers who can use the discount. + """ + remove: [ID!] +} + +""" +The type of discount that will be applied. Currently, only a percentage discount is supported. +""" +union DiscountEffect = DiscountAmount|DiscountPercentage + +""" +The input fields for how the discount will be applied. Currently, only percentage off is supported. +""" +input DiscountEffectInput { + """ + The percentage value of the discount. Value must be between 0.00 - 1.00. + """ + percentage: Float + + """ + The value of the discount. + """ + amount: Decimal +} + +""" +Possible error codes that can be returned by `DiscountUserError`. +""" +enum DiscountErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + The input value should be greater than the minimum allowed value. + """ + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The input value is invalid. + """ + INVALID + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The input value should be less than the maximum value allowed. + """ + LESS_THAN + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Too many arguments provided. + """ + TOO_MANY_ARGUMENTS + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + The active period overlaps with other automatic discounts. At any given time, only 25 automatic discounts can be active. + """ + ACTIVE_PERIOD_OVERLAP + + """ + The end date should be after the start date. + """ + END_DATE_BEFORE_START_DATE + + """ + The value exceeded the maximum allowed value. + """ + EXCEEDED_MAX + + """ + Specify a minimum subtotal or a quantity, but not both. + """ + MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT + + """ + The value is outside of the allowed range. + """ + VALUE_OUTSIDE_RANGE + + """ + The attribute selection contains conflicting settings. + """ + CONFLICT + + """ + The value is already present through another selection. + """ + IMPLICIT_DUPLICATE + + """ + The input value is already present. + """ + DUPLICATE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The `combinesWith` settings are invalid for the discount class. + """ + INVALID_COMBINES_WITH_FOR_DISCOUNT_CLASS + + """ + The discountClass is invalid for the price rule. + """ + INVALID_DISCOUNT_CLASS_FOR_PRICE_RULE + + """ + The active period overlaps with too many other app-provided discounts. There's a limit on the number of app discounts that can be active at any given time. + """ + MAX_APP_DISCOUNTS + + """ + A discount cannot have both appliesOnOneTimePurchase and appliesOnSubscription set to false. + """ + APPLIES_ON_NOTHING + + """ + Recurring cycle limit must be a valid integer greater than or equal to 0. + """ + RECURRING_CYCLE_LIMIT_NOT_A_VALID_INTEGER + + """ + Recurring cycle limit must be 1 when discount does not apply to subscription items. + """ + MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS + + """ + Either function ID or function handle must be provided. + """ + MISSING_FUNCTION_IDENTIFIER + + """ + Only one of function ID or function handle is allowed. + """ + MULTIPLE_FUNCTION_IDENTIFIERS +} + +""" +The type used to target the items required for discount eligibility, or the items to which the application of a discount might apply. For example, for a customer to be eligible for a discount, they're required to add an item from a specified collection to their order. Alternatively, a customer might be required to add a specific product or product variant. When using this type to target which items the discount will apply to, the discount might apply to all items on the order, or to specific products and product variants, or items in a given collection. +""" +union DiscountItems = AllDiscountItems|DiscountCollections|DiscountProducts + +""" +The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID. +""" +input DiscountItemsInput { + """ + The + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) + that the discount applies to. + """ + products: DiscountProductsInput + + """ + The collections that are attached to a discount. + """ + collections: DiscountCollectionsInput + + """ + Whether all items should be selected for the discount. Not supported for Buy X get Y discounts. + """ + all: Boolean +} + +""" +Specifies the minimum item quantity required for discount eligibility, helping merchants create volume-based promotions that encourage larger purchases. This threshold applies to qualifying items in the customer's cart. + +For example, a "Buy 3, Get 10% Off" promotion would set the minimum quantity to 3 items. + +Learn more about [discount requirements](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountMinimumQuantity { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64! +} + +""" +The input fields for the minimum quantity required for the discount. +""" +input DiscountMinimumQuantityInput { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64 +} + +""" +The type of minimum requirement that must be met for the discount to be applied. For example, a customer must spend a minimum subtotal to be eligible for the discount. Alternatively, a customer must purchase a minimum quantity of items to be eligible for the discount. +""" +union DiscountMinimumRequirement = DiscountMinimumQuantity|DiscountMinimumSubtotal + +""" +The input fields for the minimum quantity or subtotal required for a discount. +""" +input DiscountMinimumRequirementInput { + """ + The minimum required quantity. + """ + quantity: DiscountMinimumQuantityInput + + """ + The minimum required subtotal. + """ + subtotal: DiscountMinimumSubtotalInput +} + +""" +The minimum subtotal required for the discount to apply. +""" +type DiscountMinimumSubtotal { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: MoneyV2! +} + +""" +The input fields for the minimum subtotal required for a discount. +""" +input DiscountMinimumSubtotalInput { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: Decimal +} + +""" +The `DiscountNode` object enables you to manage [discounts](https://help.shopify.com/manual/discounts), which are applied at checkout or on a cart. + + +Discounts are a way for merchants to promote sales and special offers, or as customer loyalty rewards. Discounts can apply to [orders, products, or shipping](https://shopify.dev/docs/apps/build/discounts#discount-classes), and can be either automatic or code-based. For example, you can offer customers a buy X get Y discount that's automatically applied when purchases meet specific criteria. Or, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related mutations, limitations, and considerations. +""" +type DiscountNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied at checkout or on cart. + + + Discounts can be [automatic or code-based](https://shopify.dev/docs/apps/build/discounts#discount-methods). + """ + discount: Discount! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple DiscountNodes. +""" +type DiscountNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountNodeEdge!]! + + """ + A list of nodes that are contained in DiscountNodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountNode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountNode and a cursor during pagination. +""" +type DiscountNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountNodeEdge. + """ + node: DiscountNode! +} + +""" +Defines quantity-based discount rules that specify how many items are eligible for a discount effect. This object enables bulk purchase incentives and tiered pricing strategies. + +For example, a "Buy 4 candles, get 2 candles 50% off (mix and match)" promotion would specify a quantity threshold of 2 items that will receive a percentage discount effect, encouraging customers to purchase more items to unlock savings. + +The configuration combines quantity requirements with discount effects, allowing merchants to create sophisticated pricing rules that reward larger purchases and increase average order values. +""" +type DiscountOnQuantity { + """ + The discount's effect on qualifying items. + """ + effect: DiscountEffect! + + """ + The number of items being discounted. The customer must have at least this many items of specified products or product variants in their order to be eligible for the discount. + """ + quantity: DiscountQuantity! +} + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountOnQuantityInput { + """ + The quantity of items that are discounted. + """ + quantity: UnsignedInt64 + + """ + The percentage value of the discount. + """ + effect: DiscountEffectInput +} + +""" +Creates percentage-based discounts that reduce item prices by a specified percentage amount. This gives merchants a flexible way to offer proportional savings that automatically scale with order value. + +For example, a "20% off all winter clothing" promotion would use this object to apply consistent percentage savings across different price points. + +Learn more about [discount types](https://help.shopify.com/manual/discounts/). +""" +type DiscountPercentage { + """ + The percentage value of the discount. + """ + percentage: Float! +} + +""" +A list of products and product variants that the discount can have as a prerequisite or a list of products and product variants to which the discount can be applied. +""" +type DiscountProducts { + """ + The list of product variants that the discount can have as a prerequisite or the list of product variants to which the discount can be applied. + """ + productVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The list of products that the discount can have as a prerequisite or the list of products to which the discount can be applied. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductConnection! +} + +""" +The input fields for adding and removing +[products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and +[product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) +as prerequisites or as eligible items for a discount. +""" +input DiscountProductsInput { + """ + The IDs of the products to add as prerequisites or as eligible items for a discount. + """ + productsToAdd: [ID!] + + """ + The IDs of the products to remove as prerequisites or as eligible items for a discount. + """ + productsToRemove: [ID!] + + """ + The IDs of the product variants to add as prerequisites or as eligible items for a discount. + """ + productVariantsToAdd: [ID!] + + """ + The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + """ + productVariantsToRemove: [ID!] +} + +""" +A purchase amount in the context of a discount. This object can be used to define the minimum purchase amount required for a discount to be applicable. +""" +type DiscountPurchaseAmount { + """ + The purchase amount in decimal format. + """ + amount: Decimal! +} + +""" +Defines a quantity threshold for discount eligibility or application. This simple object specifies the number of items required to trigger or calculate discount benefits. + +For example, a "Buy 3, Get 1 Free" promotion would use DiscountQuantity to define the minimum purchase quantity of 3 items, or a bulk discount might specify quantity tiers like 10+ items for wholesale pricing. + +The quantity value determines how discounts interact with cart contents, whether setting minimum purchase requirements or defining quantity-based discount calculations. +""" +type DiscountQuantity { + """ + The quantity of items. + """ + quantity: UnsignedInt64! +} + +""" +A code that a customer can use at checkout to receive a discount. For example, a customer can use the redeem code 'SUMMER20' at checkout to receive a 20% discount on their entire order. +""" +type DiscountRedeemCode { + """ + The number of times that the discount redeem code has been used. This value is updated asynchronously and can be different than the actual usage count. + """ + asyncUsageCount: Int! + + """ + The code that a customer can use at checkout to receive a discount. + """ + code: String! + + """ + The application that created the discount redeem code. + """ + createdBy: App + + """ + A globally-unique ID of the discount redeem code. + """ + id: ID! +} + +""" +Return type for `discountRedeemCodeBulkAdd` mutation. +""" +type DiscountRedeemCodeBulkAddPayload { + """ + The ID of bulk operation that creates multiple unique discount codes. + You can use the + [`discountRedeemCodeBulkCreation` query](https://shopify.dev/api/admin-graphql/latest/queries/discountRedeemCodeBulkCreation) + to track the status of the bulk operation. + """ + bulkCreation: DiscountRedeemCodeBulkCreation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The properties and status of a bulk discount redeem code creation operation. +""" +type DiscountRedeemCodeBulkCreation implements Node { + """ + The result of each code creation operation associated with the bulk creation operation including any errors that might have occurred during the operation. + """ + codes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DiscountRedeemCodeBulkCreationCodeConnection! + + """ + The number of codes to create. + """ + codesCount: Int! + + """ + The date and time when the bulk creation was created. + """ + createdAt: DateTime! + + """ + The code discount associated with the created codes. + """ + discountCode: DiscountCodeNode + + """ + Whether the bulk creation is still queued (`false`) or has been run (`true`). + """ + done: Boolean! + + """ + The number of codes that weren't created successfully. + """ + failedCount: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The number of codes created successfully. + """ + importedCount: Int! +} + +""" +A result of a discount redeem code creation operation created by a bulk creation. +""" +type DiscountRedeemCodeBulkCreationCode { + """ + The code to use in the discount redeem code creation operation. + """ + code: String! + + """ + The successfully created discount redeem code. + + If the discount redeem code couldn't be created, then this field is `null``. + """ + discountRedeemCode: DiscountRedeemCode + + """ + A list of errors that occurred during the creation operation of the discount redeem code. + """ + errors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodeBulkCreationCodes. +""" +type DiscountRedeemCodeBulkCreationCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeBulkCreationCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeBulkCreationCodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountRedeemCodeBulkCreationCode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCodeBulkCreationCode and a cursor during pagination. +""" +type DiscountRedeemCodeBulkCreationCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeBulkCreationCodeEdge. + """ + node: DiscountRedeemCodeBulkCreationCode! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodes. +""" +type DiscountRedeemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DiscountRedeemCode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCode and a cursor during pagination. +""" +type DiscountRedeemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeEdge. + """ + node: DiscountRedeemCode! +} + +""" +The input fields for the redeem code to attach to a discount. +""" +input DiscountRedeemCodeInput { + """ + The code that a customer can use at checkout to receive the associated discount. + """ + code: String! +} + +""" +A shareable URL for a discount code. +""" +type DiscountShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: DiscountShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable discount URL lands. +""" +enum DiscountShareableUrlTargetType { + """ + The URL lands on a home page. + """ + HOME + + """ + The URL lands on a product page. + """ + PRODUCT + + """ + The URL lands on a collection page. + """ + COLLECTION +} + +""" +The type used to target the eligible countries of an order's shipping destination for which the discount applies. For example, the discount might be applicable when shipping to all countries, or only to a set of countries. +""" +union DiscountShippingDestinationSelection = DiscountCountries|DiscountCountryAll + +""" +The input fields for the destinations where the free shipping discount will be applied. +""" +input DiscountShippingDestinationSelectionInput { + """ + Whether the discount code applies to all countries. + """ + all: Boolean = false + + """ + A list of countries where the discount code will apply. + """ + countries: DiscountCountriesInput +} + +""" +The set of valid sort keys for the Discount query. +""" +enum DiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The status of the discount that describes its availability, +expiration, or pending activation. +""" +enum DiscountStatus { + """ + The discount is currently available for use. + """ + ACTIVE + + """ + The discount has reached its end date and is no longer valid. + """ + EXPIRED + + """ + The discount is set to become active at a future date. + """ + SCHEDULED +} + +""" +The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. +""" +enum DiscountTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The type of the subscription discount. +""" +enum DiscountType { + """ + Manual discount type. + """ + MANUAL + + """ + Code discount type. + """ + CODE_DISCOUNT + + """ + Automatic discount type. + """ + AUTOMATIC_DISCOUNT +} + +""" +An error that occurs during the execution of a discount mutation. +""" +type DiscountUserError implements DisplayableError { + """ + The error code. + """ + code: DiscountErrorCode + + """ + Extra information about this error. + """ + extraInfo: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents an error in the input of a mutation. +""" +interface DisplayableError { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `disputeEvidenceUpdate` mutation. +""" +type DisputeEvidenceUpdatePayload { + """ + The updated dispute evidence. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DisputeEvidenceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `DisputeEvidenceUpdate`. +""" +type DisputeEvidenceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: DisputeEvidenceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DisputeEvidenceUpdateUserError`. +""" +enum DisputeEvidenceUpdateUserErrorCode { + """ + Dispute evidence could not be found. + """ + DISPUTE_EVIDENCE_NOT_FOUND + + """ + Evidence already accepted. + """ + EVIDENCE_ALREADY_ACCEPTED + + """ + Evidence past due date. + """ + EVIDENCE_PAST_DUE_DATE + + """ + Combined files size is too large. + """ + FILES_SIZE_EXCEEDED_LIMIT + + """ + File upload failed. Please try again. + """ + FILE_NOT_FOUND + + """ + Individual file size is too large. + """ + TOO_LARGE + + """ + The input value is invalid. + """ + INVALID +} + +""" +The possible statuses of a dispute. +""" +enum DisputeStatus { + ACCEPTED + + LOST + + NEEDS_RESPONSE + + UNDER_REVIEW + + WON + + """ + Status previously used by Stripe to indicate that a dispute led to a refund. + """ + CHARGE_REFUNDED @deprecated(reason: "CHARGE_REFUNDED is no longer supported.") +} + +""" +The possible types for a dispute. +""" +enum DisputeType { + """ + The dispute has turned into a chargeback. + """ + CHARGEBACK + + """ + The dispute is in the inquiry phase. + """ + INQUIRY +} + +""" +A distance, which includes a numeric value and a unit of measurement. +""" +type Distance { + """ + The unit of measurement for `value`. + """ + unit: DistanceUnit! + + """ + The distance value using the unit system specified with `unit`. + """ + value: Float! +} + +""" +Units of measurement for distance. +""" +enum DistanceUnit { + """ + Metric system unit of distance. + """ + KILOMETERS + + """ + Imperial system unit of distance. + """ + MILES +} + +""" +A unique string that represents the address of a Shopify store on the Internet. +""" +type Domain implements Node { + """ + The host name of the domain. For example, `example.com`. + """ + host: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The localization of the domain, if the domain doesn't redirect. + """ + localization: DomainLocalization + + """ + The web presence of the domain. + """ + marketWebPresence: MarketWebPresence + + """ + Whether SSL is enabled. + """ + sslEnabled: Boolean! + + """ + The URL of the domain (for example, `https://example.com`). + """ + url: URL! +} + +""" +The country and language settings assigned to a domain. +""" +type DomainLocalization { + """ + The ISO codes for the domain’s alternate locales. For example, `["en"]`. + """ + alternateLocales: [String!]! + + """ + The ISO code for the country assigned to the domain. For example, `"CA"` or "*" for a domain set to "Rest of world". + """ + country: String + + """ + The ISO code for the domain’s default locale. For example, `"en"`. + """ + defaultLocale: String! +} + +""" +An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks: + +- Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created. +- Send invoices to customers to pay with a secure checkout link. +- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory. +- Re-create orders manually from active sales channels. +- Sell products at discount or wholesale rates. +- Take pre-orders. + +For draft orders in multiple currencies `presentment_money` is the source of truth for what a customer is going to be charged and `shop_money` is an estimate of what the merchant might receive in their shop currency. + +**Caution:** Only use this data if it's required for your app's functionality. Shopify will restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a legitimate use for the associated data. + +Draft orders created on or after April 1, 2025 will be automatically purged after one year of inactivity. +""" +type DraftOrder implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLocalizedFields & HasMetafields & LegacyInteroperability & Navigable & Node { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + Whether all variant prices have been overridden. + """ + allVariantPricesOverridden: Boolean! + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean! + + """ + Whether any variant prices have been overridden. + """ + anyVariantPricesOverridden: Boolean! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The billing address of the customer. + """ + billingAddress: MailingAddress + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The date and time when the draft order was converted to a new order, + and had it's status changed to **Completed**. + """ + completedAt: DateTime + + """ + The date and time when the draft order was created in Shopify. + """ + createdAt: DateTime! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The custom information added to the draft order on behalf of the customer. + """ + customAttributes: [Attribute!]! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The email address of the customer, which is used to send notifications. + """ + email: String + + """ + The list of events associated with the draft order. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + Whether the merchant has added timeline comments to the draft order. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The subject defined for the draft invoice email template. + """ + invoiceEmailTemplateSubject: String! + + """ + The date and time when the invoice was last emailed to the customer. + """ + invoiceSentAt: DateTime + + """ + The link to the checkout, which is sent to the customer in the invoice email. + """ + invoiceUrl: URL + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The list of the line items in the draft order. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DraftOrderLineItemConnection! + + """ + A subtotal of the line items and corresponding discounts, + excluding shipping charges, shipping discounts, taxes, or order discounts. + """ + lineItemsSubtotalPrice: MoneyBag! + + """ + List of localization extensions for the resource. + """ + localizationExtensions("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizationExtensionPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") + + """ + List of localized fields for the resource. + """ + localizedFields("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizedFieldPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizedFieldConnection! + + """ + The name of the selected market. + """ + marketName: String! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The selected country code that determines the pricing. + """ + marketRegionCountryCode: CountryCode! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The identifier for the draft order, which is unique within the store. For example, _#D1223_. + """ + name: String! + + """ + The text from an optional note attached to the draft order. + """ + note2: String + + """ + The order that was created from the draft order. + """ + order: Order + + """ + The associated payment terms for this draft order. + """ + paymentTerms: PaymentTerms + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The purchase order number. + """ + poNumber: String + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + Whether the draft order is ready and can be completed. + Draft orders might have asynchronous operations that can take time to finish. + """ + ready: Boolean! + + """ + The time after which inventory will automatically be restocked. + """ + reserveInventoryUntil: DateTime + + """ + The shipping address of the customer. + """ + shippingAddress: MailingAddress + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The status of the draft order. + """ + status: DraftOrderStatus! + + """ + The subtotal, in shop currency, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The comma separated list of tags associated with the draft order. + Updating `tags` overwrites any existing tags that were previously added to the draft order. + To add new tags without overwriting existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation. + """ + tags: [String!]! + + """ + Whether the draft order is tax exempt. + """ + taxExempt: Boolean! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + The total weight in grams of the draft order. + """ + totalWeight: UnsignedInt64! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The date and time when the draft order was last changed. + The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01. + """ + updatedAt: DateTime! + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean! + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The order-level discount applied to a draft order. +""" +type DraftOrderAppliedDiscount { + """ + Amount of the order-level discount that's applied to the draft order in shop currency. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + amountSet: MoneyBag! + + """ + Amount of money discounted. + """ + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """ + Description of the order-level discount. + """ + description: String! + + """ + Name of the order-level discount. + """ + title: String + + """ + The order level discount amount. If `valueType` is `"percentage"`, + then `value` is the percentage discount. + """ + value: Float! + + """ + Type of the order-level discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The input fields for applying an order-level discount to a draft order. +""" +input DraftOrderAppliedDiscountInput { + """ + The applied amount of the discount in your shop currency. + """ + amount: Money @deprecated(reason: "Please use `amountWithCurrency` instead.") + + """ + The applied amount of the discount in the specified currency. + """ + amountWithCurrency: MoneyInput + + """ + Reason for the discount. + """ + description: String + + """ + Title of the discount. + """ + title: String + + """ + The value of the discount. + If the type of the discount is fixed amount, then this is a fixed amount in your shop currency. + If the type is percentage, then this is the percentage. + """ + value: Float! + + """ + The type of discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The valid discount types that can be applied to a draft order. +""" +enum DraftOrderAppliedDiscountType { + """ + A fixed amount in the store's currency. + """ + FIXED_AMOUNT + + """ + A percentage of the order subtotal. + """ + PERCENTAGE +} + +""" +The available delivery options for a draft order. +""" +type DraftOrderAvailableDeliveryOptions { + """ + The available local delivery rates for the draft order. Requires a customer with a valid shipping address and at least one line item. + """ + availableLocalDeliveryRates: [DraftOrderShippingRate!]! + + """ + The available local pickup options for the draft order. Requires at least one line item. + """ + availableLocalPickupOptions: [PickupInStoreLocation!]! + + """ + The available shipping rates for the draft order. Requires a customer with a valid shipping address and at least one line item. + """ + availableShippingRates: [DraftOrderShippingRate!]! + + """ + Returns information about pagination of local pickup options. + """ + pageInfo: PageInfo! +} + +""" +The input fields used to determine available delivery options for a draft order. +""" +input DraftOrderAvailableDeliveryOptionsInput { + """ + The discount that will be applied to the draft order. + A draft order line item can have one discount. A draft order can also have one order-level discount. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + Discount codes that will be attempted to be applied to the draft order. If the draft isn't eligible for any given discount code it will be skipped during calculation. + """ + discountCodes: [String!] + + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + Product variant line item or custom line item associated to the draft order. + Each draft order must include at least one line item. + """ + lineItems: [DraftOrderLineItemInput!] + + """ + The mailing address to where the order will be shipped. + """ + shippingAddress: MailingAddressInput + + """ + The selected country code that determines the pricing of the draft order. + """ + marketRegionCountryCode: CountryCode + + """ + The purchasing entity for the draft order. + """ + purchasingEntity: PurchasingEntityInput +} + +""" +Return type for `draftOrderBulkAddTags` mutation. +""" +type DraftOrderBulkAddTagsPayload { + """ + The asynchronous job for adding tags to the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkDelete` mutation. +""" +type DraftOrderBulkDeletePayload { + """ + The asynchronous job for deleting the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkRemoveTags` mutation. +""" +type DraftOrderBulkRemoveTagsPayload { + """ + The asynchronous job for removing tags from the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a bundle was added to a draft order. +""" +type DraftOrderBundleAddedWarning implements DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +Return type for `draftOrderCalculate` mutation. +""" +type DraftOrderCalculatePayload { + """ + The calculated properties for a draft order. + """ + calculatedDraftOrder: CalculatedDraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderComplete` mutation. +""" +type DraftOrderCompletePayload { + """ + The completed draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple DraftOrders. +""" +type DraftOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderEdge!]! + + """ + A list of nodes that are contained in DraftOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DraftOrder!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `draftOrderCreateFromOrder` mutation. +""" +type DraftOrderCreateFromOrderPayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreate` mutation. +""" +type DraftOrderCreatePayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to specify the draft order to delete by its ID. +""" +input DraftOrderDeleteInput { + """ + The ID of the draft order to delete. + """ + id: ID! +} + +""" +Return type for `draftOrderDelete` mutation. +""" +type DraftOrderDeletePayload { + """ + The ID of the deleted draft order. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a discount cannot be applied to a draft order. +""" +type DraftOrderDiscountNotAppliedWarning implements DraftOrderWarning { + """ + The code of the discount that can't be applied. + """ + discountCode: String + + """ + The title of the discount that can't be applied. + """ + discountTitle: String + + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! + + """ + The price rule that can't be applied. + """ + priceRule: PriceRule @deprecated(reason: "Use discountCode and discountTitle instead. This field will be removed in 2026-10.") +} + +""" +Return type for `draftOrderDuplicate` mutation. +""" +type DraftOrderDuplicatePayload { + """ + The newly duplicated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DraftOrder and a cursor during pagination. +""" +type DraftOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderEdge. + """ + node: DraftOrder! +} + +""" +The input fields used to create or update a draft order. +""" +input DraftOrderInput { + """ + The discount that will be applied to the draft order. + A draft order line item can have one discount. A draft order can also have one order-level discount. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + The list of discount codes that will be attempted to be applied to the draft order. + If the draft isn't eligible for any given discount code it will be skipped during calculation. + """ + discountCodes: [String!] + + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + The mailing address associated with the payment method. + """ + billingAddress: MailingAddressInput + + """ + The customer associated with the draft order. + """ + customerId: ID @deprecated(reason: "Use `purchasingEntity` instead, which can be used for either a D2C or B2B customer.") + + """ + The extra information added to the draft order on behalf of the customer. + """ + customAttributes: [AttributeInput!] + + """ + The customer's email address. + """ + email: String + + """ + The list of product variant or custom line item. + Each draft order must include at least one line item. + Accepts a maximum of 499 line items. + + NOTE: Draft orders don't currently support subscriptions. + """ + lineItems: [DraftOrderLineItemInput!] + + """ + The list of metafields attached to the draft order. An existing metafield can not be used when creating a draft order. + """ + metafields: [MetafieldInput!] + + """ + The localization extensions attached to the draft order. For example, Tax IDs. + """ + localizationExtensions: [LocalizationExtensionInput!] @deprecated(reason: "This field will be removed in a future version. Use `localizedFields` instead.") + + """ + The localized fields attached to the draft order. For example, Tax IDs. + """ + localizedFields: [LocalizedFieldInput!] + + """ + The text of an optional note that a shop owner can attach to the draft order. + """ + note: String + + """ + The mailing address to where the order will be shipped. + """ + shippingAddress: MailingAddressInput + + """ + The shipping line object, which details the shipping method used. + """ + shippingLine: ShippingLineInput + + """ + A comma separated list of tags that have been added to the draft order. + """ + tags: [String!] + + """ + Whether or not taxes are exempt for the draft order. + If false, then Shopify will refer to the taxable field for each line item. + If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead. + """ + taxExempt: Boolean + + """ + Whether to use the customer's default address. + """ + useCustomerDefaultAddress: Boolean + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean + + """ + The time after which inventory reservation will expire. + """ + reserveInventoryUntil: DateTime + + """ + The payment currency of the customer for this draft order. + """ + presentmentCurrencyCode: CurrencyCode + + """ + The selected country code that determines the pricing of the draft order. + """ + marketRegionCountryCode: CountryCode @deprecated(reason: "This field is now incompatible with Markets.\n") + + """ + The customer's phone number. + """ + phone: String + + """ + The fields used to create payment terms. + """ + paymentTerms: PaymentTermsInput + + """ + The purchasing entity for the draft order. + """ + purchasingEntity: PurchasingEntityInput + + """ + The source channel that the order is attributed to. Set this to the handle of an order attribution definition configured for your sales channel app, such as `youtube` or `channel:amazon-us`. + To set up order attribution for your app, follow the [order attribution guide](https://shopify.dev/docs/apps/build/sales-channels/order-attribution). + """ + sourceName: String + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean + + """ + The purchase order number. + """ + poNumber: String + + """ + The unique token identifying the draft order. + """ + sessionToken: String + + """ + Fingerprint to guarantee bundles are handled correctly. + """ + transformerFingerprint: String +} + +""" +Return type for `draftOrderInvoicePreview` mutation. +""" +type DraftOrderInvoicePreviewPayload { + """ + The draft order invoice email rendered as HTML to allow previewing. + """ + previewHtml: HTML + + """ + The subject preview for the draft order invoice email. + """ + previewSubject: HTML + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderInvoiceSend` mutation. +""" +type DraftOrderInvoiceSendPayload { + """ + The draft order an invoice email is sent for. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A line item in a draft order. Line items are either [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects or custom items created manually with specific pricing and attributes. + +Each line item includes [quantity](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.quantity), [pricing](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.originalUnitPrice), [discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.discountedTotal), [tax information](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.taxLines), and [custom attributes](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.customAttributes). For [bundle products](https://shopify.dev/docs/apps/build/products/bundles), the line item includes components that define the individual products within the bundle. +""" +type DraftOrderLineItem implements Node { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The list of bundle components if applicable. + """ + bundleComponents: [DraftOrderLineItem!]! @deprecated(reason: "Use `components` instead.") + + """ + The components of the draft order line item. + """ + components: [DraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """ + The line item price, in shop currency, after discounts are applied. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total price with discounts applied. + """ + discountedTotalSet: MoneyBag! + + """ + The `discountedTotal` divided by `quantity`, equal to the value of the discount per unit in the shop currency. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + The unit price with discounts applied. + """ + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The weight of the line item in grams. + """ + grams: Int @deprecated(reason: "Use `weight` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image of the product variant. + """ + image("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The name of the product. + """ + name: String! + + """ + The total price, in shop currency, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop currency, without any discounts applied. + """ + originalUnitPrice: Money! @deprecated(reason: "Use `originalUnitPriceWithCurrency` instead.") + + """ + The price without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The original custom line item input price. + """ + originalUnitPriceWithCurrency: MoneyV2 + + """ + The price override for the line item. + """ + priceOverride: MoneyV2 + + """ + The product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + A list of tax lines. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total discount applied in shop currency. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +The input fields representing the components of a line item. +""" +input DraftOrderLineItemComponentInput { + """ + The ID of the product variant corresponding to the component. + """ + variantId: ID + + """ + The quantity of the component. + """ + quantity: Int! + + """ + The UUID of the component. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with parent line items. + """ + uuid: String +} + +""" +An auto-generated type for paginating through multiple DraftOrderLineItems. +""" +type DraftOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderLineItemEdge!]! + + """ + A list of nodes that are contained in DraftOrderLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [DraftOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DraftOrderLineItem and a cursor during pagination. +""" +type DraftOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderLineItemEdge. + """ + node: DraftOrderLineItem! +} + +""" +The input fields for a line item included in a draft order. +""" +input DraftOrderLineItemInput { + """ + The custom discount to be applied. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + A generic custom attribute using a key value pair. + """ + customAttributes: [AttributeInput!] + + """ + The weight in grams for custom line items. This field is ignored when `variantId` is provided. + """ + grams: Int @deprecated(reason: "`weight` should be used instead, allowing different units to be used.") + + """ + The custom line item price without any discounts applied in shop currency. This field is ignored when `variantId` is provided. + """ + originalUnitPrice: Money @deprecated(reason: "`originalUnitPriceWithCurrency` should be used instead, where currency can be specified.") + + """ + The price in presentment currency, without any discounts applied, for a custom line item. + If this value is provided, `original_unit_price` will be ignored. This field is ignored when `variantId` is provided. + Note: All presentment currencies for a single draft should be the same and match the + presentment currency of the draft order. + """ + originalUnitPriceWithCurrency: MoneyInput + + """ + The line item quantity. + """ + quantity: Int! + + """ + Whether physical shipping is required for a custom line item. This field is ignored when `variantId` is provided. + """ + requiresShipping: Boolean + + """ + The SKU number for custom line items only. This field is ignored when `variantId` is provided. + """ + sku: String + + """ + Whether the custom line item is taxable. This field is ignored when `variantId` is provided. + """ + taxable: Boolean + + """ + Title of the line item. This field is ignored when `variantId` is provided. + """ + title: String + + """ + The ID of the product variant corresponding to the line item. + Must be null for custom line items, otherwise required. + """ + variantId: ID + + """ + The weight unit and value inputs for custom line items only. + This field is ignored when `variantId` is provided. + """ + weight: WeightInput + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String + + """ + The bundle components when the line item is a bundle. + """ + bundleComponents: [BundlesDraftOrderBundleLineItemComponentInput!] @deprecated(reason: "Use `components` instead.") + + """ + The components of the draft order line item. + """ + components: [DraftOrderLineItemComponentInput!] + + """ + If the line item doesn't already have a price override input, setting `generatePriceOverride` to `true` will + create a price override from the current price. + """ + generatePriceOverride: Boolean + + """ + The price override for the line item. Should be set in presentment currency. + + This price will be used in place of the product variant's catalog price in this draft order. + + If the override's presentment currency doesn't match the draft order's presentment currency, it will be + converted over to match the draft order's presentment currency. This will occur if the input is defined in a + differing currency, or if some other event causes the draft order's currency to change. + + Price overrides can't be applied to bundle components. If this line item becomes part of a bundle the price + override will be removed. In the case of a cart transform, this may mean that a price override is applied to + this line item earlier in its lifecycle, and is removed later when the transform occurs. + """ + priceOverride: MoneyInput +} + +""" +A warning indicating that the market region country code is not supported with Markets. +""" +type DraftOrderMarketRegionCountryCodeNotSupportedWarning implements DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The platform discounts applied to the draft order. +""" +type DraftOrderPlatformDiscount { + """ + Price reduction allocations across the draft order's lines. + """ + allocations: [DraftOrderPlatformDiscountAllocation!]! + + """ + Whether the discount is an automatic discount. + """ + automaticDiscount: Boolean! + + """ + Whether the discount is a buy x get y discount. + """ + bxgyDiscount: Boolean! + + """ + If a code-based discount, the code used to add the discount. + """ + code: String + + """ + The discount class. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The discount classes. + """ + discountClasses: [DiscountClass!]! + + """ + The discount node for the platform discount. + """ + discountNode: DiscountNode + + """ + The ID of the discount. + """ + id: ID + + """ + Whether the discount is line, order or shipping level. + """ + presentationLevel: String! + + """ + The short summary of the discount. + """ + shortSummary: String! + + """ + The summary of the discount. + """ + summary: String! + + """ + The name of the discount. + """ + title: String! + + """ + The discount total amount in shop currency. + """ + totalAmount: MoneyV2! + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + totalAmountPriceSet: MoneyBag! +} + +""" +Price reduction allocations across the draft order's lines. +""" +type DraftOrderPlatformDiscountAllocation { + """ + The ID of the allocation. + """ + id: ID + + """ + The quantity of the target being discounted. + """ + quantity: Int + + """ + Amount of the discount allocated to the target. + """ + reductionAmount: MoneyV2! + + """ + Amount of the discount allocated to the target in both shop currency and presentment currency. + """ + reductionAmountSet: MoneyBag! + + """ + The element of the draft being discounted. + """ + target: DraftOrderPlatformDiscountAllocationTarget +} + +""" +The element of the draft being discounted. +""" +union DraftOrderPlatformDiscountAllocationTarget = CalculatedDraftOrderLineItem|DraftOrderLineItem|ShippingLine + +""" +A shipping rate is an additional cost added to the cost of the products that were ordered. +""" +type DraftOrderShippingRate { + """ + The code of the shipping rate. + """ + code: String! + + """ + Unique identifier for this shipping rate. + """ + handle: String! + + """ + The cost associated with the shipping rate. + """ + price: MoneyV2! + + """ + The source of the shipping rate. + """ + source: String! + + """ + The name of the shipping rate. + """ + title: String! +} + +""" +The set of valid sort keys for the DraftOrder query. +""" +enum DraftOrderSortKeys { + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `number` value. + """ + NUMBER + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `total_price` value. + """ + TOTAL_PRICE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid statuses for a draft order. +""" +enum DraftOrderStatus { + """ + The draft order has been paid. + """ + COMPLETED + + """ + An invoice for the draft order has been sent to the customer. + """ + INVOICE_SENT + + """ + The draft order is open. It has not been paid, and an invoice hasn't been sent. + """ + OPEN +} + +""" +Represents a draft order tag. +""" +type DraftOrderTag implements Node { + """ + Handle of draft order tag. + """ + handle: String! + + """ + ID of draft order tag. + """ + id: ID! + + """ + Title of draft order tag. + """ + title: String! +} + +""" +Return type for `draftOrderUpdate` mutation. +""" +type DraftOrderUpdatePayload { + """ + The updated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning that is displayed to the merchant when a change is made to a draft order. +""" +interface DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The duty details for a line item. +""" +type Duty implements Node { + """ + The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty. + """ + countryCodeOfOrigin: CountryCode + + """ + The harmonized system code of the item used in calculating the duty. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The amount of the duty. + """ + price: MoneyBag! + + """ + A list of taxes charged on the duty. + """ + taxLines: [TaxLine!]! +} + +""" +A sale associated with a duty charge. +""" +type DutySale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The duty for the associated sale. + """ + duty: Duty! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The attribute editable information. +""" +type EditableProperty { + """ + Whether the attribute is locked for editing. + """ + locked: Boolean! + + """ + The reason the attribute is locked for editing. + """ + reason: FormattedString +} + +""" +The input fields for an email. +""" +input EmailInput { + """ + Specifies the email subject. + """ + subject: String + + """ + Specifies the email recipient. + """ + to: String + + """ + Specifies the email sender. + """ + from: String + + """ + Specifies the email body. + """ + body: String + + """ + Specifies any bcc recipients for the email. + """ + bcc: [String!] + + """ + Specifies a custom message to include in the email. + """ + customMessage: String +} + +""" +The shop's entitlements. +""" +type EntitlementsType { + """ + Represents the markets for the shop. + """ + markets: MarketsType! +} + +""" +An error that occurs during the execution of a server pixel mutation. +""" +type ErrorsServerPixelUserError implements DisplayableError { + """ + The error code. + """ + code: ErrorsServerPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsServerPixelUserError`. +""" +enum ErrorsServerPixelUserErrorCode { + """ + A server pixel doesn't exist for this app and shop. + """ + NOT_FOUND + + """ + A server pixel already exists for this app and shop. Only one server pixel can exist for any app and shop combination. + """ + ALREADY_EXISTS + + """ + PubSubProject and PubSubTopic values resulted in an address that is not a valid GCP pub/sub format.Address format should be pubsub://project:topic. + """ + PUB_SUB_ERROR + + """ + Server Pixel must be configured with a valid AWS Event Bridge or GCP pub/sub endpoint address to be connected. + """ + NEEDS_CONFIGURATION_TO_CONNECT +} + +""" +An error that occurs during the execution of a web pixel mutation. +""" +type ErrorsWebPixelUserError implements DisplayableError { + """ + The error code. + """ + code: ErrorsWebPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsWebPixelUserError`. +""" +enum ErrorsWebPixelUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The input value is already taken. + """ + TAKEN + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The provided settings does not match the expected settings definition on the app. + """ + INVALID_SETTINGS + + """ + An error occurred and the web pixel couldnt be deleted. + """ + UNABLE_TO_DELETE @deprecated(reason: "`UNABLE_TO_DELETE` is deprecated. Use `UNEXPECTED_ERROR` instead.") + + """ + No extension found. + """ + NO_EXTENSION + + """ + The provided settings is not a valid JSON. + """ + INVALID_CONFIGURATION_JSON + + """ + The settings definition of the web pixel extension is in an invalid state on the app. + """ + INVALID_SETTINGS_DEFINITION + + """ + An unexpected error occurred. + """ + UNEXPECTED_ERROR + + """ + The provided runtime context is invalid. + """ + INVALID_RUNTIME_CONTEXT +} + +""" +Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the +addition of a product. +""" +interface Event { + """ + The action that occured. + """ + action: String! + + """ + The name of the app that created the event. + """ + appTitle: String + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! +} + +""" +Return type for `eventBridgeServerPixelUpdate` mutation. +""" +type EventBridgeServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `eventBridgeWebhookSubscriptionCreate` mutation. +""" +type EventBridgeWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +The input fields for an EventBridge webhook subscription. +""" +input EventBridgeWebhookSubscriptionInput { + """ + The format in which the webhook subscription should send the data. + """ + format: WebhookSubscriptionFormat + + """ + The list of fields to be included in the webhook subscription. Only the fields specified will be included in the webhook payload. If null, then all fields will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). + """ + includeFields: [String!] + + """ + A constraint specified using search syntax that ensures only webhooks that match the specified filter are emitted. See our [guide on filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. + """ + filter: String + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!] + + """ + A list of identifiers specifying metafields to include in the webhook payload. + """ + metafields: [HasMetafieldsMetafieldIdentifierInput!] + + """ + The ARN of the EventBridge partner event source. + """ + arn: ARN +} + +""" +Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. +""" +type EventBridgeWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An auto-generated type for paginating through multiple Events. +""" +type EventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [EventEdge!]! + + """ + A list of nodes that are contained in EventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Event!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Event and a cursor during pagination. +""" +type EventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of EventEdge. + """ + node: Event! +} + +""" +The set of valid sort keys for the Event query. +""" +enum EventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The type of the resource that generated the event. +""" +enum EventSubjectType { + """ + A CompanyLocation resource generated the event. + """ + COMPANY_LOCATION + + """ + A Company resource generated the event. + """ + COMPANY + + """ + A Customer resource generated the event. + """ + CUSTOMER + + """ + A DraftOrder resource generated the event. + """ + DRAFT_ORDER + + """ + A InventoryTransfer resource generated the event. + """ + INVENTORY_TRANSFER + + """ + A Collection resource generated the event. + """ + COLLECTION + + """ + A Product resource generated the event. + """ + PRODUCT + + """ + A ProductVariant resource generated the event. + """ + PRODUCT_VARIANT + + """ + A Article resource generated the event. + """ + ARTICLE + + """ + A Blog resource generated the event. + """ + BLOG + + """ + A Comment resource generated the event. + """ + COMMENT + + """ + A Page resource generated the event. + """ + PAGE + + """ + A DiscountAutomaticBxgy resource generated the event. + """ + DISCOUNT_AUTOMATIC_BXGY + + """ + A DiscountAutomaticNode resource generated the event. + """ + DISCOUNT_AUTOMATIC_NODE + + """ + A DiscountCodeNode resource generated the event. + """ + DISCOUNT_CODE_NODE + + """ + A DiscountNode resource generated the event. + """ + DISCOUNT_NODE + + """ + A PriceRule resource generated the event. + """ + PRICE_RULE + + """ + A Order resource generated the event. + """ + ORDER + + """ + Subject type is not available. This usually means that the subject isn't available in the current + version of the API, using a newer API version may resolve this. + """ + UNKNOWN +} + +""" +An item for exchange. +""" +type ExchangeLineItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The order line item for the exchange. If the exchange line has been processed multiple times, this will be the first associated line item and won't reflect all processed values. + """ + lineItem: LineItem @deprecated(reason: "Use `lineItems` instead.") + + """ + The order line items for the exchange. + """ + lineItems: [LineItem!] + + """ + The quantity of the exchange item that can be processed. + """ + processableQuantity: Int! + + """ + The quantity of the exchange item that have been processed. + """ + processedQuantity: Int! + + """ + The number of units ordered, including refunded and removed units. + """ + quantity: Int! + + """ + The quantity of the exchange item that haven't been processed. + """ + unprocessedQuantity: Int! + + """ + The ID of the variant at time of return creation. + """ + variantId: ID +} + +""" +The input fields for an applied discount on a calculated exchange line item. +""" +input ExchangeLineItemAppliedDiscountInput { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount or a percentage. + """ + value: ExchangeLineItemAppliedDiscountValueInput! +} + +""" +The input value for an applied discount on a calculated exchange line item. +Can either specify the value as a fixed amount or a percentage. +""" +input ExchangeLineItemAppliedDiscountValueInput @oneOf { + """ + The value of the discount as a fixed amount. + """ + amount: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple ExchangeLineItems. +""" +type ExchangeLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeLineItemEdge!]! + + """ + A list of nodes that are contained in ExchangeLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ExchangeLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeLineItem and a cursor during pagination. +""" +type ExchangeLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeLineItemEdge. + """ + node: ExchangeLineItem! +} + +""" +The input fields for new line items to be added to the order as part of an exchange. +""" +input ExchangeLineItemInput { + """ + The gift card codes associated with the physical gift cards. + """ + giftCardCodes: [String!] + + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID + + """ + The quantity of the item to be added. + """ + quantity: Int! + + """ + The discount to be applied to the exchange line item. + """ + appliedDiscount: ExchangeLineItemAppliedDiscountInput +} + +""" +The input fields for removing an exchange line item from a return. +""" +input ExchangeLineItemRemoveFromReturnInput { + """ + The ID of the exchange line item to remove. + """ + exchangeLineItemId: ID! + + """ + The quantity of the associated exchange line item to be removed. + """ + quantity: Int! +} + +""" +An exchange where existing items on an order are returned and new items are added to the order. +""" +type ExchangeV2 implements Node { + """ + The details of the new items in the exchange. + """ + additions: ExchangeV2Additions! + + """ + The date and time when the exchange was completed. + """ + completedAt: DateTime + + """ + The date and time when the exchange was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the exchange happened. + """ + location: Location + + """ + Mirrored from Admin Exchanges. + """ + mirrored: Boolean! + + """ + The text of an optional note that a shop owner can attach to the exchange. + """ + note: String + + """ + The refunds processed during the exchange. + """ + refunds: [Refund!]! + + """ + The details of the returned items in the exchange. + """ + returns: ExchangeV2Returns! + + """ + The staff member associated with the exchange. + """ + staffMember: StaffMember + + """ + The amount of money that was paid or refunded as part of the exchange. + """ + totalAmountProcessedSet: MoneyBag! + + """ + The difference in values of the items that were exchanged. + """ + totalPriceSet: MoneyBag! + + """ + The order transactions related to the exchange. + """ + transactions: [OrderTransaction!]! +} + +""" +New items associated to the exchange. +""" +type ExchangeV2Additions { + """ + The list of new items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The subtotal of the items being added, including discounts. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being added. + """ + taxLines: [TaxLine!]! + + """ + The total price of the items being added, including discounts and taxes. + """ + totalPriceSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple ExchangeV2s. +""" +type ExchangeV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeV2Edge!]! + + """ + A list of nodes that are contained in ExchangeV2Edge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ExchangeV2!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeV2 and a cursor during pagination. +""" +type ExchangeV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeV2Edge. + """ + node: ExchangeV2! +} + +""" +Contains information about an item in the exchange. +""" +type ExchangeV2LineItem { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The total line price, in shop and presentment currencies, after discounts are applied. + """ + discountedTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit after line item discounts are applied. + """ + discountedUnitPriceSet: MoneyBag! + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + Indiciates if this line item is a gift card. + """ + giftCard: Boolean! + + """ + The gift cards associated with the line item. + """ + giftCards: [GiftCard!]! + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The line item associated with this object. + """ + lineItem: LineItem + + """ + The name of the product. + """ + name: String! + + """ + The total price, in shop and presentment currencies, before discounts are applied. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit before line item discounts are applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The number of products that were purchased. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + The TaxLine object connected to this line item. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The product variant of the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String +} + +""" +Return items associated to the exchange. +""" +type ExchangeV2Returns { + """ + The list of return items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The amount of the order-level discount for the items and shipping being returned, which doesn't contain any line item discounts. + """ + orderDiscountAmountSet: MoneyBag! + + """ + The amount of money to be refunded for shipping. + """ + shippingRefundAmountSet: MoneyBag! + + """ + The subtotal of the items being returned. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being returned. + """ + taxLines: [TaxLine!]! + + """ + The amount of money to be refunded for tip. + """ + tipRefundAmountSet: MoneyBag! + + """ + The total value of the items being returned. + """ + totalPriceSet: MoneyBag! +} + +""" +Represents a video hosted outside of Shopify. +""" +type ExternalVideo implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + The embed URL of the video for the respective host. + """ + embedUrl: URL! + + """ + The URL. + """ + embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The host of the external video. + """ + host: MediaHost! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The origin URL of the video on the respective host. + """ + originUrl: URL! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Requirements that must be met before an app can be installed. +""" +type FailedRequirement { + """ + Action to be taken to resolve a failed requirement, including URL link. + """ + action: NavigationItem + + """ + A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app + encounters when trying to make use of their Shop and its resources. + """ + message: String! +} + +""" +A additional cost, charged by the merchant, on an order. Examples include return shipping fees and restocking fees. +""" +interface Fee { + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +A sale associated with a fee. +""" +type FeeSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The fee associated with the sale. It can be null if the fee was deleted. + """ + fee: Fee + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +A file interface. +""" +interface File { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fileAcknowledgeUpdateFailed` mutation. +""" +type FileAcknowledgeUpdateFailedPayload { + """ + The updated file(s). + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type for paginating through multiple Files. +""" +type FileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FileEdge!]! + + """ + A list of nodes that are contained in FileEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [File!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a file object. +""" +enum FileContentType { + """ + A Shopify-hosted image. + """ + IMAGE + + """ + A Shopify-hosted generic file. + """ + FILE + + """ + A Shopify-hosted video file. It's recommended to use this type for all video files. + """ + VIDEO + + """ + An externally hosted video. + """ + EXTERNAL_VIDEO + + """ + A Shopify-hosted 3D model. + """ + MODEL_3D +} + +""" +The input fields that are required to create a file object. +""" +input FileCreateInput { + """ + The name of the file. If provided, then the file is created with the specified filename. + If not provided, then the filename from the `originalSource` is used. + """ + filename: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + How to handle if filename is already in use. + """ + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """ + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String! +} + +""" +The input fields for handling if filename is already in use. +""" +enum FileCreateInputDuplicateResolutionMode { + """ + Append a UUID if filename is already in use. + """ + APPEND_UUID + + """ + Raise an error if filename is already in use. + """ + RAISE_ERROR + + """ + Replace the existing file if filename is already in use. + """ + REPLACE +} + +""" +Return type for `fileCreate` mutation. +""" +type FileCreatePayload { + """ + The newly created files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Return type for `fileDelete` mutation. +""" +type FileDeletePayload { + """ + The IDs of the deleted files. + """ + deletedFileIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type which holds one File and a cursor during pagination. +""" +type FileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FileEdge. + """ + node: File! +} + +""" +A file error. This typically occurs when there is an issue with the file itself causing it to fail validation. +Check the file before attempting to upload again. +""" +type FileError { + """ + Code representing the type of error. + """ + code: FileErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +The error types for a file. +""" +enum FileErrorCode { + """ + File error has occurred for an unknown reason. + """ + UNKNOWN + + """ + File could not be processed because the signed URL was invalid. + """ + INVALID_SIGNED_URL + + """ + File could not be processed because the image could not be downloaded. + """ + IMAGE_DOWNLOAD_FAILURE + + """ + File could not be processed because the image could not be processed. + """ + IMAGE_PROCESSING_FAILURE + + """ + File timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_ERROR + + """ + File could not be created because the external video could not be found. + """ + EXTERNAL_VIDEO_NOT_FOUND + + """ + File could not be created because the external video is not listed or is private. + """ + EXTERNAL_VIDEO_UNLISTED + + """ + File could not be created because the external video has an invalid aspect ratio. + """ + EXTERNAL_VIDEO_INVALID_ASPECT_RATIO + + """ + File could not be created because embed permissions are disabled for this video. + """ + EXTERNAL_VIDEO_EMBED_DISABLED + + """ + File could not be created because video is either not found or still transcoding. + """ + EXTERNAL_VIDEO_EMBED_NOT_FOUND_OR_TRANSCODING + + """ + File could not be processed because the source could not be downloaded. + """ + GENERIC_FILE_DOWNLOAD_FAILURE + + """ + File could not be created because the size is too large. + """ + GENERIC_FILE_INVALID_SIZE + + """ + File could not be created because the metadata could not be read. + """ + VIDEO_METADATA_READ_ERROR + + """ + File could not be created because it has an invalid file type. + """ + VIDEO_INVALID_FILETYPE_ERROR + + """ + File could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + File could not be created because it does not meet the maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + File could not be created because it does not meet the minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + File could not be created because it does not meet the maximum height requirement. + """ + VIDEO_MAX_HEIGHT_ERROR + + """ + File could not be created because it does not meet the minimum duration requirement. + """ + VIDEO_MIN_DURATION_ERROR + + """ + File could not be created because it does not meet the maximum duration requirement. + """ + VIDEO_MAX_DURATION_ERROR + + """ + Video failed validation. + """ + VIDEO_VALIDATION_ERROR + + """ + Model failed validation. + """ + MODEL3D_VALIDATION_ERROR + + """ + File could not be created because the model's thumbnail generation failed. + """ + MODEL3D_THUMBNAIL_GENERATION_ERROR + + """ + There was an issue while trying to generate a new thumbnail. + """ + MODEL3D_THUMBNAIL_REGENERATION_ERROR + + """ + File could not be created because the model can't be converted to USDZ format. + """ + MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR + + """ + File could not be created because the model file failed processing. + """ + MODEL3D_GLB_OUTPUT_CREATION_ERROR + + """ + File could not be created because the model file failed processing. + """ + MODEL3D_PROCESSING_FAILURE + + """ + File could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """ + File could not be created because the image size is too large. + """ + INVALID_IMAGE_FILE_SIZE + + """ + File could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + File could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + File could not be created because the cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + File could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR +} + +""" +The input fields required to create or update a file object. +""" +input FileSetInput { + """ + The name of the file. If provided, then the file is created with the specified filename. + If not provided, then the filename from the `originalSource` is used. + """ + filename: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + How to handle if filename is already in use. + """ + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """ + The ID of an existing file. + """ + id: ID + + """ + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String +} + +""" +The set of valid sort keys for the File query. +""" +enum FileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `filename` value. + """ + FILENAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `original_upload_size` value. + """ + ORIGINAL_UPLOAD_SIZE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The possible statuses for a file object. +""" +enum FileStatus { + """ + File has been uploaded but hasn't been processed. + """ + UPLOADED + + """ + File is being processed. + """ + PROCESSING + + """ + File is ready to be displayed. + """ + READY + + """ + File processing has failed. + """ + FAILED +} + +""" +The input fields that are required to update a file object. +""" +input FileUpdateInput { + """ + The ID of the file to be updated. + """ + id: ID! + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + The source from which to update a media image or generic file. + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String + + """ + The source from which to update the media preview image. + May be an external URL or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + previewImageSource: String + + """ + The name of the file including its extension. + """ + filename: String + + """ + The IDs of the references to add to the file. Currently only accepts product IDs. + """ + referencesToAdd: [ID!] + + """ + The IDs of the references to remove from the file. Currently only accepts product IDs. + """ + referencesToRemove: [ID!] +} + +""" +Return type for `fileUpdate` mutation. +""" +type FileUpdatePayload { + """ + The list of updated files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Possible error codes that can be returned by `FilesUserError`. +""" +enum FilesErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + File does not exist. + """ + FILE_DOES_NOT_EXIST + + """ + File has a pending operation. + """ + FILE_LOCKED + + """ + Filename update is only supported on Image and GenericFile. + """ + UNSUPPORTED_MEDIA_TYPE_FOR_FILENAME_UPDATE + + """ + Specify one argument: search, IDs, or deleteAll. + """ + TOO_MANY_ARGUMENTS + + """ + The search term must not be blank. + """ + BLANK_SEARCH + + """ + At least one argument is required. + """ + MISSING_ARGUMENTS + + """ + Search query isn't supported. + """ + INVALID_QUERY + + """ + One or more associated products are suspended. + """ + PRODUCT_SUSPENDED + + """ + Invalid filename extension. + """ + INVALID_FILENAME_EXTENSION + + """ + The provided filename is invalid. + """ + INVALID_FILENAME + + """ + The provided filename already exists. + """ + FILENAME_ALREADY_EXISTS + + """ + The file is not supported on trial accounts that have not validated their email. Either select a plan or verify the shop owner email to upload this file. + """ + UNACCEPTABLE_UNVERIFIED_TRIAL_ASSET + + """ + The file type is not supported. + """ + UNACCEPTABLE_ASSET + + """ + The file is not supported on trial accounts. Select a plan to upload this file. + """ + UNACCEPTABLE_TRIAL_ASSET + + """ + The alt value exceeds the maximum limit of 512 characters. + """ + ALT_VALUE_LIMIT_EXCEEDED + + """ + The file is not in the READY state. + """ + NON_READY_STATE + + """ + File cannot be updated in a failed state. + """ + INVALID_FAILED_MEDIA_STATE + + """ + Exceeded the limit of non-image media per shop. + """ + NON_IMAGE_MEDIA_PER_SHOP_LIMIT_EXCEEDED + + """ + Cannot create file with custom filename which does not match original source extension. + """ + MISMATCHED_FILENAME_AND_ORIGINAL_SOURCE + + """ + Duplicate resolution mode is not supported for this file type. + """ + INVALID_DUPLICATE_MODE_FOR_TYPE + + """ + Invalid image source url value provided. + """ + INVALID_IMAGE_SOURCE_URL + + """ + Duplicate resolution mode REPLACE cannot be used without specifying filename. + """ + MISSING_FILENAME_FOR_DUPLICATE_MODE_REPLACE + + """ + Exceeded the limit of media per product. + """ + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """ + The file type is not supported for referencing. + """ + UNSUPPORTED_FILE_REFERENCE + + """ + The target resource does not exist. + """ + REFERENCE_TARGET_DOES_NOT_EXIST + + """ + Cannot add more than 10000 references to a file. + """ + TOO_MANY_FILE_REFERENCE + + """ + Invalid duplicate resolution mode provided. + """ + INVALID_DUPLICATE_RESOLUTION_MODE + + """ + Media cannot be modified. It is currently being modified by another operation. + """ + MEDIA_CANNOT_BE_MODIFIED +} + +""" +An error that happens during the execution of a Files API query or mutation. +""" +type FilesUserError implements DisplayableError { + """ + The error code. + """ + code: FilesErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A filter option is one possible value in a search filter. +""" +type FilterOption { + """ + The filter option's label for display purposes. + """ + label: String! + + """ + The filter option's value. + """ + value: String! +} + +""" +Current user's access policy for a finance app. +""" +type FinanceAppAccessPolicy { + """ + Current shop staff's access within the app. + """ + access: [BankingFinanceAppAccess!]! +} + +""" +Shopify Payments account information shared with embedded finance applications. +""" +type FinanceKycInformation { + """ + The legal entity business address. + """ + businessAddress: ShopifyPaymentsAddressBasic + + """ + The legal entity business type. + """ + businessType: ShopifyPaymentsBusinessType + + """ + Business industry. + """ + industry: ShopifyPaymentsMerchantCategoryCode + + """ + Returns the business legal name. + """ + legalName: String + + """ + The shop owner information for financial KYC purposes. + """ + shopOwner: FinancialKycShopOwner! + + """ + Tax identification information. + """ + taxIdentification: ShopifyPaymentsTaxIdentification +} + +""" +Represents the shop owner information for financial KYC purposes. +""" +type FinancialKycShopOwner { + """ + The email of the shop owner. + """ + email: String! + + """ + The first name of the shop owner. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the shop owner. + """ + lastName: String + + """ + The phone number of the shop owner. + """ + phone: String +} + +""" +An amount that's allocated to a line item based on an associated discount application. +""" +type FinancialSummaryDiscountAllocation { + """ + The money amount that's allocated per unit on the associated line based on the discount application in shop and presentment currencies. If the allocated amount for the line cannot be evenly divided by the quantity, then this amount will be an approximate amount, avoiding fractional pennies. For example, if the associated line had a quantity of 3 with a discount of 4 cents, then the discount distribution would be [0.01, 0.01, 0.02]. This field returns the highest number of the distribution. In this example, this would be 0.02. + """ + approximateAllocatedAmountPerItem: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: FinancialSummaryDiscountApplication! +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. +""" +type FinancialSummaryDiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! +} + +""" +Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). +""" +scalar Float + +""" +Return type for `flowGenerateSignature` mutation. +""" +type FlowGenerateSignaturePayload { + """ + The payload used to generate the signature. + """ + payload: String + + """ + The generated signature. + """ + signature: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `flowTriggerReceive` mutation. +""" +type FlowTriggerReceivePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a strict subset of HTML code. Non-allowed tags will be stripped out. +Allowed tags: +* `a` (allowed attributes: `href`, `target`) +* `b` +* `br` +* `em` +* `i` +* `strong` +* `u` +Use [HTML](https://shopify.dev/api/admin-graphql/latest/scalars/HTML) instead if you need to +include other HTML tags. + +Example value: `"Your current domain is example.myshopify.com."` +""" +scalar FormattedString + +""" +A shipment of one or more items from an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). Tracks which [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects ship, their quantities, and the shipment's tracking information. + +Includes tracking details such as the carrier, tracking numbers, and URLs. The fulfillment connects to both the original order and any associated [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects. [`FulfillmentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) objects record milestones throughout the shipment lifecycle, from creation through delivery. + +Multiple fulfillments can exist for a single order when items either ship separately or from different locations. +""" +type Fulfillment implements LegacyInteroperability & Node { + """ + The date and time when the fulfillment was created. + """ + createdAt: DateTime! + + """ + The date that this fulfillment was delivered. + """ + deliveredAt: DateTime + + """ + Human readable display status for this fulfillment. + """ + displayStatus: FulfillmentDisplayStatus + + """ + The estimated date that this fulfillment will arrive. + """ + estimatedDeliveryAt: DateTime + + """ + The history of events associated with this fulfillment. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FulfillmentEventSortKeys = HAPPENED_AT): FulfillmentEventConnection! + + """ + List of the fulfillment's line items. + """ + fulfillmentLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentLineItemConnection! + + """ + A paginated list of fulfillment orders for the fulfillment. + """ + fulfillmentOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date and time when the fulfillment went into transit. + """ + inTransitAt: DateTime + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The location that the fulfillment was processed at. + """ + location: Location + + """ + Human readable reference identifier for this fulfillment. + """ + name: String! + + """ + The order for which the fulfillment was created. + """ + order: Order! + + """ + The address at which the fulfillment occurred. This field is intended for tax purposes, as a full address is required for tax providers to accurately calculate taxes. Typically this is the address of the warehouse or fulfillment center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the [`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object instead. + """ + originAddress: FulfillmentOriginAddress + + """ + Whether any of the line items in the fulfillment require shipping. + """ + requiresShipping: Boolean! + + """ + Fulfillment service associated with the fulfillment. + """ + service: FulfillmentService + + """ + The status of the fulfillment. + """ + status: FulfillmentStatus! + + """ + Sum of all line item quantities for the fulfillment. + """ + totalQuantity: Int! + + """ + Tracking information associated with the fulfillment, + such as the tracking company, tracking number, and tracking URL. + """ + trackingInfo("Truncate the array result to this size." first: Int): [FulfillmentTrackingInfo!]! + + """ + The date and time when the fulfillment was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `fulfillmentCancel` mutation. +""" +type FulfillmentCancelPayload { + """ + The canceled fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Fulfillments. +""" +type FulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEdge!]! + + """ + A list of nodes that are contained in FulfillmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Fulfillment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A fulfillment constraint rule. +""" +type FulfillmentConstraintRule implements HasMetafields & Node { + """ + Delivery method types that the function is associated with. + """ + deliveryMethodTypes: [DeliveryMethodType!]! + + """ + The ID for the fulfillment constraint function. + """ + function: ShopifyFunction! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +Return type for `fulfillmentConstraintRuleCreate` mutation. +""" +type FulfillmentConstraintRuleCreatePayload { + """ + The newly created fulfillment constraint rule. + """ + fulfillmentConstraintRule: FulfillmentConstraintRule + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleCreateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleCreate`. +""" +type FulfillmentConstraintRuleCreateUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleCreateUserError`. +""" +enum FulfillmentConstraintRuleCreateUserErrorCode { + """ + Failed to create fulfillment constraint rule due to invalid input. + """ + INPUT_INVALID + + """ + No Shopify Function found for provided function_id. + """ + FUNCTION_NOT_FOUND + + """ + A fulfillment constraint rule already exists for the provided function_id. + """ + FUNCTION_ALREADY_REGISTERED + + """ + Function does not implement the required interface for this fulfillment constraint rule. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function is pending deletion and cannot have new rules created against it. + """ + FUNCTION_PENDING_DELETION + + """ + Only one of function_id or function_handle can be provided, not both. + """ + MULTIPLE_FUNCTION_IDENTIFIERS + + """ + Either function_id or function_handle must be provided. + """ + MISSING_FUNCTION_IDENTIFIER + + """ + Maximum number of fulfillment constraint rules reached. Limit is 10. + """ + MAXIMUM_FULFILLMENT_CONSTRAINT_RULES_REACHED +} + +""" +Return type for `fulfillmentConstraintRuleDelete` mutation. +""" +type FulfillmentConstraintRuleDeletePayload { + """ + Whether or not the fulfillment constraint rule was successfully deleted. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleDeleteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleDelete`. +""" +type FulfillmentConstraintRuleDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleDeleteUserError`. +""" +enum FulfillmentConstraintRuleDeleteUserErrorCode { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentConstraintRuleUpdate` mutation. +""" +type FulfillmentConstraintRuleUpdatePayload { + """ + The updated fulfillment constraint rule. + """ + fulfillmentConstraintRule: FulfillmentConstraintRule + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleUpdateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleUpdate`. +""" +type FulfillmentConstraintRuleUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleUpdateUserError`. +""" +enum FulfillmentConstraintRuleUpdateUserErrorCode { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentCreate` mutation. +""" +type FulfillmentCreatePayload { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentCreateV2` mutation. +""" +type FulfillmentCreateV2Payload { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The display status of a fulfillment. +""" +enum FulfillmentDisplayStatus { + """ + Displayed as **Attempted delivery**. + """ + ATTEMPTED_DELIVERY + + """ + Displayed as **Canceled**. + """ + CANCELED + + """ + Displayed as **Confirmed**. + """ + CONFIRMED + + """ + Displayed as **Delayed**. + """ + DELAYED + + """ + Displayed as **Delivered**. + """ + DELIVERED + + """ + Displayed as **Failure**. + """ + FAILURE + + """ + Displayed as **Fulfilled**. + """ + FULFILLED + + """ + Displayed as **Picked up by carrier**. + """ + CARRIER_PICKED_UP + + """ + Displayed as **In transit**. + """ + IN_TRANSIT + + """ + Displayed as **Label printed**. + """ + LABEL_PRINTED + + """ + Displayed as **Label purchased**. + """ + LABEL_PURCHASED + + """ + Displayed as **Label voided**. + """ + LABEL_VOIDED + + """ + Displayed as **Marked as fulfilled**. + """ + MARKED_AS_FULFILLED + + """ + Displayed as **Not delivered**. + """ + NOT_DELIVERED + + """ + Displayed as **Out for delivery**. + """ + OUT_FOR_DELIVERY + + """ + Displayed as **Ready for pickup**. + """ + READY_FOR_PICKUP + + """ + Displayed as **Picked up**. + """ + PICKED_UP + + """ + Displayed as **Submitted**. + """ + SUBMITTED +} + +""" +An auto-generated type which holds one Fulfillment and a cursor during pagination. +""" +type FulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEdge. + """ + node: Fulfillment! +} + +""" +A tracking event that records the status and location of a fulfillment at a specific point in time. Each event captures details such as the [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.status) (for example, in transit, out for delivery, delivered) and any [messages](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.message) associated with the event. + +Fulfillment events provide a chronological history of a package's journey from shipment to delivery. They include timestamps, geographic coordinates, and estimated delivery dates to track fulfillment progress. +""" +type FulfillmentEvent implements Node { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The date and time when the fulfillment event was created. + """ + createdAt: DateTime! + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The time at which this fulfillment event happened. + """ + happenedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latitude where this fulfillment event occurred. + """ + latitude: Float + + """ + The longitude where this fulfillment event occurred. + """ + longitude: Float + + """ + A message associated with this fulfillment event. + """ + message: String + + """ + The province where this fulfillment event occurred. + """ + province: String + + """ + The status of this fulfillment event. + """ + status: FulfillmentEventStatus! + + """ + The zip code of the location where this fulfillment event occurred. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple FulfillmentEvents. +""" +type FulfillmentEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEventEdge!]! + + """ + A list of nodes that are contained in FulfillmentEventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentEvent!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `fulfillmentEventCreate` mutation. +""" +type FulfillmentEventCreatePayload { + """ + The created fulfillment event. + """ + fulfillmentEvent: FulfillmentEvent + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one FulfillmentEvent and a cursor during pagination. +""" +type FulfillmentEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEventEdge. + """ + node: FulfillmentEvent! +} + +""" +The input fields used to create a fulfillment event. +""" +input FulfillmentEventInput { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The time at which this fulfillment event happened. + """ + happenedAt: DateTime + + """ + The ID for the fulfillment that's associated with this fulfillment event. + """ + fulfillmentId: ID! + + """ + The latitude where this fulfillment event occurred. + """ + latitude: Float + + """ + The longitude where this fulfillment event occurred. + """ + longitude: Float + + """ + A message associated with this fulfillment event. + """ + message: String + + """ + The province where this fulfillment event occurred. + """ + province: String + + """ + The status of this fulfillment event. + """ + status: FulfillmentEventStatus! + + """ + The zip code of the location where this fulfillment event occurred. + """ + zip: String +} + +""" +The set of valid sort keys for the FulfillmentEvent query. +""" +enum FulfillmentEventSortKeys { + """ + Sort by the `happened_at` value. + """ + HAPPENED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The status that describes a fulfillment or delivery event. +""" +enum FulfillmentEventStatus { + """ + A shipping label has been purchased. + """ + LABEL_PURCHASED + + """ + A purchased shipping label has been printed. + """ + LABEL_PRINTED + + """ + The fulfillment is ready to be picked up. + """ + READY_FOR_PICKUP + + """ + The fulfillment is confirmed. This is the default value when no other information is available. + """ + CONFIRMED + + """ + The fulfillment is in transit. + """ + IN_TRANSIT + + """ + The fulfillment is out for delivery. + """ + OUT_FOR_DELIVERY + + """ + A delivery was attempted. + """ + ATTEMPTED_DELIVERY + + """ + The fulfillment is delayed. + """ + DELAYED + + """ + The fulfillment was successfully delivered. + """ + DELIVERED + + """ + The fulfillment request failed. + """ + FAILURE + + """ + The fulfillment has been picked up by the carrier. + """ + CARRIER_PICKED_UP +} + +""" +A fulfillment hold currently applied on a fulfillment order. +""" +type FulfillmentHold implements Node { + """ + The localized reason for the fulfillment hold for display purposes. + """ + displayReason: String! + + """ + An identifier an app can use to reference one of many holds it applied to a fulfillment order. + This field must be unique among the holds that a single app applies to a single fulfillment order. + """ + handle: String + + """ + The app that created the fulfillment hold. + """ + heldByApp: App + + """ + A boolean value that indicates whether the requesting app created the fulfillment hold. + """ + heldByRequestingApp: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The reason for the fulfillment hold. + """ + reason: FulfillmentHoldReason! + + """ + Additional information about the fulfillment hold reason. + """ + reasonNotes: String +} + +""" +The reason for a fulfillment hold. +""" +enum FulfillmentHoldReason { + """ + The fulfillment hold is applied because payment is pending. + """ + AWAITING_PAYMENT + + """ + The fulfillment hold is applied because of a high risk of fraud. + """ + HIGH_RISK_OF_FRAUD + + """ + The fulfillment hold is applied because of an incorrect address. + """ + INCORRECT_ADDRESS + + """ + The fulfillment hold is applied because inventory is out of stock. + """ + INVENTORY_OUT_OF_STOCK + + """ + The fulfillment hold is applied because of an unknown delivery date. + """ + UNKNOWN_DELIVERY_DATE + + """ + The fulfillment hold is applied because of a post purchase upsell offer. + """ + ONLINE_STORE_POST_PURCHASE_CROSS_SELL + + """ + The fulfillment hold is applied because of return items not yet received during an exchange. + """ + AWAITING_RETURN_ITEMS + + """ + The fulfillment hold is applied for another reason. + """ + OTHER +} + +""" +The input fields used to create a fulfillment from fulfillment orders. +""" +input FulfillmentInput { + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput + + """ + Whether the customer is notified. + If `true`, then a notification is sent when the fulfillment is created. The default value is `false`. + """ + notifyCustomer: Boolean = false + + """ + Pairs of `fulfillment_order_id` and `fulfillment_order_line_items` that represent the fulfillment + order line items that have to be fulfilled for each fulfillment order. For any given pair, if the + fulfillment order line items are left blank then all the fulfillment order line items of the + associated fulfillment order ID will be fulfilled. + """ + lineItemsByFulfillmentOrder: [FulfillmentOrderLineItemsInput!]! + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput +} + +""" +A line item from an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) that's included in a [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment). Links the fulfillment to specific items from the original order, tracking how many units were fulfilled. + +> Note: The discounted total excludes order-level discounts, showing only line-item specific discount amounts. +""" +type FulfillmentLineItem implements Node { + """ + The total price after discounts are applied. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total price after discounts are applied in shop and presentment currencies. This value doesn't include order-level discounts. + """ + discountedTotalSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The associated order's line item. + """ + lineItem: LineItem! + + """ + The total price before discounts are applied. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price before discounts are applied in shop and presentment currencies. + """ + originalTotalSet: MoneyBag! + + """ + Number of line items in the fulfillment. + """ + quantity: Int +} + +""" +An auto-generated type for paginating through multiple FulfillmentLineItems. +""" +type FulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. +""" +type FulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentLineItemEdge. + """ + node: FulfillmentLineItem! +} + +""" +The FulfillmentOrder object represents either an item or a group of items in an +[Order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +that are expected to be fulfilled from the same location. +There can be more than one fulfillment order for an +[order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +at a given location. + +{{ '/api/reference/fulfillment_order_relationships.png' | image }} + +Fulfillment orders represent the work which is intended to be done in relation to an order. +When fulfillment has started for one or more line items, a +[Fulfillment](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment) +is created by a merchant or third party to represent the ongoing or completed work of fulfillment. + +[See below for more details on creating fulfillments](#the-lifecycle-of-a-fulfillment-order-at-a-location-which-is-managed-by-a-fulfillment-service). + +> Note: +> Shopify creates fulfillment orders automatically when an order is created. +> It is not possible to manually create fulfillment orders. +> +> [See below for more details on the lifecycle of a fulfillment order](#the-lifecycle-of-a-fulfillment-order). + +## Retrieving fulfillment orders + +### Fulfillment orders from an order + +All fulfillment orders related to a given order can be retrieved with the +[Order.fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/objects/Order#connection-order-fulfillmentorders) +connection. + +[API access scopes](#api-access-scopes) +govern which fulfillments orders are returned to clients. +An API client will only receive a subset of the fulfillment orders which belong to an order +if they don't have the necessary access scopes to view all of the fulfillment orders. + +### Fulfillment orders assigned to the app for fulfillment + +Fulfillment service apps can retrieve the fulfillment orders which have been assigned to their locations with the +[assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) +connection. +Use the `assignmentStatus` argument to control whether all assigned fulfillment orders +should be returned or only those where a merchant has sent a +[fulfillment request](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderMerchantRequest) +and it has yet to be responded to. + +The API client must be granted the `read_assigned_fulfillment_orders` access scope to access +the assigned fulfillment orders. + +### All fulfillment orders + +Apps can retrieve all fulfillment orders with the +[fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/queries/fulfillmentOrders) +query. This query returns all assigned, merchant-managed, and third-party fulfillment orders on the shop, +which are accessible to the app according to the +[fulfillment order access scopes](#api-access-scopes) it was granted with. + +## The lifecycle of a fulfillment order + +### Fulfillment Order Creation + +After an order is created, a background worker performs the order routing process which determines +which locations will be responsible for fulfilling the purchased items. +Once the order routing process is complete, one or more fulfillment orders will be created +and assigned to these locations. It is not possible to manually create fulfillment orders. + +Once a fulfillment order has been created, it will have one of two different lifecycles depending on +the type of location which the fulfillment order is assigned to. + +### The lifecycle of a fulfillment order at a merchant managed location + +Fulfillment orders are completed by creating +[fulfillments](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment). +Fulfillments represents the work done. + +For digital products a merchant or an order management app would create a fulfilment once the digital asset +has been provisioned. +For example, in the case of a digital gift card, a merchant would to do this once +the gift card has been activated - before the email has been shipped. + +On the other hand, for a traditional shipped order, +a merchant or an order management app would create a fulfillment after picking and packing the items relating +to a fulfillment order, but before the courier has collected the goods. + +[Learn about managing fulfillment orders as an order management app](https://shopify.dev/apps/fulfillment/order-management-apps/manage-fulfillments). + +### The lifecycle of a fulfillment order at a location which is managed by a fulfillment service + +For fulfillment orders which are assigned to a location that is managed by a fulfillment service, +a merchant or an Order Management App can +[send a fulfillment request](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitFulfillmentRequest) +to the fulfillment service which operates the location to request that they fulfill the associated items. +A fulfillment service has the option to +[accept](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderAcceptFulfillmentRequest) +or [reject](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderRejectFulfillmentRequest) +this fulfillment request. + +Once the fulfillment service has accepted the request, the request can no longer be cancelled by the merchant +or order management app and instead a +[cancellation request must be submitted](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitCancellationRequest) +to the fulfillment service. + +Once a fulfillment service accepts a fulfillment request, +then after they are ready to pack items and send them for delivery, they create fulfillments with the +[fulfillmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentCreate) +mutation. +They can provide tracking information right away or create fulfillments without it and then +update the tracking information for fulfillments with the +[fulfillmentTrackingInfoUpdate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentTrackingInfoUpdate) +mutation. + +[Learn about managing fulfillment orders as a fulfillment service](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments). + +## API access scopes + +Fulfillment orders are governed by the following API access scopes: + +* The `read_merchant_managed_fulfillment_orders` and + `write_merchant_managed_fulfillment_orders` access scopes + grant access to fulfillment orders assigned to merchant-managed locations. +* The `read_assigned_fulfillment_orders` and `write_assigned_fulfillment_orders` + access scopes are intended for fulfillment services. + These scopes grant access to fulfillment orders assigned to locations that are being managed + by fulfillment services. +* The `read_third_party_fulfillment_orders` and `write_third_party_fulfillment_orders` + access scopes grant access to fulfillment orders + assigned to locations managed by other fulfillment services. + +### Fulfillment service app access scopes + +Usually, **fulfillment services** have the `write_assigned_fulfillment_orders` access scope +and don't have the `*_third_party_fulfillment_orders` +or `*_merchant_managed_fulfillment_orders` access scopes. +The app will only have access to the fulfillment orders assigned to their location +(or multiple locations if the app registers multiple fulfillment services on the shop). +The app will not have access to fulfillment orders assigned to merchant-managed locations +or locations owned by other fulfillment service apps. + +### Order management app access scopes + +**Order management apps** will usually request `write_merchant_managed_fulfillment_orders` and +`write_third_party_fulfillment_orders` access scopes. This will allow them to manage all fulfillment orders +on behalf of a merchant. + +If an app combines the functions of an order management app and a fulfillment service, +then the app should request all +access scopes to manage all assigned and all unassigned fulfillment orders. + +## Notifications about fulfillment orders + +Fulfillment services are required to +[register](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) +a self-hosted callback URL which has a number of uses. One of these uses is that this callback URL will be notified +whenever a merchant submits a fulfillment or cancellation request. + +Both merchants and apps can +[subscribe](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#webhooks) +to the +[fulfillment order webhooks](https://shopify.dev/api/admin-graphql/latest/enums/WebhookSubscriptionTopic#value-fulfillmentorderscancellationrequestaccepted) +to be notified whenever fulfillment order related domain events occur. + +[Learn about fulfillment workflows](https://shopify.dev/apps/fulfillment). +""" +type FulfillmentOrder implements Node { + """ + The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen. + + The fulfillment order's assigned location might change in the following cases: + + - The fulfillment order has been entirely moved to a new location. For example, the [fulfillmentOrderMove]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove + ) mutation has been called, and you see the original fulfillment order in the [movedFulfillmentOrder]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove#field-fulfillmentordermovepayload-movedfulfillmentorder + ) field within the mutation's response. + - Work on the fulfillment order hasn't yet begun, which means that the fulfillment order has the + [OPEN](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-open), + [SCHEDULED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-scheduled), or + [ON_HOLD](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-onhold) + status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin). + """ + assignedLocation: FulfillmentOrderAssignedLocation! + + """ + ID of the channel that created the order. + """ + channelId: ID + + """ + Date and time when the fulfillment order was created. + """ + createdAt: DateTime! + + """ + Delivery method of this fulfillment order. + """ + deliveryMethod: DeliveryMethod + + """ + The destination where the items should be sent. + """ + destination: FulfillmentOrderDestination + + """ + The date and time at which the fulfillment order will be fulfillable. When this date and time is reached, the scheduled fulfillment order is automatically transitioned to open. For example, the `fulfill_at` date for a subscription order might be the 1st of each month, a pre-order `fulfill_at` date would be `nil`, and a standard order `fulfill_at` date would be the order creation date. + """ + fulfillAt: DateTime + + """ + The latest date and time by which all items in the fulfillment order need to be fulfilled. + """ + fulfillBy: DateTime + + """ + The fulfillment holds applied on the fulfillment order. + """ + fulfillmentHolds: [FulfillmentHold!]! + + """ + Fulfillment orders eligible for merging with the given fulfillment order. + """ + fulfillmentOrdersForMerge("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderConnection! + + """ + A list of fulfillments for the fulfillment order. + """ + fulfillments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The duties delivery method of this fulfillment order. + """ + internationalDuties: FulfillmentOrderInternationalDuties + + """ + A list of the fulfillment order's line items. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderLineItemConnection! + + """ + A list of locations that the fulfillment order can potentially move to. + """ + locationsForMove("Filter to a list of Fulfillment Order Line Items." lineItemIds: [ID!] = [], "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active | string |\n| address1 | string |\n| address2 | string |\n| city | string |\n| country | string |\n| created_at | time |\n| geolocated | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| legacy | boolean |\n| location_id | id |\n| name | string |\n| pickup_in_store | string | | - `enabled`
- `disabled` |\n| province | string |\n| zip | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "Specific Location ids to check for the movability for a fulfillment order." locationIds: [ID!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderLocationForMoveConnection! + + """ + A list of requests sent by the merchant or an order management app to the fulfillment service for the fulfillment order. + """ + merchantRequests("The kind of request the merchant sent." kind: FulfillmentOrderMerchantRequestKind, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderMerchantRequestConnection! + + """ + The order that's associated with the fulfillment order. + """ + order: Order! + + """ + ID of the order that's associated with the fulfillment order. + """ + orderId: ID! + + """ + The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. + For example, "#1001", "EN1001", or "1001-A". + This value isn't unique across multiple stores. + """ + orderName: String! + + """ + The date and time when the order was processed. + This date and time might not match the date and time when the order was created. + """ + orderProcessedAt: DateTime! + + """ + The request status of the fulfillment order. + """ + requestStatus: FulfillmentOrderRequestStatus! + + """ + The status of the fulfillment order. + """ + status: FulfillmentOrderStatus! + + """ + The actions that can be performed on this fulfillment order. + """ + supportedActions: [FulfillmentOrderSupportedAction!]! + + """ + The date and time when the fulfillment order was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fulfillmentOrderAcceptCancellationRequest` mutation. +""" +type FulfillmentOrderAcceptCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderAcceptFulfillmentRequest` mutation. +""" +type FulfillmentOrderAcceptFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The actions that can be taken on a fulfillment order. +""" +enum FulfillmentOrderAction { + """ + Creates a fulfillment for selected line items in the fulfillment order. The corresponding mutation for this action is `fulfillmentCreateV2`. + """ + CREATE_FULFILLMENT + + """ + Sends a request for fulfilling selected line items in a fulfillment order to a fulfillment service. The corresponding mutation for this action is `fulfillmentOrderSubmitFulfillmentRequest`. + """ + REQUEST_FULFILLMENT + + """ + Cancels a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderCancel`. + """ + CANCEL_FULFILLMENT_ORDER + + """ + Moves a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMove`. + """ + MOVE + + """ + Sends a cancellation request to the fulfillment service of a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSubmitCancellationRequest`. + """ + REQUEST_CANCELLATION + + """ + Marks the fulfillment order as open. The corresponding mutation for this action is `fulfillmentOrderOpen`. + """ + MARK_AS_OPEN + + """ + Releases the fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderReleaseHold`. + """ + RELEASE_HOLD + + """ + Applies a fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderHold`. + """ + HOLD + + """ + Opens an external URL to initiate the fulfillment process outside Shopify. This action should be paired with `FulfillmentOrderSupportedAction.externalUrl`. + """ + EXTERNAL + + """ + Splits a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSplit`. + """ + SPLIT + + """ + Merges a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMerge`. + """ + MERGE +} + +""" +The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen. + + The fulfillment order's assigned location might change in the following cases: + + - The fulfillment order has been entirely moved to a new location. For example, the [fulfillmentOrderMove]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove + ) mutation has been called, and you see the original fulfillment order in the [movedFulfillmentOrder]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove#field-fulfillmentordermovepayload-movedfulfillmentorder + ) field within the mutation's response. + + - Work on the fulfillment order has not yet begun, which means that the fulfillment order has the + [OPEN](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-open), + [SCHEDULED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-scheduled), or + [ON_HOLD](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-onhold) + status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin). + +If the [fulfillmentOrderMove]( +https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove +) mutation has moved the fulfillment order's line items to a new location, +but hasn't moved the fulfillment order instance itself, then the original fulfillment order's assigned location +doesn't change. +This happens if the fulfillment order is being split during the move, or if all line items can be moved +to an existing fulfillment order at a new location. + +Once the fulfillment order has been taken into work or canceled, +which means that the fulfillment order has the +[IN_PROGRESS](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-inprogress), +[CLOSED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-closed), +[CANCELLED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-cancelled), or +[INCOMPLETE](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-incomplete) +status, `FulfillmentOrderAssignedLocation` acts as a snapshot of the shop's location content. +Up-to-date shop's location data may be queried through [location]( + https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderAssignedLocation#field-fulfillmentorderassignedlocation-location +) connection. +""" +type FulfillmentOrderAssignedLocation { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The two-letter country code of the location. + """ + countryCode: CountryCode! + + """ + The location where the fulfillment is expected to happen. This value might be different from + `FulfillmentOrderAssignedLocation` if the location's attributes were updated + after the fulfillment order was taken into work of canceled. + """ + location: Location + + """ + The name of the location. + """ + name: String! + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +The assigment status to be used to filter fulfillment orders. +""" +enum FulfillmentOrderAssignmentStatus { + """ + Fulfillment orders for which the merchant has requested cancellation of + the previously accepted fulfillment request. + """ + CANCELLATION_REQUESTED + + """ + Fulfillment orders for which the merchant has requested fulfillment. + """ + FULFILLMENT_REQUESTED + + """ + Fulfillment orders for which the merchant's fulfillment request has been accepted. + Any number of fulfillments can be created on these fulfillment orders + to completely fulfill the requested items. + """ + FULFILLMENT_ACCEPTED + + """ + Fulfillment orders for which the merchant hasn't yet requested fulfillment. + """ + FULFILLMENT_UNSUBMITTED +} + +""" +Return type for `fulfillmentOrderCancel` mutation. +""" +type FulfillmentOrderCancelPayload { + """ + The fulfillment order that was marked as canceled. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was created to replace the canceled fulfillment order. + """ + replacementFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderClose` mutation. +""" +type FulfillmentOrderClosePayload { + """ + The fulfillment order that was marked as incomplete. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrders. +""" +type FulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the destination where the items should be sent upon fulfillment. +""" +type FulfillmentOrderDestination implements Node { + """ + The first line of the address of the destination. + """ + address1: String + + """ + The second line of the address of the destination. + """ + address2: String + + """ + The city of the destination. + """ + city: String + + """ + The company of the destination. + """ + company: String + + """ + The two-letter country code of the destination. + """ + countryCode: CountryCode + + """ + The email of the customer at the destination. + """ + email: String + + """ + The first name of the customer at the destination. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer at the destination. + """ + lastName: String + + """ + The location designated for the pick-up of the fulfillment order. + """ + location: Location + + """ + The phone number of the customer at the destination. + """ + phone: String + + """ + The province of the destination. + """ + province: String + + """ + The ZIP code of the destination. + """ + zip: String +} + +""" +An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. +""" +type FulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderEdge. + """ + node: FulfillmentOrder! +} + +""" +The input fields for the fulfillment hold applied on the fulfillment order. +""" +input FulfillmentOrderHoldInput { + """ + The reason for the fulfillment hold. + """ + reason: FulfillmentHoldReason! + + """ + Additional information about the fulfillment hold reason. + """ + reasonNotes: String + + """ + Whether the merchant receives a notification about the fulfillment hold. The default value is `false`. + """ + notifyMerchant: Boolean = false + + """ + A configurable ID used to track the automation system releasing these holds. + """ + externalId: String + + """ + An identifier that an app can use to reference one of the holds that it applies to a + fulfillment order. + + This field must be unique among the holds that a single app applies to a single fulfillment order. + It prevents apps from inadvertently creating duplicate holds. + This field cannot exceed 64 characters. + + For example, an app can place multiple holds on a single fulfillment order each with a different `handle`. + If an app attempts to place two holds with the same `handle`, the second hold will be rejected with + [a duplicate hold user error](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-duplicatefulfillmentholdhandle). + The same `handle` can however be re-used on different fulfillment orders and by different apps. + + By default, `handle` will be an empty string. If an app wishes to place multiple holds on a single + fulfillment order, then a different `handle` must be provided for each. + """ + handle: String = "" + + """ + The fulfillment order line items to be placed on hold. + + If left blank, all line items of the fulfillment order are placed on hold. + + Not supported when placing a hold on a fulfillment order that is already held. + If supplied when a fulfillment order is already on hold, [a user error](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-fulfillmentordernotsplittable) + will be returned indicating that the fulfillment order is not able to be split. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] = [] +} + +""" +Return type for `fulfillmentOrderHold` mutation. +""" +type FulfillmentOrderHoldPayload { + """ + The fulfillment hold created for the fulfillment order. Null if no hold was created. + """ + fulfillmentHold: FulfillmentHold + + """ + The fulfillment order on which a fulfillment hold was applied. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The remaining fulfillment order containing the line items to which the hold wasn't applied, + if specific line items were specified to be placed on hold. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderHold`. +""" +type FulfillmentOrderHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderHoldUserError`. +""" +enum FulfillmentOrderHoldUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN_ZERO + + """ + The maximum number of fulfillment holds for this fulfillment order has been reached for this app. An app can only have up to 10 holds on a single fulfillment order at any one time. + """ + FULFILLMENT_ORDER_HOLD_LIMIT_REACHED + + """ + The handle provided for the fulfillment hold is already in use by this app for another hold on this fulfillment order. + """ + DUPLICATE_FULFILLMENT_HOLD_HANDLE + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY + + """ + The fulfillment order is not in a splittable state. + """ + FULFILLMENT_ORDER_NOT_SPLITTABLE + + """ + The fulfillment order line items are not unique. + """ + DUPLICATED_FULFILLMENT_ORDER_LINE_ITEMS +} + +""" +The international duties relevant to a fulfillment order. +""" +type FulfillmentOrderInternationalDuties { + """ + The method of duties payment. Example values: `DDP`, `DAP`. + """ + incoterm: String! +} + +""" +Associates an order line item with the quantities that require fulfillment as part of a fulfillment order. Each Fulfillment Order Line Item object tracks the total quantity to fulfill and the remaining quantity yet to be fulfilled, along with details about the line item being fulfilled and pricing information. + +The line item provides additional fulfillment data including whether the item requires shipping. Financial summaries show pricing details with discounts applied, while warning messages alert merchants to any issues that might affect fulfillment. +""" +type FulfillmentOrderLineItem implements Node { + """ + The financial summary for the Fulfillment Order's Line Items. + """ + financialSummaries: [FulfillmentOrderLineItemFinancialSummary!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image: Image + + """ + The ID of the inventory item. + """ + inventoryItemId: ID + + """ + The associated order line item. + """ + lineItem: LineItem! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! @deprecated(reason: "Use `financialSummaries` instead.") + + """ + The title of the product. + """ + productTitle: String! + + """ + The number of units remaining to be fulfilled. + """ + remainingQuantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + The total number of units to be fulfilled. + """ + totalQuantity: Int! + + """ + The product variant associated to the fulfillment order line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String + + """ + Warning messages for a fulfillment order line item. + """ + warnings: [FulfillmentOrderLineItemWarning!]! + + """ + The weight of a line item unit. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderLineItems. +""" +type FulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLineItem and a cursor during pagination. +""" +type FulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLineItemEdge. + """ + node: FulfillmentOrderLineItem! +} + +""" +The financial details of a fulfillment order line item. +""" +type FulfillmentOrderLineItemFinancialSummary { + """ + The approximate split price of a line item unit, in shop and presentment currencies. This value doesn't include discounts applied to the entire order.For the full picture of applied discounts, see discountAllocations. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The discounts that have been allocated onto the line item by discount applications, not including order edits and refunds. + """ + discountAllocations: [FinancialSummaryDiscountAllocation!]! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! + + """ + Number of line items that this financial summary applies to. + """ + quantity: Int! +} + +""" +The input fields used to include the quantity of the fulfillment order line item that should be fulfilled. +""" +input FulfillmentOrderLineItemInput { + """ + The ID of the fulfillment order line item. + """ + id: ID! + + """ + The quantity of the fulfillment order line item. + """ + quantity: Int! +} + +""" +A fulfillment order line item warning. For example, a warning about why a fulfillment request was rejected. +""" +type FulfillmentOrderLineItemWarning { + """ + The description of warning. + """ + description: String + + """ + The title of warning. + """ + title: String +} + +""" +The input fields used to include the line items of a specified fulfillment order that should be fulfilled. +""" +input FulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be fulfilled. + If left blank, all line items of the fulfillment order will be fulfilled. + Accepts a maximum of 512 line items. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +The input fields for marking fulfillment order line items as ready for pickup. +""" +input FulfillmentOrderLineItemsPreparedForPickupInput { + """ + The fulfillment orders associated with the line items which are ready to be picked up by a customer. + """ + lineItemsByFulfillmentOrder: [PreparedFulfillmentOrderLineItemsInput!]! +} + +""" +Return type for `fulfillmentOrderLineItemsPreparedForPickup` mutation. +""" +type FulfillmentOrderLineItemsPreparedForPickupPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderLineItemsPreparedForPickupUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderLineItemsPreparedForPickup`. +""" +type FulfillmentOrderLineItemsPreparedForPickupUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderLineItemsPreparedForPickupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderLineItemsPreparedForPickupUserError`. +""" +enum FulfillmentOrderLineItemsPreparedForPickupUserErrorCode { + """ + The fulfillment order does not have any line items that can be prepared. + """ + NO_LINE_ITEMS_TO_PREPARE_FOR_FULFILLMENT_ORDER + + """ + Invalid fulfillment order ID provided. + """ + FULFILLMENT_ORDER_INVALID + + """ + Unable to prepare quantity. + """ + UNABLE_TO_PREPARE_QUANTITY +} + +""" +A location that a fulfillment order can potentially move to. +""" +type FulfillmentOrderLocationForMove { + """ + Fulfillment order line items that can be moved from their current location to the given location. + """ + availableLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderLineItemConnection! + + """ + Total number of fulfillment order line items that can be moved from their current assigned location to the + given location. + """ + availableLineItemsCount: Count + + """ + The location being considered as the fulfillment order's new assigned location. + """ + location: Location! + + """ + A human-readable string with the reason why the fulfillment order, or some of its line items, can't be + moved to the location. + """ + message: String + + """ + Whether the fulfillment order can be moved to the location. + """ + movable: Boolean! + + """ + Fulfillment order line items that cannot be moved from their current location to the given location. + """ + unavailableLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderLineItemConnection! + + """ + Total number of fulfillment order line items that can't be moved from their current assigned location to the + given location. + """ + unavailableLineItemsCount: Count +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderLocationForMoves. +""" +type FulfillmentOrderLocationForMoveConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLocationForMoveEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLocationForMoveEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentOrderLocationForMove!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination. +""" +type FulfillmentOrderLocationForMoveEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLocationForMoveEdge. + """ + node: FulfillmentOrderLocationForMove! +} + +""" +A request made by the merchant or an order management app to a fulfillment service +for a fulfillment order. +""" +type FulfillmentOrderMerchantRequest implements Node { + """ + The fulfillment order associated with the merchant request. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The kind of request made. + """ + kind: FulfillmentOrderMerchantRequestKind! + + """ + The optional message that the merchant included in the request. + """ + message: String + + """ + Additional options requested by the merchant. These depend on the `kind` of the request. + For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the + merchant intends to notify the customer upon fulfillment. The fulfillment service can then set + `notifyCustomer` when making calls to `FulfillmentCreate`. + """ + requestOptions: JSON + + """ + The response from the fulfillment service. + """ + responseData: JSON + + """ + The timestamp when the request was made. + """ + sentAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests. +""" +type FulfillmentOrderMerchantRequestConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderMerchantRequestEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderMerchantRequestEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [FulfillmentOrderMerchantRequest!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination. +""" +type FulfillmentOrderMerchantRequestEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderMerchantRequestEdge. + """ + node: FulfillmentOrderMerchantRequest! +} + +""" +The kinds of request merchants can make to a fulfillment service. +""" +enum FulfillmentOrderMerchantRequestKind { + """ + The merchant requests fulfillment for an `OPEN` fulfillment order. + """ + FULFILLMENT_REQUEST + + """ + The merchant requests cancellation of an `IN_PROGRESS` fulfillment order. + """ + CANCELLATION_REQUEST +} + +""" +The input fields for merging fulfillment orders. +""" +input FulfillmentOrderMergeInput { + """ + The details of the fulfillment orders to be merged. + """ + mergeIntents: [FulfillmentOrderMergeInputMergeIntent!]! +} + +""" +The input fields for merging fulfillment orders into a single merged fulfillment order. +""" +input FulfillmentOrderMergeInputMergeIntent { + """ + The fulfillment order line items to be merged. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + + """ + The ID of the fulfillment order to be merged. + """ + fulfillmentOrderId: ID! +} + +""" +Return type for `fulfillmentOrderMerge` mutation. +""" +type FulfillmentOrderMergePayload { + """ + The result of the fulfillment order merges. + """ + fulfillmentOrderMerges: [FulfillmentOrderMergeResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderMergeUserError!]! +} + +""" +The result of merging a set of fulfillment orders. +""" +type FulfillmentOrderMergeResult { + """ + The new fulfillment order as a result of the merge. + """ + fulfillmentOrder: FulfillmentOrder! +} + +""" +An error that occurs during the execution of `FulfillmentOrderMerge`. +""" +type FulfillmentOrderMergeUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderMergeUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderMergeUserError`. +""" +enum FulfillmentOrderMergeUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY +} + +""" +Return type for `fulfillmentOrderMove` mutation. +""" +type FulfillmentOrderMovePayload { + """ + The fulfillment order which now contains the moved line items and is assigned to the destination location. + + If the original fulfillment order doesn't have any line items which are fully or partially fulfilled, the original fulfillment order will be moved to the new location. + However if this isn't the case, the moved fulfillment order will differ from the original one. + """ + movedFulfillmentOrder: FulfillmentOrder + + """ + The final state of the original fulfillment order. + + As a result of the move operation, the original fulfillment order might be moved to the new location + or remain in the original location. The original fulfillment order might have the same status or be closed. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + This field is deprecated. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderOpen` mutation. +""" +type FulfillmentOrderOpenPayload { + """ + The fulfillment order that was transitioned to open and is fulfillable. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectCancellationRequest` mutation. +""" +type FulfillmentOrderRejectCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectFulfillmentRequest` mutation. +""" +type FulfillmentOrderRejectFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The reason for a fulfillment order rejection. +""" +enum FulfillmentOrderRejectionReason { + """ + The fulfillment order was rejected because of an incorrect address. + """ + INCORRECT_ADDRESS + + """ + The fulfillment order was rejected because inventory is out of stock. + """ + INVENTORY_OUT_OF_STOCK + + """ + The fulfillment order was rejected because of an ineligible product. + """ + INELIGIBLE_PRODUCT + + """ + The fulfillment order was rejected because of an undeliverable destination. + """ + UNDELIVERABLE_DESTINATION + + """ + The fulfillment order was rejected because international address shipping hasn't been enabled. + """ + INTERNATIONAL_SHIPPING_UNAVAILABLE + + """ + The fulfillment order was rejected because product information is incorrect to be able to ship. + """ + INCORRECT_PRODUCT_INFO + + """ + The fulfillment order was rejected because customs information was missing for international shipping. + """ + MISSING_CUSTOMS_INFO + + """ + The fulfillment order was rejected because of an invalid SKU. + """ + INVALID_SKU + + """ + The fulfillment order was rejected because the payment method was declined. + """ + PAYMENT_DECLINED + + """ + The fulfillment order was rejected because the package preference was not set. + """ + PACKAGE_PREFERENCE_NOT_SET + + """ + The fulfillment order was rejected because of invalid customer contact information. + """ + INVALID_CONTACT_INFORMATION + + """ + The fulfillment order was rejected because the order is too large. + """ + ORDER_TOO_LARGE + + """ + The fulfillment order was rejected because the merchant is blocked or suspended. + """ + MERCHANT_BLOCKED_OR_SUSPENDED + + """ + The fulfillment order was rejected for another reason. + """ + OTHER +} + +""" +Return type for `fulfillmentOrderReleaseHold` mutation. +""" +type FulfillmentOrderReleaseHoldPayload { + """ + The fulfillment order on which the hold was released. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderReleaseHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReleaseHold`. +""" +type FulfillmentOrderReleaseHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderReleaseHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderReleaseHoldUserError`. +""" +enum FulfillmentOrderReleaseHoldUserErrorCode { + """ + The fulfillment order wasn't found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The app doesn't have access to release the fulfillment hold. + """ + INVALID_ACCESS +} + +""" +The request status of a fulfillment order. +""" +enum FulfillmentOrderRequestStatus { + """ + The initial request status for the newly-created fulfillment orders. This is the only valid + request status for fulfillment orders that aren't assigned to a fulfillment service. + """ + UNSUBMITTED + + """ + The merchant requested fulfillment for this fulfillment order. + """ + SUBMITTED + + """ + The fulfillment service accepted the merchant's fulfillment request. + """ + ACCEPTED + + """ + The fulfillment service rejected the merchant's fulfillment request. + """ + REJECTED + + """ + The merchant requested a cancellation of the fulfillment request for this fulfillment order. + """ + CANCELLATION_REQUESTED + + """ + The fulfillment service accepted the merchant's fulfillment cancellation request. + """ + CANCELLATION_ACCEPTED + + """ + The fulfillment service rejected the merchant's fulfillment cancellation request. + """ + CANCELLATION_REJECTED + + """ + The fulfillment service closed the fulfillment order without completing it. + """ + CLOSED +} + +""" +Return type for `fulfillmentOrderReschedule` mutation. +""" +type FulfillmentOrderReschedulePayload { + """ + A fulfillment order with the rescheduled line items. + + Fulfillment orders may be merged if they have the same `fulfillAt` datetime. + + If the fulfillment order is merged then the resulting fulfillment order will be returned. + Otherwise the original fulfillment order will be returned with an updated `fulfillAt` datetime. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderRescheduleUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReschedule`. +""" +type FulfillmentOrderRescheduleUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderRescheduleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderRescheduleUserError`. +""" +enum FulfillmentOrderRescheduleUserErrorCode { + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND +} + +""" +The set of valid sort keys for the FulfillmentOrder query. +""" +enum FulfillmentOrderSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields for the split applied to the fulfillment order. +""" +input FulfillmentOrderSplitInput { + """ + The fulfillment order line items to be split out. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! + + """ + The ID of the fulfillment order to be split. + """ + fulfillmentOrderId: ID! +} + +""" +Return type for `fulfillmentOrderSplit` mutation. +""" +type FulfillmentOrderSplitPayload { + """ + The result of the fulfillment order splits. + """ + fulfillmentOrderSplits: [FulfillmentOrderSplitResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderSplitUserError!]! +} + +""" +The result of splitting a fulfillment order. +""" +type FulfillmentOrderSplitResult { + """ + The original fulfillment order as a result of the split. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + The remaining fulfillment order as a result of the split. + """ + remainingFulfillmentOrder: FulfillmentOrder! + + """ + The replacement fulfillment order if the original fulfillment order wasn't in a state to be split. + """ + replacementFulfillmentOrder: FulfillmentOrder +} + +""" +An error that occurs during the execution of `FulfillmentOrderSplit`. +""" +type FulfillmentOrderSplitUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderSplitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderSplitUserError`. +""" +enum FulfillmentOrderSplitUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY + + """ + The fulfillment order must have at least one line item input to split. + """ + NO_LINE_ITEMS_PROVIDED_TO_SPLIT +} + +""" +The status of a fulfillment order. +""" +enum FulfillmentOrderStatus { + """ + The fulfillment order is ready for fulfillment. + """ + OPEN + + """ + The fulfillment order is being processed. + """ + IN_PROGRESS + + """ + The fulfillment order has been cancelled by the merchant. + """ + CANCELLED + + """ + The fulfillment order cannot be completed as requested. + """ + INCOMPLETE + + """ + The fulfillment order has been completed and closed. + """ + CLOSED + + """ + The fulfillment order is deferred and will be ready for fulfillment after the date and time specified in `fulfill_at`. + """ + SCHEDULED + + """ + The fulfillment order is on hold. The fulfillment process can't be initiated until the hold on the fulfillment order is released. + """ + ON_HOLD +} + +""" +Return type for `fulfillmentOrderSubmitCancellationRequest` mutation. +""" +type FulfillmentOrderSubmitCancellationRequestPayload { + """ + The fulfillment order specified in the cancelation request. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderSubmitFulfillmentRequest` mutation. +""" +type FulfillmentOrderSubmitFulfillmentRequestPayload { + """ + The original fulfillment order intended to request fulfillment for. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was submitted to the fulfillment service. This will be the same as + the original fulfillment order field. The exception to this is partial fulfillment requests or + fulfillment request for cancelled or incomplete fulfillment orders. + """ + submittedFulfillmentOrder: FulfillmentOrder + + """ + This field will only be present for partial fulfillment requests. This will represent the new + fulfillment order with the remaining line items not submitted to the fulfillment service. + """ + unsubmittedFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +One of the actions that the fulfillment order supports in its current state. +""" +type FulfillmentOrderSupportedAction { + """ + The action value. + """ + action: FulfillmentOrderAction! + + """ + The external URL to be used to initiate the fulfillment process outside Shopify. + Applicable only when the `action` value is `EXTERNAL`. + """ + externalUrl: URL +} + +""" +Return type for `fulfillmentOrdersReroute` mutation. +""" +type FulfillmentOrdersReroutePayload { + """ + The fulfillment orders which contains the moved line items. + """ + movedFulfillmentOrders: [FulfillmentOrder!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersRerouteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersReroute`. +""" +type FulfillmentOrdersRerouteUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersRerouteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersRerouteUserError`. +""" +enum FulfillmentOrdersRerouteUserErrorCode { + """ + No fulfillment order IDs were provided. + """ + NO_FULFILLMENT_ORDER_IDS + + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + Fulfillment orders are not from the same order. + """ + FULFILLMENT_ORDERS_NOT_FROM_THE_SAME_ORDER + + """ + All fulfillment orders must have status and request status compatible with reroutable states. + """ + FULFILLMENT_ORDERS_STATE_NOT_SUPPORTED + + """ + Cannot reassign location for fulfillment orders. + """ + CANNOT_REASSIGN_LOCATION_FOR_FULFILLMENT_ORDERS + + """ + The delivery method type is not supported. + """ + DELIVERY_METHOD_TYPE_NOT_SUPPORTED + + """ + This feature is only supported for multi-location shops. + """ + SINGLE_LOCATION_SHOP_NOT_SUPPORTED + + """ + Fulfillment orders must belong to the same location. + """ + FULFILLMENT_ORDERS_MUST_BELONG_TO_SAME_LOCATION + + """ + Cannot move a fulfillment order that has progress reported. + """ + CANNOT_MOVE_FULFILLMENT_ORDER_WITH_REPORTED_PROGRESS +} + +""" +Return type for `fulfillmentOrdersSetFulfillmentDeadline` mutation. +""" +type FulfillmentOrdersSetFulfillmentDeadlinePayload { + """ + Whether the fulfillment deadline was successfully set. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersSetFulfillmentDeadlineUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersSetFulfillmentDeadline`. +""" +type FulfillmentOrdersSetFulfillmentDeadlineUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersSetFulfillmentDeadlineUserError`. +""" +enum FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode { + """ + The fulfillment orders could not be found. + """ + FULFILLMENT_ORDERS_NOT_FOUND +} + +""" +The address at which the fulfillment occurred. This object is intended for tax purposes, as a full address is required for tax providers to accurately calculate taxes. Typically this is the address of the warehouse or fulfillment center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the [`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object instead. +""" +type FulfillmentOriginAddress { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The country code of the fulfillment location. + """ + countryCode: String! + + """ + The province code of the fulfillment location. + """ + provinceCode: String + + """ + The zip code of the fulfillment location. + """ + zip: String +} + +""" +The input fields used to include the address at which the fulfillment occurred. This input object is intended for tax purposes, as a full address is required for tax providers to accurately calculate taxes. Typically this is the address of the warehouse or fulfillment center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the [`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object instead. +""" +input FulfillmentOriginAddressInput { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The zip code of the fulfillment location. + """ + zip: String + + """ + The province of the fulfillment location. + """ + provinceCode: String + + """ + The country of the fulfillment location. + """ + countryCode: String! +} + +""" +A **Fulfillment Service** is a third party warehouse that prepares and ships orders +on behalf of the store owner. Fulfillment services charge a fee to package and ship items +and update product inventory levels. Some well known fulfillment services with Shopify integrations +include: Amazon, Shipwire, and Rakuten. When an app registers a new `FulfillmentService` on a store, +Shopify automatically creates a `Location` that's associated to the fulfillment service. +To learn more about fulfillment services, refer to +[Manage fulfillments as a fulfillment service app](https://shopify.dev/apps/fulfillment/fulfillment-service-apps) +guide. + +## Mutations + +You can work with the `FulfillmentService` object with the +[fulfillmentServiceCreate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceCreate), +[fulfillmentServiceUpdate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceUpdate), +and [fulfillmentServiceDelete](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceDelete) +mutations. + +## Hosted endpoints + +Fulfillment service providers integrate with Shopify by providing Shopify with a set of hosted endpoints that +Shopify can query on certain conditions. +These endpoints must have a common prefix, and this prefix should be supplied in the `callbackUrl` parameter +in the +[fulfillmentServiceCreate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceCreate) +mutation. + +- Shopify sends POST requests to the `/fulfillment_order_notification` endpoint + to notify the fulfillment service about fulfillment requests and fulfillment cancellation requests. + + For more information, refer to + [Receive fulfillment requests and cancellations](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). +- Shopify sends GET requests to the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers for orders + if `trackingSupport` is set to `true`. + + For more information, refer to + [Enable tracking support](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-8-enable-tracking-support-optional). + + Fulfillment services can also update tracking information using the + [fulfillmentTrackingInfoUpdate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate) mutation, + rather than waiting for Shopify to ask for tracking numbers. +- Shopify sends GET requests to the `/fetch_stock` endpoint to retrieve + on hand inventory levels for the fulfillment service location if `inventoryManagement` is set to `true`. + + For more information, refer to + [Sharing inventory levels with Shopify](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-10-optional-share-inventory-levels-with-shopify). + +To make sure you have everything set up correctly, you can test the `callbackUrl`-prefixed endpoints +in your development store. + +## Resources and webhooks + +There are a variety of objects and webhooks that enable a fulfillment service to work. +To exchange fulfillment information with Shopify, fulfillment services use the +[FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder), +[Fulfillment](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment) and +[Order](https://shopify.dev/api/admin-graphql/latest/objects/Order) objects and related mutations. +To act on fulfillment process events that happen on the Shopify side, +besides awaiting calls to `callbackUrl`-prefixed endpoints, +fulfillment services can subscribe to the +[fulfillment order](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#webhooks) +and [order](https://shopify.dev/api/admin-rest/latest/resources/webhook) +webhooks. +""" +type FulfillmentService { + """ + The callback URL that the fulfillment service has registered for requests. The following considerations apply: + + - Shopify queries the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the `/fetch_stock` endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the `/fulfillment_order_notification` endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support). + """ + callbackUrl: URL + + """ + Whether the fulfillment service uses the [fulfillment order based workflow](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments) for managing fulfillments. + + As the migration is now finished, the `fulfillmentOrdersOptIn` property is [deprecated]( + https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field) + and is always set to `true` on correctly functioning fulfillment services. + """ + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: "Migration period ended. All correctly functioning fulfillment services have `fulfillmentOrdersOptIn` set to `true`.") + + """ + Human-readable unique identifier for this fulfillment service. + """ + handle: String! + + """ + The ID of the fulfillment service. + """ + id: ID! + + """ + Whether the fulfillment service tracks product inventory and provides updates to Shopify. + """ + inventoryManagement: Boolean! + + """ + Location associated with the fulfillment service. + """ + location: Location + + """ + Whether the fulfillment service can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean! @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https://shopify.dev/changelog/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\nAs of API version `2026-04` this field will be removed.\n") + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean! + + """ + The name of the fulfillment service as seen by merchants. + """ + serviceName: String! + + """ + Whether the fulfillment service implemented the /fetch_tracking_numbers endpoint. + """ + trackingSupport: Boolean! + + """ + Type associated with the fulfillment service. + """ + type: FulfillmentServiceType! +} + +""" +Return type for `fulfillmentServiceCreate` mutation. +""" +type FulfillmentServiceCreatePayload { + """ + The created fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Actions that can be taken at the location when a client requests the deletion of the fulfillment service. +""" +enum FulfillmentServiceDeleteInventoryAction { + """ + Deactivate and delete the inventory and location. + """ + DELETE + + """ + Keep the inventory in place and convert the Fulfillment Service's location to be merchant managed. + """ + KEEP + + """ + Transfer the inventory and other dependencies to the provided location. + """ + TRANSFER +} + +""" +Return type for `fulfillmentServiceDelete` mutation. +""" +type FulfillmentServiceDeletePayload { + """ + The ID of the deleted fulfillment service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The type of a fulfillment service. +""" +enum FulfillmentServiceType { + """ + Fulfillment by gift card. + """ + GIFT_CARD + + """ + Manual fulfillment by the merchant. + """ + MANUAL + + """ + Fullfillment by a third-party fulfillment service. + """ + THIRD_PARTY +} + +""" +Return type for `fulfillmentServiceUpdate` mutation. +""" +type FulfillmentServiceUpdatePayload { + """ + The updated fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The status of a fulfillment. +""" +enum FulfillmentStatus { + """ + Shopify has created the fulfillment and is waiting for the third-party fulfillment service to transition it to `open` or `success`. + """ + PENDING @deprecated(reason: "This is a legacy status and is due to be deprecated.") + + """ + The third-party fulfillment service has acknowledged the fulfillment and is processing it. + """ + OPEN @deprecated(reason: "This is a legacy status and is due to be deprecated.") + + """ + The fulfillment was completed successfully. + """ + SUCCESS + + """ + The fulfillment was canceled. + """ + CANCELLED + + """ + There was an error with the fulfillment request. + """ + ERROR + + """ + The fulfillment request failed. + """ + FAILURE +} + +""" +Represents the tracking information for a fulfillment. +""" +type FulfillmentTrackingInfo { + """ + The name of the tracking company. + + For tracking company names from the list below + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + ### Supported tracking companies + + The following tracking companies display for shops located in any country: + + * 4PX + * AGS + * Amazon + * Amazon Logistics UK + * An Post + * Anjun Logistics + * APC + * Asendia USA + * Australia Post + * Bonshaw + * BPost + * BPost International + * Canada Post + * Canpar + * CDL Last Mile + * China Post + * Chronopost + * Chukou1 + * Colissimo + * Comingle + * Coordinadora + * Correios + * Correos + * CTT + * CTT Express + * Cyprus Post + * Delnext + * Deutsche Post + * DHL eCommerce + * DHL eCommerce Asia + * DHL Express + * DPD + * DPD Local + * DPD UK + * DTD Express + * DX + * Eagle + * Estes + * Evri + * FedEx + * First Global Logistics + * First Line + * FSC + * Fulfilla + * GLS + * Guangdong Weisuyi Information Technology (WSE) + * Heppner Internationale Spedition GmbH & Co. + * Iceland Post + * IDEX + * Israel Post + * Japan Post (EN) + * Japan Post (JA) + * La Poste Colissimo + * La Poste Burkina Faso + * Lasership + * Latvia Post + * Lietuvos Paštas + * Logisters + * Lone Star Overnight + * M3 Logistics + * Meteor Space + * Mondial Relay + * New Zealand Post + * NinjaVan + * North Russia Supply Chain (Shenzhen) Co. + * OnTrac + * Packeta + * Pago Logistics + * Ping An Da Tengfei Express + * Pitney Bowes + * Portal PostNord + * Poste Italiane + * PostNL + * PostNord DK + * PostNord NO + * PostNord SE + * Purolator + * Qxpress + * Qyun Express + * Royal Mail + * Royal Shipments + * Sagawa (EN) + * Sagawa (JA) + * Sendle + * SF Express + * SFC Fulfillment + * ShipBob + * SHREE NANDAN COURIER + * Singapore Post + * Southwest Air Cargo + * StarTrack + * Step Forward Freight + * Swiss Post + * TForce Final Mile + * Tinghao + * TNT + * Toll IPEC + * United Delivery Service + * UPS + * USPS + * Venipak + * We Post + * Whistl + * Wizmo + * WMYC + * Xpedigo + * XPO Logistics + * Yamato (EN) + * Yamato (JA) + * YiFan Express + * YunExpress + + The following tracking companies are displayed for shops located in specific countries: + + * **Australia**: Australia Post, Sendle, Aramex Australia, TNT Australia, Hunter Express, Couriers Please, Bonds, Allied Express, Direct Couriers, Northline, GO Logistics + * **Austria**: Österreichische Post + * **Bulgaria**: Speedy + * **Canada**: Intelcom, BoxKnight, Loomis, GLS + * **China**: China Post, DHL eCommerce Asia, WanbExpress, YunExpress, Anjun Logistics, SFC Fulfillment, FSC + * **Czechia**: Zásilkovna + * **Germany**: Deutsche Post (DE), Deutsche Post (EN), DHL, DHL Express, Swiship, Hermes, GLS + * **Spain**: SEUR + * **France**: Colissimo, Mondial Relay, Colis Privé, GLS + * **United Kingdom**: Evri, DPD UK, Parcelforce, Yodel, DHL Parcel, Tuffnells + * **Greece**: ACS Courier + * **Hong Kong SAR**: SF Express + * **Ireland**: Fastway, DPD Ireland + * **India**: DTDC, India Post, Delhivery, Gati KWE, Professional Couriers, XpressBees, Ecom Express, Ekart, Shadowfax, Bluedart + * **Italy**: BRT, GLS Italy + * **Japan**: エコ配, 西濃運輸, 西濃スーパーエキスプレス, 福山通運, 日本通運, 名鉄運輸, 第一貨物 + * **Netherlands**: DHL Parcel, DPD + * **Norway**: Bring + * **Poland**: Inpost + * **Turkey**: PTT, Yurtiçi Kargo, Aras Kargo, Sürat Kargo + * **United States**: GLS, Alliance Air Freight, Pilot Freight, LSO, Old Dominion, Pandion, R+L Carriers, Southwest Air Cargo + * **South Africa**: Fastway, Skynet. + """ + company: String + + """ + The tracking number of the fulfillment. + + The tracking number is clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking url provided in the `url` field. + * [Shopify-known tracking company name](#supported-tracking-companies) specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URL. + """ + number: String + + """ + The URLs to track the fulfillment. + + The tracking URL is displayed in the merchant's admin on the order page. + The tracking URL is displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, it's also displayed in the customer's order history. + """ + url: URL +} + +""" +Return type for `fulfillmentTrackingInfoUpdate` mutation. +""" +type FulfillmentTrackingInfoUpdatePayload { + """ + The updated fulfillment with tracking information. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentTrackingInfoUpdateV2` mutation. +""" +type FulfillmentTrackingInfoUpdateV2Payload { + """ + The updated fulfillment with tracking information. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields that specify all possible fields for tracking information. + +> Note: +> If you provide the `url` field, you should not provide the `urls` field. +> +> If you provide the `number` field, you should not provide the `numbers` field. +> +> If you provide the `url` field, you should provide the `number` field. +> +> If you provide the `urls` field, you should provide the `numbers` field. +""" +input FulfillmentTrackingInput { + """ + The tracking number of the fulfillment. + + The tracking number will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking url provided in the `url` field. + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URL. + """ + number: String + + """ + The URL to track the fulfillment. + + The tracking URL is displayed in the merchant's admin on the order page. + The tracking URL is displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, it's also displayed in the customer's order history. + + The URL must be an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and + [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + For example, `"https://www.myshipping.com/track/?tracknumbers=TRACKING_NUMBER"` is a valid URL. + It includes a scheme (`https`) and a host (`myshipping.com`). + """ + url: URL + + """ + The name of the tracking company. + + If you specify a tracking company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + The same tracking company will be applied to all tracking numbers specified. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + > Note: + > Send the tracking company name exactly as written in + > [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + > (capitalization matters). + """ + company: String + + """ + The tracking numbers of the fulfillment, one or many. + + With multiple tracking numbers, you can provide tracking information + for all shipments associated with the fulfillment, if there are more than one. + For example, if you're shipping assembly parts of one furniture item in several boxes. + + Tracking numbers will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking URLs provided in the `urls` field. + The tracking URLs will be matched to the tracking numbers based on their positions in the arrays. + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build tracking URLs automatically for all tracking numbers specified. + The same tracking company will be applied to all tracking numbers. + * Tracking numbers have a Shopify-known format. + Shopify will guess tracking providers and build tracking URLs based on the tracking number formats. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URLs. + """ + numbers: [String!] + + """ + The URLs to track the fulfillment, one or many. + + The tracking URLs are displayed in the merchant's admin on the order page. + The tracking URLs are displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, the tracking URLs are also displayed in the customer's order history. + + If you're not specifying a + [Shopify-known](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + tracking company name in the `company` field, + then provide tracking URLs for all tracking numbers from the `numbers` field. + + Tracking URLs from the `urls` array field are being matched with the tracking numbers from the `numbers` array + field correspondingly their positions in the arrays. + + Each URL must be an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and + [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + For example, `"https://www.myshipping.com/track/?tracknumbers=TRACKING_NUMBER"` is a valid URL. + It includes a scheme (`https`) and a host (`myshipping.com`). + """ + urls: [URL!] +} + +""" +The input fields used to create a fulfillment from fulfillment orders. +""" +input FulfillmentV2Input { + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput + + """ + Whether the customer is notified. + If `true`, then a notification is sent when the fulfillment is created. The default value is `false`. + """ + notifyCustomer: Boolean = false + + """ + Pairs of `fulfillment_order_id` and `fulfillment_order_line_items` that represent the fulfillment + order line items that have to be fulfilled for each fulfillment order. For any given pair, if the + fulfillment order line items are left blank then all the fulfillment order line items of the + associated fulfillment order ID will be fulfilled. + """ + lineItemsByFulfillmentOrder: [FulfillmentOrderLineItemsInput!]! + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput +} + +""" +The App Bridge information for a Shopify Function. +""" +type FunctionsAppBridge { + """ + The relative path for creating a customization. + """ + createPath: String! + + """ + The relative path for viewing a customization. + """ + detailsPath: String! +} + +""" +The error history from running a Shopify Function. +""" +type FunctionsErrorHistory { + """ + The date and time that the first error occurred. + """ + errorsFirstOccurredAt: DateTime! + + """ + The date and time that the first error occurred. + """ + firstOccurredAt: DateTime! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasBeenSharedSinceLastError: Boolean! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasSharedRecentErrors: Boolean! +} + +""" +Represents any file other than HTML. +""" +type GenericFile implements File & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The generic file's MIME type. + """ + mimeType: String + + """ + The generic file's size in bytes. + """ + originalFileSize: Int + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! + + """ + The generic file's URL. + """ + url: URL +} + +""" +A gift card that customers use as a payment method. Stores the initial value, current balance, and expiration date. + +You can issue gift cards to a specific [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) or send them to a [`GiftCardRecipient`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardRecipient) with a personalized message. The card tracks its transaction history through [`GiftCardCreditTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardCreditTransaction) and [`GiftCardDebitTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardDebitTransaction) records. You can create and deactivate gift cards using the [`GiftCardCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardCreate) and [`GiftCardDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardDeactivate) mutations, respectively. + +> Note: After a gift card is deactivated, it can't be used for further purchases or re-enabled. +""" +type GiftCard implements Node { + """ + The gift card's remaining balance. + """ + balance: MoneyV2! + + """ + The date and time at which the gift card was created. + """ + createdAt: DateTime! + + """ + The customer who will receive the gift card. + """ + customer: Customer + + """ + The date and time at which the gift card was deactivated. + """ + deactivatedAt: DateTime + + """ + Whether the gift card is enabled. + """ + enabled: Boolean! + + """ + The date at which the gift card will expire. + """ + expiresOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The initial value of the gift card. + """ + initialValue: MoneyV2! + + """ + The final four characters of the gift card code. + """ + lastCharacters: String! + + """ + The gift card code. Everything but the final four characters is masked. + """ + maskedCode: String! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The order associated with the gift card. This value is `null` if the gift card was issued manually. + """ + order: Order + + """ + The recipient who will receive the gift card. + """ + recipientAttributes: GiftCardRecipient + + """ + The theme template used to render the gift card online. + """ + templateSuffix: String + + """ + The transaction history of the gift card. + """ + transactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): GiftCardTransactionConnection + + """ + The date and time at which the gift card was updated. + """ + updatedAt: DateTime! +} + +""" +Represents information about the configuration of gift cards on the shop. +""" +type GiftCardConfiguration { + """ + The issue limit for gift cards in the default shop currency. + """ + issueLimit: MoneyV2! + + """ + The purchase limit for gift cards in the default shop currency. + """ + purchaseLimit: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple GiftCards. +""" +type GiftCardConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardEdge!]! + + """ + A list of nodes that are contained in GiftCardEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [GiftCard!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to issue a gift card. +""" +input GiftCardCreateInput { + """ + The initial value of the gift card. + """ + initialValue: Decimal! + + """ + The gift card's code. It must be 8-20 characters long and contain only letters(a-z) and numbers(0-9). + It isn't case sensitive. If not provided, then a random code will be generated. + """ + code: String + + """ + The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. + """ + customerId: ID + + """ + The date at which the gift card will expire. If not provided, then the gift card will never expire. + """ + expiresOn: Date + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The recipient attributes of the gift card. + """ + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + If not provided, then the default `gift_card.liquid` template is used. + """ + templateSuffix: String +} + +""" +Return type for `giftCardCreate` mutation. +""" +type GiftCardCreatePayload { + """ + The created gift card. + """ + giftCard: GiftCard + + """ + The created gift card's code. + """ + giftCardCode: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardUserError!]! +} + +""" +The input fields for a gift card credit transaction. +""" +input GiftCardCreditInput { + """ + The amount to credit the gift card. + """ + creditAmount: MoneyInput! + + """ + A note about the credit. + """ + note: String + + """ + The date and time the credit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +""" +Return type for `giftCardCredit` mutation. +""" +type GiftCardCreditPayload { + """ + The gift card credit transaction that was created. + """ + giftCardCreditTransaction: GiftCardCreditTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardTransactionUserError!]! +} + +""" +A credit transaction which increases the gift card balance. +""" +type GiftCardCreditTransaction implements GiftCardTransaction & HasMetafields & Node { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +Return type for `giftCardDeactivate` mutation. +""" +type GiftCardDeactivatePayload { + """ + The deactivated gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardDeactivateUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardDeactivate`. +""" +type GiftCardDeactivateUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardDeactivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardDeactivateUserError`. +""" +enum GiftCardDeactivateUserErrorCode { + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND +} + +""" +The input fields for a gift card debit transaction. +""" +input GiftCardDebitInput { + """ + The amount to debit the gift card. + """ + debitAmount: MoneyInput! + + """ + A note about the debit. + """ + note: String + + """ + The date and time the debit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +""" +Return type for `giftCardDebit` mutation. +""" +type GiftCardDebitPayload { + """ + The gift card debit transaction that was created. + """ + giftCardDebitTransaction: GiftCardDebitTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardTransactionUserError!]! +} + +""" +A debit transaction which decreases the gift card balance. +""" +type GiftCardDebitTransaction implements GiftCardTransaction & HasMetafields & Node { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +An auto-generated type which holds one GiftCard and a cursor during pagination. +""" +type GiftCardEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of GiftCardEdge. + """ + node: GiftCard! +} + +""" +Possible error codes that can be returned by `GiftCardUserError`. +""" +enum GiftCardErrorCode { + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is invalid. + """ + INVALID + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + The input value should be greater than the minimum allowed value. + """ + GREATER_THAN + + """ + The gift card's value exceeds the allowed limits. + """ + GIFT_CARD_LIMIT_EXCEEDED + + """ + The customer could not be found. + """ + CUSTOMER_NOT_FOUND + + """ + The recipient could not be found. + """ + RECIPIENT_NOT_FOUND +} + +""" +Represents a recipient who will receive the issued gift card. +""" +type GiftCardRecipient { + """ + The message sent with the gift card. + """ + message: String + + """ + The preferred name of the recipient who will receive the gift card. + """ + preferredName: String + + """ + The recipient who will receive the gift card. + """ + recipient: Customer! + + """ + The scheduled datetime on which the gift card will be sent to the recipient. The gift card will be sent within an hour of the specified datetime. + """ + sendNotificationAt: DateTime +} + +""" +The input fields to add a recipient to a gift card. +""" +input GiftCardRecipientInput { + """ + The ID of the customer who will be the recipient of the gift card. Requires `write_customers` access_scope. + """ + id: ID! + + """ + The preferred name of the recipient. + """ + preferredName: String + + """ + The personalized message intended for the recipient. + """ + message: String + + """ + The scheduled datetime on which the gift card will be sent to the recipient. The gift card will be sent within an hour of the specified datetime. + """ + sendNotificationAt: DateTime +} + +""" +A sale associated with a gift card. +""" +type GiftCardSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line item for the associated sale. + """ + lineItem: LineItem! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +Return type for `giftCardSendNotificationToCustomer` mutation. +""" +type GiftCardSendNotificationToCustomerPayload { + """ + The gift card that was sent. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardSendNotificationToCustomerUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToCustomer`. +""" +type GiftCardSendNotificationToCustomerUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardSendNotificationToCustomerUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToCustomerUserError`. +""" +enum GiftCardSendNotificationToCustomerUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The customer could not be found. + """ + CUSTOMER_NOT_FOUND + + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND +} + +""" +Return type for `giftCardSendNotificationToRecipient` mutation. +""" +type GiftCardSendNotificationToRecipientPayload { + """ + The gift card that was sent. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardSendNotificationToRecipientUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToRecipient`. +""" +type GiftCardSendNotificationToRecipientUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardSendNotificationToRecipientUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToRecipientUserError`. +""" +enum GiftCardSendNotificationToRecipientUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The recipient could not be found. + """ + RECIPIENT_NOT_FOUND + + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND +} + +""" +The set of valid sort keys for the GiftCard query. +""" +enum GiftCardSortKeys { + """ + Sort by the `amount_spent` value. + """ + AMOUNT_SPENT + + """ + Sort by the `balance` value. + """ + BALANCE + + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `disabled_at` value. + """ + DISABLED_AT + + """ + Sort by the `expires_on` value. + """ + EXPIRES_ON + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `initial_value` value. + """ + INITIAL_VALUE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Interface for a gift card transaction. +""" +interface GiftCardTransaction implements HasMetafields { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + The unique ID for the transaction. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple GiftCardTransactions. +""" +type GiftCardTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardTransactionEdge!]! + + """ + A list of nodes that are contained in GiftCardTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [GiftCardTransaction!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one GiftCardTransaction and a cursor during pagination. +""" +type GiftCardTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of GiftCardTransactionEdge. + """ + node: GiftCardTransaction! +} + +""" +Represents an error that happens during the execution of a gift card transaction mutation. +""" +type GiftCardTransactionUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardTransactionUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardTransactionUserError`. +""" +enum GiftCardTransactionUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The gift card's value exceeds the allowed limits. + """ + GIFT_CARD_LIMIT_EXCEEDED + + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND + + """ + A positive amount must be used. + """ + NEGATIVE_OR_ZERO_AMOUNT + + """ + The gift card does not have sufficient funds to satisfy the request. + """ + INSUFFICIENT_FUNDS + + """ + The currency provided does not match the currency of the gift card. + """ + MISMATCHING_CURRENCY +} + +""" +The input fields to update a gift card. +""" +input GiftCardUpdateInput { + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The date at which the gift card will expire. If set to `null`, then the gift card will never expire. + """ + expiresOn: Date + + """ + The ID of the customer who will receive the gift card. The ID can't be changed if the gift card already has an assigned customer ID. + """ + customerId: ID + + """ + The recipient attributes of the gift card. + """ + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + """ + templateSuffix: String +} + +""" +Return type for `giftCardUpdate` mutation. +""" +type GiftCardUpdatePayload { + """ + The updated gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents an error that happens during the execution of a gift card mutation. +""" +type GiftCardUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a +complete list of HTML elements. + +Example value: `"

Grey cotton knit sweater.

"` +""" +scalar HTML + +""" +Represents a summary of the current version of data in a resource. + +The `compare_digest` field can be used as input for mutations that implement a compare-and-swap mechanism. +""" +interface HasCompareDigest { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! +} + +""" +Represents an object that has a list of events. +""" +interface HasEvents { + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! +} + +""" +Localization extensions associated with the specified resource. For example, the tax id for government invoice. +""" +interface HasLocalizationExtensions { + """ + List of localization extensions for the resource. + """ + localizationExtensions("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizationExtensionPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") +} + +""" +Localized fields associated with the specified resource. +""" +interface HasLocalizedFields { + """ + List of localized fields for the resource. + """ + localizedFields("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizedFieldPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizedFieldConnection! +} + +""" +Resources that metafield definitions can be applied to. +""" +interface HasMetafieldDefinitions { + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") +} + +""" +Represents information about the metafields associated to the specified resource. +""" +interface HasMetafields { + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! +} + +""" +The input fields that identify metafield definitions. +""" +input HasMetafieldsMetafieldIdentifierInput { + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! +} + +""" +Published translations associated with the resource. +""" +interface HasPublishedTranslations { + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +Represents information about the store credit accounts associated to the specified owner. +""" +interface HasStoreCreditAccounts { + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| currency_code | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): StoreCreditAccountConnection! +} + +""" +Represents a unique identifier, often used to refetch an object. +The ID type appears in a JSON response as a String, but it is not intended to be human-readable. + +Example value: `"gid://shopify/Product/10079785100"` +""" +scalar ID + +""" +Represents an image resource. +""" +type Image implements HasMetafields & HasPublishedTranslations { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + height: Int + + """ + A unique ID for the image. + """ + id: ID + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The location of the original image as a URL. + + If there are any existing transformations in the original source URL, they will remain and not be stripped. + """ + originalSrc: URL! @deprecated(reason: "Use `url` instead.") + + """ + The location of the image as a URL. + """ + src: URL! @deprecated(reason: "Use `url` instead.") + + """ + The ThumbHash of the image. + + Useful to display placeholder images while the original image is loading. + """ + thumbhash: String + + """ + The location of the transformed image as a URL. + + All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. + Otherwise any transformations which an image type doesn't support will be ignored. + """ + transformedSrc("Image width in pixels between 1 and 5760." maxWidth: Int, "Image height in pixels between 1 and 5760." maxHeight: Int, "Crops the image according to the specified region." crop: CropRegion, "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1, "Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported)." preferredContentType: ImageContentType): URL! @deprecated(reason: "Use `url(transform:)` instead") + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The location of the image as a URL. + + If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + + All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + + If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). + """ + url("A set of options to transform the original image." transform: ImageTransformInput): URL! + + """ + The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + width: Int +} + +""" +An auto-generated type for paginating through multiple Images. +""" +type ImageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ImageEdge!]! + + """ + A list of nodes that are contained in ImageEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Image!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +List of supported image content types. +""" +enum ImageContentType { + """ + A PNG image. + """ + PNG + + """ + A JPG image. + """ + JPG + + """ + A WEBP image. + """ + WEBP +} + +""" +An auto-generated type which holds one Image and a cursor during pagination. +""" +type ImageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ImageEdge. + """ + node: Image! +} + +""" +The input fields for an image. +""" +input ImageInput { + """ + A globally-unique ID. + """ + id: ID + + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + The URL of the image. May be a staged upload URL. + """ + src: String +} + +""" +The available options for transforming an image. + +All transformation options are considered best effort. Any transformation that the original image type doesn't support will be ignored. +""" +input ImageTransformInput { + """ + The region of the image to remain after cropping. + Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, where the `maxWidth` and `maxHeight` aren't equal. + The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while + a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ maxWidth: 5, maxHeight: 10, crop: LEFT }` will result + in an image with a width of 5 and height of 10, where the right side of the image is removed. + """ + crop: CropRegion + + """ + Image width in pixels between 1 and 5760. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 5760. + """ + maxHeight: Int + + """ + Image size multiplier for high-resolution retina displays. Must be within 1..3. + """ + scale: Int = 1 + + """ + Convert the source image into the preferred content type. + Supported conversions: `.svg` to `.png`, any file type to `.jpg`, and any file type to `.webp`. + """ + preferredContentType: ImageContentType +} + +""" +A parameter to upload an image. + +Deprecated in favor of +[StagedUploadParameter](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadParameter), +which is used in +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget) +and returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type ImageUploadParameter { + """ + The parameter name. + """ + name: String! + + """ + The parameter value. + """ + value: String! +} + +""" +Answers the question if prices include duties and / or taxes. +""" +enum InclusiveDutiesPricingStrategy { + """ + Add duties at checkout when configured to collect. + """ + ADD_DUTIES_AT_CHECKOUT + + """ + Include duties in price when configured to collect. + """ + INCLUDE_DUTIES_IN_PRICE +} + +""" +Answers the question if prices include duties and / or taxes. +""" +enum InclusiveTaxPricingStrategy { + """ + Add taxes at checkout when configured to collect. + """ + ADD_TAXES_AT_CHECKOUT + + """ + Include taxes in price when configured to collect. + """ + INCLUDES_TAXES_IN_PRICE + + """ + Include taxes in price based on country when configured to collect. + """ + INCLUDES_TAXES_IN_PRICE_BASED_ON_COUNTRY +} + +""" +The input fields for the incoming line item. +""" +input IncomingRequestLineItemInput { + """ + The ID of the rejected line item. + """ + fulfillmentOrderLineItemId: ID! + + """ + The rejection message of the line item. + """ + message: String +} + +""" +Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +""" +scalar Int + +""" +Return type for `inventoryActivate` mutation. +""" +type InventoryActivatePayload { + """ + The inventory level that was activated. + """ + inventoryLevel: InventoryLevel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields required to adjust inventory quantities. +""" +input InventoryAdjustQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + to be adjusted. + """ + name: String! + + """ + A URI that represents why the inventory change happened, identifying the source system and document that caused this adjustment. Enables complete audit trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """ + The quantity changes of items at locations to be made. + """ + changes: [InventoryChangeInput!]! +} + +""" +Return type for `inventoryAdjustQuantities` mutation. +""" +type InventoryAdjustQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryAdjustQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryAdjustQuantities`. +""" +type InventoryAdjustQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryAdjustQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryAdjustQuantitiesUserError`. +""" +enum InventoryAdjustQuantitiesUserErrorCode { + """ + Internal (gid://shopify/) ledger documents are not allowed to be adjusted via API. + """ + INTERNAL_LEDGER_DOCUMENT + + """ + A ledger document URI is not allowed when adjusting available. + """ + INVALID_AVAILABLE_DOCUMENT + + """ + The specified inventory item could not be found. + """ + INVALID_INVENTORY_ITEM + + """ + The specified ledger document is invalid. + """ + INVALID_LEDGER_DOCUMENT + + """ + The specified location could not be found. + """ + INVALID_LOCATION + + """ + A ledger document URI is required except when adjusting available. + """ + INVALID_QUANTITY_DOCUMENT + + """ + The specified quantity name is invalid. + """ + INVALID_QUANTITY_NAME + + """ + The quantity can't be lower than -2,000,000,000. + """ + INVALID_QUANTITY_TOO_LOW + + """ + The quantity can't be higher than 2,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_DOCUMENT + + """ + The service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE + + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The quantities couldn't be adjusted. Try again. + """ + ADJUST_QUANTITIES_FAILED + + """ + All changes must have the same ledger document URI or, in the case of adjusting available, no ledger document URI. + """ + MAX_ONE_LEDGER_DOCUMENT + + """ + The inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +Records a batch of inventory changes made together in a single operation. Tracks which [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) or [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) initiated the changes, when they occurred, and why they were made. + +Provides an audit trail through its reason and reference document URI. The reference document URI links to the source that triggered the adjustment, such as an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer), or external system event. Use the [`changes`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup#field-InventoryAdjustmentGroup.fields.changes) field to retrieve the specific quantity adjustments for each inventory state at affected [locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). +""" +type InventoryAdjustmentGroup implements Node { + """ + The app that triggered the inventory event, if one exists. + """ + app: App + + """ + The set of inventory quantity changes that occurred in the inventory event. + """ + changes("The IDs of the inventory items to filter changes by." inventoryItemIds: [ID!], "The IDs of the locations to filter changes by." locationIds: [ID!], "The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states)\nof the requested inventory quantities." quantityNames: [String!]): [InventoryChange!]! + + """ + The date and time the inventory adjustment group was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The reason for the group of adjustments. + """ + reason: String! + + """ + A freeform URI that represents why the inventory change happened. This can be the entity adjusting inventory + quantities or the Shopify resource that's associated with the inventory adjustment. For example, a unit in a + draft order might have been previously reserved, and a merchant later creates an order from the draft order. + In this case, the `referenceDocumentUri` for the inventory adjustment is a URI referencing the order ID. + """ + referenceDocumentUri: String + + """ + The staff member associated with the inventory event. + """ + staffMember: StaffMember +} + +""" +The input fields required to adjust the available quantity of a product variant at a location. +""" +input InventoryAdjustmentInput { + """ + The ID of the location where the available quantity should be adjusted. + """ + locationId: ID! + + """ + The adjustment of the available quantity at the location. If the value is `null`, then the product variant is no longer stocked at the location. + """ + adjustment: Int + + """ + The quantity to compare against before applying the delta. + """ + changeFromQuantity: Int +} + +""" +The input fields to specify whether the inventory item should be activated or not at the specified location. +""" +input InventoryBulkToggleActivationInput { + """ + The ID of the location to modify the inventory item's stocked status. + """ + locationId: ID! + + """ + Whether the inventory item can be stocked at the specified location. To deactivate, set the value to false which removes an inventory item's quantities from that location, and turns off inventory at that location. + """ + activate: Boolean! +} + +""" +Return type for `inventoryBulkToggleActivation` mutation. +""" +type InventoryBulkToggleActivationPayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The activated inventory levels. + """ + inventoryLevels: [InventoryLevel!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryBulkToggleActivationUserError!]! +} + +""" +An error that occurred while setting the activation status of an inventory item. +""" +type InventoryBulkToggleActivationUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryBulkToggleActivationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryBulkToggleActivationUserError`. +""" +enum InventoryBulkToggleActivationUserErrorCode { + """ + An error occurred while setting the activation status. + """ + GENERIC_ERROR + + """ + Cannot unstock an inventory item from the only location at which it is stocked. + """ + CANNOT_DEACTIVATE_FROM_ONLY_LOCATION + + """ + Cannot unstock this inventory item from this location because it has committed and incoming quantities. + """ + COMMITTED_AND_INCOMING_INVENTORY_AT_LOCATION @deprecated(reason: "This error code is deprecated. Both INCOMING_INVENTORY_AT_LOCATION and COMMITTED_INVENTORY_AT_LOCATION codes will be returned as individual errors instead.") + + """ + Cannot unstock this inventory item from this location because it has incoming quantities. + """ + INCOMING_INVENTORY_AT_LOCATION + + """ + Cannot unstock this inventory item from this location because it has committed quantities. + """ + COMMITTED_INVENTORY_AT_LOCATION + + """ + Cannot unstock this inventory item from this location because it has unavailable quantities. + """ + RESERVED_INVENTORY_AT_LOCATION + + """ + Failed to unstock this inventory item from this location. + """ + FAILED_TO_UNSTOCK_FROM_LOCATION + + """ + Cannot stock this inventory item at this location because it is managed by a third-party fulfillment service. + """ + INVENTORY_MANAGED_BY_3RD_PARTY + + """ + Cannot stock this inventory item at this location because it is managed by Shopify. + """ + INVENTORY_MANAGED_BY_SHOPIFY + + """ + Failed to stock this inventory item at this location. + """ + FAILED_TO_STOCK_AT_LOCATION + + """ + Cannot stock this inventory item at this location because the variant is missing a SKU. + """ + MISSING_SKU + + """ + The location was not found. + """ + LOCATION_NOT_FOUND + + """ + The inventory item was not found. + """ + INVENTORY_ITEM_NOT_FOUND +} + +""" +A change in an inventory quantity of an inventory item at a location. Each change tracks how inventory moves between different states like available, committed, reserved, or damaged. + +The change captures the [amount changed](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryChange#field-InventoryChange.fields.delta), the resulting [quantity](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryChange#field-InventoryChange.fields.quantityAfterChange), and links to the associated [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) and [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). + +The [`name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryChange#field-InventoryChange.fields.name) field indicates which inventory state changed, such as `available`, `reserved`, or `damaged`. The [`ledgerDocumentUri`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryChange#field-InventoryChange.fields.ledgerDocumentUri) field provides an audit trail by referencing the source document or system that triggered the change. +""" +type InventoryChange { + """ + The amount by which the inventory quantity was changed. + """ + delta: Int! + + """ + The inventory item associated with this inventory change. + """ + item: InventoryItem + + """ + A URI that represents what the inventory quantity change was applied to. + """ + ledgerDocumentUri: String + + """ + The location associated with this inventory change. + """ + location: Location + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + of the inventory quantity that was changed. + """ + name: String! + + """ + The quantity of named inventory after the change. + """ + quantityAfterChange: Int +} + +""" +The input fields for the change to be made to an inventory item at a location. +""" +input InventoryChangeInput { + """ + The amount by which the inventory quantity will be changed. + """ + delta: Int! + + """ + The quantity currently expected at this location, before the delta is applied. + + This field enables a compare-and-swap (CAS) safety check. If the location’s current quantity doesn't equal the value you provide, then the mutation fails with a `CHANGE_FROM_QUANTITY_STALE` error. This prevents accidental overwrites when the client is operating on stale inventory data. + + To skip the CAS check, pass `null`. This is appropriate when your system is the source of truth for inventory at this location and you don’t need protection against concurrent updates. + + For more information, refer to the [compare and swap documentation](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). + """ + changeFromQuantity: Int + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the change will be applied. + """ + locationId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or ledger entry was changed. Represents the exact inventory movement being referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Required for all quantity names except `available`. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: String +} + +""" +Return type for `inventoryDeactivate` mutation. +""" +type InventoryDeactivatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A [product variant's](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) inventory information across all locations. The inventory item connects the product variant to its [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) at different locations, tracking stock keeping unit (SKU), whether quantities are tracked, shipping requirements, and customs information for the product. + +Learn more about [inventory object relationships](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryItem implements LegacyInteroperability & Node { + """ + The ISO 3166-1 alpha-2 country code of where the item originated from. + """ + countryCodeOfOrigin: CountryCode + + """ + A list of country specific harmonized system codes. + """ + countryHarmonizedSystemCodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CountryHarmonizedSystemCodeConnection! + + """ + The date and time when the inventory item was created. + """ + createdAt: DateTime! + + """ + The number of inventory items that share the same SKU with this item. + """ + duplicateSkuCount: Int! + + """ + The harmonized system code of the item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL that points to the inventory history for the item. + """ + inventoryHistoryUrl: URL + + """ + The inventory item's quantities at the specified location. + """ + inventoryLevel("ID of the location for which the inventory level is requested." locationId: ID!): InventoryLevel + + """ + A list of the inventory item's quantities for each location that the inventory item can be stocked at. + """ + inventoryLevels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_group_id | id |\n| inventory_item_id | id |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryLevelConnection! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The number of locations where this inventory item is stocked. + """ + locationsCount: Count + + """ + The packaging dimensions of the inventory item. + """ + measurement: InventoryItemMeasurement! + + """ + The ISO 3166-2 alpha-2 province code of where the item originated from. + """ + provinceCodeOfOrigin: String + + """ + Whether the inventory item requires shipping. + """ + requiresShipping: Boolean! + + """ + Inventory item SKU. Case-sensitive string. + """ + sku: String + + """ + Whether inventory levels are tracked for the item. + """ + tracked: Boolean! + + """ + Whether the value of the `tracked` field for the inventory item can be changed. + """ + trackedEditable: EditableProperty! + + """ + Unit cost associated with the inventory item. Note: the user must have "View product costs" permission granted in order to access this field once product granular permissions are enabled. + """ + unitCost: MoneyV2 + + """ + The date and time when the inventory item was updated. + """ + updatedAt: DateTime! + + """ + The variant that owns this inventory item. + """ + variant: ProductVariant! @deprecated(reason: "Use `variants` instead.") + + """ + A paginated list of the variants that reference this inventory item. + """ + variants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): ProductVariantConnection +} + +""" +An auto-generated type for paginating through multiple InventoryItems. +""" +type InventoryItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryItemEdge!]! + + """ + A list of nodes that are contained in InventoryItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryItem and a cursor during pagination. +""" +type InventoryItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryItemEdge. + """ + node: InventoryItem! +} + +""" +The input fields for an inventory item. +""" +input InventoryItemInput { + """ + The SKU (stock keeping unit) of the inventory item. + """ + sku: String + + """ + Unit cost associated with the inventory item, the currency is the shop's default currency. + """ + cost: Decimal + + """ + Whether the inventory item is tracked. + """ + tracked: Boolean + + """ + The country where the item was manufactured or produced, specified using the standard two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. + """ + countryCodeOfOrigin: CountryCode + + """ + The harmonized system code of the inventory item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """ + List of country-specific harmonized system codes. + """ + countryHarmonizedSystemCodes: [CountryHarmonizedSystemCodeInput!] + + """ + The province where the item was manufactured or produced, specified using the standard two-letter [ISO 3166-2 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) province code. + """ + provinceCodeOfOrigin: String + + """ + The measurements of an inventory item. + """ + measurement: InventoryItemMeasurementInput + + """ + Whether the inventory item needs to be physically shipped to the customer. Items that require shipping are physical products, while digital goods and services typically don't require shipping and can be fulfilled electronically. + """ + requiresShipping: Boolean +} + +""" +Weight information for an [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) when packaged. Provides the weight specification used for inventory management and shipping calculations. Learn more about [managing inventory](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps). +""" +type InventoryItemMeasurement implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The weight of the inventory item. + """ + weight: Weight +} + +""" +The input fields for an inventory item measurement. +""" +input InventoryItemMeasurementInput { + """ + The weight of the inventory item. + """ + weight: WeightInput + + """ + Shipping package associated with inventory item. + """ + shippingPackageId: ID +} + +""" +Return type for `inventoryItemUpdate` mutation. +""" +type InventoryItemUpdatePayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The quantities of an inventory item at a specific location. Each inventory level connects one [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) to one [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location), tracking multiple quantity states like available, on-hand, incoming, and committed. + +The [`quantities`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel#field-InventoryLevel.fields.quantities) field provides access to different inventory states. Learn [more about inventory states and relationships](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryLevel implements Node { + """ + Whether the inventory items associated with the inventory level can be deactivated. + """ + canDeactivate: Boolean! + + """ + The date and time when the inventory level was created. + """ + createdAt: DateTime! + + """ + Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated. + """ + deactivationAlert: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + Inventory item associated with the inventory level. + """ + item: InventoryItem! + + """ + The location associated with the inventory level. + """ + location: Location! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantities("The\n[names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states)\nof the requested inventory quantities." names: [String!]!): [InventoryQuantity!]! + + """ + Scheduled changes for the requested quantity names. + """ + scheduledChanges("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ScheduledChangeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| expected_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| quantity_names | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryScheduledChangeConnection! @deprecated(reason: "Scheduled changes will be phased out in a future version.") + + """ + The date and time when the inventory level was updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple InventoryLevels. +""" +type InventoryLevelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryLevelEdge!]! + + """ + A list of nodes that are contained in InventoryLevelEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryLevel!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryLevel and a cursor during pagination. +""" +type InventoryLevelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryLevelEdge. + """ + node: InventoryLevel! +} + +""" +The input fields for an inventory level. +""" +input InventoryLevelInput { + """ + The available quantity of an inventory item at a location. + """ + availableQuantity: Int! + + """ + The ID of a location associated with the inventory level. + """ + locationId: ID! +} + +""" +The input fields required to move inventory quantities. +""" +input InventoryMoveQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the source system and document that caused this adjustment. Enables complete audit trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String! + + """ + The quantity changes of items at locations to be made. + """ + changes: [InventoryMoveQuantityChange!]! +} + +""" +Return type for `inventoryMoveQuantities` mutation. +""" +type InventoryMoveQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryMoveQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryMoveQuantities`. +""" +type InventoryMoveQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryMoveQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryMoveQuantitiesUserError`. +""" +enum InventoryMoveQuantitiesUserErrorCode { + """ + Internal (gid://shopify/) ledger documents are not allowed to be adjusted via API. + """ + INTERNAL_LEDGER_DOCUMENT + + """ + A ledger document URI is not allowed when adjusting available. + """ + INVALID_AVAILABLE_DOCUMENT + + """ + The specified inventory item could not be found. + """ + INVALID_INVENTORY_ITEM + + """ + The specified ledger document is invalid. + """ + INVALID_LEDGER_DOCUMENT + + """ + The specified location could not be found. + """ + INVALID_LOCATION + + """ + A ledger document URI is required except when adjusting available. + """ + INVALID_QUANTITY_DOCUMENT + + """ + The specified quantity name is invalid. + """ + INVALID_QUANTITY_NAME + + """ + The quantity can't be negative. + """ + INVALID_QUANTITY_NEGATIVE + + """ + The quantity can't be higher than 2,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_DOCUMENT + + """ + The service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE + + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The quantities couldn't be moved. Try again. + """ + MOVE_QUANTITIES_FAILED + + """ + The quantities can't be moved between different locations. + """ + DIFFERENT_LOCATIONS + + """ + The quantity names for each change can't be the same. + """ + SAME_QUANTITY_NAME + + """ + Only a maximum of 2 ledger document URIs across all changes is allowed. + """ + MAXIMUM_LEDGER_DOCUMENT_URIS + + """ + The inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +Represents the change to be made to an inventory item at a location. +The change can either involve the same quantity name between different locations, +or involve different quantity names between the same location. +""" +input InventoryMoveQuantityChange { + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! + + """ + The amount by which the inventory quantity will be changed. + """ + quantity: Int! + + """ + Details about where the move will be made from. + """ + from: InventoryMoveQuantityTerminalInput! + + """ + Details about where the move will be made to. + """ + to: InventoryMoveQuantityTerminalInput! +} + +""" +The input fields representing the change to be made to an inventory item at a location. +""" +input InventoryMoveQuantityTerminalInput { + """ + Specifies the location at which the change will be applied. + """ + locationId: ID! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) to be + moved. + """ + name: String! + + """ + A non-Shopify URI that identifies what specific inventory transaction or ledger entry was changed. Represents the exact inventory movement being referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Required for all quantity names except `available`. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: String + + """ + The quantity currently expected at this location, before the move is applied. + + This field enables a compare-and-swap (CAS) safety check. If the location’s current quantity doesn't match the value you provide, then the mutation fails with a `CHANGE_FROM_QUANTITY_STALE` error. This helps prevent unintended overwrites when the request is based on stale inventory data. + + To skip the CAS check, pass `null`. This is appropriate when your system is the source of truth for inventory at this location and you don’t need to guard against concurrent updates. + + For more information, refer to the [compare and swap documentation](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). + """ + changeFromQuantity: Int +} + +""" +General inventory properties for the shop. +""" +type InventoryProperties { + """ + All the quantity names. + """ + quantityNames: [InventoryQuantityName!]! +} + +""" +The `InventoryQuantity` object lets you manage and track inventory quantities for specific [states](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). +Inventory quantities represent different states of items such as available for purchase, committed to orders, reserved for drafts, incoming from suppliers, or set aside for quality control or safety stock. + +You can use [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel) to manage where inventory items are stocked. You can also [make inventory adjustments](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) to apply changes to inventory quantities. + +Inventory quantities can be managed by a merchant or by [fulfillment services](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentservice) that handle inventory tracking. +Learn more about working with [Shopify's inventory management system](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps). +""" +type InventoryQuantity implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory state [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + that identifies the inventory quantity. + """ + name: String! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantity: Int! + + """ + When the inventory quantity was last updated. + """ + updatedAt: DateTime +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventoryQuantityInput { + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! + + """ + The current quantity to be compared against the persisted quantity. + """ + compareQuantity: Int @deprecated(reason: "Use `changeFromQuantity` instead. This will be removed in 2026-04.") + + """ + The quantity currently expected at this location, before setting the new quantity. + + This field enables a compare-and-swap (CAS) safety check. If the location’s current quantity doesn't match the value you provide, then the mutation fails with a `CHANGE_FROM_QUANTITY_STALE` error. This helps prevent unintended overwrites when the request is based on stale inventory data. + + To skip the CAS check, pass `null`. This is appropriate when your system is the source of truth for inventory at this location and you don’t need to guard against concurrent updates. + + For more information, refer to the [compare and swap documentation](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). + """ + changeFromQuantity: Int +} + +""" +Details about an individual quantity name. +""" +type InventoryQuantityName { + """ + List of quantity names that this quantity name belongs to. + """ + belongsTo: [String!]! + + """ + List of quantity names that comprise this quantity name. + """ + comprises: [String!]! + + """ + The display name for quantity names translated into applicable language. + """ + displayName: String + + """ + Whether the quantity name has been used by the merchant. + """ + isInUse: Boolean! + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) of + the inventory quantity. Used by + [inventory queries and mutations](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#graphql-queries-and-mutations). + """ + name: String! +} + +""" +Returns the scheduled changes to inventory states related to the ledger document. +""" +type InventoryScheduledChange { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantities of an inventory item that are related to a specific location. + """ + inventoryLevel: InventoryLevel! + + """ + A freeform URI that represents what changed the inventory quantities. + """ + ledgerDocumentUri: URL! + + """ + The quantity of the scheduled change associated with the ledger document in the `fromName` state. + """ + quantity: Int! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +An auto-generated type for paginating through multiple InventoryScheduledChanges. +""" +type InventoryScheduledChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryScheduledChangeEdge!]! + + """ + A list of nodes that are contained in InventoryScheduledChangeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryScheduledChange!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryScheduledChange and a cursor during pagination. +""" +type InventoryScheduledChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryScheduledChangeEdge. + """ + node: InventoryScheduledChange! +} + +""" +The input fields for a scheduled change of an inventory item. +""" +input InventoryScheduledChangeInput { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +The input fields for the inventory item associated with the scheduled changes that need to be applied. +""" +input InventoryScheduledChangeItemInput { + """ + The ID of the inventory item. + """ + inventoryItemId: ID! + + """ + The ID of the location. + """ + locationId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or ledger entry was changed. Represents the exact inventory movement being referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: URL! + + """ + An array of all the scheduled changes for the item. + """ + scheduledChanges: [InventoryScheduledChangeInput!]! +} + +""" +The input fields required to set inventory on hand quantities. +""" +input InventorySetOnHandQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the source system and document that caused this adjustment. Enables complete audit trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """ + The value to which the on hand quantity will be set. + """ + setQuantities: [InventorySetQuantityInput!]! +} + +""" +Return type for `inventorySetOnHandQuantities` mutation. +""" +type InventorySetOnHandQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetOnHandQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetOnHandQuantities`. +""" +type InventorySetOnHandQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetOnHandQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetOnHandQuantitiesUserError`. +""" +enum InventorySetOnHandQuantitiesUserErrorCode { + """ + The specified inventory item could not be found. + """ + INVALID_INVENTORY_ITEM + + """ + The specified location could not be found. + """ + INVALID_LOCATION + + """ + The quantity can't be negative. + """ + INVALID_QUANTITY_NEGATIVE + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_DOCUMENT + + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The on-hand quantities couldn't be set. Try again. + """ + SET_ON_HAND_QUANTITIES_FAILED + + """ + The inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM + + """ + The total quantity can't be higher than 1,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The compareQuantity value does not match persisted value. + """ + COMPARE_QUANTITY_STALE + + """ + The service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +The input fields required to set inventory quantities. +""" +input InventorySetQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + The name of quantities to be changed. The only accepted values are: `available` or `on_hand`. + """ + name: String! + + """ + A URI that represents why the inventory change happened, identifying the source system and document that caused this adjustment. Enables complete audit trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """ + The values to which each quantities will be set. + """ + quantities: [InventoryQuantityInput!]! + + """ + Skip the compare quantity check in the quantities field. + """ + ignoreCompareQuantity: Boolean = false @deprecated(reason: "Instead of opting out of quantity comparison checks by passing in `ignoreCompareQuantity: true`, you can now opt out by explicitly passing in a null value to `InventoryQuantityInput.changeFromQuantity`. This field will be removed in `2026-04`.") +} + +""" +Return type for `inventorySetQuantities` mutation. +""" +type InventorySetQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetQuantities`. +""" +type InventorySetQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetQuantitiesUserError`. +""" +enum InventorySetQuantitiesUserErrorCode { + """ + The specified inventory item could not be found. + """ + INVALID_INVENTORY_ITEM + + """ + The specified location could not be found. + """ + INVALID_LOCATION + + """ + The quantity can't be negative. + """ + INVALID_QUANTITY_NEGATIVE + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_DOCUMENT + + """ + The specified inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The total quantity can't be higher than 1,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The total quantity can't be lower than -1,000,000,000. + """ + INVALID_QUANTITY_TOO_LOW + + """ + The compareQuantity argument must be given to each quantity or ignored using ignoreCompareQuantity. + """ + COMPARE_QUANTITY_REQUIRED + + """ + The compareQuantity value does not match persisted value. + """ + COMPARE_QUANTITY_STALE + + """ + The changeFromQuantity value does not match persisted value. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The quantity name must be either 'available' or 'on_hand'. + """ + INVALID_NAME + + """ + The combination of inventoryItemId and locationId must be unique. + """ + NO_DUPLICATE_INVENTORY_ITEM_ID_GROUP_ID_PAIR + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventorySetQuantityInput { + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! + + """ + The current quantity to be compared against the persisted quantity. For more information, refer to the [Compare and Swap documentation](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). + """ + changeFromQuantity: Int +} + +""" +The input fields for setting up scheduled changes of inventory items. +""" +input InventorySetScheduledChangesInput { + """ + The reason for setting up the scheduled changes. + """ + reason: String! + + """ + The list of all the items on which the scheduled changes need to be applied. + """ + items: [InventoryScheduledChangeItemInput!]! + + """ + A URI that represents why the inventory change happened, identifying the source system and document that caused this adjustment. Enables complete audit trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: URL! +} + +""" +Return type for `inventorySetScheduledChanges` mutation. +""" +type InventorySetScheduledChangesPayload { + """ + The scheduled changes that were created. + """ + scheduledChanges: [InventoryScheduledChange!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetScheduledChangesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetScheduledChanges`. +""" +type InventorySetScheduledChangesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetScheduledChangesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetScheduledChangesUserError`. +""" +enum InventorySetScheduledChangesUserErrorCode { + """ + There was an error updating the scheduled changes. + """ + ERROR_UPDATING_SCHEDULED + + """ + The from_name and to_name can't be the same. + """ + SAME_FROM_TO_NAMES + + """ + The specified fromName is invalid. + """ + INVALID_FROM_NAME + + """ + The specified toName is invalid. + """ + INVALID_TO_NAME + + """ + The item can only have one scheduled change for quantity name as the toName. + """ + DUPLICATE_TO_NAME + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The item can only have one scheduled change for quantity name as the fromName. + """ + DUPLICATE_FROM_NAME + + """ + The location couldn't be found. + """ + LOCATION_NOT_FOUND + + """ + The inventory item was not found at the location specified. + """ + INVENTORY_STATE_NOT_FOUND + + """ + At least 1 item must be provided. + """ + ITEMS_EMPTY + + """ + The inventory item was not found. + """ + INVENTORY_ITEM_NOT_FOUND + + """ + The specified field is invalid. + """ + INCLUSION + + """ + The ledger document URI is invalid. + """ + LEDGER_DOCUMENT_INVALID + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +Represents an inventory shipment. +""" +type InventoryShipment implements Node { + """ + The date the shipment was created in UTC. + """ + dateCreated: DateTime + + """ + The date the shipment was initially received in UTC. + """ + dateReceived: DateTime + + """ + The date the shipment was shipped in UTC. + """ + dateShipped: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The total quantity of all items in the shipment. + """ + lineItemTotalQuantity: Int! + + """ + The line items included in this shipment. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ShipmentLineItemSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryShipmentLineItemConnection + + """ + The number of line items associated with the inventory shipment. Limited to a maximum of 10000 by default. + """ + lineItemsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The name of the inventory shipment. + """ + name: String! + + """ + The current status of the shipment. + """ + status: InventoryShipmentStatus! + + """ + The total quantity of items accepted across all line items in this shipment. + """ + totalAcceptedQuantity: Int! + + """ + The total quantity of items received (both accepted and rejected) across all line items in this shipment. + """ + totalReceivedQuantity: Int! + + """ + The total quantity of items rejected across all line items in this shipment. + """ + totalRejectedQuantity: Int! + + """ + The tracking information for the shipment. + """ + tracking: InventoryShipmentTracking +} + +""" +Return type for `inventoryShipmentAddItems` mutation. +""" +type InventoryShipmentAddItemsPayload { + """ + The list of added line items. + """ + addedItems: [InventoryShipmentLineItem!] + + """ + The inventory shipment with the added items. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentAddItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentAddItems`. +""" +type InventoryShipmentAddItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentAddItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentAddItemsUserError`. +""" +enum InventoryShipmentAddItemsUserErrorCode { + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + Failed to activate inventory at location. + """ + ACTIVATION_FAILED + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +An auto-generated type for paginating through multiple InventoryShipments. +""" +type InventoryShipmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryShipmentEdge!]! + + """ + A list of nodes that are contained in InventoryShipmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryShipment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `inventoryShipmentCreateInTransit` mutation. +""" +type InventoryShipmentCreateInTransitPayload { + """ + The created inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentCreateInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentCreateInTransit`. +""" +type InventoryShipmentCreateInTransitUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentCreateInTransitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentCreateInTransitUserError`. +""" +enum InventoryShipmentCreateInTransitUserErrorCode { + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The shipment input cannot be empty. + """ + EMPTY_SHIPMENT_INPUT + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The URL is invalid. + """ + INVALID_URL + + """ + The shipment input is invalid. + """ + INVALID_SHIPMENT_INPUT + + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +The input fields to add a shipment. +""" +input InventoryShipmentCreateInput { + """ + The ID of the inventory movement (transfer or purchase order) this shipment belongs to. + """ + movementId: ID! + + """ + The tracking information for the shipment. + """ + trackingInput: InventoryShipmentTrackingInput + + """ + The list of line items for the inventory shipment. + """ + lineItems: [InventoryShipmentLineItemInput!]! + + """ + The date the shipment was created. + """ + dateCreated: DateTime +} + +""" +Return type for `inventoryShipmentCreate` mutation. +""" +type InventoryShipmentCreatePayload { + """ + The created inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentCreate`. +""" +type InventoryShipmentCreateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentCreateUserError`. +""" +enum InventoryShipmentCreateUserErrorCode { + """ + This barcode is already assigned to another shipment. + """ + BARCODE_DUPLICATE + + """ + Barcode must be 255 characters or less. + """ + BARCODE_TOO_LONG + + """ + The shipment input cannot be empty. + """ + EMPTY_SHIPMENT_INPUT + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The shipment input is invalid. + """ + INVALID_SHIPMENT_INPUT + + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + The URL is invalid. + """ + INVALID_URL + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH + + """ + The idempotency record was found but the associated scheduled changes no longer exist. + """ + IDEMPOTENCY_RECORD_NOT_FOUND +} + +""" +Return type for `inventoryShipmentDelete` mutation. +""" +type InventoryShipmentDeletePayload { + """ + The ID of the inventory shipment that was deleted. + """ + id: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentDelete`. +""" +type InventoryShipmentDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentDeleteUserError`. +""" +enum InventoryShipmentDeleteUserErrorCode { + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS +} + +""" +An auto-generated type which holds one InventoryShipment and a cursor during pagination. +""" +type InventoryShipmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryShipmentEdge. + """ + node: InventoryShipment! +} + +""" +Represents a single line item within an inventory shipment. +""" +type InventoryShipmentLineItem implements Node { + """ + The quantity of items that were accepted in this shipment line item. + """ + acceptedQuantity: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory item associated with this line item. + """ + inventoryItem: InventoryItem + + """ + The quantity of items in this shipment line item. + """ + quantity: Int! + + """ + The quantity of items that were rejected in this shipment line item. + """ + rejectedQuantity: Int! + + """ + The total quantity of units that haven't been received (neither accepted or rejected) in this shipment line item. + """ + unreceivedQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryShipmentLineItems. +""" +type InventoryShipmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryShipmentLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryShipmentLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryShipmentLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryShipmentLineItem and a cursor during pagination. +""" +type InventoryShipmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryShipmentLineItemEdge. + """ + node: InventoryShipmentLineItem! +} + +""" +The input fields for a line item on an inventory shipment. +""" +input InventoryShipmentLineItemInput { + """ + The inventory item ID for the shipment line item. + """ + inventoryItemId: ID! + + """ + The quantity for the shipment line item. + """ + quantity: Int! +} + +""" +Return type for `inventoryShipmentMarkInTransit` mutation. +""" +type InventoryShipmentMarkInTransitPayload { + """ + The marked in transit inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentMarkInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentMarkInTransit`. +""" +type InventoryShipmentMarkInTransitUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentMarkInTransitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentMarkInTransitUserError`. +""" +enum InventoryShipmentMarkInTransitUserErrorCode { + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + Failed to activate inventory at location. + """ + ACTIVATION_FAILED +} + +""" +The input fields to receive an item on an inventory shipment. +""" +input InventoryShipmentReceiveItemInput { + """ + The shipment line item ID to be received. + """ + shipmentLineItemId: ID! + + """ + The quantity for the item to be received. + """ + quantity: Int! + + """ + The reason for received item. + """ + reason: InventoryShipmentReceiveLineItemReason! +} + +""" +The reason for receiving a line item on an inventory shipment. +""" +enum InventoryShipmentReceiveLineItemReason { + """ + The line item was accepted. + """ + ACCEPTED + + """ + The line item was rejected. + """ + REJECTED +} + +""" +Return type for `inventoryShipmentReceive` mutation. +""" +type InventoryShipmentReceivePayload { + """ + The inventory shipment with received items. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentReceiveUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentReceive`. +""" +type InventoryShipmentReceiveUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentReceiveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentReceiveUserError`. +""" +enum InventoryShipmentReceiveUserErrorCode { + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE +} + +""" +Return type for `inventoryShipmentRemoveItems` mutation. +""" +type InventoryShipmentRemoveItemsPayload { + """ + The inventory shipment with items removed. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentRemoveItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentRemoveItems`. +""" +type InventoryShipmentRemoveItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentRemoveItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentRemoveItemsUserError`. +""" +enum InventoryShipmentRemoveItemsUserErrorCode { + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE +} + +""" +Return type for `inventoryShipmentSetTracking` mutation. +""" +type InventoryShipmentSetTrackingPayload { + """ + The inventory shipment with the edited tracking info. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentSetTrackingUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentSetTracking`. +""" +type InventoryShipmentSetTrackingUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentSetTrackingUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentSetTrackingUserError`. +""" +enum InventoryShipmentSetTrackingUserErrorCode { + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The URL is invalid. + """ + INVALID_URL +} + +""" +The status of an inventory shipment. +""" +enum InventoryShipmentStatus { + """ + The inventory shipment has been created but not yet shipped. + """ + DRAFT + + """ + The inventory shipment is currently in transit. + """ + IN_TRANSIT + + """ + The inventory shipment has been partially received at the destination. + """ + PARTIALLY_RECEIVED + + """ + The inventory shipment has been completely received at the destination. + """ + RECEIVED + + """ + Status not included in the current enumeration set. + """ + OTHER +} + +""" +Represents the tracking information for an inventory shipment. +""" +type InventoryShipmentTracking { + """ + The estimated date and time that the shipment will arrive. + """ + arrivesAt: DateTime + + """ + The name of the shipping carrier company. + """ + company: String + + """ + The tracking number used by the carrier to identify the shipment. + """ + trackingNumber: String + + """ + The URL to track the shipment. + + Given a tracking number and a shipping carrier company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company), + Shopify will return a generated tracking URL if no tracking URL was set manually. + """ + trackingUrl: URL +} + +""" +The input fields for an inventory shipment's tracking information. +""" +input InventoryShipmentTrackingInput { + """ + The tracking number for the shipment. + """ + trackingNumber: String + + """ + The name of the shipping carrier company. + + Given a shipping carrier company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company), + Shopify can build a tracking URL for a provided tracking number. + """ + company: String + + """ + The URL to track the shipment. + + Use this field to specify a custom tracking URL. If no custom tracking URL is set, Shopify will automatically provide + this field on query for a tracking number and a supported shipping carrier company from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company). + """ + trackingUrl: URL + + """ + The estimated date and time that the shipment will arrive. + """ + arrivesAt: DateTime +} + +""" +The input fields for a line item on an inventory shipment. +""" +input InventoryShipmentUpdateItemQuantitiesInput { + """ + The ID for the inventory shipment line item. + """ + shipmentLineItemId: ID! + + """ + The quantity for the shipment line item. + """ + quantity: Int! +} + +""" +Return type for `inventoryShipmentUpdateItemQuantities` mutation. +""" +type InventoryShipmentUpdateItemQuantitiesPayload { + """ + The inventory shipment with updated item quantities. + """ + shipment: InventoryShipment + + """ + The updated item quantities. + """ + updatedLineItems: [InventoryShipmentLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentUpdateItemQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentUpdateItemQuantities`. +""" +type InventoryShipmentUpdateItemQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentUpdateItemQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentUpdateItemQuantitiesUserError`. +""" +enum InventoryShipmentUpdateItemQuantitiesUserErrorCode { + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE +} + +""" +Tracks the movement of [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) objects between [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects. A transfer includes origin and destination information, [`InventoryTransferLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) objects with quantities, and shipment details. + +Transfers progress through multiple [`statuses`](https://shopify.dev/docs/api/admin-graphql/latest/enums/InventoryTransferStatus). The transfer maintains [`LocationSnapshot`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationSnapshot) objects of location details to preserve historical data even if locations change or are deleted later. +""" +type InventoryTransfer implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + The date and time the inventory transfer was created in UTC format. + """ + dateCreated: DateTime + + """ + Snapshot of the destination location (name, address, when snapped) with an optional link to the live Location object. If the original location is deleted, the snapshot data will still be available but the location link will be nil. + """ + destination: LocationSnapshot + + """ + The list of events associated with the inventory transfer. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + Whether the merchant has added timeline comments to the inventory transfer. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The line items associated with the inventory transfer. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryTransferLineItemConnection! + + """ + The number of line items associated with the inventory transfer. Limited to a maximum of 10000 by default. + """ + lineItemsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The name of the inventory transfer. + """ + name: String! + + """ + Additional note attached to the inventory transfer. + """ + note: String + + """ + Snapshot of the origin location (name, address, when snapped) with an optional link to the live Location object. If the original location is deleted, the snapshot data will still be available but the location link will be nil. + """ + origin: LocationSnapshot + + """ + The total quantity of items received in the transfer. + """ + receivedQuantity: Int! + + """ + The reference name of the inventory transfer. + """ + referenceName: String + + """ + The shipments associated with the inventory transfer. + """ + shipments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): InventoryShipmentConnection! + + """ + The current status of the transfer. + """ + status: InventoryTransferStatus! + + """ + A list of tags that have been added to the inventory transfer. + """ + tags: [String!]! + + """ + The total quantity of items being transferred. + """ + totalQuantity: Int! +} + +""" +Return type for `inventoryTransferCancel` mutation. +""" +type InventoryTransferCancelPayload { + """ + The cancelled inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCancelUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCancel`. +""" +type InventoryTransferCancelUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCancelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCancelUserError`. +""" +enum InventoryTransferCancelUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + Shipment already exists for the transfer. + """ + SHIPMENT_EXISTS +} + +""" +An auto-generated type for paginating through multiple InventoryTransfers. +""" +type InventoryTransferConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferEdge!]! + + """ + A list of nodes that are contained in InventoryTransferEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryTransfer!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create an inventory transfer. +""" +input InventoryTransferCreateAsReadyToShipInput { + """ + The origin location for the inventory transfer. + """ + originLocationId: ID + + """ + The destination location for the inventory transfer. + """ + destinationLocationId: ID + + """ + The list of line items for the inventory transfer. + """ + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String +} + +""" +Return type for `inventoryTransferCreateAsReadyToShip` mutation. +""" +type InventoryTransferCreateAsReadyToShipPayload { + """ + The created inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCreateAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreateAsReadyToShip`. +""" +type InventoryTransferCreateAsReadyToShipUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCreateAsReadyToShipUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateAsReadyToShipUserError`. +""" +enum InventoryTransferCreateAsReadyToShipUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + One or more tags are not valid. + """ + INVALID_TAG + + """ + A location is required for this operation. + """ + LOCATION_REQUIRED + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH + + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE +} + +""" +The input fields to create an inventory transfer. +""" +input InventoryTransferCreateInput { + """ + The origin location for the inventory transfer. + """ + originLocationId: ID + + """ + The destination location for the inventory transfer. + """ + destinationLocationId: ID + + """ + The list of line items for the inventory transfer. + """ + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String +} + +""" +Return type for `inventoryTransferCreate` mutation. +""" +type InventoryTransferCreatePayload { + """ + The created inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCreateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreate`. +""" +type InventoryTransferCreateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateUserError`. +""" +enum InventoryTransferCreateUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + One or more tags are not valid. + """ + INVALID_TAG + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH + + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE +} + +""" +Return type for `inventoryTransferDelete` mutation. +""" +type InventoryTransferDeletePayload { + """ + The ID of the deleted inventory transfer. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDelete`. +""" +type InventoryTransferDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDeleteUserError`. +""" +enum InventoryTransferDeleteUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS +} + +""" +Return type for `inventoryTransferDuplicate` mutation. +""" +type InventoryTransferDuplicatePayload { + """ + The duplicated inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferDuplicateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDuplicate`. +""" +type InventoryTransferDuplicateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferDuplicateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDuplicateUserError`. +""" +enum InventoryTransferDuplicateUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +An auto-generated type which holds one InventoryTransfer and a cursor during pagination. +""" +type InventoryTransferEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryTransferEdge. + """ + node: InventoryTransfer! +} + +""" +The input fields to edit an inventory transfer. +""" +input InventoryTransferEditInput { + """ + The origin location for the inventory transfer. The origin location can only be changed + for draft transfers. + """ + originId: ID + + """ + The destination location for the inventory transfer. The destination location can only be + changed for draft transfers. + """ + destinationId: ID + + """ + The date the inventory transfer was created. + """ + dateCreated: Date + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String +} + +""" +Return type for `inventoryTransferEdit` mutation. +""" +type InventoryTransferEditPayload { + """ + The edited inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferEditUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferEdit`. +""" +type InventoryTransferEditUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferEditUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferEditUserError`. +""" +enum InventoryTransferEditUserErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The location of a transfer cannot be updated. Only Draft Transfers can mutate their locations. + """ + TRANSFER_LOCATION_IMMUTABLE + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + One or more tags are not valid. + """ + INVALID_TAG +} + +""" +Represents a line item belonging to an inventory transfer. +""" +type InventoryTransferLineItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory item associated with this line item. + """ + inventoryItem: InventoryItem + + """ + The quantity of the item that has been picked for a draft shipment but not yet shipped. + """ + pickedForShipmentQuantity: Int! + + """ + The quantity of the item that can be actioned upon, such as editing the item quantity on the transfer or adding to a shipment. + """ + processableQuantity: Int! + + """ + The quantity of the item that can be shipped. + """ + shippableQuantity: Int! + + """ + The quantity of the item that has been shipped. + """ + shippedQuantity: Int! + + """ + The title of the product associated with this line item. + """ + title: String + + """ + The total quantity of items being transferred. + """ + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryTransferLineItems. +""" +type InventoryTransferLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryTransferLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [InventoryTransferLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryTransferLineItem and a cursor during pagination. +""" +type InventoryTransferLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryTransferLineItemEdge. + """ + node: InventoryTransferLineItem! +} + +""" +The input fields for a line item on an inventory transfer. +""" +input InventoryTransferLineItemInput { + """ + The inventory item ID for the transfer line item. + """ + inventoryItemId: ID! + + """ + The quantity for the transfer line item. + """ + quantity: Int! +} + +""" +Represents an update to a single transfer line item. +""" +type InventoryTransferLineItemUpdate { + """ + The delta quantity for the transfer line item. + """ + deltaQuantity: Int + + """ + The inventory item ID for the transfer line item. + """ + inventoryItemId: ID + + """ + The new quantity for the transfer line item. + """ + newQuantity: Int +} + +""" +Return type for `inventoryTransferMarkAsReadyToShip` mutation. +""" +type InventoryTransferMarkAsReadyToShipPayload { + """ + The ready to ship inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferMarkAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferMarkAsReadyToShip`. +""" +type InventoryTransferMarkAsReadyToShipUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferMarkAsReadyToShipUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferMarkAsReadyToShipUserError`. +""" +enum InventoryTransferMarkAsReadyToShipUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + A location is required for this operation. + """ + LOCATION_REQUIRED + + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND +} + +""" +The input fields to remove inventory items from a transfer. +""" +input InventoryTransferRemoveItemsInput { + """ + The ID of the inventory transfer where the items will be removed. + """ + id: ID! + + """ + The IDs of the [`InventoryTransferLineItem`s](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) + to be removed from the transfer. Passing an empty array is a no-op and returns + the transfer unchanged. + """ + transferLineItemIds: [ID!] +} + +""" +Return type for `inventoryTransferRemoveItems` mutation. +""" +type InventoryTransferRemoveItemsPayload { + """ + The transfer with line items removed. + """ + inventoryTransfer: InventoryTransfer + + """ + The line items that have had their shippable quantity removed. + """ + removedQuantities: [InventoryTransferLineItemUpdate!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferRemoveItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferRemoveItems`. +""" +type InventoryTransferRemoveItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferRemoveItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferRemoveItemsUserError`. +""" +enum InventoryTransferRemoveItemsUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + A `READY_TO_SHIP` transfer must have at least one line item; you cannot remove every line item from one. To empty a `READY_TO_SHIP` transfer, cancel it instead. + """ + CANT_REMOVE_ALL_ITEMS_FROM_READY_TO_SHIP_TRANSFER + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The item cannot be removed because all of its quantity is fully allocated to one or more shipments (including draft shipments where the item has been picked). The error name refers to the underlying allocation check; it triggers regardless of whether the shipments have actually shipped. + """ + ALL_QUANTITY_SHIPPED + + """ + The line item cannot be removed because it appears on a draft shipment with quantity `0`. + """ + ITEM_PRESENT_ON_DRAFT_SHIPMENT_WITH_ZERO_QUANTITY + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND +} + +""" +The input fields to the InventoryTransferSetItems mutation. +""" +input InventoryTransferSetItemsInput { + """ + The ID of the inventory transfer where the items will be set. + """ + id: ID! + + """ + The line items to set on the Transfer. Only the items included in this list are affected; items already on the transfer that aren't referenced here will stay unchanged. Each inventory item may appear at most once in this list; duplicate `inventoryItemId` entries are rejected. + """ + lineItems: [InventoryTransferLineItemInput!]! +} + +""" +Return type for `inventoryTransferSetItems` mutation. +""" +type InventoryTransferSetItemsPayload { + """ + The Transfer with its line items updated. + """ + inventoryTransfer: InventoryTransfer + + """ + The updated line items. + """ + updatedLineItems: [InventoryTransferLineItemUpdate!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferSetItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferSetItems`. +""" +type InventoryTransferSetItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferSetItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferSetItemsUserError`. +""" +enum InventoryTransferSetItemsUserErrorCode { + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH + + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE +} + +""" +The status of a transfer. +""" +enum InventoryTransferStatus { + """ + The inventory transfer has been created but not yet finalized. + """ + DRAFT + + """ + The inventory transfer has been created, but not yet shipped. + """ + READY_TO_SHIP + + """ + The inventory transfer is in progress, with a shipment currently underway or received. + """ + IN_PROGRESS + + """ + The inventory transfer has been completely received at the destination. + """ + TRANSFERRED + + """ + The inventory transfer has been canceled. + """ + CANCELED + + """ + Status not included in the current enumeration set. + """ + OTHER +} + +""" +The financial transfer details for a return outcome that results in an invoice. +""" +type InvoiceReturnOutcome { + """ + The total monetary value to be invoiced in shop and presentment currencies. + """ + amount: MoneyBag! +} + +""" +A [JSON](https://www.json.org/json-en.html) object. + +Example value: +`{ + "product": { + "id": "gid://shopify/Product/1346443542550", + "title": "White T-shirt", + "options": [{ + "name": "Size", + "values": ["M", "L"] + }] + } +}` +""" +scalar JSON + +""" +A job corresponds to some long running task that the client should poll for status. +""" +type Job { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! + + """ + This field will only resolve once the job is done. Can be used to ask for object(s) that have been changed by the job. + """ + query: QueryRoot +} + +""" +A job corresponds to some long running task that the client should poll for status. +""" +interface JobResult { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Language codes supported by Shopify. +""" +enum LanguageCode { + """ + Afrikaans. + """ + AF + + """ + Akan. + """ + AK + + """ + Amharic. + """ + AM + + """ + Arabic. + """ + AR + + """ + Assamese. + """ + AS + + """ + Azerbaijani. + """ + AZ + + """ + Belarusian. + """ + BE + + """ + Bulgarian. + """ + BG + + """ + Bambara. + """ + BM + + """ + Bangla. + """ + BN + + """ + Tibetan. + """ + BO + + """ + Breton. + """ + BR + + """ + Bosnian. + """ + BS + + """ + Catalan. + """ + CA + + """ + Chechen. + """ + CE + + """ + Central Kurdish. + """ + CKB + + """ + Czech. + """ + CS + + """ + Welsh. + """ + CY + + """ + Danish. + """ + DA + + """ + German. + """ + DE + + """ + Dzongkha. + """ + DZ + + """ + Ewe. + """ + EE + + """ + Greek. + """ + EL + + """ + English. + """ + EN + + """ + Esperanto. + """ + EO + + """ + Spanish. + """ + ES + + """ + Estonian. + """ + ET + + """ + Basque. + """ + EU + + """ + Persian. + """ + FA + + """ + Fulah. + """ + FF + + """ + Finnish. + """ + FI + + """ + Filipino. + """ + FIL + + """ + Faroese. + """ + FO + + """ + French. + """ + FR + + """ + Western Frisian. + """ + FY + + """ + Irish. + """ + GA + + """ + Scottish Gaelic. + """ + GD + + """ + Galician. + """ + GL + + """ + Gujarati. + """ + GU + + """ + Manx. + """ + GV + + """ + Hausa. + """ + HA + + """ + Hebrew. + """ + HE + + """ + Hindi. + """ + HI + + """ + Croatian. + """ + HR + + """ + Hungarian. + """ + HU + + """ + Armenian. + """ + HY + + """ + Interlingua. + """ + IA + + """ + Indonesian. + """ + ID + + """ + Igbo. + """ + IG + + """ + Sichuan Yi. + """ + II + + """ + Icelandic. + """ + IS + + """ + Italian. + """ + IT + + """ + Japanese. + """ + JA + + """ + Javanese. + """ + JV + + """ + Georgian. + """ + KA + + """ + Kikuyu. + """ + KI + + """ + Kazakh. + """ + KK + + """ + Kalaallisut. + """ + KL + + """ + Khmer. + """ + KM + + """ + Kannada. + """ + KN + + """ + Korean. + """ + KO + + """ + Kashmiri. + """ + KS + + """ + Kurdish. + """ + KU + + """ + Cornish. + """ + KW + + """ + Kyrgyz. + """ + KY + + """ + Luxembourgish. + """ + LB + + """ + Ganda. + """ + LG + + """ + Lingala. + """ + LN + + """ + Lao. + """ + LO + + """ + Lithuanian. + """ + LT + + """ + Luba-Katanga. + """ + LU + + """ + Latvian. + """ + LV + + """ + Malagasy. + """ + MG + + """ + Māori. + """ + MI + + """ + Macedonian. + """ + MK + + """ + Malayalam. + """ + ML + + """ + Mongolian. + """ + MN + + """ + Marathi. + """ + MR + + """ + Malay. + """ + MS + + """ + Maltese. + """ + MT + + """ + Burmese. + """ + MY + + """ + Norwegian (Bokmål). + """ + NB + + """ + North Ndebele. + """ + ND + + """ + Nepali. + """ + NE + + """ + Dutch. + """ + NL + + """ + Norwegian Nynorsk. + """ + NN + + """ + Norwegian. + """ + NO + + """ + Oromo. + """ + OM + + """ + Odia. + """ + OR + + """ + Ossetic. + """ + OS + + """ + Punjabi. + """ + PA + + """ + Polish. + """ + PL + + """ + Pashto. + """ + PS + + """ + Portuguese (Brazil). + """ + PT_BR + + """ + Portuguese (Portugal). + """ + PT_PT + + """ + Quechua. + """ + QU + + """ + Romansh. + """ + RM + + """ + Rundi. + """ + RN + + """ + Romanian. + """ + RO + + """ + Russian. + """ + RU + + """ + Kinyarwanda. + """ + RW + + """ + Sanskrit. + """ + SA + + """ + Sardinian. + """ + SC + + """ + Sindhi. + """ + SD + + """ + Northern Sami. + """ + SE + + """ + Sango. + """ + SG + + """ + Sinhala. + """ + SI + + """ + Slovak. + """ + SK + + """ + Slovenian. + """ + SL + + """ + Shona. + """ + SN + + """ + Somali. + """ + SO + + """ + Albanian. + """ + SQ + + """ + Serbian. + """ + SR + + """ + Sundanese. + """ + SU + + """ + Swedish. + """ + SV + + """ + Swahili. + """ + SW + + """ + Tamil. + """ + TA + + """ + Telugu. + """ + TE + + """ + Tajik. + """ + TG + + """ + Thai. + """ + TH + + """ + Tigrinya. + """ + TI + + """ + Turkmen. + """ + TK + + """ + Tongan. + """ + TO + + """ + Turkish. + """ + TR + + """ + Tatar. + """ + TT + + """ + Uyghur. + """ + UG + + """ + Ukrainian. + """ + UK + + """ + Urdu. + """ + UR + + """ + Uzbek. + """ + UZ + + """ + Vietnamese. + """ + VI + + """ + Wolof. + """ + WO + + """ + Xhosa. + """ + XH + + """ + Yiddish. + """ + YI + + """ + Yoruba. + """ + YO + + """ + Chinese (Simplified). + """ + ZH_CN + + """ + Chinese (Traditional). + """ + ZH_TW + + """ + Zulu. + """ + ZU + + """ + Chinese. + """ + ZH + + """ + Portuguese. + """ + PT + + """ + Church Slavic. + """ + CU + + """ + Volapük. + """ + VO +} + +""" +Interoperability metadata for types that directly correspond to a REST Admin API resource. +For example, on the Product type, LegacyInteroperability returns metadata for the corresponding [Product object](https://shopify.dev/api/admin-graphql/latest/objects/product) in the REST Admin API. +""" +interface LegacyInteroperability { + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! +} + +""" +Units of measurement for length. +""" +enum LengthUnit { + """ + 1000 millimeters equals 1 meter. + """ + MILLIMETERS + + """ + 100 centimeters equals 1 meter. + """ + CENTIMETERS + + """ + Metric system unit of length. + """ + METERS + + """ + 12 inches equals 1 foot. + """ + INCHES + + """ + Imperial system unit of length. + """ + FEET + + """ + 1 yard equals 3 feet. + """ + YARDS +} + +""" +The total number of pending orders on a shop if less then a maximum, or that maximum. +The atMax field indicates when this maximum has been reached. +""" +type LimitedPendingOrderCount { + """ + This is set when the number of pending orders has reached the maximum. + """ + atMax: Boolean! + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + count: Int! +} + +""" +The `LineItem` object represents a single product or service that a customer purchased in an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). +Each line item is associated with a +[product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +and can have multiple [discount allocations](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAllocation). +Line items contain details about what was purchased, including the product variant, quantity, pricing, +and fulfillment status. + +Use the `LineItem` object to manage the following processes: + +- [Track the quantity of items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions) ordered, fulfilled, and unfulfilled. +- [Calculate prices](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders), including discounts and taxes. +- Manage fulfillment through [fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps). +- Manage [returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) and [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges). +- Handle [subscriptions](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) and recurring orders. + +Line items can also include custom attributes and properties, allowing merchants to add specific details +about each item in an order. Learn more about +[managing orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type LineItem implements Node { + """ + Whether the line item can be restocked. + """ + canRestock: Boolean! @deprecated(reason: "Use `restockable` instead.") + + """ + The subscription contract associated with this line item. + """ + contract: SubscriptionContract + + """ + The number of units ordered, excluding refunded and removed units. + """ + currentQuantity: Int! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated to the line item by discount applications, including discounts allocated to refunded and removed quantities. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total discounted price of the line item in shop currency, including refunded and removed quantities. This value doesn't include order-level discounts. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total discounted price of the line item in shop and presentment currencies, including refunded and removed quantities. This value doesn't include order-level discounts. Code-based discounts aren't included by default. + """ + discountedTotalSet("Whether to include code-based discounts in the total." withCodeDiscounts: Boolean = false): MoneyBag! + + """ + The approximate unit price of the line item in shop currency. This value includes line-level discounts and discounts applied to refunded and removed quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `discountedUnitPriceSet` instead.") + + """ + The approximate unit price of the line item in shop and presentment currencies. This value includes discounts applied to refunded and removed quantities. + """ + discountedUnitPriceAfterAllDiscountsSet: MoneyBag! + + """ + The approximate unit price of the line item in shop and presentment currencies. This value includes line-level discounts and discounts applied to refunded and removed quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The duties associated with the line item. + """ + duties: [Duty!]! + + """ + The total number of units to fulfill. + """ + fulfillableQuantity: Int! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead.") + + """ + The fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) is a third-party fulfillment service. Third-party fulfillment services don't have a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was awaiting fulfillment by a third-party fulfillment service. Third-party fulfillment services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: FulfillmentService @deprecated(reason: "\nThe [relationship between a product variant and a fulfillment service was changed](/changelog/fulfillment-service-sku-sharing). A [ProductVariant](/api/admin-graphql/latest/objects/ProductVariant) can be stocked by multiple fulfillment services. As a result, we recommend that you use the [inventoryItem field](/api/admin-graphql/latest/objects/ProductVariant#field-productvariant-inventoryitem) if you need to determine where a product variant is stocked.\n\nIf you need to determine whether a product is a gift card, then you should continue to use this field until an alternative is available.\n\nAltering the locations which stock a product variant won't change the value of this field for existing orders.\n\nLearn about [managing inventory quantities and states](/apps/fulfillment/inventory-management-apps/quantities-states).\n") + + """ + The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, + 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. + """ + fulfillmentStatus: String! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The line item group associated to the line item. + """ + lineItemGroup: LineItemGroup + + """ + Whether the line item can be edited or not. + """ + merchantEditable: Boolean! + + """ + The title of the product, optionally appended with the title of the variant (if applicable). + """ + name: String! + + """ + The total number of units that can't be fulfilled. For example, if items have been refunded, or the item is not something that can be fulfilled, like a tip. Please see the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object for more fulfillment details. + """ + nonFulfillableQuantity: Int! + + """ + In shop currency, the total price of the line item when the order was created. + This value doesn't include discounts. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + In shop and presentment currencies, the total price of the line item when the order was created. + This value doesn't include discounts. + """ + originalTotalSet: MoneyBag! + + """ + In shop currency, the unit price of the line item when the order was created. This value doesn't include discounts. + """ + originalUnitPrice: Money! @deprecated(reason: "Use `originalUnitPriceSet` instead.") + + """ + In shop and presentment currencies, the unit price of the line item when the order was created. This value doesn't include discounts. + """ + originalUnitPriceSet: MoneyBag! + + """ + The Product object associated with this line item's variant. + """ + product: Product + + """ + The number of units ordered, including refunded and removed units. + """ + quantity: Int! + + """ + The number of units ordered, excluding refunded units and removed units. + """ + refundableQuantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + Whether the line item can be restocked. + """ + restockable: Boolean! + + """ + The selling plan details associated with the line item. + """ + sellingPlan: LineItemSellingPlan + + """ + The variant SKU number. + """ + sku: String + + """ + Staff attributed to the line item. + """ + staffMember: StaffMember + + """ + Return reasons suggested based on the line item's product category in Shopify's product taxonomy. Use [`returnReasonDefinitions`](https://shopify.dev/docs/api/admin-graphql/latest/queries/returnReasonDefinitions) to access the full library of available reasons. + """ + suggestedReturnReasonDefinitions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReturnReasonDefinitionConnection + + """ + The taxes charged for the line item, including taxes charged for refunded and removed quantities. + """ + taxLines("Truncate the array result to this size." first: Int): [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product at time of order creation. + """ + title: String! + + """ + The total discount allocated to the line item in shop currency, including the total allocated to refunded and removed quantities. This value doesn't include order-level discounts. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total discount allocated to the line item in shop and presentment currencies, including the total allocated to refunded and removed quantities. This value doesn't include order-level discounts. + """ + totalDiscountSet: MoneyBag! + + """ + In shop currency, the total discounted price of the unfulfilled quantity for the line item. + """ + unfulfilledDiscountedTotal: Money! @deprecated(reason: "Use `unfulfilledDiscountedTotalSet` instead.") + + """ + In shop and presentment currencies, the total discounted price of the unfulfilled quantity for the line item. + """ + unfulfilledDiscountedTotalSet: MoneyBag! + + """ + In shop currency, the total price of the unfulfilled quantity for the line item. This value doesn't include discounts. + """ + unfulfilledOriginalTotal: Money! @deprecated(reason: "Use `unfulfilledOriginalTotalSet` instead.") + + """ + In shop and presentment currencies, the total price of the unfulfilled quantity for the line item. This value doesn't include discounts. + """ + unfulfilledOriginalTotalSet: MoneyBag! + + """ + The number of units not yet fulfilled. + """ + unfulfilledQuantity: Int! + + """ + The Variant object associated with this line item. + """ + variant: ProductVariant + + """ + The title of the variant at time of order creation. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String +} + +""" +An auto-generated type for paginating through multiple LineItems. +""" +type LineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LineItemEdge!]! + + """ + A list of nodes that are contained in LineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [LineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LineItem and a cursor during pagination. +""" +type LineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LineItemEdge. + """ + node: LineItem! +} + +""" +The information for [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) that are part of a bundle. When a bundle is purchased, each component line item references its [`LineItemGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItemGroup) through the [`lineItemGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem#field-lineItemGroup) field to maintain the relationship with the bundle. + +The parent bundle's product, variant, and custom attributes enable apps to group and display bundle components in order management systems, transactional emails, and other contexts where understanding the bundle structure is needed. + +Learn more about [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). +""" +type LineItemGroup implements Node { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + ID of the product of the line item group. + """ + productId: ID + + """ + Quantity of the line item group on the order. + """ + quantity: Int! + + """ + Title of the line item group. + """ + title: String! + + """ + ID of the variant of the line item group. + """ + variantId: ID + + """ + SKU of the variant of the line item group. + """ + variantSku: String +} + +""" +Represents the selling plan for a line item. +""" +type LineItemSellingPlan { + """ + The name of the selling plan for display purposes. + """ + name: String! + + """ + The ID of the selling plan associated with the line item. + """ + sellingPlanId: ID +} + +""" +A link to direct users to. +""" +type Link implements HasPublishedTranslations { + """ + A context-sensitive label for the link. + """ + label: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The URL that the link visits. + """ + url: URL! +} + +""" +The identifier for the metafield linked to this option. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) for more details. +""" +type LinkedMetafield { + """ + Key of the metafield the option is linked to. + """ + key: String + + """ + Namespace of the metafield the option is linked to. + """ + namespace: String +} + +""" +The input fields required to link a product option to a metafield. +""" +input LinkedMetafieldCreateInput { + """ + The namespace of the metafield this option is linked to. + """ + namespace: String! + + """ + The key of the metafield this option is linked to. + """ + key: String! + + """ + Values associated with the option. + """ + values: [String!] +} + +""" +The input fields for linking a combined listing option to a metafield. +""" +input LinkedMetafieldInput { + """ + The namespace of the linked metafield. + """ + namespace: String! + + """ + The key of the linked metafield. + """ + key: String! + + """ + The values of the linked metafield. + """ + values: [String!]! +} + +""" +The input fields required to link a product option to a metafield. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) for more details. +""" +input LinkedMetafieldUpdateInput { + """ + The namespace of the metafield this option is linked to. + """ + namespace: String! + + """ + The key of the metafield this option is linked to. + """ + key: String! +} + +""" +Local payment methods payment details related to a transaction. +""" +type LocalPaymentMethodsPaymentDetails implements BasePaymentDetails { + """ + The descriptor by the payment provider. Only available for Amazon Pay and Buy with Prime. + """ + paymentDescriptor: String + + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +A locale. +""" +type Locale { + """ + Locale ISO code. + """ + isoCode: String! + + """ + Human-readable locale name. + """ + name: String! +} + +""" +Specifies the type of the underlying localizable content. This can be used to conditionally render different UI elements such as input fields. +""" +enum LocalizableContentType { + """ + A JSON string. + """ + JSON_STRING + + """ + A JSON. + """ + JSON + + """ + A link. + """ + LINK + + """ + A list of links. + """ + LIST_LINK + + """ + A list of multi-line texts. + """ + LIST_MULTI_LINE_TEXT_FIELD + + """ + A list of single-line texts. + """ + LIST_SINGLE_LINE_TEXT_FIELD + + """ + A list of URLs. + """ + LIST_URL + + """ + A multi-line text. + """ + MULTI_LINE_TEXT_FIELD + + """ + A rich text. + """ + RICH_TEXT_FIELD + + """ + A single-line text. + """ + SINGLE_LINE_TEXT_FIELD + + """ + A string. + """ + STRING + + """ + A URL. + """ + URL + + """ + A file reference. + """ + FILE_REFERENCE + + """ + A list of file references. + """ + LIST_FILE_REFERENCE + + """ + An HTML. + """ + HTML + + """ + A URI. + """ + URI + + """ + An inline rich text. + """ + INLINE_RICH_TEXT +} + +""" +Represents the value captured by a localization extension. Localization extensions are additional fields required by certain countries on international orders. For example, some countries require additional fields for customs information or tax identification numbers. +""" +type LocalizationExtension { + """ + Country ISO 3166-1 alpha-2 code. + """ + countryCode: CountryCode! + + """ + The localized extension keys that are allowed. + """ + key: LocalizationExtensionKey! + + """ + The purpose of this localization extension. + """ + purpose: LocalizationExtensionPurpose! + + """ + The localized extension title. + """ + title: String! + + """ + The value of the field. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizationExtensions. +""" +type LocalizationExtensionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizationExtensionEdge!]! + + """ + A list of nodes that are contained in LocalizationExtensionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [LocalizationExtension!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizationExtension and a cursor during pagination. +""" +type LocalizationExtensionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocalizationExtensionEdge. + """ + node: LocalizationExtension! +} + +""" +The input fields for a LocalizationExtensionInput. +""" +input LocalizationExtensionInput { + """ + The key for the localization extension. + """ + key: LocalizationExtensionKey! + + """ + The localization extension value. + """ + value: String! +} + +""" +The key of a localization extension. +""" +enum LocalizationExtensionKey { + """ + Extension key 'tax_credential_br' for country BR. + """ + TAX_CREDENTIAL_BR + + """ + Extension key 'shipping_credential_br' for country BR. + """ + SHIPPING_CREDENTIAL_BR + + """ + Extension key 'tax_credential_cl' for country CL. + """ + TAX_CREDENTIAL_CL + + """ + Extension key 'shipping_credential_cl' for country CL. + """ + SHIPPING_CREDENTIAL_CL + + """ + Extension key 'shipping_credential_cn' for country CN. + """ + SHIPPING_CREDENTIAL_CN + + """ + Extension key 'tax_credential_co' for country CO. + """ + TAX_CREDENTIAL_CO + + """ + Extension key 'tax_credential_type_co' for country CO. + """ + TAX_CREDENTIAL_TYPE_CO + + """ + Extension key 'shipping_credential_co' for country CO. + """ + SHIPPING_CREDENTIAL_CO + + """ + Extension key 'shipping_credential_type_co' for country CO. + """ + SHIPPING_CREDENTIAL_TYPE_CO + + """ + Extension key 'tax_credential_cr' for country CR. + """ + TAX_CREDENTIAL_CR + + """ + Extension key 'shipping_credential_cr' for country CR. + """ + SHIPPING_CREDENTIAL_CR + + """ + Extension key 'tax_credential_ec' for country EC. + """ + TAX_CREDENTIAL_EC + + """ + Extension key 'shipping_credential_ec' for country EC. + """ + SHIPPING_CREDENTIAL_EC + + """ + Extension key 'tax_credential_gt' for country GT. + """ + TAX_CREDENTIAL_GT + + """ + Extension key 'shipping_credential_gt' for country GT. + """ + SHIPPING_CREDENTIAL_GT + + """ + Extension key 'tax_credential_id' for country ID. + """ + TAX_CREDENTIAL_ID + + """ + Extension key 'shipping_credential_id' for country ID. + """ + SHIPPING_CREDENTIAL_ID + + """ + Extension key 'tax_credential_it' for country IT. + """ + TAX_CREDENTIAL_IT + + """ + Extension key 'tax_email_it' for country IT. + """ + TAX_EMAIL_IT + + """ + Extension key 'tax_credential_my' for country MY. + """ + TAX_CREDENTIAL_MY + + """ + Extension key 'shipping_credential_my' for country MY. + """ + SHIPPING_CREDENTIAL_MY + + """ + Extension key 'shipping_credential_mx' for country MX. + """ + SHIPPING_CREDENTIAL_MX + + """ + Extension key 'tax_credential_mx' for country MX. + """ + TAX_CREDENTIAL_MX + + """ + Extension key 'tax_credential_type_mx' for country MX. + """ + TAX_CREDENTIAL_TYPE_MX + + """ + Extension key 'tax_credential_use_mx' for country MX. + """ + TAX_CREDENTIAL_USE_MX + + """ + Extension key 'tax_credential_py' for country PY. + """ + TAX_CREDENTIAL_PY + + """ + Extension key 'shipping_credential_py' for country PY. + """ + SHIPPING_CREDENTIAL_PY + + """ + Extension key 'tax_credential_pe' for country PE. + """ + TAX_CREDENTIAL_PE + + """ + Extension key 'shipping_credential_pe' for country PE. + """ + SHIPPING_CREDENTIAL_PE + + """ + Extension key 'tax_credential_pt' for country PT. + """ + TAX_CREDENTIAL_PT + + """ + Extension key 'shipping_credential_pt' for country PT. + """ + SHIPPING_CREDENTIAL_PT + + """ + Extension key 'shipping_credential_kr' for country KR. + """ + SHIPPING_CREDENTIAL_KR + + """ + Extension key 'tax_credential_es' for country ES. + """ + TAX_CREDENTIAL_ES + + """ + Extension key 'shipping_credential_es' for country ES. + """ + SHIPPING_CREDENTIAL_ES + + """ + Extension key 'shipping_credential_tw' for country TW. + """ + SHIPPING_CREDENTIAL_TW + + """ + Extension key 'tax_credential_tr' for country TR. + """ + TAX_CREDENTIAL_TR + + """ + Extension key 'shipping_credential_tr' for country TR. + """ + SHIPPING_CREDENTIAL_TR +} + +""" +The purpose of a localization extension. +""" +enum LocalizationExtensionPurpose { + """ + Extensions that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """ + Extensions that are used for taxes purposes, for example, invoicing. + """ + TAX +} + +""" +Represents the value captured by a localized field. Localized fields are additional fields required by certain countries on international orders. For example, some countries require additional fields for customs information or tax identification numbers. +""" +type LocalizedField { + """ + Country ISO 3166-1 alpha-2 code. + """ + countryCode: CountryCode! + + """ + The localized field keys that are allowed. + """ + key: LocalizedFieldKey! + + """ + The purpose of this localized field. + """ + purpose: LocalizedFieldPurpose! + + """ + The localized field title. + """ + title: String! + + """ + The value of the field. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizedFields. +""" +type LocalizedFieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizedFieldEdge!]! + + """ + A list of nodes that are contained in LocalizedFieldEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [LocalizedField!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizedField and a cursor during pagination. +""" +type LocalizedFieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocalizedFieldEdge. + """ + node: LocalizedField! +} + +""" +The input fields for a LocalizedFieldInput. +""" +input LocalizedFieldInput { + """ + The key for the localized field. + """ + key: LocalizedFieldKey! + + """ + The localized field value. + """ + value: String! +} + +""" +The key of a localized field. +""" +enum LocalizedFieldKey { + """ + Localized field key 'tax_credential_br' for country Brazil. + """ + TAX_CREDENTIAL_BR + + """ + Localized field key 'shipping_credential_br' for country Brazil. + """ + SHIPPING_CREDENTIAL_BR + + """ + Localized field key 'tax_credential_cl' for country Chile. + """ + TAX_CREDENTIAL_CL + + """ + Localized field key 'shipping_credential_cl' for country Chile. + """ + SHIPPING_CREDENTIAL_CL + + """ + Localized field key 'shipping_credential_cn' for country China. + """ + SHIPPING_CREDENTIAL_CN + + """ + Localized field key 'tax_credential_co' for country Colombia. + """ + TAX_CREDENTIAL_CO + + """ + Localized field key 'tax_credential_type_co' for country Colombia. + """ + TAX_CREDENTIAL_TYPE_CO + + """ + Localized field key 'shipping_credential_co' for country Colombia. + """ + SHIPPING_CREDENTIAL_CO + + """ + Localized field key 'shipping_credential_type_co' for country Colombia. + """ + SHIPPING_CREDENTIAL_TYPE_CO + + """ + Localized field key 'tax_credential_cr' for country Costa Rica. + """ + TAX_CREDENTIAL_CR + + """ + Localized field key 'shipping_credential_cr' for country Costa Rica. + """ + SHIPPING_CREDENTIAL_CR + + """ + Localized field key 'tax_credential_ec' for country Ecuador. + """ + TAX_CREDENTIAL_EC + + """ + Localized field key 'shipping_credential_ec' for country Ecuador. + """ + SHIPPING_CREDENTIAL_EC + + """ + Localized field key 'tax_credential_gt' for country Guatemala. + """ + TAX_CREDENTIAL_GT + + """ + Localized field key 'shipping_credential_gt' for country Guatemala. + """ + SHIPPING_CREDENTIAL_GT + + """ + Localized field key 'tax_credential_id' for country Indonesia. + """ + TAX_CREDENTIAL_ID + + """ + Localized field key 'shipping_credential_id' for country Indonesia. + """ + SHIPPING_CREDENTIAL_ID + + """ + Localized field key 'tax_credential_it' for country Italy. + """ + TAX_CREDENTIAL_IT + + """ + Localized field key 'tax_email_it' for country Italy. + """ + TAX_EMAIL_IT + + """ + Localized field key 'tax_credential_my' for country Malaysia. + """ + TAX_CREDENTIAL_MY + + """ + Localized field key 'shipping_credential_my' for country Malaysia. + """ + SHIPPING_CREDENTIAL_MY + + """ + Localized field key 'shipping_credential_mx' for country Mexico. + """ + SHIPPING_CREDENTIAL_MX + + """ + Localized field key 'tax_credential_mx' for country Mexico. + """ + TAX_CREDENTIAL_MX + + """ + Localized field key 'tax_credential_type_mx' for country Mexico. + """ + TAX_CREDENTIAL_TYPE_MX + + """ + Localized field key 'tax_credential_use_mx' for country Mexico. + """ + TAX_CREDENTIAL_USE_MX + + """ + Localized field key 'tax_credential_py' for country Paraguay. + """ + TAX_CREDENTIAL_PY + + """ + Localized field key 'shipping_credential_py' for country Paraguay. + """ + SHIPPING_CREDENTIAL_PY + + """ + Localized field key 'tax_credential_pe' for country Peru. + """ + TAX_CREDENTIAL_PE + + """ + Localized field key 'shipping_credential_pe' for country Peru. + """ + SHIPPING_CREDENTIAL_PE + + """ + Localized field key 'tax_credential_pt' for country Portugal. + """ + TAX_CREDENTIAL_PT + + """ + Localized field key 'shipping_credential_pt' for country Portugal. + """ + SHIPPING_CREDENTIAL_PT + + """ + Localized field key 'shipping_credential_kr' for country South Korea. + """ + SHIPPING_CREDENTIAL_KR + + """ + Localized field key 'tax_credential_es' for country Spain. + """ + TAX_CREDENTIAL_ES + + """ + Localized field key 'shipping_credential_es' for country Spain. + """ + SHIPPING_CREDENTIAL_ES + + """ + Localized field key 'shipping_credential_tw' for country Taiwan. + """ + SHIPPING_CREDENTIAL_TW + + """ + Localized field key 'tax_credential_tr' for country Turkey. + """ + TAX_CREDENTIAL_TR + + """ + Localized field key 'shipping_credential_tr' for country Turkey. + """ + SHIPPING_CREDENTIAL_TR +} + +""" +The purpose of a localized field. +""" +enum LocalizedFieldPurpose { + """ + Fields that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """ + Fields that are used for taxes purposes, for example, invoicing. + """ + TAX +} + +""" +A physical location where merchants store and fulfill inventory. Locations include retail stores, warehouses, popups, dropshippers, or other places where inventory is managed or stocked. + +Active locations can fulfill online orders when configured with shipping rates, local pickup, or local delivery options. Locations track inventory quantities for [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and process [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) fulfillment. Third-party apps using [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) can create and manage their own locations. +""" +type Location implements HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + Whether the location can be reactivated. If `false`, then trying to activate the location with the + [`LocationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation will return an error that describes why the location can't be activated. + """ + activatable: Boolean! + + """ + The address of this location. + """ + address: LocationAddress! + + """ + Whether the location address has been verified. + """ + addressVerified: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. + """ + createdAt: DateTime! + + """ + Whether this location can be deactivated. If `true`, then the location can be deactivated by calling the + [`LocationDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationDeactivate) + mutation. If `false`, then calling the mutation to deactivate it will return an error that describes why the + location can't be deactivated. + """ + deactivatable: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was deactivated at. For example, 3:30 pm on September 7, 2019 in the time zone of UTC (Universal Time Coordinated) is represented as `"2019-09-07T15:50:00Z`". + """ + deactivatedAt: String + + """ + Whether this location can be deleted. + """ + deletable: Boolean! + + """ + Name of the service provider that fulfills from this location. + """ + fulfillmentService: FulfillmentService + + """ + Whether this location can fulfill online orders. + """ + fulfillsOnlineOrders: Boolean! + + """ + Whether this location has active inventory. + """ + hasActiveInventory: Boolean! + + """ + Whether this location has orders that need to be fulfilled. + """ + hasUnfulfilledOrders: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantities of an inventory item at this location. + """ + inventoryLevel("The ID of the inventory item to obtain the inventory level for." inventoryItemId: ID!): InventoryLevel + + """ + A list of the quantities of the inventory items that can be stocked at this location. + """ + inventoryLevels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_group_id | id |\n| inventory_item_id | id |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryLevelConnection! + + """ + Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has + `activatable` set to `true` by calling the + [`locationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation. + """ + isActive: Boolean! + + """ + Whether this location is a fulfillment service. + """ + isFulfillmentService: Boolean! + + """ + Whether the location is your primary location for shipping inventory. + """ + isPrimary: Boolean! @deprecated(reason: "The concept of a primary location is deprecated, shipsInventory can be used to get a fallback location") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + Local pickup settings for the location. + """ + localPickupSettingsV2: DeliveryLocalPickupSettings + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The name of the location. + """ + name: String! + + """ + Legacy field indicating this location was designated for shipping. All locations with valid addresses can now ship. + """ + shipsInventory: Boolean! + + """ + List of suggested addresses for this location (empty if none). + """ + suggestedAddresses: [LocationSuggestedAddress!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `locationActivate` mutation. +""" +type LocationActivatePayload { + """ + The location that was activated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationActivateUserErrors: [LocationActivateUserError!]! +} + +""" +An error that occurs while activating a location. +""" +type LocationActivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationActivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationActivateUserError`. +""" +enum LocationActivateUserErrorCode { + """ + An error occurred while activating the location. + """ + GENERIC_ERROR + + """ + Shop has reached its location limit. + """ + LOCATION_LIMIT + + """ + This location currently cannot be activated as inventory, pending orders or transfers are being relocated from this location. + """ + HAS_ONGOING_RELOCATION + + """ + Location not found. + """ + LOCATION_NOT_FOUND + + """ + There is already an active location with this name. + """ + HAS_NON_UNIQUE_NAME + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +The input fields to use to specify the address while adding a location. +""" +input LocationAddAddressInput { + """ + The first line of the address. + """ + address1: String + + """ + The second line of the address. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The phone number of the location. + """ + phone: String + + """ + The ZIP code or postal code of the address. + """ + zip: String + + """ + The two-letter code of country for the address. + """ + countryCode: CountryCode! + + """ + The code for the region of the address, such as the state, province, or district. + For example CA for California, United States. + """ + provinceCode: String +} + +""" +The input fields to use to add a location. +""" +input LocationAddInput { + """ + The name of the location. + """ + name: String! + + """ + The address of the location. + """ + address: LocationAddAddressInput! + + """ + Whether inventory at this location is available for sale online. + """ + fulfillsOnlineOrders: Boolean = true + + """ + Additional customizable information to associate with the location. + """ + metafields: [MetafieldInput!] +} + +""" +Return type for `locationAdd` mutation. +""" +type LocationAddPayload { + """ + The location that was added. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationAddUserError!]! +} + +""" +An error that occurs while adding a location. +""" +type LocationAddUserError implements DisplayableError { + """ + The error code. + """ + code: LocationAddUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationAddUserError`. +""" +enum LocationAddUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is blank. + """ + BLANK + + """ + The ZIP code is not a valid US ZIP code. + """ + INVALID_US_ZIPCODE + + """ + An error occurred while adding the location. + """ + GENERIC_ERROR + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + An internal error occurred. + """ + INTERNAL_ERROR +} + +""" +Represents the address of a location. +""" +type LocationAddress { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The country of the location. + """ + country: String + + """ + The country code of the location. + """ + countryCode: String + + """ + A formatted version of the address for the location. + """ + formatted: [String!]! + + """ + The approximate latitude coordinates of the location. + """ + latitude: Float + + """ + The approximate longitude coordinates of the location. + """ + longitude: Float + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The code for the province, state, or district of the address of the location. + """ + provinceCode: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple Locations. +""" +type LocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocationEdge!]! + + """ + A list of nodes that are contained in LocationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Location!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `locationDeactivate` mutation. +""" +type LocationDeactivatePayload { + """ + The location that was deactivated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeactivateUserErrors: [LocationDeactivateUserError!]! +} + +""" +The possible errors that can be returned when executing the `locationDeactivate` mutation. +""" +type LocationDeactivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeactivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeactivateUserError`. +""" +enum LocationDeactivateUserErrorCode { + """ + Location not found. + """ + LOCATION_NOT_FOUND + + """ + Location either has a fulfillment service or is the only location with a shipping address. + """ + PERMANENTLY_BLOCKED_FROM_DEACTIVATION_ERROR + + """ + Location has incoming inventory. The location can be deactivated after the inventory has been received. + """ + TEMPORARILY_BLOCKED_FROM_DEACTIVATION_ERROR + + """ + Location needs to be removed from Shopify POS for Retail subscription in Point of Sale channel. + """ + HAS_ACTIVE_RETAIL_SUBSCRIPTIONS + + """ + Destination location is the same as the location to be deactivated. + """ + DESTINATION_LOCATION_IS_THE_SAME_LOCATION + + """ + Destination location is not found or inactive. + """ + DESTINATION_LOCATION_NOT_FOUND_OR_INACTIVE + + """ + Destination location is not Shopify managed. + """ + DESTINATION_LOCATION_NOT_SHOPIFY_MANAGED + + """ + Location could not be deactivated without specifying where to relocate inventory at the location. + """ + HAS_ACTIVE_INVENTORY_ERROR + + """ + Location could not be deactivated because it has pending orders. + """ + HAS_FULFILLMENT_ORDERS_ERROR + + """ + Location could not be deactivated because it has incoming inventory quantities from third party + applications. + """ + HAS_INCOMING_FROM_EXTERNAL_DOCUMENT_SOURCES + + """ + Location could not be deactivated because it has open Shopify Fulfillment Network transfers. + """ + HAS_INCOMING_MOVEMENTS_ERROR + + """ + Location could not be deactivated because it has open purchase orders. + """ + HAS_OPEN_PURCHASE_ORDERS_ERROR + + """ + Failed to relocate active inventories to the destination location. + """ + FAILED_TO_RELOCATE_ACTIVE_INVENTORIES + + """ + Failed to relocate open purchase orders to the destination location. + """ + FAILED_TO_RELOCATE_OPEN_PURCHASE_ORDERS + + """ + Failed to relocate incoming movements to the destination location. + """ + FAILED_TO_RELOCATE_INCOMING_MOVEMENTS + + """ + At least one location must fulfill online orders. + """ + CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT + + """ + This request is currently in progress, please try again. + """ + IDEMPOTENCY_CONCURRENT_REQUEST + + """ + The same idempotency key cannot be used with different operation parameters. + """ + IDEMPOTENCY_KEY_PARAMETER_MISMATCH +} + +""" +Return type for `locationDelete` mutation. +""" +type LocationDeletePayload { + """ + The ID of the location that was deleted. + """ + deletedLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeleteUserErrors: [LocationDeleteUserError!]! +} + +""" +An error that occurs while deleting a location. +""" +type LocationDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeleteUserError`. +""" +enum LocationDeleteUserErrorCode { + """ + Location not found. + """ + LOCATION_NOT_FOUND + + """ + The location cannot be deleted while it is active. + """ + LOCATION_IS_ACTIVE + + """ + An error occurred while deleting the location. + """ + GENERIC_ERROR + + """ + The location cannot be deleted while it has inventory. + """ + LOCATION_HAS_INVENTORY + + """ + The location cannot be deleted while it has pending orders. + """ + LOCATION_HAS_PENDING_ORDERS + + """ + The location cannot be deleted while it has any active Retail subscriptions in the Point of Sale channel. + """ + LOCATION_HAS_ACTIVE_RETAIL_SUBSCRIPTION +} + +""" +An auto-generated type which holds one Location and a cursor during pagination. +""" +type LocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocationEdge. + """ + node: Location! +} + +""" +The input fields to use to edit the address of a location. +""" +input LocationEditAddressInput { + """ + The first line of the address. + """ + address1: String + + """ + The second line of the address. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The phone number of the location. + """ + phone: String + + """ + The ZIP code or postal code of the location. + """ + zip: String + + """ + The two-letter code of country for the address. + """ + countryCode: CountryCode + + """ + The code for the region of the address, such as the state, province, or district. + For example CA for California, United States. + """ + provinceCode: String +} + +""" +The input fields to use to edit a location. +""" +input LocationEditInput { + """ + The name of the location. + """ + name: String + + """ + The address of the location. + """ + address: LocationEditAddressInput + + """ + Whether inventory at this location is available for sale online. + + **Note:** This can't be disabled for fulfillment service locations. + """ + fulfillsOnlineOrders: Boolean + + """ + Additional customizable information to associate with the location. + """ + metafields: [MetafieldInput!] +} + +""" +Return type for `locationEdit` mutation. +""" +type LocationEditPayload { + """ + The location that was edited. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationEditUserError!]! +} + +""" +An error that occurs while editing a location. +""" +type LocationEditUserError implements DisplayableError { + """ + The error code. + """ + code: LocationEditUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationEditUserError`. +""" +enum LocationEditUserErrorCode { + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is blank. + """ + BLANK + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + The ZIP code is not a valid US ZIP code. + """ + INVALID_US_ZIPCODE + + """ + An error occurred while editing the location. + """ + GENERIC_ERROR + + """ + At least one location must fulfill online orders. + """ + CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT + + """ + Cannot modify the online order fulfillment preference for fulfillment service locations. + """ + CANNOT_MODIFY_ONLINE_ORDER_FULFILLMENT_FOR_FS_LOCATION + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + An internal error occurred. + """ + INTERNAL_ERROR +} + +""" +The input fields for identifying a location. +""" +input LocationIdentifierInput @oneOf { + """ + The ID of the location. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the location. + """ + customId: UniqueMetafieldValueInput +} + +""" +Return type for `locationLocalPickupDisable` mutation. +""" +type LocationLocalPickupDisablePayload { + """ + The ID of the location for which local pickup was disabled. + """ + locationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +Return type for `locationLocalPickupEnable` mutation. +""" +type LocationLocalPickupEnablePayload { + """ + The local pickup settings that were enabled. + """ + localPickupSettings: DeliveryLocalPickupSettings + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +A snapshot of location details including name and address captured at a specific point in time. Refer to the parent model to know the lifecycle. +""" +type LocationSnapshot { + """ + The address details of the location as they were when the snapshot was recorded. + """ + address: LocationAddress! + + """ + A reference to the live Location object, if it still exists and is accessible. This provides current details of the location, which may differ from the snapshotted name and address. + """ + location: Location + + """ + The name of the location as it was when the snapshot was recorded. + """ + name: String! + + """ + The date and time when these snapshot details (name and address) were recorded. + """ + snapshottedAt: DateTime! +} + +""" +The set of valid sort keys for the Location query. +""" +enum LocationSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Represents a suggested address for a location. +""" +type LocationSuggestedAddress { + """ + The first line of the suggested address. + """ + address1: String + + """ + The second line of the suggested address. + """ + address2: String + + """ + The city of the suggested address. + """ + city: String + + """ + The country of the suggested address. + """ + country: String + + """ + The country code of the suggested address. + """ + countryCode: CountryCode + + """ + A formatted version of the suggested address. + """ + formatted: [String!]! + + """ + The province of the suggested address. + """ + province: String + + """ + The code for the province, state, or district of the suggested address. + """ + provinceCode: String + + """ + The ZIP code of the suggested address. + """ + zip: String +} + +""" +A condition checking the location that the visitor is shopping from. +""" +type LocationsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The locations that comprise the market. + """ + locations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocationConnection! +} + +""" +A physical mailing address. For example, a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s default address and an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order)'s billing address are both mailing addresses. Stores standard address components, customer name information, and company details. + +The address includes geographic coordinates ([`latitude`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.latitude) and [`longitude`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.longitude)). You can format addresses for display using the [`formatted`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.formatted) field with options to include or exclude name and company information. +""" +type MailingAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + Whether the address corresponds to recognized latitude and longitude values. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted("Whether to include the customer's name in the formatted address." withName: Boolean = false, "Whether to include the customer's company in the formatted address." withCompany: Boolean = true): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer. + """ + lastName: String + + """ + The latitude coordinate of the customer address. + """ + latitude: Float + + """ + The longitude coordinate of the customer address. + """ + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The time zone of the address. + """ + timeZone: String + + """ + The validation status that's leveraged by the address validation feature in the Shopify Admin. + See ["Validating addresses in your Shopify admin"](https://help.shopify.com/manual/fulfillment/managing-orders/validating-order-address) for more details. + """ + validationResultSummary: MailingAddressValidationResult + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. +""" +type MailingAddressConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MailingAddressEdge!]! + + """ + A list of nodes that are contained in MailingAddressEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MailingAddress!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MailingAddress and a cursor during pagination. +""" +type MailingAddressEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MailingAddressEdge. + """ + node: MailingAddress! +} + +""" +The input fields to create or update a mailing address. +""" +input MailingAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String @deprecated(reason: "Use `countryCode` instead.") + + """ + The two-letter code for the country of the address. + """ + countryCode: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + id: ID @deprecated(reason: "Not needed for 90% of mutations, and provided separately where it is needed.") + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String @deprecated(reason: "Use `provinceCode` instead.") + + """ + The code for the region of the address, such as the province, state, or district. + For example QC for Quebec, Canada. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Highest level of validation concerns identified for the address. +""" +enum MailingAddressValidationResult { + """ + Indicates that the address has been validated and no issues were found. + """ + NO_ISSUES + + """ + Indicates that the address has been validated and is very likely to contain invalid information. + """ + ERROR + + """ + Indicates that the address has been validated and might contain invalid information. + """ + WARNING +} + +""" +The type of resource a payment mandate can be used for. +""" +enum MandateResourceType { + """ + A credential stored on file for merchant and customer initiated transactions. + """ + CREDENTIAL_ON_FILE + + """ + A credential stored on file for checkout. + """ + CHECKOUT + + """ + A credential stored on file for a Draft Order. + """ + DRAFT_ORDER + + """ + A credential stored on file for an Order. + """ + ORDER + + """ + A credential stored for subscription billing attempts. + """ + SUBSCRIPTIONS +} + +""" +Manual discount applications capture the intentions of a discount that was manually created for an order. + +Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ManualDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the discount application. + """ + description: String + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the discount application. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A merchant-defined group of buyers identified by conditions such as their +region, retail location, or company location. Each market allows configuration +of a distinct, localized buyer experience. Customizations include, but are +not limited to, +[currency](https://shopify.dev/api/admin-graphql/current/mutations/marketCurrencySettingsUpdate), +[pricing and product availability](https://shopify.dev/apps/internationalization/product-price-lists), +[web presence](https://shopify.dev/api/admin-graphql/current/objects/MarketWebPresence), +and content translations. +""" +type Market implements HasMetafieldDefinitions & HasMetafields & Node { + """ + Whether the market has a customization with the given ID. + """ + assignedCustomization("The ID of the customization that the market has been assigned to." customizationId: ID!): Boolean! + + """ + The catalogs that belong to the market. + """ + catalogs("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketCatalogConnection! + + """ + The number of catalogs that belong to the market. + """ + catalogsCount: Count + + """ + The conditions under which a visitor is in the market. + """ + conditions: MarketConditions + + """ + The market’s currency settings. + """ + currencySettings: MarketCurrencySettings + + """ + Whether the market is enabled to receive visitors and sales. **Note**: Regions in inactive + markets can't be selected on the storefront or in checkout. + """ + enabled: Boolean! @deprecated(reason: "Use `status` instead.") + + """ + A short, human-readable unique identifier for the market. This is changeable by the merchant. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The name of the market. Not shown to customers. + """ + name: String! + + """ + The inclusive pricing strategy for a market. This determines if prices include duties and / or taxes. + """ + priceInclusions: MarketPriceInclusions + + """ + The market’s price list, which specifies a percentage-based price adjustment as well as + fixed price overrides for specific variants. + + Markets with multiple catalogs can have multiple price lists. To query which price lists are connected to + a market, please query for price lists through the catalogs connection. + """ + priceList: PriceList @deprecated(reason: "Use `catalogs` instead.") + + """ + Whether the market is the shop’s primary market. + """ + primary: Boolean! @deprecated(reason: "This field is deprecated and will be removed in the future.") + + """ + The regions that comprise the market. + """ + regions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketRegionConnection! @deprecated(reason: "This field is deprecated and will be removed in the future. Use `conditions.regionConditions` instead.") + + """ + Status of the market. Replaces the enabled field. + """ + status: MarketStatus! + + """ + The type of the market. + """ + type: MarketType! + + """ + The market’s web presence, which defines its SEO strategy. This can be a different domain, + subdomain, or subfolders of the primary domain. Each web presence comprises one or more + language variants. If a market doesn't have its own web presence, then the market is accessible on the + primary market's domains using [country + selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + If it's the primary market and it has multiple web presences, then this field will return the primary domain web presence. + """ + webPresence: MarketWebPresence @deprecated(reason: "Use `webPresences` instead.") + + """ + The market’s web presences, which defines its SEO strategy. This can be a different domain, + subdomain, or subfolders of the primary domain. Each web presence comprises one or more + language variants. If a market doesn't have any web presences, then the market is accessible on the + primary market's domains using [country + selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + """ + webPresences("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketWebPresenceConnection! +} + +""" +A catalog for managing product availability and pricing for specific [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) contexts. Each catalog links to one or more markets. The catalog can optionally include a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) to control which [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects customers see, and a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) for market-specific pricing adjustments. When a publication isn't associated with the catalog, product availability is determined by the sales channel. + +Use catalogs to create distinct shopping experiences for different geographic regions or customer segments. + +Learn more about [building a catalog](https://shopify.dev/docs/apps/build/markets/build-catalog) and [managing markets](https://shopify.dev/docs/apps/build/markets). +""" +type MarketCatalog implements Catalog & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The markets associated with the catalog. + """ + markets("Filters markets by type." type: MarketType = null, "Filters markets by status." status: MarketStatus = null, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketConnection! + + """ + The number of markets associated with the catalog. + """ + marketsCount("Filters markets by type." type: MarketType = null, "Filters markets by status." status: MarketStatus = null, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| market_condition_types | string | A comma-separated list of condition types. |\n| market_type | string |\n| name | string |\n| status | string | | - `ACTIVE`
- `DRAFT` |\n| wildcard_company_location_with_country_code | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int): Count + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple MarketCatalogs. +""" +type MarketCatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketCatalogEdge!]! + + """ + A list of nodes that are contained in MarketCatalogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketCatalog!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketCatalog and a cursor during pagination. +""" +type MarketCatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketCatalogEdge. + """ + node: MarketCatalog! +} + +""" +The application level for a market condition. +""" +enum MarketConditionApplicationType { + """ + The condition matches specified records of a given type. + """ + SPECIFIED + + """ + The condition matches all records of a given type. + """ + ALL +} + +""" +The condition types for the condition set. +""" +enum MarketConditionType { + """ + The condition checks the visitor's region. + """ + REGION + + """ + The condition checks the location that the visitor is shopping from. + """ + LOCATION + + """ + The condition checks the company location that the visitor is purchasing for. + """ + COMPANY_LOCATION +} + +""" +The conditions that determine whether a visitor is in a market. +""" +type MarketConditions { + """ + The company location conditions that determine whether a visitor is in the market. + """ + companyLocationsCondition: CompanyLocationsCondition + + """ + The set of condition types that are defined for the market. + """ + conditionTypes: [MarketConditionType!]! + + """ + The retail location conditions that determine whether a visitor is in the market. + """ + locationsCondition: LocationsCondition + + """ + The region conditions that determine whether a visitor is in the market. + """ + regionsCondition: RegionsCondition +} + +""" +The input fields required to create or update a company location market condition. +""" +input MarketConditionsCompanyLocationsInput @oneOf { + """ + A list of company location IDs to include in the market condition. + """ + companyLocationIds: [ID!] + + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType +} + +""" +The input fields required to create or update the market conditions. +""" +input MarketConditionsInput { + """ + The company locations to include in the market conditions. + """ + companyLocationsCondition: MarketConditionsCompanyLocationsInput + + """ + The locations to include in the market conditions. + """ + locationsCondition: MarketConditionsLocationsInput + + """ + The regions to include in the market conditions. + """ + regionsCondition: MarketConditionsRegionsInput +} + +""" +The input fields required to create or update a location market condition. +""" +input MarketConditionsLocationsInput @oneOf { + """ + A list of location IDs to include in the market condition. + """ + locationIds: [ID!] + + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType +} + +""" +The input fields to specify a region condition. +""" +input MarketConditionsRegionInput { + """ + A country code to which this condition should apply. + """ + countryCode: CountryCode! +} + +""" +The input fields required to create or update a region market condition. +""" +input MarketConditionsRegionsInput @oneOf { + """ + A list of market region IDs to include in the market condition. + """ + regionIds: [ID!] + + """ + A list of market regions to include in the market condition. + """ + regions: [MarketConditionsRegionInput!] + + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType +} + +""" +The input fields required to update a market condition. +""" +input MarketConditionsUpdateInput { + """ + The conditions to update to the market condition. + """ + conditionsToAdd: MarketConditionsInput + + """ + The conditions to delete from the market condition. + """ + conditionsToDelete: MarketConditionsInput +} + +""" +An auto-generated type for paginating through multiple Markets. +""" +type MarketConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketEdge!]! + + """ + A list of nodes that are contained in MarketEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Market!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a market. +""" +input MarketCreateInput { + """ + The name of the market. Not shown to customers. + """ + name: String! + + """ + A unique identifier for the market. For example `"ca"`. + If the handle isn't provided, then the handle is auto-generated based on the country or name. + """ + handle: String + + """ + Whether the market is enabled to receive visitors and sales. If a + value isn't provided, then the market is enabled by default if all + included regions have shipping rates, and disabled if any regions don't + have shipping rates. + + **Note**: Regions in inactive markets can't be selected on the + storefront or in checkout. + """ + enabled: Boolean @deprecated(reason: "Use `status` instead.") + + """ + The regions to be included in the market. Each region can only be included in one market at + a time. + """ + regions: [MarketRegionCreateInput!] @deprecated(reason: "Use `conditions` instead.") + + """ + The conditions that apply to the market. + """ + conditions: MarketConditionsInput + + """ + Catalog IDs to include in the market. + """ + catalogs: [ID!] + + """ + Whether to update duplicate market's status to draft. + """ + makeDuplicateRegionMarketsDraft: Boolean @deprecated(reason: "Use `makeDuplicateUniqueMarketsDraft` instead.") + + """ + Whether to update duplicate region or wildcard markets' status to draft. + """ + makeDuplicateUniqueMarketsDraft: Boolean + + """ + The status of the market. + """ + status: MarketStatus + + """ + Web presence IDs to include in the market. + """ + webPresences: [ID!] + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput +} + +""" +Return type for `marketCreate` mutation. +""" +type MarketCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +A market's currency settings. +""" +type MarketCurrencySettings { + """ + The currency which this market's customers must use if local currencies are disabled. + """ + baseCurrency: CurrencySetting! + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean! + + """ + Whether or not rounding is enabled on multi-currency prices. + """ + roundingEnabled: Boolean! +} + +""" +The input fields used to update the currency settings of a market. +""" +input MarketCurrencySettingsUpdateInput { + """ + The currency which this market’s customers must use if local currencies are disabled. + """ + baseCurrency: CurrencyCode + + """ + The manual exchange rate that will be used to convert shop currency prices. If null, then the automatic exchange rates will be used. + """ + baseCurrencyManualRate: Decimal + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean + + """ + Whether or not rounding is enabled on multi-currency prices. + """ + roundingEnabled: Boolean +} + +""" +Return type for `marketCurrencySettingsUpdate` mutation. +""" +type MarketCurrencySettingsUpdatePayload { + """ + The market object. + """ + market: Market @deprecated(reason: "Use `marketCreate` and `marketUpdate` mutations instead.") + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketCurrencySettingsUserError!]! +} + +""" +Error codes for failed market multi-currency operations. +""" +type MarketCurrencySettingsUserError implements DisplayableError { + """ + The error code. + """ + code: MarketCurrencySettingsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketCurrencySettingsUserError`. +""" +enum MarketCurrencySettingsUserErrorCode { + """ + The specified market wasn't found. + """ + MARKET_NOT_FOUND + + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """ + This action is restricted if unified markets is enabled. + """ + UNIFIED_MARKETS_ENABLED + + """ + The shop's payment gateway does not support enabling more than one currency. + """ + MULTIPLE_CURRENCIES_NOT_SUPPORTED + + """ + Can't enable or disable local currencies on a single country market. + """ + NO_LOCAL_CURRENCIES_ON_SINGLE_COUNTRY_MARKET + + """ + The specified currency is not supported. + """ + UNSUPPORTED_CURRENCY + + """ + The primary market must use the shop currency. + """ + PRIMARY_MARKET_USES_SHOP_CURRENCY +} + +""" +Return type for `marketDelete` mutation. +""" +type MarketDeletePayload { + """ + The ID of the deleted market. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one Market and a cursor during pagination. +""" +type MarketEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketEdge. + """ + node: Market! +} + +""" +The market localizable content of a resource's field. +""" +type MarketLocalizableContent { + """ + The hash digest representation of the content value. + """ + digest: String + + """ + The resource field that's being localized. + """ + key: String! + + """ + The content value. + """ + value: String +} + +""" +A resource that has market localizable fields. +""" +type MarketLocalizableResource { + """ + The market localizable content. + """ + marketLocalizableContent: [MarketLocalizableContent!]! + + """ + Market localizations for the market localizable content. + """ + marketLocalizations("Filters market localizations by market ID." marketId: ID!): [MarketLocalization!]! + + """ + The GID of the resource. + """ + resourceId: ID! +} + +""" +An auto-generated type for paginating through multiple MarketLocalizableResources. +""" +type MarketLocalizableResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketLocalizableResourceEdge!]! + + """ + A list of nodes that are contained in MarketLocalizableResourceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketLocalizableResource!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketLocalizableResource and a cursor during pagination. +""" +type MarketLocalizableResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketLocalizableResourceEdge. + """ + node: MarketLocalizableResource! +} + +""" +The type of resources that are market localizable. +""" +enum MarketLocalizableResourceType { + """ + A metafield. Market localizable fields: `value`. + """ + METAFIELD + + """ + A Metaobject. Market Localizable fields are determined by the Metaobject type. + """ + METAOBJECT +} + +""" +The market localization of a field within a resource, which is determined by the market ID. +""" +type MarketLocalization { + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """ + The market that the localization is specific to. + """ + market: Market! + + """ + Whether the original content has changed since this market localization was updated. + """ + outdated: Boolean! + + """ + The date and time when the market localization was updated. + """ + updatedAt: DateTime + + """ + The value of the market localization. + """ + value: String +} + +""" +The input fields and values for creating or updating a market localization. +""" +input MarketLocalizationRegisterInput { + """ + The ID of the market that the localization is specific to. + """ + marketId: ID! + + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """ + The value of the market localization. + """ + value: String! + + """ + A hash digest representation of the content being localized. + """ + marketLocalizableContentDigest: String! +} + +""" +Return type for `marketLocalizationsRegister` mutation. +""" +type MarketLocalizationsRegisterPayload { + """ + The market localizations that were created or updated. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +Return type for `marketLocalizationsRemove` mutation. +""" +type MarketLocalizationsRemovePayload { + """ + The market localizations that were deleted. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +The inclusive pricing strategy for a market. +""" +type MarketPriceInclusions { + """ + The inclusive duties pricing strategy of the market. This determines if prices include duties. + """ + inclusiveDutiesPricingStrategy: InclusiveDutiesPricingStrategy! + + """ + The inclusive tax pricing strategy of the market. This determines if prices include taxes. + """ + inclusiveTaxPricingStrategy: InclusiveTaxPricingStrategy! +} + +""" +The input fields used to create a price inclusion. +""" +input MarketPriceInclusionsInput { + """ + The inclusive tax pricing strategy for the market. + """ + taxPricingStrategy: InclusiveTaxPricingStrategy + + """ + The inclusive duties pricing strategy for the market. + """ + dutiesPricingStrategy: InclusiveDutiesPricingStrategy +} + +""" +A geographic region which comprises a market. +""" +interface MarketRegion { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple MarketRegions. +""" +type MarketRegionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketRegionEdge!]! + + """ + A list of nodes that are contained in MarketRegionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketRegion!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A country which comprises a market. +""" +type MarketRegionCountry implements MarketRegion & Node { + """ + The ISO code identifying the country. + """ + code: CountryCode! + + """ + The currency which this country uses given its market settings. + """ + currency: CurrencySetting! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +The input fields for creating a market region with exactly one required option. +""" +input MarketRegionCreateInput { + """ + A country code for the region. + """ + countryCode: CountryCode! +} + +""" +Return type for `marketRegionDelete` mutation. +""" +type MarketRegionDeletePayload { + """ + The ID of the deleted market region. + """ + deletedId: ID + + """ + The parent market object of the deleted region. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketRegion and a cursor during pagination. +""" +type MarketRegionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketRegionEdge. + """ + node: MarketRegion! +} + +""" +Return type for `marketRegionsCreate` mutation. +""" +type MarketRegionsCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketRegionsDelete` mutation. +""" +type MarketRegionsDeletePayload { + """ + The ID of the deleted market region. + """ + deletedIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +The possible market statuses. +""" +enum MarketStatus { + """ + The market is active. + """ + ACTIVE + + """ + The market is in draft. + """ + DRAFT +} + +""" +The market types. +""" +enum MarketType { + """ + The market does not apply to any visitor. + """ + NONE + + """ + The market applies to the visitor based on region. + """ + REGION + + """ + The market applies to the visitor based on the location. + """ + LOCATION + + """ + The market applies to the visitor based on the company location. + """ + COMPANY_LOCATION +} + +""" +The input fields used to update a market. +""" +input MarketUpdateInput { + """ + The name of the market. Not shown to customers. + """ + name: String + + """ + A unique identifier for the market. For example `"ca"`. + """ + handle: String + + """ + Whether the market is enabled to receive visitors and sales. **Note**: Regions in + inactive markets cannot be selected on the storefront or in checkout. + """ + enabled: Boolean @deprecated(reason: "Use `status` instead.") + + """ + The conditions to update. + """ + conditions: MarketConditionsUpdateInput + + """ + Catalog IDs to include in the market. + """ + catalogsToAdd: [ID!] + + """ + Catalog IDs to remove from the market. + """ + catalogsToDelete: [ID!] + + """ + The web presences to add to the market. + """ + webPresencesToAdd: [ID!] + + """ + The web presences to remove from the market. + """ + webPresencesToDelete: [ID!] + + """ + Whether to update duplicate market's status to draft. + """ + makeDuplicateRegionMarketsDraft: Boolean @deprecated(reason: "Use `makeDuplicateUniqueMarketsDraft` instead.") + + """ + Whether to update duplicate region or wildcard markets' status to draft. + """ + makeDuplicateUniqueMarketsDraft: Boolean + + """ + The status of the market. + """ + status: MarketStatus + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + Remove any currency settings that are defined for the market. + """ + removeCurrencySettings: Boolean + + """ + The price inclusions to remove from the market. + """ + removePriceInclusions: Boolean + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput +} + +""" +Return type for `marketUpdate` mutation. +""" +type MarketUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Defines errors encountered while managing a Market. +""" +type MarketUserError implements DisplayableError { + """ + The error code. + """ + code: MarketUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketUserError`. +""" +enum MarketUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is blank. + """ + BLANK + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The market wasn't found. + """ + MARKET_NOT_FOUND + + """ + The market region wasn't found. + """ + REGION_NOT_FOUND + + """ + The province doesn't exist. + """ + PROVINCE_DOES_NOT_EXIST + + """ + The market web presence wasn't found. + """ + WEB_PRESENCE_NOT_FOUND + + """ + Can't add regions to the primary market. + """ + CANNOT_ADD_REGIONS_TO_PRIMARY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + Can't delete the only region in a market. + """ + CANNOT_DELETE_ONLY_REGION + + """ + Exactly one input option is required. + """ + REQUIRES_EXACTLY_ONE_OPTION @deprecated(reason: "No longer used") + + """ + Can't delete the primary market. + """ + CANNOT_DELETE_PRIMARY_MARKET + + """ + Exceeds max multi-context markets. + """ + EXCEEDS_MAX_MULTI_CONTEXT_MARKETS + + """ + Domain was not found. + """ + DOMAIN_NOT_FOUND + + """ + The subfolder suffix must contain only letters. + """ + SUBFOLDER_SUFFIX_MUST_CONTAIN_ONLY_LETTERS @deprecated(reason: "No longer used") + + """ + The subfolder suffix must be at least 2 letters. + """ + SUBFOLDER_SUFFIX_MUST_BE_AT_LEAST_2_LETTERS + + """ + The subfolder suffix is invalid, please provide a different value. + """ + SUBFOLDER_SUFFIX_CANNOT_BE_SCRIPT_CODE + + """ + No languages selected. + """ + NO_LANGUAGES + + """ + Can't enable or disable local currencies on a single country market. + """ + NO_LOCAL_CURRENCIES_ON_SINGLE_COUNTRY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + Rounding is not supported if unified markets are not enabled. + """ + NO_ROUNDING_ON_LEGACY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + Duplicates found in languages. + """ + DUPLICATE_LANGUAGES + + """ + Duplicate region market. + """ + DUPLICATE_REGION_MARKET + + """ + Duplicate unique market. + """ + DUPLICATE_UNIQUE_MARKET + + """ + Cannot add region-specific language. + """ + REGION_SPECIFIC_LANGUAGE + + """ + Can't pass both `subfolderSuffix` and `domainId`. + """ + CANNOT_HAVE_SUBFOLDER_AND_DOMAIN + + """ + Can't add the web presence to the primary market. + """ + CANNOT_ADD_WEB_PRESENCE_TO_PRIMARY_MARKET @deprecated(reason: "No longer used") + + """ + Can't add another web presence to the market. + """ + MARKET_REACHED_WEB_PRESENCE_LIMIT + + """ + Market and condition types are not compatible with each other. + """ + MARKET_NOT_COMPATIBLE_WITH_CONDITION_TYPES @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + The country code is missing. + """ + MISSING_COUNTRY_CODE + + """ + The province code is missing. + """ + MISSING_PROVINCE_CODE + + """ + Can't have multiple subfolder web presences per market. + """ + CANNOT_HAVE_MULTIPLE_SUBFOLDERS_PER_MARKET + + """ + Can't have both subfolder and domain web presences. + """ + CANNOT_HAVE_BOTH_SUBFOLDER_AND_DOMAIN_WEB_PRESENCES + + """ + One of `subfolderSuffix` or `domainId` is required. + """ + REQUIRES_DOMAIN_OR_SUBFOLDER + + """ + The primary market must use the primary domain. + """ + PRIMARY_MARKET_MUST_USE_PRIMARY_DOMAIN @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + Can't delete the primary market's web presence. + """ + CANNOT_DELETE_PRIMARY_MARKET_WEB_PRESENCE @deprecated(reason: "No longer used") + + """ + Can't have more than 50 markets. + """ + SHOP_REACHED_MARKETS_LIMIT @deprecated(reason: "No longer used") + + """ + Can't disable the primary market. + """ + CANNOT_DISABLE_PRIMARY_MARKET + + """ + The language isn't published to the store. + """ + UNPUBLISHED_LANGUAGE + + """ + The language isn't enabled on the store. + """ + DISABLED_LANGUAGE + + """ + Can't set default locale to null. + """ + CANNOT_SET_DEFAULT_LOCALE_TO_NULL + + """ + Can't add unsupported country or region. + """ + UNSUPPORTED_COUNTRY_REGION + + """ + Can't add customer account domain to a market. + """ + CANNOT_ADD_CUSTOMER_DOMAIN + + """ + An error occurred. See the message for details. + """ + GENERIC_ERROR + + """ + Another modification to this market is in progress. + """ + MARKET_UPDATE_CONCURRENT_MODIFICATION + + """ + Invalid combination of status and enabled. + """ + INVALID_STATUS_AND_ENABLED_COMBINATION + + """ + The province format is invalid. + """ + INVALID_PROVINCE_FORMAT + + """ + One or more condition IDs were not found. + """ + CONDITIONS_NOT_FOUND + + """ + Specified conditions cannot be empty. + """ + SPECIFIED_CONDITIONS_CANNOT_BE_EMPTY + + """ + One or more customizations were not found. + """ + CUSTOMIZATIONS_NOT_FOUND + + """ + Matching ALL or NONE isn't supported for this driver type. + """ + WILDCARD_NOT_SUPPORTED + + """ + With an ID list in input, SPECIFIED is not needed. + """ + SPECIFIED_NOT_VALID_FOR_INPUT + + """ + Web presences and condition types are not compatible with each other. + """ + WEB_PRESENCE_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """ + Catalogs and condition types are not compatible with each other. + """ + CATALOG_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """ + A market can only have market catalogs. + """ + CATALOG_TYPE_NOT_SUPPORTED + + """ + Inclusive pricing cannot be added to a market with the specified condition types. + """ + INCLUSIVE_PRICING_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """ + The specified conditions are not compatible with each other. + """ + INCOMPATIBLE_CONDITIONS + + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """ + The shop's payment gateway does not support enabling more than one currency. + """ + MULTIPLE_CURRENCIES_NOT_SUPPORTED + + """ + The specified currency is not supported. + """ + UNSUPPORTED_CURRENCY + + """ + The shop must have a web presence that uses the primary domain. + """ + SHOP_MUST_HAVE_PRIMARY_DOMAIN_WEB_PRESENCE + + """ + Can’t delete, disable, or change the type of the last region market. + """ + MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET + + """ + The user doesn't have permission access to create or edit markets. + """ + USER_LACKS_PERMISSION + + """ + Contains regions that cannot be managed. + """ + CONTAINS_REGIONS_THAT_CANNOT_BE_MANAGED + + """ + Unified markets are not enabled. + """ + UNIFIED_MARKETS_NOT_ENABLED @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """ + Can't add web presence to the another market. + """ + WEB_PRESENCE_REACHED_MARKETS_LIMIT + + """ + A web presence cannot be added to a market with type retail location. + """ + WEB_PRESENCE_RETAIL_LOCATION @deprecated(reason: "No longer used") + + """ + Catalog condition types must be the same for all conditions on a catalog. + """ + CATALOG_CONDITION_TYPES_MUST_BE_THE_SAME + + """ + A direct connection catalog can't be attached to a market. + """ + MARKET_CANT_HAVE_DIRECT_CONNECTION_CATALOG + + """ + Your shop is not entitled to activate markets of this type. + """ + NOT_ENTITLED_TO_ACTIVATE_MARKET + + """ + B2B markets must be merchant managed. + """ + B2B_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + POS location markets must be merchant managed. + """ + POS_LOCATION_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + Catalogs created by Managed Markets cannot be added to a market. + """ + MANAGED_MARKETS_CATALOG_NOT_ALLOWED + + """ + Resources created by Managed Markets cannot be added to a market. + """ + MANAGED_MARKETS_RESOURCE_NOT_ALLOWED + + """ + Retail location currency must be local. + """ + RETAIL_LOCATION_CURRENCY_MUST_BE_LOCAL + + """ + Catalogs with volume pricing or quantity rules are not supported for the specified condition types. + """ + CATALOGS_WITH_VOLUME_PRICING_OR_QUANTITY_RULES_NOT_SUPPORTED + + """ + All retail locations in a market must be in the same country. + """ + MIXED_COUNTRY_LOCATIONS_NOT_ALLOWED + + """ + Location match all is only valid with one non-match all region. + """ + LOCATION_MATCH_ALL_REQUIRES_ONE_SPECIFIC_REGION + + """ + A location's country does not match the region's country. + """ + LOCATION_REGION_COUNTRY_MISMATCH + + """ + Managing this catalog is not supported by your plan. + """ + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """ + Can't add selected responders to a province driven market. + """ + INVALID_RESPONDER_FOR_PROVINCE_DRIVEN_MARKET @deprecated(reason: "No longer used") +} + +""" +The market’s web presence, which defines its SEO strategy. This can be a different domain +(e.g. `example.ca`), subdomain (e.g. `ca.example.com`), or subfolders of the primary +domain (e.g. `example.com/en-ca`). Each web presence comprises one or more language +variants. If a market does not have its own web presence, it is accessible on the shop’s +primary domain via [country +selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + +Note: while the domain/subfolders defined by a market’s web presence are not applicable to +custom storefronts, which must manage their own domains and routing, the languages chosen +here do govern [the languages available on the Storefront +API](https://shopify.dev/custom-storefronts/internationalization/multiple-languages) for the countries in +this market. +""" +type MarketWebPresence implements Node { + """ + The ShopLocale object for the alternate locales. When a domain is used, these locales will be + available as language-specific subfolders. For example, if English is an + alternate locale, and `example.ca` is the market’s domain, then + `example.ca/en` will load in English. + """ + alternateLocales: [ShopLocale!]! + + """ + The ShopLocale object for the default locale. When a domain is used, this is the locale that will + be used when the domain root is accessed. For example, if French is the default locale, + and `example.ca` is the market’s domain, then `example.ca` will load in French. + """ + defaultLocale: ShopLocale! + + """ + The web presence’s domain. + This field will be null if `subfolderSuffix` isn't null. + """ + domain: Domain + + """ + A globally-unique ID. + """ + id: ID! + + """ + The associated market. This can be null for a web presence that isn't associated with a market. + """ + market: Market @deprecated(reason: "Use `markets` instead.") + + """ + The associated markets for this web presence. + """ + markets("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketConnection + + """ + The list of root URLs for each of the web presence’s locales. As of version `2024-04` this value will no longer have a trailing slash. + """ + rootUrls: [MarketWebPresenceRootUrl!]! + + """ + The market-specific suffix of the subfolders defined by the web presence. Example: in `/en-us` the subfolder suffix is `us`. This field will be null if `domain` isn't null. + """ + subfolderSuffix: String +} + +""" +An auto-generated type for paginating through multiple MarketWebPresences. +""" +type MarketWebPresenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketWebPresenceEdge!]! + + """ + A list of nodes that are contained in MarketWebPresenceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketWebPresence!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields used to create a web presence for a market. +""" +input MarketWebPresenceCreateInput { + """ + The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. + """ + domainId: ID + + """ + The default locale for the market’s web presence. + """ + defaultLocale: String! + + """ + The alternate locales for the market’s web presence. + """ + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceCreate` mutation. +""" +type MarketWebPresenceCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketWebPresenceDelete` mutation. +""" +type MarketWebPresenceDeletePayload { + """ + The ID of the deleted web presence. + """ + deletedId: ID + + """ + The market for which the web presence was deleted. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketWebPresence and a cursor during pagination. +""" +type MarketWebPresenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketWebPresenceEdge. + """ + node: MarketWebPresence! +} + +""" +The URL for the homepage of the online store in the context of a particular market and a +particular locale. +""" +type MarketWebPresenceRootUrl { + """ + The locale that the storefront loads in. + """ + locale: String! + + """ + The URL. + """ + url: URL! +} + +""" +The input fields used to update a web presence for a market. +""" +input MarketWebPresenceUpdateInput { + """ + The web presence's domain ID. This field must be null if `subfolderSuffix` is not null. + """ + domainId: ID + + """ + The default locale for the market’s web presence. + """ + defaultLocale: String + + """ + The alternate locales for the market’s web presence. + """ + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be null if `domainId` is not null. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceUpdate` mutation. +""" +type MarketWebPresenceUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketingActivitiesDeleteAllExternal` mutation. +""" +type MarketingActivitiesDeleteAllExternalPayload { + """ + The asynchronous job that performs the deletion. The status of the job may be used to determine when it's safe again to create new activities. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The marketing activity resource represents marketing that a + merchant created through an app. +""" +type MarketingActivity implements Node { + """ + The URL of the marketing activity listing page in the marketing section. + """ + activityListUrl: URL + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyV2 + + """ + The app which created this marketing activity. + """ + app: App! + + """ + The errors generated when an app publishes the marketing activity. + """ + appErrors: MarketingActivityExtensionAppErrors + + """ + The allocated budget for the marketing activity. + """ + budget: MarketingBudget + + """ + The date and time when the marketing activity was created. + """ + createdAt: DateTime! + + """ + The completed content in the marketing activity creation form. + """ + formData: String + + """ + The hierarchy level of the marketing activity. + """ + hierarchyLevel: MarketingActivityHierarchyLevel + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the marketing activity is in the main workflow version of the marketing automation. + """ + inMainWorkflowVersion: Boolean! + + """ + The marketing activity represents an external marketing activity. + """ + isExternal: Boolean! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannel: MarketingChannel! @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + Associated marketing event of this marketing activity. + """ + marketingEvent: MarketingEvent + + """ + ID of the parent activity of this marketing activity. + """ + parentActivityId: ID + + """ + ID of the parent activity of this marketing activity. + """ + parentRemoteId: String + + """ + A contextual description of the marketing activity based on the platform and tactic used. + """ + sourceAndMedium: String! + + """ + The current state of the marketing activity. + """ + status: MarketingActivityStatus! + + """ + The severity of the marketing activity's status. + """ + statusBadgeType: MarketingActivityStatusBadgeType @deprecated(reason: "Use `statusBadgeTypeV2` instead.") + + """ + The severity of the marketing activity's status. + """ + statusBadgeTypeV2: BadgeType + + """ + The rendered status of the marketing activity. + """ + statusLabel: String! + + """ + The [date and time]( + https://help.shopify.com/https://en.wikipedia.org/wiki/ISO_8601 + ) when the activity's status last changed. + """ + statusTransitionedAt: DateTime + + """ + The method of marketing used for this marketing activity. + """ + tactic: MarketingTactic! + + """ + The status to which the marketing activity is currently transitioning. + """ + targetStatus: MarketingActivityStatus + + """ + The marketing activity's title, which is rendered on the marketing listing page. + """ + title: String! + + """ + The date and time when the marketing activity was updated. + """ + updatedAt: DateTime! + + """ + The value portion of the URL query parameter used in attributing sessions to this activity. + """ + urlParameterValue: String + + """ + The set of [Urchin Tracking Module]( + https://help.shopify.com/https://en.wikipedia.org/wiki/UTM_parameters + ) used in the URL for tracking this marketing activity. + """ + utmParameters: UTMParameters +} + +""" +The input fields combining budget amount and its marketing budget type. +""" +input MarketingActivityBudgetInput { + """ + Budget type for marketing activity. + """ + budgetType: MarketingBudgetBudgetType + + """ + Amount of budget for the marketing activity. + """ + total: MoneyInput +} + +""" +An auto-generated type for paginating through multiple MarketingActivities. +""" +type MarketingActivityConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingActivityEdge!]! + + """ + A list of nodes that are contained in MarketingActivityEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketingActivity!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating an externally-managed marketing activity. +""" +input MarketingActivityCreateExternalInput { + """ + The title of the marketing activity. + """ + title: String! + + """ + Specifies the [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated with a related marketing campaign. Either the URL parameter value or UTM can be set, but not both. + """ + utm: UTMInput + + """ + Value for a query parameter that gets inserted into storefront URLs for matching storefront traffic to this activity. This feature is currently available on a limited basis to some partners only. UTMs should continue to be used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + A custom unique identifier for the marketing activity, which can be used to manage the activity and send engagement metrics without having to store our marketing activity ID in your systems. + """ + remoteId: String + + """ + The status of the marketing activity. If status isn't set it will default to UNDEFINED. + """ + status: MarketingActivityExternalStatus + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL! + + """ + The URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "This field was renamed for clarity, please switch to using marketingChannelType when migrating to the latest API version.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + The domain from which ad clicks are forwarded to the shop. + """ + referringDomain: String + + """ + The unique string identifier of the channel to which this activity belongs. For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: DateTime + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity started. If omitted or set to `null`, the current time will be used. + """ + start: DateTime + + """ + The date and time at which the activity ended. If omitted or set to `null`, the current time will be used if the status is set to `INACTIVE` or `DELETED_EXTERNALLY`. + """ + end: DateTime + + """ + The ID for the parent marketing activity, if creating hierarchical activities. + """ + parentActivityId: ID + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel +} + +""" +Return type for `marketingActivityCreateExternal` mutation. +""" +type MarketingActivityCreateExternalPayload { + """ + The external marketing activity that was created. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to create a marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityCreateInput { + """ + The title of the marketing activity. + """ + marketingActivityTitle: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The form data in JSON serialized as a string. + """ + formData: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The ID of the marketing activity extension. + """ + marketingActivityExtensionId: ID! + + """ + Encoded context containing marketing campaign id. + """ + context: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Specifies the + [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) + that are associated with a related marketing campaign. UTMInput is required for all Marketing + tactics except Storefront App. + """ + utm: UTMInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Value for a query parameter that gets inserted into storefront URLs for matching storefront traffic to this activity. This feature is currently available on a limited basis to some partners only. UTMs should continue to be used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The current state of the marketing activity. + """ + status: MarketingActivityStatus! + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") +} + +""" +Return type for `marketingActivityCreate` mutation. +""" +type MarketingActivityCreatePayload { + """ + The created marketing activity. + """ + marketingActivity: MarketingActivity @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The path to return back to shopify admin from embedded editor. + """ + redirectPath: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `marketingActivityDeleteExternal` mutation. +""" +type MarketingActivityDeleteExternalPayload { + """ + The ID of the marketing activity that was deleted, if one was deleted. + """ + deletedMarketingActivityId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An auto-generated type which holds one MarketingActivity and a cursor during pagination. +""" +type MarketingActivityEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingActivityEdge. + """ + node: MarketingActivity! +} + +""" +The error code resulted from the marketing activity extension integration. +""" +enum MarketingActivityExtensionAppErrorCode { + """ + The shop/user must be onboarded to use the app. + """ + NOT_ONBOARDED_ERROR + + """ + The app has returned validation errors. + """ + VALIDATION_ERROR + + """ + The app is either not responding or returning unexpected data. + """ + API_ERROR + + """ + The app has returned an error when invoking the platform. + """ + PLATFORM_ERROR + + """ + The app needs to be installed. + """ + INSTALL_REQUIRED_ERROR +} + +""" +Represents errors returned from apps when using the marketing activity extension. +""" +type MarketingActivityExtensionAppErrors { + """ + The app error type. + """ + code: MarketingActivityExtensionAppErrorCode! + + """ + The list of errors returned by the app. + """ + userErrors: [UserError!]! +} + +""" +Set of possible statuses for an external marketing activity. +""" +enum MarketingActivityExternalStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity has completed running. + """ + INACTIVE + + """ + This marketing activity is currently not running. + """ + PAUSED + + """ + This marketing activity is scheduled to run. + """ + SCHEDULED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """ + The marketing activity's status is unknown. + """ + UNDEFINED +} + +""" +Hierarchy levels for external marketing activities. +""" +enum MarketingActivityHierarchyLevel { + """ + An advertisement activity. Must be parented by an ad group or a campaign activity, and must be assigned tracking parameters (URL or UTM). + """ + AD + + """ + A group of advertisement activities. Must be parented by a campaign activity. + """ + AD_GROUP + + """ + A campaign activity. May contain either ad groups or ads as child activities. If childless, then the campaign activity should have tracking parameters assigned (URL or UTM) otherwise it won't appear in marketing reports. + """ + CAMPAIGN +} + +""" +The set of valid sort keys for the MarketingActivity query. +""" +enum MarketingActivitySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +Status helps to identify if this marketing activity has been completed, queued, failed etc. +""" +enum MarketingActivityStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity is permanently unavailable. + """ + DELETED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """ + This marketing activity is disconnected and no longer editable. + """ + DISCONNECTED + + """ + This marketing activity has been edited, but it is not yet created. + """ + DRAFT + + """ + This marketing activity is unable to run. + """ + FAILED + + """ + This marketing activity has completed running. + """ + INACTIVE + + """ + This marketing activity is currently not running. + """ + PAUSED + + """ + This marketing activity is pending creation on the app's marketing platform. + """ + PENDING + + """ + This marketing activity is scheduled to run. + """ + SCHEDULED + + """ + The marketing activity's status is unknown. + """ + UNDEFINED +} + +""" +StatusBadgeType helps to identify the color of the status badge. +""" +enum MarketingActivityStatusBadgeType { + """ + This status badge has type default. + """ + DEFAULT + + """ + This status badge has type success. + """ + SUCCESS + + """ + This status badge has type attention. + """ + ATTENTION + + """ + This status badge has type warning. + """ + WARNING + + """ + This status badge has type info. + """ + INFO + + """ + This status badge has type critical. + """ + CRITICAL +} + +""" +The input fields required to update an externally managed marketing activity. +""" +input MarketingActivityUpdateExternalInput { + """ + The title of the marketing activity. + """ + title: String + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL + + """ + The URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "This field was renamed for clarity, please switch to using marketingChannelType when migrating to the latest API version.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """ + The domain from which ad clicks are forwarded to the shop. + """ + referringDomain: String + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: DateTime + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity started. + """ + start: DateTime + + """ + The date and time at which the activity ended. + """ + end: DateTime + + """ + The status of the marketing activity. + """ + status: MarketingActivityExternalStatus +} + +""" +Return type for `marketingActivityUpdateExternal` mutation. +""" +type MarketingActivityUpdateExternalPayload { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to update a marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityUpdateInput { + """ + The ID of the marketing activity. + """ + id: ID! + + """ + The ID of the recommendation that the marketing activity was created from, if one exists. + """ + marketingRecommendationId: ID @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The title of the marketing activity. + """ + title: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The budget for the marketing activity. + """ + budget: MarketingActivityBudgetInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The cumulative amount spent on the marketing activity. + """ + adSpend: MoneyInput @deprecated(reason: "Use `MarketingEngagementCreate.MarketingEngagementInput.adSpend` GraphQL to send the ad spend.") + + """ + The current state of the marketing activity. Learn more about + [marketing activities statuses](/api/marketing-activities/statuses). + """ + status: MarketingActivityStatus @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The target state that the marketing activity is transitioning to. Learn more about [marketing activities statuses](/api/marketing-activities/statuses). + """ + targetStatus: MarketingActivityStatus @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The form data of the marketing activity. This is only used if the marketing activity is + integrated with the external editor. + """ + formData: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Specifies the + [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) + that are associated with a related marketing campaign. UTMInput is required for all Marketing + tactics except Storefront App. The utm field can only be set once and never modified. + """ + utm: UTMInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Value for a query parameter that gets inserted into storefront URLs for matching storefront traffic to this activity. This feature is currently available on a limited basis to some partners only. UTMs should continue to be used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + A list of the item IDs that were marketed in this marketing activity. Valid types for these items are: + * `Product` + * `Shop` + """ + marketedResources: [ID!] @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Encoded context provided by Shopify during the update marketing activity callback. + """ + context: String @deprecated(reason: "This context is no longer needed by Shopify in the callback.") + + """ + The error messages that were generated when the app was trying to complete the activity. + Learn more about the + [JSON format expected for error messages](/api/marketing-activities/statuses#failed-status). + """ + errors: JSON @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") +} + +""" +Return type for `marketingActivityUpdate` mutation. +""" +type MarketingActivityUpdatePayload { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The redirect path from the embedded editor to the Shopify admin. + """ + redirectPath: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for creating or updating an externally-managed marketing activity. +""" +input MarketingActivityUpsertExternalInput { + """ + The title of the marketing activity. + """ + title: String! + + """ + Specifies the [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated with a related marketing campaign. Either the URL parameter value or UTM can be set, but not both. + """ + utm: UTMInput + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + A custom unique identifier for the marketing activity, which can be used to manage the activity and send engagement metrics without having to store our marketing activity ID in your systems. + """ + remoteId: String! + + """ + The status of the marketing activity. + """ + status: MarketingActivityExternalStatus! + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL! + + """ + The URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + The domain from which ad clicks are forwarded to the shop. + """ + referringDomain: String + + """ + The unique string identifier of the channel to which this activity belongs. For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: DateTime + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity started. On creation, if this field is omitted or set to `null`, the current time will be used. + """ + start: DateTime + + """ + The date and time at which the activity started. On creation, if this field is omitted or set to `null`, the current time will be used if the status is set to `INACTIVE` or `DELETED_EXTERNALLY` . + """ + end: DateTime + + """ + Value for a query parameter that gets inserted into storefront URLs for matching storefront traffic to this activity. This feature is currently available on a limited basis to some partners only. UTMs should continue to be used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel +} + +""" +Return type for `marketingActivityUpsertExternal` mutation. +""" +type MarketingActivityUpsertExternalPayload { + """ + The external marketing activity that was created or updated. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An error that occurs during the execution of marketing activity and engagement mutations. +""" +type MarketingActivityUserError implements DisplayableError { + """ + The error code. + """ + code: MarketingActivityUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketingActivityUserError`. +""" +enum MarketingActivityUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + Marketing activity does not exist. + """ + MARKETING_ACTIVITY_DOES_NOT_EXIST + + """ + A marketing activity with the same remote ID already exists. + """ + MARKETING_ACTIVITY_WITH_REMOTE_ID_ALREADY_EXISTS + + """ + A marketing activity with the same UTM campaign, medium, and source already exists. + """ + MARKETING_ACTIVITY_WITH_UTM_CAMPAIGN_ALREADY_EXISTS + + """ + A marketing activity with the same URL parameter value already exists. + """ + MARKETING_ACTIVITY_WITH_URL_PARAMETER_VALUE_ALREADY_EXISTS + + """ + Marketing activity is not valid, the associated marketing event does not exist. + """ + MARKETING_EVENT_DOES_NOT_EXIST + + """ + All currency codes provided in the input need to match. + """ + CURRENCY_CODE_MISMATCH_INPUT + + """ + The currency codes provided need to match the referenced marketing activity's currency code. + """ + MARKETING_ACTIVITY_CURRENCY_CODE_MISMATCH + + """ + The job to delete all external activities failed to enqueue. + """ + DELETE_JOB_FAILED_TO_ENQUEUE + + """ + Non-hierarchical marketing activities must have UTM parameters or a URL parameter value. + """ + NON_HIERARCHIAL_REQUIRES_UTM_URL_PARAMETER + + """ + A mutation can not be ran because a job to delete all external activities has been enqueued, which happens either from calling the marketingActivitiesDeleteAllExternal mutation or as a result of an app uninstall. + """ + DELETE_JOB_ENQUEUED + + """ + The marketing activity must be an external activity. + """ + ACTIVITY_NOT_EXTERNAL + + """ + The channel handle value cannot be modified. + """ + IMMUTABLE_CHANNEL_HANDLE + + """ + The URL parameter value cannot be modified. + """ + IMMUTABLE_URL_PARAMETER + + """ + The UTM parameters cannot be modified. + """ + IMMUTABLE_UTM_PARAMETERS + + """ + The parent activity cannot be modified. + """ + IMMUTABLE_PARENT_ID + + """ + The hierarchy level cannot be modified. + """ + IMMUTABLE_HIERARCHY_LEVEL + + """ + The remote ID does not correspond to an existing activity. + """ + INVALID_REMOTE_ID + + """ + The channel handle is not recognized. + """ + INVALID_CHANNEL_HANDLE + + """ + Either the marketing activity ID or remote ID must be provided for the activity to be deleted. + """ + INVALID_DELETE_ACTIVITY_EXTERNAL_ARGUMENTS + + """ + Either the channel_handle or delete_engagements_for_all_channels must be provided when deleting a marketing engagement. + """ + INVALID_DELETE_ENGAGEMENTS_ARGUMENTS + + """ + Either the marketing activity ID, remote ID, or UTM must be provided. + """ + INVALID_MARKETING_ACTIVITY_EXTERNAL_ARGUMENTS + + """ + For activity level engagement, either the marketing activity ID or remote ID must be provided. For channel level engagement, the channel handle must be provided. + """ + INVALID_MARKETING_ENGAGEMENT_ARGUMENTS + + """ + No identifier found. For activity level engagement, either the marketing activity ID or remote ID must be provided. For channel level engagement, the channel handle must be provided. + """ + INVALID_MARKETING_ENGAGEMENT_ARGUMENT_MISSING + + """ + This activity has child activities and thus cannot be deleted. Child activities must be deleted before a parent activity. + """ + CANNOT_DELETE_ACTIVITY_WITH_CHILD_EVENTS + + """ + The activity's tactic can not be updated to STOREFRONT_APP. This type of tactic can only be specified when creating a new activity. + """ + CANNOT_UPDATE_TACTIC_TO_STOREFRONT_APP + + """ + The activity's tactic can not be updated from STOREFRONT_APP. + """ + CANNOT_UPDATE_TACTIC_IF_ORIGINALLY_STOREFRONT_APP +} + +""" +This type combines budget amount and its marketing budget type. +""" +type MarketingBudget { + """ + The budget type for a marketing activity. + """ + budgetType: MarketingBudgetBudgetType! + + """ + The amount of budget for marketing activity. + """ + total: MoneyV2! +} + +""" +The budget type for a marketing activity. +""" +enum MarketingBudgetBudgetType { + """ + A daily budget. + """ + DAILY + + """ + A budget for the lifetime of a marketing activity. + """ + LIFETIME +} + +""" +The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. +""" +enum MarketingChannel { + """ + Paid search. + """ + SEARCH + + """ + Displayed ads. + """ + DISPLAY + + """ + Social media. + """ + SOCIAL + + """ + Email. + """ + EMAIL + + """ + Referral links. + """ + REFERRAL +} + +""" +Marketing engagement represents customer activity taken on a marketing activity or a marketing channel. +""" +type MarketingEngagement { + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyV2 + + """ + The number of all conversions from the marketing content. This field supports ad platforms that track conversions beyond traditional sales metrics. All conversions include both primary and secondary conversion goals as defined by the ad platform, such as purchases, add-to-carts, page views, and sign-ups. + """ + allConversions: Decimal + + """ + The unique string identifier of the channel to which the engagement metrics are being provided. This should be set when and only when providing channel-level engagements. This should be nil when providing activity-level engagements. For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + The total number of interactions, such as a button press or a screen touch, that occurred on the marketing content. + """ + clicksCount: Int + + """ + The total number of comments on the marketing content. + """ + commentsCount: Int + + """ + The total number of complaints on the marketing content. For message-based platforms such as email or SMS, this represents the number of marketing emails or messages that were marked as spam. For social media platforms, this represents the number of dislikes or the number of times marketing content was reported. + """ + complaintsCount: Int + + """ + The total number of fails for the marketing content. For message-based platforms such as email or SMS, this represents the number of bounced marketing emails or messages. + """ + failsCount: Int + + """ + The total number of favorites, likes, saves, or bookmarks on the marketing content. + """ + favoritesCount: Int + + """ + The number of customers that have placed their first order. Doesn't include adjustments such as edits, exchanges, or returns. + """ + firstTimeCustomers: Decimal + + """ + The total number of times marketing content was displayed to users, whether or not an interaction occurred. For message-based platforms such as email or SMS, this represents the number of marketing emails or messages that were delivered. + """ + impressionsCount: Int + + """ + Specifies how the provided metrics have been aggregated. Cumulative metrics are aggregated from the first day of reporting up to and including `occuredOn`. Non-cumulative metrics are aggregated over the single day indicated in `occuredOn`. Cumulative metrics will monotonically increase in time as each record includes the previous day's values, and so on. Non-cumulative metrics are required going forward; cumulative metrics are deprecated. + """ + isCumulative: Boolean! @deprecated(reason: "Cumulative metrics are being phased out. Send non-cumulative engagement metrics instead (values aggregated over the single day indicated in `occurredOn`, with `isCumulative: false`). Existing activities that have been sending cumulative metrics can migrate to non-cumulative at any time.") + + """ + The marketing activity object related to this engagement. This corresponds to the marketingActivityId passed in on creation of the engagement. + """ + marketingActivity: MarketingActivity + + """ + The calendar date (in the time zone offset specified by the utcOffset field) for which the metrics are being reported. For example, a shop in UTC-5 would set utcOffset="-05:00" and aggregate all engagements from 05:00:00Z up to 29:00:00Z (5am UTC next day) for each call. + """ + occurredOn: Date! + + """ + The number of orders generated from the marketing content. + """ + orders: Decimal + + """ + The number of primary conversions from the marketing content. This field supports ad platforms that track conversions beyond traditional sales metrics. Primary conversions represent the main conversion goal defined by the ad platform, such as purchases, sign-ups, or add-to-carts. + """ + primaryConversions: Decimal + + """ + The number of returning customers that have placed an order. Doesn't include adjustments such as edits, exchanges, or returns. + """ + returningCustomers: Decimal + + """ + The amount of sales generated from the marketing content. + """ + sales: MoneyV2 + + """ + The total number of marketing emails or messages that were sent. + """ + sendsCount: Int + + """ + The number of online store sessions generated from the marketing content. + """ + sessionsCount: Int + + """ + The total number of times marketing content was distributed or reposted to either one's own network of followers through a social media platform or other digital channels. For message-based platforms such as email or SMS, this represents the number of times marketing emails or messages were forwarded. + """ + sharesCount: Int + + """ + The total number of unique clicks on the marketing content. + """ + uniqueClicksCount: Int + + """ + The total number of all users who saw marketing content since it was published. For message-based platforms such as email or SMS, this represents the number of unique users that opened a marketing email or message. For video-based content, this represents the number of unique users that played video content. + """ + uniqueViewsCount: Int + + """ + The total number of unsubscribes on the marketing content. For social media platforms, this represents the number of unfollows. + """ + unsubscribesCount: Int + + """ + The UTC offset for the time zone in which the metrics are being reported, in the format `"+HH:MM"` or `"-HH:MM"`. Used in combination with occurredOn when aggregating daily metrics. Must match the account settings for the shop to minimize eventual discrepancies in reporting. + """ + utcOffset: UtcOffset! + + """ + The total number of views on the marketing content. For message-based platforms such as email or SMS, this represents the number of times marketing emails or messages were opened. For video-based content, this represents the number of times videos were played. + """ + viewsCount: Int +} + +""" +Return type for `marketingEngagementCreate` mutation. +""" +type MarketingEngagementCreatePayload { + """ + The marketing engagement that was created. This represents customer activity taken on a marketing activity or a marketing channel. + """ + marketingEngagement: MarketingEngagement + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields for a marketing engagement. +""" +input MarketingEngagementInput { + """ + The calendar date (in the time zone offset specified by the utcOffset field) for which the metrics are being reported. For example, a shop in UTC-5 would set utcOffset="-05:00" and aggregate all engagements from 05:00:00Z up to 29:00:00Z (5am UTC next day) for each call. + """ + occurredOn: Date! + + """ + The total number of times marketing content was displayed to users, whether or not an interaction occurred. For message-based platforms such as email or SMS, this represents the number of marketing emails or messages that were delivered. + """ + impressionsCount: Int + + """ + The total number of views on the marketing content. For message-based platforms such as email or SMS, this represents the number of times marketing emails or messages were opened. For video-based content, this represents the number of times videos were played. + """ + viewsCount: Int + + """ + The total number of interactions, such as a button press or a screen touch, that occurred on the marketing content. + """ + clicksCount: Int + + """ + The total number of times marketing content was distributed or reposted to either one's own network of followers through a social media platform or other digital channels. For message-based platforms such as email or SMS, this represents the number of times marketing emails or messages were forwarded. + """ + sharesCount: Int + + """ + The total number of favorites, likes, saves, or bookmarks on the marketing content. + """ + favoritesCount: Int + + """ + The total number of comments on the marketing content. + """ + commentsCount: Int + + """ + The total number of unsubscribes on the marketing content. For social media platforms, this represents the number of unfollows. + """ + unsubscribesCount: Int + + """ + The total number of complaints on the marketing content. For message-based platforms such as email or SMS, this represents the number of marketing emails or messages that were marked as spam. For social media platforms, this represents the number of dislikes or the number of times marketing content was reported. + """ + complaintsCount: Int + + """ + The total number of fails for the marketing content. For message-based platforms such as email or SMS, this represents the number of bounced marketing emails or messages. + """ + failsCount: Int + + """ + The total number of marketing emails or messages that were sent. + """ + sendsCount: Int + + """ + The total number of all users who saw marketing content since it was published. For message-based platforms such as email or SMS, this represents the number of unique users that opened a marketing email or message. For video-based content, this represents the number of unique users that played video content. + """ + uniqueViewsCount: Int + + """ + The total number of unique clicks on the marketing content. + """ + uniqueClicksCount: Int + + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyInput + + """ + Specifies how the provided metrics have been aggregated. Cumulative metrics are aggregated from the first day of reporting up to and including `occuredOn`. Non-cumulative metrics are aggregated over the single day indicated in `occuredOn`. Cumulative metrics will monotonically increase in time as each record includes the previous day's values, and so on. Non-cumulative metrics are required going forward; cumulative metrics are deprecated. + """ + isCumulative: Boolean! + + """ + The UTC offset for the time zone in which the metrics are being reported, in the format `"+HH:MM"` or `"-HH:MM"`. Used in combination with occurredOn when aggregating daily metrics. Must match the account settings for the shop to minimize eventual discrepancies in reporting. + """ + utcOffset: UtcOffset! + + """ + The amount of sales generated from the marketing content. + """ + sales: MoneyInput + + """ + The number of online store sessions generated from the marketing content. + """ + sessionsCount: Int + + """ + The number of orders generated from the marketing content. + """ + orders: Decimal + + """ + The number of customers that have placed their first order. Doesn't include adjustments such as edits, exchanges, or returns. + """ + firstTimeCustomers: Decimal + + """ + The number of returning customers that have placed an order. Doesn't include adjustments such as edits, exchanges, or returns. + """ + returningCustomers: Decimal + + """ + The number of primary conversions from the marketing content. This field supports ad platforms that track conversions beyond traditional sales metrics. Primary conversions represent the main conversion goal defined by the ad platform, such as purchases, sign-ups, or add-to-carts. + """ + primaryConversions: Decimal + + """ + The number of all conversions from the marketing content. This field supports ad platforms that track conversions beyond traditional sales metrics. All conversions include both primary and secondary conversion goals as defined by the ad platform, such as purchases, add-to-carts, page views, and sign-ups. + """ + allConversions: Decimal +} + +""" +Return type for `marketingEngagementsDelete` mutation. +""" +type MarketingEngagementsDeletePayload { + """ + Informational message about the engagement data that has been marked for deletion. + """ + result: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +Represents actions that market a merchant's store or products. +""" +type MarketingEvent implements LegacyInteroperability & Node { + """ + The app that the marketing event is attributed to. + """ + app: App! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The unique string identifier of the channel to which this activity belongs. For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + A human-readable description of the marketing event. + """ + description: String + + """ + The date and time when the marketing event ended. + """ + endedAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL where the marketing event can be managed. + """ + manageUrl: URL + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """ + The URL where the marketing event can be previewed. + """ + previewUrl: URL + + """ + An optional ID that helps Shopify validate engagement data. + """ + remoteId: String + + """ + The date and time when the marketing event is scheduled to end. + """ + scheduledToEndAt: DateTime + + """ + Where the `MarketingEvent` occurred and what kind of content was used. + Because `utmSource` and `utmMedium` are often used interchangeably, this is + based on a combination of `marketingChannel`, `referringDomain`, and `type` to + provide a consistent representation for any given piece of marketing + regardless of the app that created it. + """ + sourceAndMedium: String! + + """ + The date and time when the marketing event started. + """ + startedAt: DateTime! + + """ + The display text for the marketing event type. + """ + targetTypeDisplayText: String! @deprecated(reason: "Use `sourceAndMedium` instead.") + + """ + The marketing event type. + """ + type: MarketingTactic! + + """ + The name of the marketing campaign. + """ + utmCampaign: String + + """ + The medium that the marketing campaign is using. Example values: `cpc`, `banner`. + """ + utmMedium: String + + """ + The referrer of the marketing event. Example values: `google`, `newsletter`. + """ + utmSource: String +} + +""" +An auto-generated type for paginating through multiple MarketingEvents. +""" +type MarketingEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingEventEdge!]! + + """ + A list of nodes that are contained in MarketingEventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MarketingEvent!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketingEvent and a cursor during pagination. +""" +type MarketingEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingEventEdge. + """ + node: MarketingEvent! +} + +""" +The set of valid sort keys for the MarketingEvent query. +""" +enum MarketingEventSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `started_at` value. + """ + STARTED_AT +} + +""" +The available types of tactics for a marketing activity. +""" +enum MarketingTactic { + """ + An abandoned cart recovery email. + """ + ABANDONED_CART + + """ + An ad, such as a Facebook ad. + """ + AD + + """ + An affiliate link. + """ + AFFILIATE + + """ + A link. + """ + LINK + + """ + A loyalty program. + """ + LOYALTY + + """ + A messaging app, such as Facebook Messenger. + """ + MESSAGE + + """ + A newsletter. + """ + NEWSLETTER + + """ + A notification in the Shopify admin. + """ + NOTIFICATION + + """ + A blog post. + """ + POST + + """ + A retargeting ad. + """ + RETARGETING + + """ + A transactional email. + """ + TRANSACTIONAL + + """ + A popup on the online store. + """ + STOREFRONT_APP + + """ + Search engine optimization. + """ + SEO +} + +""" +The entitlements for B2B markets. +""" +type MarketsB2BEntitlement { + """ + The entitlements for B2B market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether B2B markets are enabled. + """ + enabled: Boolean! +} + +""" +The entitlements for catalogs. +""" +type MarketsCatalogsEntitlement { + """ + Whether catalogs are enabled. + """ + enabled: Boolean! +} + +""" +The entitlements for region markets. +""" +type MarketsRegionsEntitlement { + """ + The entitlements for region market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether region markets are enabled. + """ + enabled: Boolean! +} + +""" +The resolved values based on the markets configuration for a buyer signal. Resolved values include the resolved catalogs, web presences, currency, and price inclusivity. +""" +type MarketsResolvedValues { + """ + The resolved catalogs. + """ + catalogs("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketCatalogConnection! + + """ + The resolved currency code. + """ + currencyCode: CurrencyCode! + + """ + The resolved price inclusivity attributes. + """ + priceInclusivity: ResolvedPriceInclusivity! + + """ + The resolved web presences ordered by priority. + """ + webPresences("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketWebPresenceConnection! +} + +""" +The entitlements for retail markets. +""" +type MarketsRetailEntitlement { + """ + The entitlements for retail market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether retail markets are enabled. + """ + enabled: Boolean! +} + +""" +The set of valid sort keys for the Markets query. +""" +enum MarketsSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `market_condition_types` value. + """ + MARKET_CONDITION_TYPES + + """ + Sort by the `market_type` value. + """ + MARKET_TYPE + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The entitlements for themes. +""" +type MarketsThemesEntitlement { + """ + Whether themes are enabled. + """ + enabled: Boolean! +} + +""" +Markets entitlement information. +""" +type MarketsType { + """ + The entitlements for B2B markets. + """ + b2b: MarketsB2BEntitlement! + + """ + The entitlements for region markets. + """ + regions: MarketsRegionsEntitlement! + + """ + The entitlements for retail markets. + """ + retail: MarketsRetailEntitlement! + + """ + The entitlements for themes. + """ + themes: MarketsThemesEntitlement! +} + +""" +Represents a media interface. +""" +interface Media { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! +} + +""" +An auto-generated type for paginating through multiple Media. +""" +type MediaConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MediaEdge!]! + + """ + A list of nodes that are contained in MediaEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Media!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a media object. +""" +enum MediaContentType { + """ + A Shopify-hosted video. + """ + VIDEO + + """ + An externally hosted video. + """ + EXTERNAL_VIDEO + + """ + A 3d model. + """ + MODEL_3D + + """ + A Shopify-hosted image. + """ + IMAGE +} + +""" +An auto-generated type which holds one Media and a cursor during pagination. +""" +type MediaEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MediaEdge. + """ + node: Media! +} + +""" +Represents a media error. This typically occurs when there is an issue with the media itself causing it to fail validation. +Check the media before attempting to upload again. +""" +type MediaError { + """ + Code representing the type of error. + """ + code: MediaErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +Error types for media. +""" +enum MediaErrorCode { + """ + Media error has occured for unknown reason. + """ + UNKNOWN + + """ + Media could not be processed because the signed URL was invalid. + """ + INVALID_SIGNED_URL + + """ + Media could not be processed because the image could not be downloaded. + """ + IMAGE_DOWNLOAD_FAILURE + + """ + Media could not be processed because the image could not be processed. + """ + IMAGE_PROCESSING_FAILURE + + """ + Media timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_ERROR + + """ + Media could not be created because the external video could not be found. + """ + EXTERNAL_VIDEO_NOT_FOUND + + """ + Media could not be created because the external video is not listed or is private. + """ + EXTERNAL_VIDEO_UNLISTED + + """ + Media could not be created because the external video has an invalid aspect ratio. + """ + EXTERNAL_VIDEO_INVALID_ASPECT_RATIO + + """ + Media could not be created because embed permissions are disabled for this video. + """ + EXTERNAL_VIDEO_EMBED_DISABLED + + """ + Media could not be created because video is either not found or still transcoding. + """ + EXTERNAL_VIDEO_EMBED_NOT_FOUND_OR_TRANSCODING + + """ + File could not be processed because the source could not be downloaded. + """ + GENERIC_FILE_DOWNLOAD_FAILURE + + """ + File could not be created because the size is too large. + """ + GENERIC_FILE_INVALID_SIZE + + """ + Media could not be created because the metadata could not be read. + """ + VIDEO_METADATA_READ_ERROR + + """ + Media could not be created because it has an invalid file type. + """ + VIDEO_INVALID_FILETYPE_ERROR + + """ + Media could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + Media could not be created because it does not meet the maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + Media could not be created because it does not meet the minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + Media could not be created because it does not meet the maximum height requirement. + """ + VIDEO_MAX_HEIGHT_ERROR + + """ + Media could not be created because it does not meet the minimum duration requirement. + """ + VIDEO_MIN_DURATION_ERROR + + """ + Media could not be created because it does not meet the maximum duration requirement. + """ + VIDEO_MAX_DURATION_ERROR + + """ + Video failed validation. + """ + VIDEO_VALIDATION_ERROR + + """ + Model failed validation. + """ + MODEL3D_VALIDATION_ERROR + + """ + Media could not be created because the model's thumbnail generation failed. + """ + MODEL3D_THUMBNAIL_GENERATION_ERROR + + """ + There was an issue while trying to generate a new thumbnail. + """ + MODEL3D_THUMBNAIL_REGENERATION_ERROR + + """ + Media could not be created because the model can't be converted to USDZ format. + """ + MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR + + """ + Media could not be created because the model file failed processing. + """ + MODEL3D_GLB_OUTPUT_CREATION_ERROR + + """ + Media could not be created because the model file failed processing. + """ + MODEL3D_PROCESSING_FAILURE + + """ + Media could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """ + Media could not be created because the image size is too large. + """ + INVALID_IMAGE_FILE_SIZE + + """ + Media could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + Media could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + Media could not be created because the cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + Media could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR +} + +""" +Host for a Media Resource. +""" +enum MediaHost { + """ + Host for YouTube embedded videos. + """ + YOUTUBE + + """ + Host for Vimeo embedded videos. + """ + VIMEO +} + +""" +The `MediaImage` object represents an image hosted on Shopify's +[content delivery network (CDN)](https://shopify.dev/docs/storefronts/themes/best-practices/performance/platform#shopify-cdn). +Shopify CDN is a content system that serves as the primary way to store, +manage, and deliver visual content for products, variants, and other resources across the Shopify platform. + +The `MediaImage` object provides information to: + +- Store and display product and variant images across online stores, admin interfaces, and mobile apps. +- Retrieve visual branding elements, including logos, banners, favicons, and background images in checkout flows. +- Retrieve signed URLs for secure, time-limited access to original image files. + +Each `MediaImage` object provides both the processed image data (with automatic optimization and CDN delivery) +and access to the original source file. The image processing is handled asynchronously, so images +might not be immediately available after upload. The +[`status`](https://shopify.dev/docs/api/admin-graphql/latest/objects/mediaimage#field-MediaImage.fields.status) +field indicates when processing is complete and the image is ready for use. + +The `MediaImage` object implements the [`Media`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Media) +interface alongside other media types, like videos and 3D models. + +Learn about +managing media for [products](https://shopify.dev/docs/apps/build/online-store/product-media), +[product variants](https://shopify.dev/docs/apps/build/online-store/product-variant-media), and +[asynchronous media management](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components#asynchronous-media-management). +""" +type MediaImage implements File & HasMetafields & HasPublishedTranslations & Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """ + The MIME type of the image. + """ + mimeType: String + + """ + The original source of the image. + """ + originalSource: MediaImageOriginalSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +The original source for an image. +""" +type MediaImageOriginalSource { + """ + The size of the original file in bytes. + """ + fileSize: Int + + """ + The URL of the original image, valid only for a short period. + """ + url: URL +} + +""" +Represents the preview image for a media. +""" +type MediaPreviewImage { + """ + The preview image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """ + Current status of the preview image. + """ + status: MediaPreviewImageStatus! +} + +""" +The possible statuses for a media preview image. +""" +enum MediaPreviewImageStatus { + """ + Preview image is uploaded but not yet processed. + """ + UPLOADED + + """ + Preview image is being processed. + """ + PROCESSING + + """ + Preview image is ready to be displayed. + """ + READY + + """ + Preview image processing has failed. + """ + FAILED +} + +""" +The possible statuses for a media object. +""" +enum MediaStatus { + """ + Media has been uploaded but not yet processed. + """ + UPLOADED + + """ + Media is being processed. + """ + PROCESSING + + """ + Media is ready to be displayed. + """ + READY + + """ + Media processing has failed. + """ + FAILED +} + +""" +Represents an error that happens during execution of a Media query or mutation. +""" +type MediaUserError implements DisplayableError { + """ + The error code. + """ + code: MediaUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MediaUserError`. +""" +enum MediaUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is blank. + """ + BLANK + + """ + Video validation failed. + """ + VIDEO_VALIDATION_ERROR + + """ + Model validation failed. + """ + MODEL3D_VALIDATION_ERROR + + """ + Video creation throttle was exceeded. + """ + VIDEO_THROTTLE_EXCEEDED + + """ + Model3d creation throttle was exceeded. + """ + MODEL3D_THROTTLE_EXCEEDED + + """ + Exceeded the limit of media per product. + """ + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """ + Exceeded the limit of media per shop. + """ + SHOP_MEDIA_LIMIT_EXCEEDED + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Media does not exist. + """ + MEDIA_DOES_NOT_EXIST + + """ + Media does not exist on the given product. + """ + MEDIA_DOES_NOT_EXIST_ON_PRODUCT + + """ + Only one mediaId is allowed per variant-media input pair. + """ + TOO_MANY_MEDIA_PER_INPUT_PAIR + + """ + Exceeded the maximum number of 100 variant-media pairs per mutation call. + """ + MAXIMUM_VARIANT_MEDIA_PAIRS_EXCEEDED + + """ + Invalid media type. + """ + INVALID_MEDIA_TYPE + + """ + Variant specified in more than one pair. + """ + PRODUCT_VARIANT_SPECIFIED_MULTIPLE_TIMES + + """ + Variant does not exist on the given product. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST_ON_PRODUCT + + """ + Non-ready media are not supported. + """ + NON_READY_MEDIA + + """ + Product variant already has attached media. + """ + PRODUCT_VARIANT_ALREADY_HAS_MEDIA + + """ + The specified media is not attached to the specified variant. + """ + MEDIA_IS_NOT_ATTACHED_TO_VARIANT + + """ + Media cannot be modified. It is currently being modified by another operation. + """ + MEDIA_CANNOT_BE_MODIFIED + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Missing arguments. + """ + MISSING_ARGUMENTS +} + +""" +Represents a media warning. This occurs when there is a non-blocking concern regarding your media. +Consider reviewing your media to ensure it is correct and its parameters are as expected. +""" +type MediaWarning { + """ + The code representing the type of warning. + """ + code: MediaWarningCode! + + """ + Translated warning message. + """ + message: String +} + +""" +Warning types for media. +""" +enum MediaWarningCode { + """ + 3D model physical size might be invalid. The dimensions of your model are very small. Consider reviewing your model to ensure they are correct. + """ + MODEL_SMALL_PHYSICAL_SIZE + + """ + 3D model physical size might be invalid. The dimensions of your model are very large. Consider reviewing your model to ensure they are correct. + """ + MODEL_LARGE_PHYSICAL_SIZE + + """ + The thumbnail failed to regenerate.Try applying the changes again to regenerate the thumbnail. + """ + MODEL_PREVIEW_IMAGE_FAIL +} + +""" +Navigation menus that organize links into logical structures to guide customers through a store. Menus serve as the backbone of store navigation, making it easy for customers to find products, pages, and other content through organized hierarchical links. + +For example, a merchant might create a main navigation menu with top-level categories like "Products," "About Us," and "Contact," where each category can contain nested menu items linking to specific collections, pages, or external resources. + +Use the `Menu` object to: +- Build and customize store navigation structures +- Organize hierarchical menu systems with nested items +- Work with default menus that can't be deleted +- Access menu items for building navigation + +Menus can be designated as default navigation elements (like main menu or footer), which can't be deleted and have restricted handle updates. The handle provides a unique identifier that themes can reference, while the items collection enables nested navigation structures. + +Each menu contains menu items that can link to various resource types. This flexibility lets merchants create navigation experiences that guide customers through their store. +""" +type Menu implements HasPublishedTranslations & Node { + """ + The menu's handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the menu is a default. The handle for default menus can't be updated and default menus can't be deleted. + """ + isDefault: Boolean! + + """ + A list of items on the menu sorted by position. + """ + items("The number of menu items to be returned." limit: Int): [MenuItem!]! + + """ + The menu's title. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple Menus. +""" +type MenuConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MenuEdge!]! + + """ + A list of nodes that are contained in MenuEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Menu!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `menuCreate` mutation. +""" +type MenuCreatePayload { + """ + The created menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuCreateUserError!]! +} + +""" +An error that occurs during the execution of `MenuCreate`. +""" +type MenuCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuCreateUserError`. +""" +enum MenuCreateUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The menu cannot be nested more than 3 level deep. + """ + NESTING_TOO_DEEP +} + +""" +Return type for `menuDelete` mutation. +""" +type MenuDeletePayload { + """ + The ID of the deleted menu. + """ + deletedMenuId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MenuDelete`. +""" +type MenuDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MenuDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuDeleteUserError`. +""" +enum MenuDeleteUserErrorCode { + """ + Menu does not exist. + """ + MENU_DOES_NOT_EXIST + + """ + Default menu cannot be deleted. + """ + UNABLE_TO_DELETE_DEFAULT_MENU +} + +""" +An auto-generated type which holds one Menu and a cursor during pagination. +""" +type MenuEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MenuEdge. + """ + node: Menu! +} + +""" +Individual navigation links that make up store menus, giving customers clickable paths to explore the store. Menu items are the building blocks that connect shoppers to products, collections, pages, or external resources. + +For example, within a "Products" menu, individual menu items might link to specific collections like "Summer Collection" or "Best Sellers," each with its own title, URL, and resource connection. + +Use the `MenuItem` object to: +- Define individual navigation links and their destinations +- Create nested menu hierarchies through item relationships +- Use tags for collection filtering +- Connect menu links to specific store resources + +Menu items support various link types, enabling connections to internal store content or external websites. The nested items capability allows for dropdown or multi-level navigation structures that help organize complex store catalogs. +""" +type MenuItem { + """ + A globally-unique ID of the navigation menu item. + """ + id: ID! + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItem!]! + + """ + The ID of the resource to link to. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!]! + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's url. + """ + url: String +} + +""" +The input fields required to create a valid menu item. +""" +input MenuItemCreateInput { + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's association with an existing resource. + """ + resourceId: ID + + """ + The menu item's url to be used when the item doesn't point to a resource. + """ + url: String + + """ + The menu item's tags to filter a collection. + """ + tags: [String!] + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemCreateInput!] +} + +""" +A menu item type. +""" +enum MenuItemType { + """ + The frontpage menu item type. + """ + FRONTPAGE + + """ + The collection menu item type. + """ + COLLECTION + + """ + The collections menu item type. + """ + COLLECTIONS + + """ + The product menu item type. + """ + PRODUCT + + """ + The catalog menu item type. + """ + CATALOG + + """ + The page menu item type. + """ + PAGE + + """ + The blog menu item type. + """ + BLOG + + """ + The article menu item type. + """ + ARTICLE + + """ + The search menu item type. + """ + SEARCH + + """ + The shop_policy menu item type. + """ + SHOP_POLICY + + """ + The http menu item type. + """ + HTTP + + """ + The metaobject menu item type. + """ + METAOBJECT + + """ + The customer_account_page menu item type. + """ + CUSTOMER_ACCOUNT_PAGE +} + +""" +The input fields required to update a valid menu item. +""" +input MenuItemUpdateInput { + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's association with an existing resource. + """ + resourceId: ID + + """ + The menu item's url to be used when the item doesn't point to a resource. + """ + url: String + + """ + The menu item's tags to filter a collection. + """ + tags: [String!] + + """ + A globally-unique ID of the online store navigation menu item. + """ + id: ID + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemUpdateInput!] +} + +""" +The set of valid sort keys for the Menu query. +""" +enum MenuSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `menuUpdate` mutation. +""" +type MenuUpdatePayload { + """ + The updated menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuUpdateUserError!]! +} + +""" +An error that occurs during the execution of `MenuUpdate`. +""" +type MenuUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuUpdateUserError`. +""" +enum MenuUpdateUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The menu cannot be nested more than 3 level deep. + """ + NESTING_TOO_DEEP +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum MerchandiseDiscountClass { + """ + The discount is combined with a + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT + + """ + The discount is combined with an + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + ORDER +} + +""" +Merchant approval for accelerated onboarding to channel integration apps. +""" +type MerchantApprovalSignals { + """ + Whether the shop's Shopify Payments account identity is verified. Returns `false` if the identity is unverified or if the shop doesn't have a Shopify Payments account. + """ + identityVerified: Boolean! + + """ + Whether Shopify has pre-verified the merchant's business for onboarding to channel integration apps. Returns `false` if the shop isn't marked for verification. + """ + verifiedByShopify: Boolean! + + """ + Which tier of the Shopify verification was determined for the merchant's business for onboarding to channel integration apps. + """ + verifiedByShopifyTier: String! +} + +""" +Metafields enable you to attach additional information to a Shopify resource, such as a [Product](https://shopify.dev/api/admin-graphql/latest/objects/product) or a [Collection](https://shopify.dev/api/admin-graphql/latest/objects/collection). +For more information about where you can attach metafields refer to [HasMetafields](https://shopify.dev/api/admin-graphql/latest/interfaces/HasMetafields). +Some examples of the data that metafields enable you to store are specifications, size charts, downloadable documents, release dates, images, or part numbers. +Metafields are identified by an owner resource, namespace, and key. and store a value along with type information for that value. +""" +type Metafield implements HasCompareDigest & LegacyInteroperability & Node { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! + + """ + The date and time when the metafield was created. + """ + createdAt: DateTime! + + """ + The metafield definition that the metafield belongs to, if any. + """ + definition: MetafieldDefinition + + """ + The description of the metafield. + """ + description: String @deprecated(reason: "This field will be removed in a future release. Use the `description` on the metafield definition instead.\n") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The data stored in the metafield in JSON format. + """ + jsonValue: JSON! + + """ + The unique identifier for the metafield within its namespace. + """ + key: String! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The container for a group of metafields that the metafield is associated with. + """ + namespace: String! + + """ + The resource that the metafield is attached to. + """ + owner: HasMetafields! + + """ + The type of resource that the metafield is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + Returns a reference object if the metafield definition's type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of reference objects if the metafield's type is a resource reference list. + """ + references("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): MetafieldReferenceConnection + + """ + The type of data that's stored in the metafield. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: String! + + """ + The date and time when the metafield was updated. + """ + updatedAt: DateTime! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! +} + +""" +Access permissions for the definition's metafields. +""" +type MetafieldAccess { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccess + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccess! + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccess +} + +""" +The input fields that set access permissions for the definition's metafields. +""" +input MetafieldAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccessInput + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccessInput + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccessInput +} + +""" +The input fields for the access settings for the metafields under the definition. +""" +input MetafieldAccessUpdateInput { + """ + The admin access setting to use for the metafields under this definition. + """ + admin: MetafieldAdminAccessInput + + """ + The storefront access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput +} + +""" +Metafield access permissions for the Admin API. +""" +enum MetafieldAdminAccess { + """ + The merchant and other apps have no access. + """ + PRIVATE + + """ + The merchant and other apps have read-only access. + """ + PUBLIC_READ + + """ + The merchant and other apps have read and write access. + """ + PUBLIC_READ_WRITE + + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE +} + +""" +Metafield access permissions for the Admin API. +""" +enum MetafieldAdminAccessInput { + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE +} + +""" +Provides the capabilities of a metafield definition. +""" +type MetafieldCapabilities { + """ + Indicate whether a metafield definition is configured for filtering. + """ + adminFilterable: MetafieldCapabilityAdminFilterable! + + """ + Indicate whether a metafield definition can be used as a smart collection condition. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionCondition! + + """ + Indicate whether the metafield values for a metafield definition are required to be unique. + """ + uniqueValues: MetafieldCapabilityUniqueValues! +} + +""" +Information about the admin filterable capability on a metafield definition. +""" +type MetafieldCapabilityAdminFilterable { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! + + """ + Determines the metafield definition's filter status for use in admin filtering. + """ + status: MetafieldDefinitionAdminFilterStatus! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetafieldCapabilityAdminFilterableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metafield capability. +""" +input MetafieldCapabilityCreateInput { + """ + The input for updating the smart collection condition capability. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + The input for updating the unique values capability. + """ + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +""" +Information about the smart collection condition capability on a metafield definition. +""" +type MetafieldCapabilitySmartCollectionCondition { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the smart collection condition capability. +""" +input MetafieldCapabilitySmartCollectionConditionInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Information about the unique values capability on a metafield definition. +""" +type MetafieldCapabilityUniqueValues { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the unique values capability. +""" +input MetafieldCapabilityUniqueValuesInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for updating a metafield capability. +""" +input MetafieldCapabilityUpdateInput { + """ + The input for updating the smart collection condition capability. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + The input for updating the unique values capability. + """ + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +""" +An auto-generated type for paginating through multiple Metafields. +""" +type MetafieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldEdge!]! + + """ + A list of nodes that are contained in MetafieldEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Metafield!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccess { + """ + Read and write access. + """ + READ_WRITE + + """ + Read-only access. + """ + READ + + """ + No access. + """ + NONE +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccessInput { + """ + Read and write access. + """ + READ_WRITE + + """ + Read-only access. + """ + READ + + """ + No access. + """ + NONE +} + +""" +Defines the structure, validation rules, and permissions for [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) objects attached to a specific owner type. Each definition establishes a schema that metafields must follow, including the data type and validation constraints. + +The definition controls access permissions across different APIs, determines whether the metafield can be used for filtering or as a collection condition, and can be constrained to specific resource subtypes. +""" +type MetafieldDefinition implements Node { + """ + The access settings associated with the metafield definition. + """ + access: MetafieldAccess! + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilities! + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what subtypes of resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraints + + """ + The description of the metafield definition. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The metafields that belong to the metafield definition. + """ + metafields("Returns the metafields filtered by the validation status." validationStatus: MetafieldValidationStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The count of the metafields that belong to the metafield definition. + """ + metafieldsCount("The current validation status." validationStatus: MetafieldValidationStatus): Int! + + """ + The human-readable name of the metafield definition. + """ + name: String! + + """ + The container for a group of metafields that the metafield definition is associated with. + """ + namespace: String! + + """ + The resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + The position of the metafield definition in the pinned list. + """ + pinnedPosition: Int + + """ + The standard metafield definition template associated with the metafield definition. + """ + standardTemplate: StandardMetafieldDefinitionTemplate + + """ + The type of data that each of the metafields that belong to the metafield definition will store. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: MetafieldDefinitionType! + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean! + + """ + The validation status for the metafields that belong to the metafield definition. + """ + validationStatus: MetafieldDefinitionValidationStatus! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidation!]! +} + +""" +Possible filter statuses associated with a metafield definition for use in admin filtering. +""" +enum MetafieldDefinitionAdminFilterStatus { + """ + The metafield definition cannot be used for admin filtering. + """ + NOT_FILTERABLE + + """ + The metafield definition's metafields are currently being processed for admin filtering. + """ + IN_PROGRESS + + """ + The metafield definition allows admin filtering by matching metafield values. + """ + FILTERABLE + + """ + The metafield definition has failed to be enabled for admin filtering. + """ + FAILED +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitions. +""" +type MetafieldDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MetafieldDefinition!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Metafield definition constraint criteria to filter metafield definitions by. +""" +enum MetafieldDefinitionConstraintStatus { + """ + Returns both constrained and unconstrained metafield definitions. + """ + CONSTRAINED_AND_UNCONSTRAINED + + """ + Only returns metafield definitions that are constrained to a resource subtype. + """ + CONSTRAINED_ONLY + + """ + Only returns metafield definitions that are not constrained to a resource subtype. + """ + UNCONSTRAINED_ONLY +} + +""" +The input fields used to identify a subtype of a resource for the purposes of metafield definition constraints. +""" +input MetafieldDefinitionConstraintSubtypeIdentifier { + """ + The category of the resource subtype. + """ + key: String! + + """ + The specific subtype value within the identified subtype category. + """ + value: String! +} + +""" +A constraint subtype value that the metafield definition applies to. +""" +type MetafieldDefinitionConstraintValue { + """ + The subtype value of the constraint. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues. +""" +type MetafieldDefinitionConstraintValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionConstraintValueEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionConstraintValueEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MetafieldDefinitionConstraintValue!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldDefinitionConstraintValue and a cursor during pagination. +""" +type MetafieldDefinitionConstraintValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldDefinitionConstraintValueEdge. + """ + node: MetafieldDefinitionConstraintValue! +} + +""" +The inputs fields for modifying a metafield definition's constraint subtype values. +Exactly one option is required. +""" +input MetafieldDefinitionConstraintValueUpdateInput { + """ + The constraint subtype value to create. + """ + create: String + + """ + The constraint subtype value to delete. + """ + delete: String +} + +""" +The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) +that determine what subtypes of resources a metafield definition applies to. +""" +type MetafieldDefinitionConstraints { + """ + The category of resource subtypes that the definition applies to. + """ + key: String + + """ + The specific constraint subtype values that the definition applies to. + """ + values("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldDefinitionConstraintValueConnection! +} + +""" +The input fields required to create metafield definition [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions). +Each constraint applies a metafield definition to a subtype of a resource. +""" +input MetafieldDefinitionConstraintsInput { + """ + The category of resource subtypes that the definition applies to. + """ + key: String! + + """ + The specific constraint subtype values that the definition applies to. + """ + values: [String!]! +} + +""" +The input fields required to update metafield definition [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions). +Each constraint applies a metafield definition to a subtype of a resource. +""" +input MetafieldDefinitionConstraintsUpdatesInput { + """ + The category of resource subtypes that the definition applies to. + If omitted and the definition is already constrained, the existing constraint key will be used. + If set to `null`, all constraints will be removed. + """ + key: String + + """ + The specific constraint subtype values to create or delete. + """ + values: [MetafieldDefinitionConstraintValueUpdateInput!] +} + +""" +Return type for `metafieldDefinitionCreate` mutation. +""" +type MetafieldDefinitionCreatePayload { + """ + The metafield definition that was created. + """ + createdDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionCreateUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionCreate`. +""" +type MetafieldDefinitionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionCreateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionCreateUserError`. +""" +enum MetafieldDefinitionCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is blank. + """ + BLANK + + """ + A capability is required for the definition type but is disabled. + """ + CAPABILITY_REQUIRED_BUT_DISABLED + + """ + The definition limit per owner type has exceeded. + """ + RESOURCE_TYPE_LIMIT_EXCEEDED + + """ + The definition limit per owner type for the app has exceeded. + """ + RESOURCE_TYPE_LIMIT_EXCEEDED_BY_APP + + """ + The maximum limit of definitions per owner type has exceeded. + """ + LIMIT_EXCEEDED + + """ + An invalid option. + """ + INVALID_OPTION + + """ + A duplicate option. + """ + DUPLICATE_OPTION + + """ + This namespace and key combination is reserved for standard definitions. + """ + RESERVED_NAMESPACE_KEY + + """ + The pinned limit has been reached for the owner type. + """ + PINNED_LIMIT_REACHED + + """ + This namespace and key combination is already in use for a set of your metafields. + """ + UNSTRUCTURED_ALREADY_EXISTS + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING + + """ + A field contains an invalid character. + """ + INVALID_CHARACTER + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + You have reached the maximum allowed definitions for automated collections. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_AUTOMATED_COLLECTIONS + + """ + You have reached the maximum allowed definitions to be used as admin filters. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_USE_AS_ADMIN_FILTERS + + """ + The metafield definition constraints are invalid. + """ + INVALID_CONSTRAINTS + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED +} + +""" +Return type for `metafieldDefinitionDelete` mutation. +""" +type MetafieldDefinitionDeletePayload { + """ + The metafield definition that was deleted. + """ + deletedDefinition: MetafieldDefinitionIdentifier + + """ + The ID of the deleted metafield definition. + """ + deletedDefinitionId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionDelete`. +""" +type MetafieldDefinitionDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionDeleteUserError`. +""" +enum MetafieldDefinitionDeleteUserErrorCode { + """ + The input value needs to be blank. + """ + PRESENT + + """ + Definition not found. + """ + NOT_FOUND + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + Deleting an id type metafield definition requires deletion of its associated metafields. + """ + ID_TYPE_DELETION_ERROR + + """ + Deleting a reference type metafield definition requires deletion of its associated metafields. + """ + REFERENCE_TYPE_DELETION_ERROR + + """ + Deleting a definition in a reserved namespace requires deletion of its associated metafields. + """ + RESERVED_NAMESPACE_ORPHANED_METAFIELDS + + """ + Action cannot proceed. Definition is currently in use. + """ + METAFIELD_DEFINITION_IN_USE + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """ + Definition is required by an installed app and cannot be deleted. + """ + STANDARD_METAFIELD_DEFINITION_DEPENDENT_ON_APP + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE +} + +""" +An auto-generated type which holds one MetafieldDefinition and a cursor during pagination. +""" +type MetafieldDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldDefinitionEdge. + """ + node: MetafieldDefinition! +} + +""" +Identifies a metafield definition by its owner type, namespace, and key. +""" +type MetafieldDefinitionIdentifier { + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The container for a group of metafields that the metafield definition is associated with. + """ + namespace: String! + + """ + The resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! +} + +""" +The input fields that identify metafield definitions. +""" +input MetafieldDefinitionIdentifierInput { + """ + The resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! +} + +""" +The input fields required to create a metafield definition. +""" +input MetafieldDefinitionInput { + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + + Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + + Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """ + The human-readable name for the metafield definition. + """ + name: String! + + """ + The description for the metafield definition. + """ + description: String + + """ + The resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + The type of data that each of the metafields that belong to the metafield definition will store. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: String! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean = false @deprecated(reason: "Use `smartCollectionCondition` instead.") + + """ + Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) + the metafield definition. + """ + pin: Boolean = false + + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessInput + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraintsInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityCreateInput +} + +""" +Return type for `metafieldDefinitionPin` mutation. +""" +type MetafieldDefinitionPinPayload { + """ + The metafield definition that was pinned. + """ + pinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionPinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionPin`. +""" +type MetafieldDefinitionPinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionPinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionPinUserError`. +""" +enum MetafieldDefinitionPinUserErrorCode { + """ + The metafield definition was not found. + """ + NOT_FOUND + + """ + The pinned limit has been reached for owner type. + """ + PINNED_LIMIT_REACHED + + """ + The metafield definition is already pinned. + """ + ALREADY_PINNED + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE +} + +""" +Possible metafield definition pinned statuses. +""" +enum MetafieldDefinitionPinnedStatus { + """ + All metafield definitions. + """ + ANY + + """ + Only metafield definitions that are pinned. + """ + PINNED + + """ + Only metafield definitions that are not pinned. + """ + UNPINNED +} + +""" +The set of valid sort keys for the MetafieldDefinition query. +""" +enum MetafieldDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `pinned_position` value. + """ + PINNED_POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The type and name for the optional validation configuration of a metafield. + +For example, a supported validation might consist of a `max` name and a `number_integer` type. +This validation can then be used to enforce a maximum character length for a `single_line_text_field` metafield. +""" +type MetafieldDefinitionSupportedValidation { + """ + The name of the metafield definition validation. + """ + name: String! + + """ + The type of input for the validation. + """ + type: String! +} + +""" +A metafield definition type provides basic foundation and validation for a metafield. +""" +type MetafieldDefinitionType { + """ + The category associated with the metafield definition type. + """ + category: String! + + """ + The name of the type for the metafield definition. + See the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + name: String! + + """ + The supported validations for a metafield definition type. + """ + supportedValidations: [MetafieldDefinitionSupportedValidation!]! + + """ + Whether metafields without a definition can be migrated to a definition of this type. + """ + supportsDefinitionMigrations: Boolean! + + """ + The value type for a metafield created with this definition type. + """ + valueType: MetafieldValueType! @deprecated(reason: "`valueType` is deprecated and `name` should be used for type information.") +} + +""" +Return type for `metafieldDefinitionUnpin` mutation. +""" +type MetafieldDefinitionUnpinPayload { + """ + The metafield definition that was unpinned. + """ + unpinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUnpinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUnpin`. +""" +type MetafieldDefinitionUnpinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUnpinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUnpinUserError`. +""" +enum MetafieldDefinitionUnpinUserErrorCode { + """ + The metafield definition was not found. + """ + NOT_FOUND + + """ + The metafield definition isn't pinned. + """ + NOT_PINNED + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE +} + +""" +The input fields required to update a metafield definition. +""" +input MetafieldDefinitionUpdateInput { + """ + The container for a group of metafields that the metafield definition is associated with. Used to help identify + the metafield definition, but can't be updated itself. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. Used to help identify the metafield + definition, but can't be updated itself. + """ + key: String! + + """ + The human-readable name for the metafield definition. + """ + name: String + + """ + The description for the metafield definition. + """ + description: String + + """ + The resource type that the metafield definition is attached to. Used to help identify the metafield definition, + but can't be updated itself. + """ + ownerType: MetafieldOwnerType! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Whether to pin the metafield definition. + """ + pin: Boolean + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean = false @deprecated(reason: "Use `smartCollectionCondition` instead.") + + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessUpdateInput + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what resources a metafield definition applies to. + """ + constraintsUpdates: MetafieldDefinitionConstraintsUpdatesInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityUpdateInput +} + +""" +Return type for `metafieldDefinitionUpdate` mutation. +""" +type MetafieldDefinitionUpdatePayload { + """ + The metafield definition that was updated. + """ + updatedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUpdateUserError!]! + + """ + The asynchronous job updating the metafield definition's validation_status. + """ + validationJob: Job +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUpdate`. +""" +type MetafieldDefinitionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUpdateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUpdateUserError`. +""" +enum MetafieldDefinitionUpdateUserErrorCode { + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is blank. + """ + BLANK + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield definition wasn't found. + """ + NOT_FOUND + + """ + An invalid input. + """ + INVALID_INPUT + + """ + A capability is required for the definition type but is disabled. + """ + CAPABILITY_REQUIRED_BUT_DISABLED + + """ + The pinned limit has been reached for the owner type. + """ + PINNED_LIMIT_REACHED + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING + + """ + An invalid option. + """ + INVALID_OPTION + + """ + A duplicate option. + """ + DUPLICATE_OPTION + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + Action cannot proceed. Definition is currently in use. + """ + METAFIELD_DEFINITION_IN_USE + + """ + You have reached the maximum allowed definitions for automated collections. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_AUTOMATED_COLLECTIONS + + """ + You have reached the maximum allowed definitions to be used as admin filters. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_USE_AS_ADMIN_FILTERS + + """ + You cannot change the metaobject definition pointed to by a metaobject reference metafield definition. + """ + METAOBJECT_DEFINITION_CHANGED + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + The metafield definition constraints are invalid. + """ + INVALID_CONSTRAINTS + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + The metafield definition capability cannot be disabled. + """ + CAPABILITY_CANNOT_BE_DISABLED + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED +} + +""" +A configured metafield definition validation. + +For example, for a metafield definition of `number_integer` type, you can set a validation with the name `max` +and a value of `15`. This validation will ensure that the value of the metafield is a number less than or equal to 15. + +Refer to the [list of supported validations](https://shopify.dev/api/admin/graphql/reference/common-objects/metafieldDefinitionTypes#examples-Fetch_all_metafield_definition_types). +""" +type MetafieldDefinitionValidation { + """ + The validation name. + """ + name: String! + + """ + The name for the metafield type of this validation. + """ + type: String! + + """ + The validation value. + """ + value: String +} + +""" +The name and value for a metafield definition validation. + +For example, for a metafield definition of `single_line_text_field` type, you can set a validation with the name `min` and a value of `10`. +This validation will ensure that the value of the metafield is at least 10 characters. + +Refer to the [list of supported validations](https://shopify.dev/apps/build/custom-data/metafields/list-of-validation-options). +""" +input MetafieldDefinitionValidationInput { + """ + The name for the metafield definition validation. + """ + name: String! + + """ + The value for the metafield definition validation. + """ + value: String! +} + +""" +Possible metafield definition validation statuses. +""" +enum MetafieldDefinitionValidationStatus { + """ + All of this definition's metafields are valid. + """ + ALL_VALID + + """ + Asynchronous validation of this definition's metafields is in progress. + """ + IN_PROGRESS + + """ + Some of this definition's metafields are invalid. + """ + SOME_INVALID +} + +""" +An auto-generated type which holds one Metafield and a cursor during pagination. +""" +type MetafieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldEdge. + """ + node: Metafield! +} + +""" +Identifies a metafield by its owner resource, namespace, and key. +""" +type MetafieldIdentifier { + """ + The key of the metafield. + """ + key: String! + + """ + The namespace of the metafield. + """ + namespace: String! + + """ + GID of the owner resource that the metafield belongs to. + """ + ownerId: ID! +} + +""" +The input fields that identify metafields. +""" +input MetafieldIdentifierInput { + """ + The unique ID of the resource that the metafield is attached to. + """ + ownerId: ID! + + """ + The namespace of the metafield. + """ + namespace: String! + + """ + The key of the metafield. + """ + key: String! +} + +""" +The input fields to use to create or update a metafield through a mutation on the owning resource. +An alternative way to create or update a metafield is by using the +[metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation. +""" +input MetafieldInput { + """ + The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. + """ + id: ID + + """ + The container for a group of metafields that the metafield is or will be associated with. Used in tandem with + `key` to lookup a metafield on a resource, preventing conflicts with other metafields with the same `key`. + + Required when creating a metafield, but optional when updating. Used to help identify the metafield when + updating, but can't be updated itself. + + Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for a metafield within its namespace. + + Required when creating a metafield, but optional when updating. Used to help identify the metafield when + updating, but can't be updated itself. + + Must be 2-64 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + key: String + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String + + """ + The type of data that's stored in the metafield. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + + Required when creating or updating a metafield without a definition. + """ + type: String +} + +""" +Possible types of a metafield's owner resource. +""" +enum MetafieldOwnerType { + """ + The Api Permission metafield owner type. + """ + API_PERMISSION + + """ + The Company metafield owner type. + """ + COMPANY + + """ + The Company Location metafield owner type. + """ + COMPANY_LOCATION + + """ + The Payment Customization metafield owner type. + """ + PAYMENT_CUSTOMIZATION + + """ + The Validation metafield owner type. + """ + VALIDATION + + """ + The Customer metafield owner type. + """ + CUSTOMER + + """ + The Delivery Customization metafield owner type. + """ + DELIVERY_CUSTOMIZATION + + """ + The draft order metafield owner type. + """ + DRAFTORDER + + """ + The GiftCardTransaction metafield owner type. + """ + GIFT_CARD_TRANSACTION + + """ + The Market metafield owner type. + """ + MARKET + + """ + The Cart Transform metafield owner type. + """ + CARTTRANSFORM + + """ + The Collection metafield owner type. + """ + COLLECTION + + """ + The Media Image metafield owner type. + """ + MEDIA_IMAGE @deprecated(reason: "`MEDIA_IMAGE` is deprecated.") + + """ + The Product metafield owner type. + """ + PRODUCT + + """ + The Product Variant metafield owner type. + """ + PRODUCTVARIANT + + """ + The Selling Plan metafield owner type. + """ + SELLING_PLAN + + """ + The Article metafield owner type. + """ + ARTICLE + + """ + The Blog metafield owner type. + """ + BLOG + + """ + The Page metafield owner type. + """ + PAGE + + """ + The Fulfillment Constraint Rule metafield owner type. + """ + FULFILLMENT_CONSTRAINT_RULE + + """ + The Order Routing Location Rule metafield owner type. + """ + ORDER_ROUTING_LOCATION_RULE + + """ + The Discount metafield owner type. + """ + DISCOUNT + + """ + The Order metafield owner type. + """ + ORDER + + """ + The Location metafield owner type. + """ + LOCATION + + """ + The Shop metafield owner type. + """ + SHOP +} + +""" +The resource referenced by the metafield value. +""" +union MetafieldReference = Article|Collection|Company|Customer|GenericFile|MediaImage|Metaobject|Model3d|Order|Page|Product|ProductVariant|TaxonomyValue|Video + +""" +An auto-generated type for paginating through multiple MetafieldReferences. +""" +type MetafieldReferenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldReferenceEdge!]! + + """ + A list of nodes that are contained in MetafieldReferenceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MetafieldReference]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldReference and a cursor during pagination. +""" +type MetafieldReferenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldReferenceEdge. + """ + node: MetafieldReference +} + +""" +Types of resources that may use metafields to reference other resources. +""" +union MetafieldReferencer = AppInstallation|Article|Blog|Collection|Company|CompanyLocation|Customer|DeliveryCustomization|DiscountAutomaticNode|DiscountCodeNode|DiscountNode|DraftOrder|FulfillmentOrder|Location|Market|Metaobject|Order|Page|PaymentCustomization|Product|ProductVariant|Shop + +""" +Defines a relation between two resources via a reference metafield. +The referencer owns the joining field with a given namespace and key, +while the target is referenced by the field. +""" +type MetafieldRelation { + """ + The key of the field making the reference. + """ + key: String! + + """ + The name of the field making the reference. + """ + name: String! + + """ + The namespace of the metafield making the reference, or type of the metaobject. + """ + namespace: String! + + """ + The resource making the reference. + """ + referencer: MetafieldReferencer! + + """ + The referenced resource. + """ + target: MetafieldReference! @deprecated(reason: "No longer supported. Access the object directly instead.") +} + +""" +An auto-generated type for paginating through multiple MetafieldRelations. +""" +type MetafieldRelationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldRelationEdge!]! + + """ + A list of nodes that are contained in MetafieldRelationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MetafieldRelation!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldRelation and a cursor during pagination. +""" +type MetafieldRelationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldRelationEdge. + """ + node: MetafieldRelation! +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccess { + """ + Read-only access. + """ + PUBLIC_READ + + """ + No access. + """ + NONE +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccessInput { + """ + Read-only access. + """ + PUBLIC_READ + + """ + No access. + """ + NONE +} + +""" +Possible metafield validation statuses. +""" +enum MetafieldValidationStatus { + """ + Any validation status (valid or invalid). + """ + ANY + + """ + Valid (according to definition). + """ + VALID + + """ + Invalid (according to definition). + """ + INVALID +} + +""" +Legacy type information for the stored value. +Replaced by `type`. +""" +enum MetafieldValueType { + """ + A text field. + """ + STRING + + """ + A whole number. + """ + INTEGER + + """ + A JSON string. + """ + JSON_STRING + + """ + A `true` or `false` value. + """ + BOOLEAN +} + +""" +Return type for `metafieldsDelete` mutation. +""" +type MetafieldsDeletePayload { + """ + List of metafield identifiers that were deleted, null if the corresponding metafield isn't found. + """ + deletedMetafields: [MetafieldIdentifier] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a metafield value to set. +""" +input MetafieldsSetInput { + """ + The unique ID of the resource that the metafield is attached to. + """ + ownerId: ID! + + """ + The container for a group of metafields that the metafield is or will be associated with. Used in tandem + with `key` to lookup a metafield on a resource, preventing conflicts with other metafields with the + same `key`. If omitted the app-reserved namespace will be used. + + Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for a metafield within its namespace. + + Must be 2-64 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! + + """ + The `compareDigest` value obtained from a previous query. Provide this with updates to ensure the metafield is modified safely. + """ + compareDigest: String + + """ + The type of data that's stored in the metafield. + The type must be one of the [supported types](https://shopify.dev/apps/metafields/types). + + Required when there's no corresponding definition for the given `namespace`, `key`, and + owner resource type (derived from `ownerId`). + """ + type: String +} + +""" +Return type for `metafieldsSet` mutation. +""" +type MetafieldsSetPayload { + """ + The list of metafields that were set. + """ + metafields: [Metafield!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldsSetUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldsSet`. +""" +type MetafieldsSetUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldsSetUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldsSetUserError`. +""" +enum MetafieldsSetUserErrorCode { + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + The metafield has been modified since it was loaded. + """ + STALE_OBJECT + + """ + The compareDigest is invalid. + """ + INVALID_COMPARE_DIGEST + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is blank. + """ + BLANK + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The input value is invalid. + """ + INVALID + + """ + An internal error occurred. + """ + INTERNAL_ERROR +} + +""" +An instance of custom structured data defined by a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition). [Metaobjects](https://shopify.dev/docs/apps/build/custom-data#what-are-metaobjects) store reusable data that extends beyond Shopify's standard resources, such as product highlights, size charts, or custom content sections. + +Each metaobject includes fields that match the field types and validation rules specified in its definition, which also determines the metaobject's capabilities, such as storefront visibility, publishing and translation support. [`Metafields`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) can reference metaobjects to connect custom data with [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects, [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) objects, and other Shopify resources. +""" +type Metaobject implements Node { + """ + Metaobject capabilities for this Metaobject. + """ + capabilities: MetaobjectCapabilityData! + + """ + When the object was created. + """ + createdAt: DateTime! + + """ + The app used to create the object. + """ + createdBy: App! + + """ + The app used to create the object. + """ + createdByApp: App! + + """ + The staff member who created the metaobject. + """ + createdByStaff: StaffMember + + """ + The MetaobjectDefinition that models this object type. + """ + definition: MetaobjectDefinition! + + """ + The preferred display name field value of the metaobject. + """ + displayName: String! + + """ + The field for an object key, or null if the key has no field definition. + """ + field("The metaobject key to access." key: String!): MetaobjectField + + """ + All ordered fields of the metaobject with their definitions and values. + """ + fields: [MetaobjectField!]! + + """ + The unique handle of the object, useful as a custom ID. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + List of back references metafields that belong to the resource. + """ + referencedBy("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldRelationConnection! + + """ + The staff member who created the metaobject. + """ + staffMember: StaffMember @deprecated(reason: "Use `createdByStaff` instead.") + + """ + The recommended field to visually represent this metaobject. May be a file reference or color field. + """ + thumbnailField: MetaobjectField + + """ + The type of the metaobject. + """ + type: String! + + """ + When the object was last updated. + """ + updatedAt: DateTime! +} + +""" +Access permissions for the definition's metaobjects. +""" +type MetaobjectAccess { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccess! + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetaobjectCustomerAccountAccess! + + """ + The access permitted on the Storefront API. + """ + storefront: MetaobjectStorefrontAccess! +} + +""" +The input fields that set access permissions for the definition's metaobjects. +""" +input MetaobjectAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccessInput + + """ + The access permitted on the Storefront API. + """ + storefront: MetaobjectStorefrontAccess + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetaobjectCustomerAccountAccess +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccess { + """ + The merchant and other apps have no access. + """ + PRIVATE + + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE + + """ + The merchant and other apps have read-only access. + """ + PUBLIC_READ + + """ + The merchant and other apps have read and write access. + """ + PUBLIC_READ_WRITE +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccessInput { + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE +} + +""" +Return type for `metaobjectBulkDelete` mutation. +""" +type MetaobjectBulkDeletePayload { + """ + The asynchronous job that deletes the metaobjects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Specifies the condition by which metaobjects are deleted. +Exactly one field of input is required. +""" +input MetaobjectBulkDeleteWhereCondition { + """ + Deletes all metaobjects with the specified `type`. + """ + type: String + + """ + A list of metaobjects IDs to delete. + """ + ids: [ID!] +} + +""" +Provides the capabilities of a metaobject definition. +""" +type MetaobjectCapabilities { + """ + Indicates whether a metaobject definition can be displayed as a page on the Online Store. + """ + onlineStore: MetaobjectCapabilitiesOnlineStore + + """ + Indicate whether a metaobject definition is publishable. + """ + publishable: MetaobjectCapabilitiesPublishable! + + """ + Indicate whether a metaobject definition is renderable and exposes SEO data. + """ + renderable: MetaobjectCapabilitiesRenderable + + """ + Indicate whether a metaobject definition is translatable. + """ + translatable: MetaobjectCapabilitiesTranslatable! +} + +""" +The Online Store capability of a metaobject definition. +""" +type MetaobjectCapabilitiesOnlineStore { + """ + The data associated with the Online Store capability. + """ + data: MetaobjectCapabilityDefinitionDataOnlineStore + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The publishable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesPublishable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The renderable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesRenderable { + """ + The data associated with the renderable capability. + """ + data: MetaobjectCapabilityDefinitionDataRenderable + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The translatable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesTranslatable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metaobject capability. +""" +input MetaobjectCapabilityCreateInput { + """ + The input for enabling the publishable capability. + """ + publishable: MetaobjectCapabilityPublishableInput + + """ + The input for enabling the translatable capability. + """ + translatable: MetaobjectCapabilityTranslatableInput + + """ + The input for enabling the renderable capability. + """ + renderable: MetaobjectCapabilityRenderableInput + + """ + The input for enabling the Online Store capability. + """ + onlineStore: MetaobjectCapabilityOnlineStoreInput +} + +""" +Provides the capabilities of a metaobject. +""" +type MetaobjectCapabilityData { + """ + The Online Store capability for this metaobject. + """ + onlineStore: MetaobjectCapabilityDataOnlineStore + + """ + The publishable capability for this metaobject. + """ + publishable: MetaobjectCapabilityDataPublishable +} + +""" +The input fields for metaobject capabilities. +""" +input MetaobjectCapabilityDataInput { + """ + Publishable capability input. + """ + publishable: MetaobjectCapabilityDataPublishableInput + + """ + Online Store capability input. + """ + onlineStore: MetaobjectCapabilityDataOnlineStoreInput +} + +""" +The Online Store capability for the parent metaobject. +""" +type MetaobjectCapabilityDataOnlineStore { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The input fields for the Online Store capability to control renderability on the Online Store. +""" +input MetaobjectCapabilityDataOnlineStoreInput { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The publishable capability for the parent metaobject. +""" +type MetaobjectCapabilityDataPublishable { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The input fields for publishable capability to adjust visibility on channels. +""" +input MetaobjectCapabilityDataPublishableInput { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The Online Store capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataOnlineStore { + """ + Flag indicating if a sufficient number of redirects are available to redirect all published entries. + """ + canCreateRedirects: Boolean! + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! +} + +""" +The input fields of the Online Store capability. +""" +input MetaobjectCapabilityDefinitionDataOnlineStoreInput { + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! + + """ + Whether to redirect published metaobjects automatically when the URL handle changes. + """ + createRedirects: Boolean = false +} + +""" +The renderable capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataRenderable { + """ + The metaobject field used as an alias for the SEO page description. + """ + metaDescriptionKey: String + + """ + The metaobject field used as an alias for the SEO page title. + """ + metaTitleKey: String +} + +""" +The input fields of the renderable capability for SEO aliases. +""" +input MetaobjectCapabilityDefinitionDataRenderableInput { + """ + The metaobject field used as an alias for the SEO page title. + """ + metaTitleKey: String + + """ + The metaobject field used as an alias for the SEO page description. + """ + metaDescriptionKey: String +} + +""" +The input fields for enabling and disabling the Online Store capability. +""" +input MetaobjectCapabilityOnlineStoreInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! + + """ + The data associated with the Online Store capability. + """ + data: MetaobjectCapabilityDefinitionDataOnlineStoreInput +} + +""" +The input fields for enabling and disabling the publishable capability. +""" +input MetaobjectCapabilityPublishableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the renderable capability. +""" +input MetaobjectCapabilityRenderableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! + + """ + The data associated with the renderable capability. + """ + data: MetaobjectCapabilityDefinitionDataRenderableInput +} + +""" +The input fields for enabling and disabling the translatable capability. +""" +input MetaobjectCapabilityTranslatableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Metaobject Capabilities types which can be enabled. +""" +enum MetaobjectCapabilityType { + """ + Allows for a Metaobject to be conditionally publishable. + """ + PUBLISHABLE + + """ + Allows for a Metaobject to be translated using the translation api. + """ + TRANSLATABLE + + """ + Allows for a Metaobject to have attributes of a renderable page such as SEO. + """ + RENDERABLE + + """ + Allows for a Metaobject to be rendered as an Online Store page. + """ + ONLINE_STORE +} + +""" +The input fields for updating a metaobject capability. +""" +input MetaobjectCapabilityUpdateInput { + """ + The input for updating the publishable capability. + """ + publishable: MetaobjectCapabilityPublishableInput + + """ + The input for updating the translatable capability. + """ + translatable: MetaobjectCapabilityTranslatableInput + + """ + The input for enabling the renderable capability. + """ + renderable: MetaobjectCapabilityRenderableInput + + """ + The input for enabling the Online Store capability. + """ + onlineStore: MetaobjectCapabilityOnlineStoreInput +} + +""" +An auto-generated type for paginating through multiple Metaobjects. +""" +type MetaobjectConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectEdge!]! + + """ + A list of nodes that are contained in MetaobjectEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Metaobject!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a metaobject. +""" +input MetaobjectCreateInput { + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! + + """ + A unique handle for the metaobject. This value is auto-generated when omitted. + """ + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput +} + +""" +Return type for `metaobjectCreate` mutation. +""" +type MetaobjectCreatePayload { + """ + The created metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Metaobject access permissions for the Customer Account API. +""" +enum MetaobjectCustomerAccountAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ +} + +""" +Defines the structure and configuration for a custom data type in Shopify. Each definition specifies the fields, validation rules, and capabilities that apply to all [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) entries created from it. + +The definition includes field definitions that determine what data to store, access controls for [the Shopify admin](https://shopify.dev/docs/apps/build/custom-data/permissions#admin-permissions) and [Storefront](https://shopify.dev/docs/apps/build/custom-data/permissions#storefront-permissions) APIs, and capabilities such as publishability and translatability. You can track which [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) or [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) created the definition and optionally base it on a [`StandardMetaobjectDefinitionTemplate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StandardMetaobjectDefinitionTemplate). +""" +type MetaobjectDefinition implements Node { + """ + Access configuration for the metaobject definition. + """ + access: MetaobjectAccess! + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilities! + + """ + The app used to create the metaobject definition. + """ + createdByApp: App! + + """ + The staff member who created the metaobject definition. + """ + createdByStaff: StaffMember + + """ + The administrative description. + """ + description: String + + """ + The key of a field to reference as the display name for each object. + """ + displayNameKey: String + + """ + The fields defined for this object type. + """ + fieldDefinitions: [MetaobjectFieldDefinition!]! + + """ + Whether this metaobject definition has field whose type can visually represent a metaobject with the `thumbnailField`. + """ + hasThumbnailField: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A paginated connection to the metaobjects associated with the definition. + """ + metaobjects("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetaobjectConnection! + + """ + The count of metaobjects created for the definition. + """ + metaobjectsCount: Int! + + """ + The human-readable name. + """ + name: String! + + """ + The standard metaobject template associated with the definition. + """ + standardTemplate: StandardMetaobjectDefinitionTemplate + + """ + The type of the object definition. Defines the namespace of associated metafields. + """ + type: String! +} + +""" +An auto-generated type for paginating through multiple MetaobjectDefinitions. +""" +type MetaobjectDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectDefinitionEdge!]! + + """ + A list of nodes that are contained in MetaobjectDefinitionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MetaobjectDefinition!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a metaobject definition. +""" +input MetaobjectDefinitionCreateInput { + """ + A human-readable name for the definition. This can be changed at any time. + """ + name: String + + """ + An administrative description of the definition. + """ + description: String + + """ + The type of the metaobject definition. This can't be changed. + + Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + type: String! + + """ + A set of field definitions to create on this metaobject definition. + """ + fieldDefinitions: [MetaobjectFieldDefinitionCreateInput!]! + + """ + Access configuration for the metaobjects created with this definition. + """ + access: MetaobjectAccessInput + + """ + The key of a field to reference as the display name for metaobjects of this type. + """ + displayNameKey: String + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilityCreateInput +} + +""" +Return type for `metaobjectDefinitionCreate` mutation. +""" +type MetaobjectDefinitionCreatePayload { + """ + The created metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDefinitionDelete` mutation. +""" +type MetaobjectDefinitionDeletePayload { + """ + The ID of the deleted metaobjects definition. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one MetaobjectDefinition and a cursor during pagination. +""" +type MetaobjectDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectDefinitionEdge. + """ + node: MetaobjectDefinition! +} + +""" +The input fields for updating a metaobject definition. +""" +input MetaobjectDefinitionUpdateInput { + """ + A human-readable name for the definition. + """ + name: String + + """ + An administrative description of the definition. + """ + description: String + + """ + A set of operations for modifying field definitions. + """ + fieldDefinitions: [MetaobjectFieldDefinitionOperationInput!] + + """ + Access configuration for the metaobjects created with this definition. + """ + access: MetaobjectAccessInput + + """ + The key of a metafield to reference as the display name for objects of this type. + """ + displayNameKey: String + + """ + Whether the field order should be reset while updating. + If `true`, then the order is assigned based on submitted fields followed by alphabetized field omissions. + If `false`, then no changes are made to the existing field order and new fields are appended at the end. + """ + resetFieldOrder: Boolean = false + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilityUpdateInput +} + +""" +Return type for `metaobjectDefinitionUpdate` mutation. +""" +type MetaobjectDefinitionUpdatePayload { + """ + The updated metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDelete` mutation. +""" +type MetaobjectDeletePayload { + """ + The ID of the deleted metaobject. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one Metaobject and a cursor during pagination. +""" +type MetaobjectEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectEdge. + """ + node: Metaobject! +} + +""" +Provides a field definition and the data value assigned to it. +""" +type MetaobjectField { + """ + The field definition for this object key. + """ + definition: MetaobjectFieldDefinition! + + """ + The assigned field value in JSON format. + """ + jsonValue: JSON + + """ + The object key of this field. + """ + key: String! + + """ + For resource reference fields, provides the referenced object. + """ + reference: MetafieldReference + + """ + For resource reference list fields, provides the list of referenced objects. + """ + references("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): MetafieldReferenceConnection + + """ + For file reference or color fields, provides visual attributes for this field. + """ + thumbnail: MetaobjectThumbnail + + """ + The type of the field. + """ + type: String! + + """ + The assigned field value, always stored as a string regardless of the field type. + """ + value: String +} + +""" +Information about the admin filterable capability. +""" +type MetaobjectFieldCapabilityAdminFilterable { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetaobjectFieldCapabilityAdminFilterableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Defines a field for a MetaobjectDefinition with properties +such as the field's data type and validations. +""" +type MetaobjectFieldDefinition { + """ + Capabilities available for this metaobject field definition. + """ + capabilities: MetaobjectFieldDefinitionCapabilities! + + """ + The administrative description. + """ + description: String + + """ + A key name used to identify the field within the metaobject composition. + """ + key: String! + + """ + The human-readable name. + """ + name: String! + + """ + Required status of the field within the metaobject composition. + """ + required: Boolean! + + """ + The type of data that the field stores. + """ + type: MetafieldDefinitionType! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the field. For example, a field with the type `date` can set a minimum date requirement. + """ + validations: [MetafieldDefinitionValidation!]! +} + +""" +Capabilities available for a metaobject field definition. +""" +type MetaobjectFieldDefinitionCapabilities { + """ + Indicate whether a metaobject field definition is configured for filtering. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterable! +} + +""" +The input fields for creating capabilities on a metaobject field definition. +""" +input MetaobjectFieldDefinitionCapabilityCreateInput { + """ + The input for configuring the admin filterable capability. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterableInput +} + +""" +The input fields for creating a metaobject field definition. +""" +input MetaobjectFieldDefinitionCreateInput { + """ + The key of the new field definition. This can't be changed. + + Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """ + The metafield type applied to values of the field. + """ + type: String! + + """ + A human-readable name for the field. This can be changed at any time. + """ + name: String + + """ + An administrative description of the field. + """ + description: String + + """ + Whether metaobjects require a saved value for the field. + """ + required: Boolean = false + + """ + Custom validations that apply to values assigned to the field. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Capabilities configuration for this field. + """ + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput +} + +""" +The input fields for deleting a metaobject field definition. +""" +input MetaobjectFieldDefinitionDeleteInput { + """ + The key of the field definition to delete. + """ + key: String! +} + +""" +The input fields for possible operations for modifying field definitions. Exactly one option is required. +""" +input MetaobjectFieldDefinitionOperationInput { + """ + The input fields for creating a metaobject field definition. + """ + create: MetaobjectFieldDefinitionCreateInput + + """ + The input fields for updating a metaobject field definition. + """ + update: MetaobjectFieldDefinitionUpdateInput + + """ + The input fields for deleting a metaobject field definition. + """ + delete: MetaobjectFieldDefinitionDeleteInput +} + +""" +The input fields for updating a metaobject field definition. +""" +input MetaobjectFieldDefinitionUpdateInput { + """ + The key of the field definition to update. + """ + key: String! + + """ + A human-readable name for the field. + """ + name: String + + """ + An administrative description of the field. + """ + description: String + + """ + Whether metaobjects require a saved value for the field. + """ + required: Boolean + + """ + Custom validations that apply to values assigned to the field. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Capabilities configuration for this field. + """ + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput +} + +""" +The input fields for a metaobject field value. +""" +input MetaobjectFieldInput { + """ + The key of the field. + """ + key: String! + + """ + The value of the field. + """ + value: String! +} + +""" +The input fields for retrieving a metaobject by handle. +""" +input MetaobjectHandleInput { + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! + + """ + The handle of the metaobject to create or update. + """ + handle: String! +} + +""" +Defines visibility status for metaobjects. +""" +enum MetaobjectStatus { + """ + The metaobjects is an internal record. + """ + DRAFT + + """ + The metaobjects is active for public use. + """ + ACTIVE +} + +""" +Metaobject access permissions for the Storefront API. +""" +enum MetaobjectStorefrontAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Provides attributes for visual representation. +""" +type MetaobjectThumbnail { + """ + The file to be used for visual representation of this metaobject. + """ + file: File + + """ + The hexadecimal color code to be used for respresenting this metaobject. + """ + hex: String +} + +""" +The input fields for updating a metaobject. +""" +input MetaobjectUpdateInput { + """ + A unique handle for the metaobject. + """ + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput + + """ + Whether to create a redirect for the metaobject. + """ + redirectNewHandle: Boolean = false +} + +""" +Return type for `metaobjectUpdate` mutation. +""" +type MetaobjectUpdatePayload { + """ + The updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +The input fields for upserting a metaobject. +""" +input MetaobjectUpsertInput { + """ + The handle of the metaobject. + """ + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput +} + +""" +Return type for `metaobjectUpsert` mutation. +""" +type MetaobjectUpsertPayload { + """ + The created or updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Defines errors encountered while managing metaobject resources. +""" +type MetaobjectUserError implements DisplayableError { + """ + The error code. + """ + code: MetaobjectUserErrorCode + + """ + The index of the failing list element in an array. + """ + elementIndex: Int + + """ + The key of the failing object element. + """ + elementKey: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetaobjectUserError`. +""" +enum MetaobjectUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is blank. + """ + BLANK + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or the definition options. + """ + INVALID_VALUE + + """ + The value for the metafield definition option was invalid. + """ + INVALID_OPTION + + """ + Duplicate inputs were provided for this field key. + """ + DUPLICATE_FIELD_INPUT + + """ + No metaobject definition found for this type. + """ + UNDEFINED_OBJECT_TYPE + + """ + No field definition found for this key. + """ + UNDEFINED_OBJECT_FIELD + + """ + The specified field key is already in use. + """ + OBJECT_FIELD_TAKEN + + """ + Missing required fields were found for this object. + """ + OBJECT_FIELD_REQUIRED + + """ + The requested record couldn't be found. + """ + RECORD_NOT_FOUND + + """ + An unexpected error occurred. + """ + INTERNAL_ERROR + + """ + The maximum number of metaobjects definitions has been exceeded. + """ + MAX_DEFINITIONS_EXCEEDED + + """ + The maximum number of metaobjects per shop has been exceeded. + """ + MAX_OBJECTS_EXCEEDED + + """ + The maximum number of input metaobjects has been exceeded. + """ + INPUT_LIMIT_EXCEEDED + + """ + The targeted object cannot be modified. + """ + IMMUTABLE + + """ + Not authorized. + """ + NOT_AUTHORIZED + + """ + The provided name is reserved for system use. + """ + RESERVED_NAME + + """ + The display name cannot be the same when using the metaobject as a product option. + """ + DISPLAY_NAME_CONFLICT + + """ + Admin access can only be specified on metaobject definitions that have an app-reserved type. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """ + Definition is required by an installed app and cannot be deleted. + """ + STANDARD_METAOBJECT_DEFINITION_DEPENDENT_ON_APP + + """ + The capability you are using is not enabled. + """ + CAPABILITY_NOT_ENABLED + + """ + The Online Store URL handle is already taken. + """ + URL_HANDLE_TAKEN + + """ + The Online Store URL handle is invalid. + """ + URL_HANDLE_INVALID + + """ + The Online Store URL handle cannot be blank. + """ + URL_HANDLE_BLANK + + """ + Renderable data input is referencing an invalid field. + """ + FIELD_TYPE_INVALID + + """ + The input is missing required keys. + """ + MISSING_REQUIRED_KEYS + + """ + The action cannot be completed because associated metaobjects are referenced by another resource. + """ + REFERENCE_EXISTS_ERROR +} + +""" +The set of valid sort keys for the MethodDefinition query. +""" +enum MethodDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `rate_provider_type` value. + """ + RATE_PROVIDER_TYPE +} + +""" +You can use the `MobilePlatformApplication` resource to enable +[shared web credentials](https://developer.apple.com/documentation/security/shared_web_credentials) for Shopify iOS apps, +as well as to create [iOS universal link](https://developer.apple.com/ios/universal-links/) +or [Android app link](https://developer.android.com/training/app-links/) verification endpoints for merchant Shopify iOS or Android apps. +Shared web credentials let iOS users access a native app after logging into the respective website in Safari without re-entering +their username and password. If a user changes their credentials in the app, then those changes are reflected in Safari. +You must use a custom domain to integrate shared web credentials with Shopify. With each platform's link system, +users can tap a link to a shop's website and get seamlessly redirected to a merchant's installed app without going +through a browser or manually selecting an app. + +For full configuration instructions on iOS shared web credentials, +see the [associated domains setup](https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains) technical documentation. + +For full configuration instructions on iOS universal links or Android App Links, +see the respective [iOS universal link](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content) +or [Android app link](https://developer.android.com/training/app-links) technical documentation. +""" +union MobilePlatformApplication = AndroidApplication|AppleApplication + +""" +An auto-generated type for paginating through multiple MobilePlatformApplications. +""" +type MobilePlatformApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MobilePlatformApplicationEdge!]! + + """ + A list of nodes that are contained in MobilePlatformApplicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [MobilePlatformApplication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationCreateAndroidInput { + """ + Android application ID. + """ + applicationId: String + + """ + The SHA256 fingerprints of the app’s signing certificate. + """ + sha256CertFingerprints: [String!]! + + """ + Whether Android App Links are supported by this app. + """ + appLinksEnabled: Boolean! +} + +""" +The input fields for an Apple based mobile platform application. +""" +input MobilePlatformApplicationCreateAppleInput { + """ + Apple application ID. + """ + appId: String + + """ + Whether Apple Universal Links are supported by this app. + """ + universalLinksEnabled: Boolean! + + """ + Whether Apple shared web credentials are enabled for this app. + """ + sharedWebCredentialsEnabled: Boolean! + + """ + Whether Apple app clips are enabled for this app. + """ + appClipsEnabled: Boolean + + """ + The Apple app clip application ID. + """ + appClipApplicationId: String +} + +""" +The input fields for a mobile application platform type. +""" +input MobilePlatformApplicationCreateInput @oneOf { + """ + Android based mobile platform application. + """ + android: MobilePlatformApplicationCreateAndroidInput + + """ + Apple based mobile platform application. + """ + apple: MobilePlatformApplicationCreateAppleInput +} + +""" +Return type for `mobilePlatformApplicationCreate` mutation. +""" +type MobilePlatformApplicationCreatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +Return type for `mobilePlatformApplicationDelete` mutation. +""" +type MobilePlatformApplicationDeletePayload { + """ + The ID of the mobile platform application that was just deleted. + """ + deletedMobilePlatformApplicationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An auto-generated type which holds one MobilePlatformApplication and a cursor during pagination. +""" +type MobilePlatformApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MobilePlatformApplicationEdge. + """ + node: MobilePlatformApplication! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationUpdateAndroidInput { + """ + Android application ID. + """ + applicationId: String + + """ + The SHA256 fingerprints of the app’s signing certificate. + """ + sha256CertFingerprints: [String!] + + """ + Whether Android App Links are supported by this app. + """ + appLinksEnabled: Boolean +} + +""" +The input fields for an Apple based mobile platform application. +""" +input MobilePlatformApplicationUpdateAppleInput { + """ + Apple application ID. + """ + appId: String + + """ + Whether Apple Universal Links are supported by this app. + """ + universalLinksEnabled: Boolean + + """ + Whether Apple shared web credentials are enabled for this app. + """ + sharedWebCredentialsEnabled: Boolean + + """ + Whether Apple App Clips are enabled for this app. + """ + appClipsEnabled: Boolean + + """ + The Apple App Clip application ID. + """ + appClipApplicationId: String +} + +""" +The input fields for the mobile platform application platform type. +""" +input MobilePlatformApplicationUpdateInput @oneOf { + """ + Android based Mobile Platform Application. + """ + android: MobilePlatformApplicationUpdateAndroidInput + + """ + Apple based Mobile Platform Application. + """ + apple: MobilePlatformApplicationUpdateAppleInput +} + +""" +Return type for `mobilePlatformApplicationUpdate` mutation. +""" +type MobilePlatformApplicationUpdatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing. +""" +type MobilePlatformApplicationUserError implements DisplayableError { + """ + The error code. + """ + code: MobilePlatformApplicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MobilePlatformApplicationUserError`. +""" +enum MobilePlatformApplicationUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +Represents a Shopify hosted 3D model. +""" +type Model3d implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The 3d model's bounding box information. + """ + boundingBox: Model3dBoundingBox + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The 3d model's filename. + """ + filename: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The 3d model's original source. + """ + originalSource: Model3dSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The 3d model's sources. + """ + sources: [Model3dSource!]! + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Bounding box information of a 3d model. +""" +type Model3dBoundingBox { + """ + Size in meters of the smallest volume which contains the 3d model. + """ + size: Vector3! +} + +""" +A source for a Shopify-hosted 3d model. + +Types of sources include GLB and USDZ formatted 3d models, where the former +is an original 3d model and the latter has been converted from the original. + +If the original source is in GLB format and over 15 MBs in size, then both the +original and the USDZ formatted source are optimized to reduce the file size. +""" +type Model3dSource { + """ + The 3d model source's filesize. + """ + filesize: Int! + + """ + The 3d model source's format. + """ + format: String! + + """ + The 3d model source's MIME type. + """ + mimeType: String! + + """ + The 3d model source's URL. + """ + url: String! +} + +""" +A monetary value string without a currency symbol or code. Example value: `"100.57"`. +""" +scalar Money + +""" +A collection of monetary values in their respective currencies. Used throughout the API for multi-currency pricing and transactions, when an amount in the shop's currency is converted to the customer's currency of choice. The `presentmentMoney` field contains the amount in the customer's selected currency. The `shopMoney` field contains the equivalent in the shop's base currency. +""" +type MoneyBag { + """ + Amount in presentment currency. + """ + presentmentMoney: MoneyV2! + + """ + Amount in shop currency. + """ + shopMoney: MoneyV2! +} + +""" +An input collection of monetary values in their respective currencies. +Represents an amount in the shop's currency and the amount as converted to the customer's currency of choice (the presentment currency). +""" +input MoneyBagInput { + """ + Amount in shop currency. + """ + shopMoney: MoneyInput! + + """ + Amount in presentment currency. If this isn't given then we assume that the presentment currency is the same as the shop's currency. + """ + presentmentMoney: MoneyInput +} + +""" +The input fields for a monetary value with currency. +""" +input MoneyInput { + """ + Decimal money amount. + """ + amount: Decimal! + + """ + Currency of the money. + """ + currencyCode: CurrencyCode! +} + +""" +A precise monetary value and its associated currency. Combines a decimal amount with a three-letter currency code to express prices, costs, and other financial values throughout the API. For example, 12.99 USD. +""" +type MoneyV2 { + """ + A monetary value in decimal format, allowing for precise representation of cents or fractional + currency. For example, 12.99. + """ + amount: Decimal! + + """ + The three-letter currency code that represents a world currency used in a store. Currency codes + include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, + and non-standard codes. For example, USD. + """ + currencyCode: CurrencyCode! +} + +""" +The input for moving a single object to a specific position in a set. + +Provide this input only for objects whose position actually changed; do not send inputs for the entire set. + +- id: The ID (GID) of the object to move. +- newPosition: The zero-based index of the object's position within the set at the time this move is applied. + +Moves are applied sequentially, so `newPosition` for each move is evaluated after all prior moves in the same list. +If `newPosition` is greater than or equal to the number of objects, the object is moved to the end of the set. +Values do not have to be unique. Objects not included in the move list keep their relative order, aside from any displacement caused by the moves. +""" +input MoveInput { + """ + The ID of the object to be moved. + """ + id: ID! + + """ + Zero-based index of the object's position at the time this move is applied. If the value is >= the number of objects, the object is placed at the end. + """ + newPosition: UnsignedInt64! +} + +""" +The schema's entry point for all mutation operations. +""" +type Mutation { + """ + Updates the email state value for an abandonment. + """ + abandonmentEmailStateUpdate("The ID of the abandonment that needs to be updated." id: ID!, "The new email state of the abandonment." emailState: AbandonmentEmailState!, "The date and time for when the email was sent, if that is the case." emailSentAt: DateTime, "The reason why the email was or was not sent." emailStateChangeReason: String): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") + + """ + Updates the marketing activities delivery statuses for an abandonment. + """ + abandonmentUpdateActivitiesDeliveryStatuses("The ID of the abandonment that needs to be updated." abandonmentId: ID!, "The ID of the marketing activity that needs to be updated." marketingActivityId: ID!, "The new delivery status of the marketing activity for this abandonment." deliveryStatus: AbandonmentDeliveryState!, "The delivery timestamp if the activity delivered." deliveredAt: DateTime, "The reason why the activity was or was not delivered." deliveryStatusChangeReason: String): AbandonmentUpdateActivitiesDeliveryStatusesPayload + + """ + Creates a one-time charge for app features or services that don't require recurring billing. This mutation is ideal for apps that sell individual features, premium content, or services on a per-use basis rather than subscription models. + + For example, a design app might charge merchants once for premium templates, or a marketing app could bill for individual campaign setups without ongoing monthly fees. + + Use the `AppPurchaseOneTimeCreate` mutation to: + - Charge for premium features or content purchases + - Bill for professional services or setup fees + - Generate revenue from one-time digital product sales + + The mutation returns a confirmation URL that merchants must visit to approve the charge. Test and development stores are not charged, allowing safe testing of billing flows. + + Explore one-time billing options on the [app purchases page](https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases). + """ + appPurchaseOneTimeCreate("The name of the one-time purchase from the app." name: String!, "The amount to be charged to the store for the app one-time purchase." price: MoneyInput!, "The URL where the merchant is redirected after approving the app one-time purchase." returnUrl: URL!, "Whether the app one-time purchase is a test transaction." test: Boolean = false): AppPurchaseOneTimeCreatePayload + + """ + Revokes previously granted access scopes from an app installation, allowing merchants to reduce an app's permissions without completely uninstalling it. This provides granular control over what data and functionality apps can access. + + For example, if a merchant no longer wants an app to access customer information but still wants to use its inventory features, they can revoke the customer-related scopes while keeping inventory permissions active. + + Use the `appRevokeAccessScopes` mutation to: + - Remove specific permissions from installed apps + - Maintain app functionality while minimizing data exposure + + The mutation returns details about which scopes were successfully revoked and any errors that prevented certain permissions from being removed. + + Learn more about [managing app permissions](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/manage-access-scopes#revoke-granted-scopes-dynamically). + """ + appRevokeAccessScopes("The list of scope handles to revoke." scopes: [String!]!): AppRevokeAccessScopesPayload + + """ + Cancels an active app subscription, stopping future billing cycles. The cancellation behavior depends on the `replacementBehavior` setting - it can either disable auto-renewal (allowing the subscription to continue until the end of the current billing period) or immediately cancel with prorated refunds. + + When a merchant decides to discontinue using subscription features, this mutation provides a clean cancellation workflow that respects billing periods and merchant expectations. + + Use the `AppSubscriptionCancel` mutation to: + - Process merchant-initiated subscription cancellations + - Terminate subscriptions due to policy violations or account issues + - Handle subscription cancellations during app uninstallation workflows + + The cancellation timing and merchant access depends on the `replacementBehavior` setting and the app's specific implementation of subscription management. + + For subscription lifecycle management and cancellation best practices, consult the [subscription management guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). + """ + appSubscriptionCancel("The ID of the app subscription to be cancelled." id: ID!, "Whether to issue prorated credits for the unused portion of the app subscription. There will\nbe a corresponding deduction (based on revenue share) to your Partner account.\nFor example, if a $10.00 app subscription (with 0% revenue share) is cancelled and prorated half way\nthrough the billing cycle, then the merchant will be credited $5.00 and that amount will be deducted\nfrom your Partner account." prorate: Boolean = false): AppSubscriptionCancelPayload + + """ + Creates a recurring or usage-based [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) that charges merchants for app features and services. The subscription includes one or more [`AppSubscriptionLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscriptionLineItem) objects that define the pricing structure, billing intervals, and optional [`AppSubscriptionDiscount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscriptionDiscount) values. + + Returns a [confirmation URL](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate#returns-confirmationUrl) where the merchant approves or declines the charges. After approval, the subscription becomes active and billing begins after any trial period expires. You can specify [`AppSubscriptionReplacementBehavior`](https://shopify.dev/docs/api/admin-graphql/latest/enums/AppSubscriptionReplacementBehavior) to control how this subscription interacts with existing active subscriptions. + + Learn more about [creating app subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-time-based-subscriptions). + """ + appSubscriptionCreate("A descriptive name for the app subscription." name: String!, "Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type." lineItems: [AppSubscriptionLineItemInput!]!, "Whether the app subscription is a test transaction." test: Boolean = false, "The number of days of the free trial period, beginning on the day that the merchant approves the app charges." trialDays: Int, "The URL pointing to the page where the merchant is redirected after approving the app subscription." returnUrl: URL!, "The replacement behavior when creating an app subscription for a merchant with an already existing app subscription." replacementBehavior: AppSubscriptionReplacementBehavior = STANDARD): AppSubscriptionCreatePayload + + """ + Updates the capped amount on usage-based billing for an [`AppSubscriptionLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscriptionLineItem). Enables you to modify the maximum charge limit that prevents merchants from exceeding a specified threshold during their billing period. + + The mutation returns a [confirmation URL](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate#returns-confirmationUrl) where the merchant must approve the new pricing limit before it takes effect. Use this when adjusting usage limits based on merchant needs or changing pricing models. + + Learn more about [updating the maximum charge for a subscription](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge). + """ + appSubscriptionLineItemUpdate("The ID of the app subscription line item to be updated." id: ID!, "The new maximum amount of usage charges that can be incurred within a subscription billing interval." cappedAmount: MoneyInput!): AppSubscriptionLineItemUpdatePayload + + """ + Extends the trial period for an existing app subscription. Trial extensions give merchants additional time to use the app before committing to paid billing. + + Requires the subscription ID and the number of days to extend (between one and 1000). The extension modifies the existing trial end date, allowing continued access to subscription features without immediate billing. Returns the updated [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription). + + Learn more about [offering free trials](https://shopify.dev/docs/apps/launch/billing/offer-free-trials). + """ + appSubscriptionTrialExtend("The ID of the app subscription to extend the trial for." id: ID!, "The number of days to extend the trial. The value must be greater than 0 and less than or equal to 1000." days: Int!): AppSubscriptionTrialExtendPayload + + """ + Uninstalls an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) from a shop. Apps use this mutation to uninstall themselves programmatically, removing their [`AppInstallation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation) from the merchant's store. + + When an app uninstalls, Shopify automatically performs cleanup tasks, such as deleting [`WebhookSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/WebhookSubscription) objects and [admin links](https://shopify.dev/docs/apps/build/admin/admin-links) associated with the app. + + Learn more about [app lifecycle management](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/uninstall-app-api-request). + + > Caution: + > This action is irreversible. You can't restore an uninstalled app's configuration or data. Before you uninstall an app, make sure that you no longer need to make API calls for the store in which the app has been installed. + """ + appUninstall: AppUninstallPayload + + """ + Creates a usage charge for an app subscription with usage-based pricing. The charge counts toward the capped amount limit set when creating the subscription. + + Usage records track consumption of app features or services on a per-use basis. You provide the charge amount, a description of what you consumed, and the subscription line item ID. The optional [`idempotencyKey`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppUsageRecord#field-idempotencyKey) parameter prevents duplicate charges if you send the same request multiple times. + + If the new charge would cause total usage charges in the current billing interval to exceed the capped amount, then the mutation returns an error. + + Learn more about [creating usage-based subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-usage-based-subscriptions). + """ + appUsageRecordCreate("The ID of the app subscription line item to create the usage record under. This app subscription line item must have a usage pricing plan." subscriptionLineItemId: ID!, "The price of the app usage record." price: MoneyInput!, "The description of the app usage record." description: String!, "A unique key generated by the client to avoid duplicate charges. Maximum length of 255 characters." idempotencyKey: String): AppUsageRecordCreatePayload + + """ + Creates an [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). Articles are content pieces that include a title, body text, and author information. + + You can publish the article immediately or schedule it with a specific publish date. You can customize the article's URL handle, apply custom templates for rendering, and add optional fields like [tags](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleCreate#arguments-article.fields.tags), an [image](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleCreate#arguments-article.fields.image), and [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. + + The mutation validates article content and ensures proper blog association. Error handling provides specific feedback for content requirements. + """ + articleCreate("The properties of the new article." article: ArticleCreateInput!, "The properties of the new blog." blog: ArticleBlogInput): ArticleCreatePayload + + """ + Permanently deletes a blog article from a shop's blog. This mutation removes the article and all associated metadata. + + For example, when outdated product information or seasonal content needs removal, merchants can use this mutation to clean up their blog. + + Use the `articleDelete` mutation to: + - Remove outdated or incorrect blog content + - Clean up seasonal or time-sensitive articles + - Maintain blog organization + + The deletion is permanent and returns the deleted article's ID for confirmation. + """ + articleDelete("The ID of the article to be deleted." id: ID!): ArticleDeletePayload + + """ + Updates an existing [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). You can modify the article's content, metadata, publication status, and associated properties like author information and tags. + + If you update the [`handle`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleUpdate#arguments-article.fields.handle), then you can optionally create a redirect from the old URL to the new one by setting [`redirectNewHandle`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleUpdate#arguments-article.fields.redirectNewHandle) to `true`. + """ + articleUpdate("The ID of the article to be updated." id: ID!, "The properties of the article to be updated." article: ArticleUpdateInput!, "The properties of the blog to be created." blog: ArticleBlogInput): ArticleUpdatePayload + + """ + Update the backup region that is used when we have no better signal of what region a buyer is in. + """ + backupRegionUpdate("Optional input representing the region to be updated. If not provided, the existing regions remain unchanged." region: BackupRegionUpdateInput): BackupRegionUpdatePayload + + """ + Creates a new blog within a shop, establishing a container for organizing articles. + + For example, a fitness equipment retailer launching a wellness blog would use this mutation to create the blog, enabling them to publish workout guides and nutrition tips. + + Use the `blogCreate` mutation to: + - Launch new content marketing initiatives + - Create separate blogs for different content themes + - Establish spaces for article organization + + The mutation validates blog settings and establishes the structure for article publishing. + """ + blogCreate("The properties of the new blog." blog: BlogCreateInput!): BlogCreatePayload + + """ + Permanently deletes a blog from a shop. This mutation removes the blog container and its organizational structure. + + For example, when consolidating multiple seasonal blogs into a single year-round content strategy, merchants can use this mutation to remove unused blogs. + + Use the `blogDelete` mutation to: + - Remove unused or outdated blogs + - Consolidate content organization + - Clean up blog structure + + The deletion is permanent and returns the deleted blog's ID for confirmation. + """ + blogDelete("The ID of the blog to be deleted." id: ID!): BlogDeletePayload + + """ + Updates an existing blog's configuration and settings. This mutation allows merchants to modify blog properties to keep their content strategy current. + + For example, a merchant might update their blog's title from "Company News" to "Sustainability Stories" when shifting their content focus, or modify the handle to improve URL structure. + + Use the `blogUpdate` mutation to: + - Change blog titles for rebranding + - Modify blog handles for better URLs + - Adjust comment settings and moderation preferences + + The mutation returns the updated blog with any validation errors. + """ + blogUpdate("The ID of the blog to be updated." id: ID!, "The properties of the blog to be updated." blog: BlogUpdateInput!): BlogUpdatePayload + + """ + Starts the cancelation process of a running bulk operation. + + There may be a short delay from when a cancelation starts until the operation is actually canceled. + """ + bulkOperationCancel("The ID of the bulk operation to cancel." id: ID!): BulkOperationCancelPayload + + """ + Creates and runs a [bulk operation](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation) to import data asynchronously. This mutation executes a specified GraphQL mutation multiple times using input data from a [JSONL](http://jsonlines.org/) file that you've uploaded to Shopify. + + The operation processes each line in your JSONL file as a separate mutation execution. The operation delivers results in a JSONL file when it completes. Bulk mutation operations and [`bulkOperationRunQuery`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkoperationrunquery) operations can run at the same time per shop. The number of concurrent operations that an app can run depends on the API version. For the applicable concurrency limits, refer to the [bulk operations guide](https://shopify.dev/docs/api/usage/bulk-operations/imports). + + Learn more about [bulk importing data](https://shopify.dev/docs/api/usage/bulk-operations/imports). + """ + bulkOperationRunMutation("The mutation to be executed in bulk." mutation: String!, "The staged upload path of the file containing mutation variables." stagedUploadPath: String!, "Enables grouping objects directly under their corresponding parent objects in the JSONL output. Enabling grouping slows down bulk operations and increases the likelihood of timeouts. Only enable grouping if you depend on the grouped format." groupObjects: Boolean = true @deprecated(reason: "This argument has no effect on output order."), "An optional identifier which may be used for querying." clientIdentifier: String): BulkOperationRunMutationPayload + + """ + Creates and runs a [bulk operation](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation) to fetch data asynchronously. The operation processes your GraphQL query in the background and returns results in a [JSONL](http://jsonlines.org/) file when complete. + + Bulk query and bulk mutation operations can run at the same time per shop. The number of concurrent operations that an app can run depends on the API version. For the applicable concurrency limits, refer to the [bulk operations guide](https://shopify.dev/docs/api/usage/bulk-operations/queries). The query must include at least one connection field and supports up to five connections with a maximum nesting depth of two levels. + + > Note: Results remain available for seven days after completion. + + For more information, see the [bulk operations guide](https://shopify.dev/docs/api/usage/bulk-operations/queries). + """ + bulkOperationRunQuery("The query to be executed in bulk." query: String!, "Enables grouping objects directly under their corresponding parent objects in the JSONL output. Enabling grouping slows down bulk operations and increases the likelihood of timeouts. Only enable grouping if you depend on the grouped format." groupObjects: Boolean! = false): BulkOperationRunQueryPayload + + """ + Creates product feedback for multiple products. + """ + bulkProductResourceFeedbackCreate("An array of inputs to create the feedback. Limited to 50." feedbackInput: [ProductResourceFeedbackInput!]!): BulkProductResourceFeedbackCreatePayload + + """ + Creates a carrier service that provides real-time shipping rates to Shopify. Carrier services provide real-time shipping rates from external providers like FedEx, UPS, or custom shipping solutions. The carrier service connects to your external shipping rate calculation system through a callback URL. + + When customers reach checkout, Shopify sends order details to your callback URL and displays the returned shipping rates. The service must be active to provide rates during checkout. + """ + carrierServiceCreate("The input fields used to create a carrier service." input: DeliveryCarrierServiceCreateInput!): CarrierServiceCreatePayload + + """ + Removes an existing carrier service. + """ + carrierServiceDelete("The global ID of the carrier service to delete." id: ID!): CarrierServiceDeletePayload + + """ + Updates a carrier service. Only the app that creates a carrier service can update it. + """ + carrierServiceUpdate("The input fields used to update a carrier service." input: DeliveryCarrierServiceUpdateInput!): CarrierServiceUpdatePayload + + """ + Creates a cart transform function that lets merchants customize how products are bundled and presented during checkout. This gives merchants powerful control over their merchandising strategy by allowing apps to modify cart line items programmatically, supporting advanced approaches like dynamic bundles or personalized product recommendations. + + For example, a bundle app might create a cart transform that automatically groups related products (like a camera, lens, and case) into a single bundle line item when customers add them to their cart, complete with bundle pricing and unified presentation. + + Use `CartTransformCreate` to: + - Deploy custom bundling logic to merchant stores + - Enable dynamic product grouping during checkout + - Implement personalized product recommendations + - Create conditional offers based on cart contents + - Support complex pricing strategies for product combinations + + The mutation processes synchronously and returns the created cart transform along with any validation errors. Once created, the cart transform function becomes active for the shop and will process cart modifications according to your defined logic. Cart transforms integrate with [Shopify Functions](https://shopify.dev/docs/api/functions) to provide powerful customization capabilities while maintaining checkout performance. + + Cart Transform functions can be configured to block checkout on failure or allow graceful degradation, giving you control over how errors are handled in the customer experience. + + Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle). + """ + cartTransformCreate("The identifier of the Function providing the cart transform." functionId: String @deprecated(reason: "Use `functionHandle` instead."), "The handle of the Function providing the cart transform." functionHandle: String, "Whether a run failure should block cart and checkout operations." blockOnFailure: Boolean = false, "Additional metafields to associate to the cart transform." metafields: [MetafieldInput!] = []): CartTransformCreatePayload + + """ + Removes an existing cart transform function from the merchant's store, disabling any customized bundle or cart modification logic it provided. This mutation persistently deletes the transform configuration and stops all associated cart processing. + + For example, when discontinuing a bundle app or removing specific merchandising features, you would delete the corresponding cart transform to ensure customers no longer see the bundled products or modified cart behavior. + + Use `CartTransformDelete` to: + - Deactivate customized bundle logic when removing app features + - Clean up unused transform functions + - Disable cart modifications during app uninstallation + - Remove outdated merchandising strategies + - Restore default cart behavior for merchants + + The deletion processes immediately and returns the ID of the removed cart transform for confirmation. Once deleted, the transform function stops processing new cart operations, though existing cart sessions may retain their current state until refresh. This ensures a clean transition without disrupting active customer sessions. + + Consider the timing of deletions carefully, as removing transforms during peak shopping periods could affect customer experience if they have active carts with transformed items. + + Learn more about [managing cart transforms](https://shopify.dev/docs/apps/selling-strategies/bundles). + """ + cartTransformDelete("A globally-unique identifier for the cart transform." id: ID!): CartTransformDeletePayload + + """ + Modifies which contexts, like [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation), can access a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). You can add or remove contexts to control where the catalog's products and prices are available. + + Learn more about [managing catalog contexts](https://shopify.dev/docs/apps/build/markets/new-markets/catalogs) and [managing B2B catalogs](https://shopify.dev/docs/apps/build/b2b/manage-catalogs). + """ + catalogContextUpdate("The ID of the catalog for which to update the context." catalogId: ID!, "The contexts to add to the catalog." contextsToAdd: CatalogContextInput, "The contexts to remove from the catalog." contextsToRemove: CatalogContextInput): CatalogContextUpdatePayload + + """ + Creates a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) that controls product availability and pricing for specific contexts like [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation). + + ### Publications and Price Lists + + - **[`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication)** objects control which products are visible in a catalog. Publications are **optional**. When a publication isn't associated with a catalog, product availability is determined by the sales channel. + - **[`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList)** objects define custom pricing for products in a catalog. + + You can optionally associate a publication and price list when creating the catalog, or add them later using separate mutations. + + ### When to use Publications + + **Create a publication only if you need to:** + - Limit which products are visible in a specific context (e.g., show different products to different company locations or markets) + - Publish a curated subset of your product catalog + + **Do NOT create a publication if:** + - You want product availability determined by the sales channel + - You only need to customize pricing (use a price list without a publication) + + > **Important:** For company location catalogs that only require custom pricing, create the catalog with a price list but without a publication. + + Learn more about [managing catalog contexts](https://shopify.dev/docs/apps/build/markets/new-markets/catalogs) and [using catalogs for different markets](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalogCreate("The properties of the new catalog." input: CatalogCreateInput!): CatalogCreatePayload + + """ + Delete a catalog. + """ + catalogDelete("The ID of the catalog to delete." id: ID!, "Whether to also delete the price list and the publication owned by the catalog." deleteDependentResources: Boolean = false): CatalogDeletePayload + + """ + Updates an existing [catalog's](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) configuration. Catalogs control product publishing and pricing for specific contexts like [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation). + + You can modify the catalog's title, status, and associated context. You can also update the [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) that determines pricing adjustments or the [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) that controls which products customers see. + """ + catalogUpdate("The ID of the catalog to update." id: ID!, "The properties of the updated catalog." input: CatalogUpdateInput!): CatalogUpdatePayload + + """ + Updates the visual branding for a [`CheckoutProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile), customizing how checkout displays to customers. Creates new branding settings if none exist, or modifies existing settings. + + The mutation accepts two levels of customization through the [`CheckoutBrandingInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingInput) input object. [`designSystem`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert#arguments-checkoutBrandingInput.fields.designSystem) defines foundational brand attributes like colors, typography, and corner radius that apply consistently throughout checkout. [`customizations`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert#arguments-checkoutBrandingInput.fields.customizations) defines styles for specific parts of the UI, individual components, or groups of components like the header, buttons, form fields, and sections. + + Changes to a published checkout profile display immediately in the store's checkout. You can preview draft profiles in the Shopify admin's checkout editor before publishing. + + Learn more about [checkout styling](https://shopify.dev/docs/apps/checkout/styling). + """ + checkoutBrandingUpsert("A globally-unique identifier." checkoutProfileId: ID!, "The input fields to use to upsert the checkout branding settings (pass null to reset them to default)." checkoutBrandingInput: CheckoutBrandingInput): CheckoutBrandingUpsertPayload @deprecated(reason: "Use `checkoutAndAccountsConfigurationUpdate` instead.") + + """ + Adds multiple products to an existing collection in a single operation. This mutation provides an efficient way to bulk-manage collection membership without individual product updates. + + For example, when merchants create seasonal collections, they can add dozens of related products at once rather than updating each product individually. A clothing store might add all winter jackets to a "Winter Collection" in one operation. + + Use `CollectionAddProducts` to: + - Bulk-add products to collections for efficient catalog management + - Implement collection building tools in admin interfaces + - Organize collection membership during bulk product operations + - Reduce API calls when managing large product sets + + The mutation processes multiple product additions and returns success status along with any errors encountered during the operation. Products are added to the collection while preserving existing collection settings. + + Learn more about [collection management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionAddProducts("The ID of the collection that's being updated." id: ID!, "The IDs of the products that are being added to the collection.\nIf any of the products is already present in the input collection,\nthen an error is raised and no products are added." productIds: [ID!]!): CollectionAddProductsPayload @deprecated(reason: "Use `collectionUpdate` with inclusion.selectionsToAdd instead.") + + """ + Adds products to a [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) asynchronously and returns a [`Job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) to track the operation's progress. This mutation handles large product sets efficiently by processing them in the background. + + You can poll the returned job using the [`job`](https://shopify.dev/docs/api/admin-graphql/latest/queries/job) query to monitor completion status. + + > Note: + > This mutation adds products in the order specified in the [`productIds`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/collectionAddProducts#arguments-productIds) argument. + """ + collectionAddProductsV2("The ID of the collection that's being updated." id: ID!, "The IDs of the products that are being added to the collection. If the collection's sort order is manual, the products will be added in the order in which they are provided." productIds: [ID!]!): CollectionAddProductsV2Payload @deprecated(reason: "Use `collectionUpdate` with inclusion.selectionsToAdd instead.") + + """ + Creates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + to group [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) together + in the [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + For example, an athletics store might create different collections for running attire, shoes, and accessories. + + Use the `collectionCreate` mutation when you need to: + + - Create a new collection for a product launch or campaign + - Organize products by category, season, or promotion + - Automate product grouping using conditions (for example, by tag, type, or price) + + Collections can include products manually and can also include products automatically based on rules, sources, + or conditions. + + **Defining a collection's membership** + + Define membership with `sources` on the `collection` argument + ([`CollectionCreateInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CollectionCreateInput)). + Each source adds products through `conditions` (such as product tag, title, or metafield—see + [`CollectionSourceInclusionConditionInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CollectionSourceInclusionConditionInput) + for the full list) and through manual `selections`. + + > Note: + > The `input` argument and its `ruleSet` field are deprecated. Existing integrations should migrate to + `collection` and `sources` — a `ruleSet` rule maps to an equivalent source `condition` (for example, a + tag rule becomes a `productTag` condition). If both `collection` and `input` are provided, `collection` + is used. + + > Note: + > The created collection is unpublished by default. To make it available to customers, + use the [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish) + mutation after creation. + + Learn more about [using metafields with collection conditions](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collectionCreate("The properties to use when creating the collection." input: CollectionInput!): CollectionCreatePayload + + """ + Deletes a collection and removes it permanently from the store. This operation cannot be undone and will remove the collection from all sales channels where it was published. + + For example, when merchants discontinue seasonal promotions or reorganize their catalog structure, they can delete outdated collections like "Back to School 2023" to keep their store organized. + + Use `CollectionDelete` to: + - Remove outdated or unused collections from stores + - Clean up collection structures during catalog reorganization + - Implement collection management tools with deletion capabilities + + Products within the deleted collection remain in the store but are no longer grouped under that collection. + + Learn more about [collection management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionDelete("The collection to delete." input: CollectionDeleteInput!): CollectionDeletePayload + + """ + Duplicates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + + An existing collection ID and new title are required. + + ## Publication Duplication + + Publications may be excluded by passing `copyPublications: false` in the input. + + ## Metafields + Metafield values are not duplicated if the unique values capability is enabled. + """ + collectionDuplicate("The input for duplicating a collection." input: CollectionDuplicateInput!): CollectionDuplicatePayload + + """ + Publishes a collection to a channel. + """ + collectionPublish("Specify a collection to publish and the sales channels to publish it to." input: CollectionPublishInput!): CollectionPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Removes multiple manually included products from a collection in a single operation. This mutation can process large product sets (up to 250 products) and may take significant time to complete for collections with many products. + + For example, when ending a seasonal promotion, merchants can remove all sale items from a "Summer Clearance" collection at once rather than editing each product individually. + + Use `CollectionRemoveProducts` to: + - Bulk-remove products from collections efficiently + - Clean up collection membership during catalog updates + - Implement automated collection management workflows + + The operation processes asynchronously to avoid timeouts and performance issues, especially for large product sets. + + Learn more about [collection management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionRemoveProducts("The ID of the collection to remove products from. The ID must reference an existing collection." id: ID!, "The IDs of products to remove from the collection. The mutation doesn't validate that the products belong to the collection or whether the products exist." productIds: [ID!]!): CollectionRemoveProductsPayload @deprecated(reason: "Use `collectionUpdate` with inclusions.selectionsToRemove instead.") + + """ + Asynchronously reorders products within a specified collection. Instead of returning an updated collection, this mutation returns a job, which should be [polled](https://shopify.dev/api/admin-graphql/latest/queries/job). The [`Collection.sortOrder`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-collection-sortorder) must be `MANUAL`. + + How to use this mutation: + - Provide only the products that actually moved in the `moves` list; do not send the entire product list. For example: to move the product at index 1 to index N, send a single move for that product with `newPosition: N`. + - Each move is applied sequentially in the order provided. + - `newPosition` is a zero-based index within the collection at the moment the move is applied (after any prior moves in the list). + - Products not included in `moves` keep their relative order, aside from any displacement caused by the moves. + - If `newPosition` is greater than or equal to the number of products, the product is placed at the end. + + Example: + - Initial order: [A, B, C, D, E] (indices 0..4) + - Moves (applied in order): + - E -> newPosition: 1 + - C -> newPosition: 4 + - Result: [A, E, B, D, C] + + Displaced products will have their position altered in a consistent manner with no gaps. + """ + collectionReorderProducts("The ID of the collection on which to reorder products." id: ID!, "A list of moves to perform, evaluated in order. Provide only products whose positions changed; do not send the full list.\n`newPosition` is a zero-based index evaluated at the time each move is applied (after any prior moves).\n`newPosition` values do not need to be unique, and if a value is greater than or equal to the number of products, the product is moved to the end.\nUp to 250 moves are supported." moves: [MoveInput!]!): CollectionReorderProductsPayload + + """ + Unpublishes a collection. + """ + collectionUnpublish("Specify a collection to unpublish and the sales channels to remove it from." input: CollectionUnpublishInput!): CollectionUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), + modifying its properties, products, or publication settings. Collections help organize + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) together + in the [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + + Use the `collectionUpdate` mutation to programmatically modify collections in scenarios such as: + + - Updating collection details, like title, description, or image + - Modifying SEO metadata for better search visibility + - Changing which products are included in a collection by updating its rules, sources, or conditions + - Updating custom data using [metafields](https://shopify.dev/docs/apps/build/custom-data/metafields) + + Collections can include products manually and can also include products automatically based on rules, sources, + or conditions. When product membership is updated through rules, sources, or conditions, the operation might + be processed asynchronously. In these cases, the mutation returns a [`job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) object + that you can use to track the progress of the update. + + To publish or unpublish collections to specific sales channels, use the dedicated + [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish) and + [`publishableUnpublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishableUnpublish) mutations. + + Learn more about [using metafields with collection conditions](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collectionUpdate("The updated properties for the collection." input: CollectionInput!): CollectionUpdatePayload + + """ + Add, remove and update `CombinedListing`s of a given Product. + + `CombinedListing`s are comprised of multiple products to create a single listing. There are two kinds of products used in a `CombinedListing`: + + 1. Parent products + 2. Child products + + The parent product is created with a `productCreate` with a `CombinedListingRole` of `PARENT`. Once created, you can associate child products with the parent product using this mutation. Parent products represent the idea of a product (e.g. Shoe). + + Child products represent a particular option value (or combination of option values) of a parent product. For instance, with your Shoe parent product, you may have several child products representing specific colors of the shoe (e.g. Shoe - Blue). You could also have child products representing more than a single option (e.g. Shoe - Blue/Canvas, Shoe - Blue/Leather, etc...). + + The combined listing is the association of parent product to one or more child products. + + Learn more about [Combined Listings](https://shopify.dev/apps/selling-strategies/combined-listings). + """ + combinedListingUpdate("The ID of the parent product." parentProductId: ID!, "The updated title for the combined listing." title: String, "The child products to add and their assigned options and option values." productsAdded: [ChildProductRelationInput!], "The child products to edit and their assigned options and option values." productsEdited: [ChildProductRelationInput!], "The IDs of products to be removed from the combined listing." productsRemovedIds: [ID!], "The ordered options and values to be used by the combined listing. Options and values will be reordered to match the order specified here." optionsAndValues: [OptionAndValueInput!]): CombinedListingUpdatePayload + + """ + Approves a pending comment, making it visible to store visitors on the associated blog article. + + For example, when a customer submits a question about a product in a blog post, merchants can approve the comment to make it publicly visible. + + Use the `commentApprove` mutation to: + - Publish pending comments after review + - Enable customer discussions on blog articles + - Maintain quality control over comments + + Once approved, the comment becomes visible to all store visitors. + """ + commentApprove("The ID of the comment to be approved." id: ID!): CommentApprovePayload + + """ + Permanently removes a comment from a blog article. + + For example, when a comment contains spam links or inappropriate language that violates store policies, merchants can delete it entirely. + + Use the `commentDelete` mutation to: + - Remove spam or inappropriate comments permanently + - Clean up irrelevant discussions + - Maintain content standards on blog articles + + Deletion is permanent and can't be undone. + """ + commentDelete("The ID of the comment to be deleted." id: ID!): CommentDeletePayload + + """ + Reverses a spam classification on a comment, restoring it to normal moderation status. This mutation allows merchants to change their decision when a comment has been manually marked as spam. + + For example, when a merchant reviews comments marked as spam and finds a legitimate customer question, they can use this mutation to restore the comment's normal status and make it eligible for approval. + + Use the `commentNotSpam` mutation to: + - Unmark comments that were marked as spam + - Restore comments to normal moderation status + - Move comments back to the approval queue + + This action changes the comment's status from spam back to pending, where it can then be approved or managed according to standard moderation practices. + """ + commentNotSpam("The ID of the comment to be marked as not spam." id: ID!): CommentNotSpamPayload + + """ + Marks a comment as spam, removing it from public view. This mutation enables merchants to quickly handle unwanted promotional content, malicious links, or other spam that appears in blog discussions. + + For example, when a comment contains suspicious links to unrelated products or services, merchants can mark it as spam to immediately hide it from customers. + + Use the `commentSpam` mutation to: + - Hide promotional or malicious comments from public view + - Protect customers from potentially harmful links + - Maintain professional discussion quality on blog articles + + Spam-marked comments can be reviewed later and potentially restored using the `commentNotSpam` mutation if they were incorrectly classified. + """ + commentSpam("The ID of the comment to be marked as spam." id: ID!): CommentSpamPayload + + """ + Deletes a list of companies. + """ + companiesDelete("A list of IDs of companies to delete." companyIds: [ID!]!): CompaniesDeletePayload + + """ + Deletes a company address. + """ + companyAddressDelete("The ID of the address to delete." addressId: ID!): CompanyAddressDeletePayload + + """ + Adds an existing [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) as a contact to a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company). Companies are business entities that make purchases from the merchant's store. Use this mutation when you have a customer who needs to be associated with a B2B company to make purchases on behalf of that company. + + The mutation returns the newly created [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) that links the customer to the company. After assignment, the customer becomes a company contact who can place orders on behalf of the company with access to any catalogs, pricing, and payment terms configured for the company's locations. + """ + companyAssignCustomerAsContact("The ID of the company to assign the contact to." companyId: ID!, "The ID of the customer to assign as the contact." customerId: ID!): CompanyAssignCustomerAsContactPayload + + """ + Assigns the main contact for the company. + """ + companyAssignMainContact("The ID of the company to assign the main contact to." companyId: ID!, "The ID of the company contact to be assigned as the main contact." companyContactId: ID!): CompanyAssignMainContactPayload + + """ + Assigns a role to a contact for a location. + """ + companyContactAssignRole("The ID of the contact to assign a role to." companyContactId: ID!, "The ID of the role to assign to a contact." companyContactRoleId: ID!, "The ID of the location to assign a role to a contact." companyLocationId: ID!): CompanyContactAssignRolePayload + + """ + Assigns roles on a company contact. + """ + companyContactAssignRoles("The contact whose roles are being assigned." companyContactId: ID!, "The new roles to assign." rolesToAssign: [CompanyContactRoleAssign!]!): CompanyContactAssignRolesPayload + + """ + Creates a company contact and the associated customer. + """ + companyContactCreate("The ID of the company that the company contact belongs to." companyId: ID!, "The fields to use to create the company contact." input: CompanyContactInput!): CompanyContactCreatePayload + + """ + Deletes a company contact. + """ + companyContactDelete("The ID of the company contact to delete." companyContactId: ID!): CompanyContactDeletePayload + + """ + Removes a company contact from a Company. + """ + companyContactRemoveFromCompany("The ID of the company contact to remove from the Company." companyContactId: ID!): CompanyContactRemoveFromCompanyPayload + + """ + Revokes a role on a company contact. + """ + companyContactRevokeRole("The ID of the contact to revoke a role from." companyContactId: ID!, "The ID of the role assignment to revoke from a contact." companyContactRoleAssignmentId: ID!): CompanyContactRevokeRolePayload + + """ + Revokes roles on a company contact. + """ + companyContactRevokeRoles("The contact whose roles are being revoked." companyContactId: ID!, "The current role assignment IDs to revoke." roleAssignmentIds: [ID!], "Flag to revoke all roles on the contact." revokeAll: Boolean = false): CompanyContactRevokeRolesPayload + + """ + Sends the company contact a welcome email. + """ + companyContactSendWelcomeEmail("The ID of the company contact to send welcome email to." companyContactId: ID!, "The welcome email fields." email: EmailInput): CompanyContactSendWelcomeEmailPayload + + """ + Updates a company contact. + """ + companyContactUpdate("The ID of the company contact to be updated." companyContactId: ID!, "The fields to use to update the company contact." input: CompanyContactInput!): CompanyContactUpdatePayload + + """ + Deletes one or more company contacts. + """ + companyContactsDelete("The list of IDs of the company contacts to delete." companyContactIds: [ID!]!): CompanyContactsDeletePayload + + """ + Creates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) for B2B commerce. This mutation creates the company and can optionally create an initial [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) and [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) in a single operation. Company contacts are people who place orders on behalf of the company. Company locations are branches or offices with their own billing and shipping addresses. + + > Note: Creating a company without a `name` [returns an error](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycreate?example=creating-a-company-without-a-name-returns-an-error). + + Learn more about [creating companies for B2B](https://shopify.dev/docs/apps/build/b2b/start-building#step-1-create-a-company). + """ + companyCreate("The fields to use when creating the company." input: CompanyCreateInput!): CompanyCreatePayload + + """ + Deletes a company. + """ + companyDelete("The ID of the company to delete." id: ID!): CompanyDeletePayload + + """ + Updates an address on a company location. + """ + companyLocationAssignAddress("The ID of the company location to update addresses on." locationId: ID!, "The input fields to use to update the address." address: CompanyAddressInput!, "The list of address types on the location to update." addressTypes: [CompanyAddressType!]!): CompanyLocationAssignAddressPayload + + """ + Assigns roles on a company location. + """ + companyLocationAssignRoles("The location whose roles are being assigned." companyLocationId: ID!, "The roles to assign." rolesToAssign: [CompanyLocationRoleAssign!]!): CompanyLocationAssignRolesPayload + + """ + Creates one or more mappings between a staff member at a shop and a company location. + """ + companyLocationAssignStaffMembers("The ID of the company location to assign the staff member to." companyLocationId: ID!, "The list of IDs of the staff members to assign." staffMemberIds: [ID!]!): CompanyLocationAssignStaffMembersPayload + + """ + Assigns tax exemptions to the company location. + """ + companyLocationAssignTaxExemptions("The location to which the tax exemptions will be assigned." companyLocationId: ID!, "The tax exemptions that are being assigned to the location." taxExemptions: [TaxExemption!]!): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Creates a new location for a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company). Company locations are branches or offices where B2B customers can place orders with specific pricing, catalogs, and payment terms. + + Creates a company location. Each location can have its own billing and shipping addresses, tax settings, and [`buyer experience configuration`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration). You can assign [staff members](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) and [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) objects to manage the location. + """ + companyLocationCreate("The ID of the company that the company location belongs to." companyId: ID!, "The fields to use to create the company location." input: CompanyLocationInput!): CompanyLocationCreatePayload + + """ + Creates a tax registration for a company location. + """ + companyLocationCreateTaxRegistration("The ID of the company location that the tax registration gets assigned to." locationId: ID!, "The unique tax id for the tax registration." taxId: String!): CompanyLocationCreateTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Deletes a company location. + """ + companyLocationDelete("The ID of the company location to delete." companyLocationId: ID!): CompanyLocationDeletePayload + + """ + Deletes one or more existing mappings between a staff member at a shop and a company location. + """ + companyLocationRemoveStaffMembers("The list of IDs of the company location staff member assignment to delete." companyLocationStaffMemberAssignmentIds: [ID!]!): CompanyLocationRemoveStaffMembersPayload + + """ + Revokes roles on a company location. + """ + companyLocationRevokeRoles("The location whose roles are being revoked." companyLocationId: ID!, "The current roles to revoke." rolesToRevoke: [ID!]!): CompanyLocationRevokeRolesPayload + + """ + Revokes tax exemptions from the company location. + """ + companyLocationRevokeTaxExemptions("The location from which the tax exemptions will be revoked." companyLocationId: ID!, "The tax exemptions that are being revoked from the location." taxExemptions: [TaxExemption!]!): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Revokes tax registration on a company location. + """ + companyLocationRevokeTaxRegistration("The location whose tax registration is being revoked." companyLocationId: ID!): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Sets the tax settings for a company location. + """ + companyLocationTaxSettingsUpdate("The ID of the company location that the tax settings get assigned to." companyLocationId: ID!, "The unique tax registration ID for the company location." taxRegistrationId: String, "Whether the location is exempt from taxes." taxExempt: Boolean, "The list of tax exemptions to assign to the company location." exemptionsToAssign: [TaxExemption!], "The list of tax exemptions to remove from the company location." exemptionsToRemove: [TaxExemption!]): CompanyLocationTaxSettingsUpdatePayload + + """ + Updates a company location's information and B2B checkout settings. Company locations are branches or offices where [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) members place orders on behalf of the company. Contacts must be assigned to a location through `roleAssignments` to place orders. + + The mutation modifies details such as the location's name, contact information, preferred locale, and internal notes. You can also configure the B2B checkout experience through [`BuyerExperienceConfiguration`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration) settings that control whether orders require merchant review, [`PaymentTermsTemplate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTermsTemplate) settings, shipping address editing permissions, and [`DepositConfiguration`](https://shopify.dev/docs/api/admin-graphql/latest/unions/DepositConfiguration) requirements. + + Learn more about [managing company locations](https://shopify.dev/docs/apps/build/b2b/manage-client-company-locations). + """ + companyLocationUpdate("The ID of the company location to update." companyLocationId: ID!, "The input fields to update in the company location." input: CompanyLocationUpdateInput!): CompanyLocationUpdatePayload + + """ + Deletes a list of company locations. + """ + companyLocationsDelete("A list of IDs of company locations to delete." companyLocationIds: [ID!]!): CompanyLocationsDeletePayload + + """ + Revokes the main contact from the company. + """ + companyRevokeMainContact("The ID of the company to revoke the main contact from." companyId: ID!): CompanyRevokeMainContactPayload + + """ + Updates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) with new information. Companies represent business customers that can have multiple contacts and locations with specific pricing, payment terms, and checkout settings. + + The mutation accepts the company's ID and an input object containing the fields to update. You can modify the company name, add or update internal notes, set an external ID for integration with other systems, or adjust the customer relationship start date. + + Learn more about [building B2B features](https://shopify.dev/docs/apps/build/b2b/start-building). + """ + companyUpdate("The ID of the company to be updated." companyId: ID!, "The input fields to update the company." input: CompanyInput!): CompanyUpdatePayload + + """ + Update or create consent policies in bulk. + """ + consentPolicyUpdate("The consent policies to update or create. If the country and region matches an existing consent policy, then the consent policy is updated. Otherwise, a new consent policy is created." consentPolicies: [ConsentPolicyInput!]!): ConsentPolicyUpdatePayload + + """ + Add tax exemptions for the customer. + """ + customerAddTaxExemptions("The ID of the customer to update." customerId: ID!, "The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values: `[\"CA_BC_RESELLER_EXEMPTION\", \"CA_STATUS_CARD_EXEMPTION\"]`, `\"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION\"`." taxExemptions: [TaxExemption!]!): CustomerAddTaxExemptionsPayload + + """ + Creates a new [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer). You can optionally set the address as the customer's default address. + + You can only add addresses to existing customers. Each customer can have multiple addresses. + """ + customerAddressCreate("The ID of the customer." customerId: ID!, "Specifies the fields to use when creating the address." address: MailingAddressInput!, "Whether to set the address as the customer's default address." setAsDefault: Boolean): CustomerAddressCreatePayload + + """ + Deletes a customer's address. + """ + customerAddressDelete("The ID of the customer whose address is being deleted." customerId: ID!, "The ID of the address to be deleted from the customer." addressId: ID!): CustomerAddressDeletePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress). You can modify any field of the address and optionally set it as the customer's default address. + """ + customerAddressUpdate("The ID of the customer whose address is being updated." customerId: ID!, "The ID of the address to update." addressId: ID!, "Specifies the fields to use when updating the address." address: MailingAddressInput!, "Whether to set the address as the customer's default address." setAsDefault: Boolean): CustomerAddressUpdatePayload + + """ + Cancels a pending erasure of a customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#cancel-customer-data-erasure). + + To request an erasure of a customer's data use the [customerRequestDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerRequestDataErasure). + """ + customerCancelDataErasure("The ID of the customer for whom to cancel a pending data erasure." customerId: ID!): CustomerCancelDataErasurePayload + + """ + Creates a new [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) in the store. + + Accepts customer details including contact information, marketing consent preferences, and tax exemptions through the [`CustomerInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput) input object. You can also associate [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MetafieldInput) and tags to organize and extend customer data. + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerCreate("The input fields to create a customer." input: CustomerInput!): CustomerCreatePayload + + """ + Deletes a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) from the store. You can only delete customers who haven't placed any [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerDelete("Specifies the customer to delete." input: CustomerDeleteInput!): CustomerDeletePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s email marketing consent information. The customer must have an email address to update their consent. Records the [marketing state](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingState) (such as subscribed, pending, unsubscribed), [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingOptInLevel), and when and where the customer gave or withdrew consent. + + Only three values are accepted as input: SUBSCRIBED, UNSUBSCRIBED, and PENDING. + NOT_SUBSCRIBED, REDACTED, and INVALID cannot be set via this mutation; they are + read-only or internally-set states. + """ + customerEmailMarketingConsentUpdate("Specifies the input fields to update a customer's email marketing consent information." input: CustomerEmailMarketingConsentUpdateInput!): CustomerEmailMarketingConsentUpdatePayload + + """ + Generates a one-time activation URL for a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) whose legacy customer account isn't yet enabled. Use this after importing customers or creating accounts that need activation. + + The generated URL expires after 30 days and becomes invalid if you generate a new one. + + > Note: The generated URL only works when legacy customer accounts are enabled on the shop. It only works for customers with disabled or invited [`account states`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-Customer.fields.state). Attempting to generate a URL for an already-enabled customer returns an error. + """ + customerGenerateAccountActivationUrl("The ID of the customer that the URL is generated for." customerId: ID!): CustomerGenerateAccountActivationUrlPayload + + """ + Merges two customers. + + The `customerOneId` and `customerTwoId` arguments don't guarantee which customer is kept. Shopify + selects the resulting customer in this order: + 1. If `overrideFields.customerIdOfEmailToKeep` is provided and valid, then the selected customer is kept. + 2. If exactly one customer has an email address, then that customer is kept. + 3. If both customers have email addresses, then account state and email marketing consent determine + the customer that's kept: an `enabled` account wins over other account states; otherwise, an + `invited` account can win when consent doesn't already prefer `subscribed` or `pending`; otherwise + the consent result is used. If those rules don't prefer either customer, then `customerTwoId` is kept. + 4. If neither customer has an email address, then `customerTwoId` is kept. + + Use `customerMergePreview` and `resultingCustomerId` to check which customer will be kept before merging. + """ + customerMerge("The ID of one customer to merge. This customer isn't guaranteed to be kept." customerOneId: ID!, "The ID of another customer to merge. This customer is kept when neither customer has an email address." customerTwoId: ID!, "The field-specific overrides for default customer merge rules." overrideFields: CustomerMergeOverrideFields): CustomerMergePayload + + """ + Creates a vaulted payment method for a customer from duplication data. + + This data must be obtained from another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodCreateFromDuplicationData("The ID of the customer." customerId: ID!, "The billing address." billingAddress: MailingAddressInput!, "The encrypted payment method data." encryptedDuplicationData: String!): CustomerPaymentMethodCreateFromDuplicationDataPayload + + """ + Creates a credit card payment method for a customer using a session id. + These values are only obtained through card imports happening from a PCI compliant environment. + Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly. + """ + customerPaymentMethodCreditCardCreate("The ID of the customer." customerId: ID!, "The billing address." billingAddress: MailingAddressInput!, "The Cardserver session ID. Obtained by storing card data with Shopify's Cardsink. Exchanging raw card data for a session ID must be done in a PCI complaint environment." sessionId: String!): CustomerPaymentMethodCreditCardCreatePayload + + """ + Updates an existing vaulted credit card payment method for a customer, including billing address and card details. Requires a valid cardserver session from a PCI-compliant environment. Use this when a customer's card details have changed (e.g., new expiration date or replacement card) and ongoing subscriptions or saved payment methods need to be updated. + """ + customerPaymentMethodCreditCardUpdate("The ID of the customer payment method." id: ID!, "The billing address." billingAddress: MailingAddressInput!, "The Cardserver session ID." sessionId: String!): CustomerPaymentMethodCreditCardUpdatePayload + + """ + Returns encrypted data that can be used to duplicate the payment method in another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodGetDuplicationData("The payment method to be duplicated." customerPaymentMethodId: ID!, "The shop the payment method will be duplicated into." targetShopId: ID!, "The customer the payment method will be duplicated into." targetCustomerId: ID!): CustomerPaymentMethodGetDuplicationDataPayload + + """ + Returns a URL that allows the customer to update a specific payment method. + + Currently, `customerPaymentMethodGetUpdateUrl` only supports Shop Pay. + """ + customerPaymentMethodGetUpdateUrl("The payment method to be updated." customerPaymentMethodId: ID!): CustomerPaymentMethodGetUpdateUrlPayload + + """ + Creates a vaulted PayPal billing agreement for a customer, enabling recurring charges through PayPal. The billing agreement ID (starting with 'B-') must be obtained from PayPal. Once created, this payment method can be used for subscription billing or future order payments without requiring the customer to re-authenticate with PayPal. + """ + customerPaymentMethodPaypalBillingAgreementCreate("The ID of the customer." customerId: ID!, "The billing address." billingAddress: MailingAddressInput, "The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`)." billingAgreementId: String!, "Whether the PayPal billing agreement is inactive." inactive: Boolean = false): CustomerPaymentMethodPaypalBillingAgreementCreatePayload + + """ + Updates the billing address associated with a customer's vaulted PayPal billing agreement. Use this when a customer's billing information has changed and their PayPal payment method record in Shopify needs to be updated accordingly. + """ + customerPaymentMethodPaypalBillingAgreementUpdate("The ID of the customer payment method." id: ID!, "The billing address." billingAddress: MailingAddressInput!): CustomerPaymentMethodPaypalBillingAgreementUpdatePayload + + """ + Creates a customer payment method using identifiers from remote payment gateways like Stripe, Authorize.Net, or Braintree. Imports existing payment methods from external gateways and associates them with [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) objects in Shopify. + + The operation processes payment methods asynchronously. The returned [`CustomerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod) initially has incomplete details while Shopify validates and processes the remote gateway information. Use the [`customerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/queries/customerPaymentMethod) query to retrieve the payment method status until all details are available or the payment method is revoked. + + Learn more about [migrating customer payment methods from remote gateways](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/migrate-to-subscriptions-api/migrate-customer-information#step-2-import-payment-methods-for-customers). + """ + customerPaymentMethodRemoteCreate("The ID of the customer." customerId: ID!, "Remote gateway payment method details." remoteReference: CustomerPaymentMethodRemoteInput!): CustomerPaymentMethodRemoteCreatePayload + + """ + Revokes a customer's vaulted payment method, preventing it from being used for future charges such as subscriptions, draft orders, or other payments. Revocation will fail if the payment method has active subscription contracts. Use this when a customer requests removal of their stored payment information or when a payment method is no longer valid. + """ + customerPaymentMethodRevoke("The ID of the customer payment method to be revoked." customerPaymentMethodId: ID!): CustomerPaymentMethodRevokePayload + + """ + Sends an email to a customer containing a secure link to update a specific vaulted payment method. This is commonly used when a customer's credit card is expiring or has been declined, and they need to provide updated payment details for ongoing subscriptions. The email can be customized with sender and BCC fields. + """ + customerPaymentMethodSendUpdateEmail("The payment method to be updated." customerPaymentMethodId: ID!, "Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input." email: EmailInput): CustomerPaymentMethodSendUpdateEmailPayload + + """ + Remove tax exemptions from a customer. + """ + customerRemoveTaxExemptions("The ID of the customer to update." customerId: ID!, "The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values: `[\"CA_BC_RESELLER_EXEMPTION\", \"A_STATUS_CARD_EXEMPTION\"]`, `\"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION\"`." taxExemptions: [TaxExemption!]!): CustomerRemoveTaxExemptionsPayload + + """ + Replace tax exemptions for a customer. + """ + customerReplaceTaxExemptions("The ID of the customer to update." customerId: ID!, "The list of tax exemptions that will replace the current exemptions for a customer. Can be an array or a comma-separated list.\n Example values: `[\"CA_BC_RESELLER_EXEMPTION\", \"A_STATUS_CARD_EXEMPTION\"]`, `\"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION\"`." taxExemptions: [TaxExemption!]!): CustomerReplaceTaxExemptionsPayload + + """ + Enqueues a request to erase customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#erase-customer-personal-data). + + To cancel the data erasure request use the [customerCancelDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerCancelDataErasure). + """ + customerRequestDataErasure("The ID of the customer to erase." customerId: ID!): CustomerRequestDataErasurePayload + + """ + Creates a customer segment members query. + """ + customerSegmentMembersQueryCreate("The input fields to create a customer segment members query." input: CustomerSegmentMembersQueryInput!): CustomerSegmentMembersQueryCreatePayload + + """ + Sends an email invitation for a customer to create a legacy customer account. The invitation lets customers set up their password and activate their account in the online store. + + You can optionally customize the email content including the subject, sender, recipients, and message body. If you don't provide email customization, the store uses its default account invitation template. + + > Note: The invite only works when legacy customer accounts are enabled on the shop. + """ + customerSendAccountInviteEmail("The ID of the customer to whom an account invite email is to be sent." customerId: ID!, "Specifies the account invite email fields." email: EmailInput): CustomerSendAccountInviteEmailPayload + + """ + Creates or updates a customer in a single mutation. + + Use this mutation when syncing information from an external data source into Shopify. + + This mutation can be used to create a new customer, update an existing customer by id, or + upsert a customer by a unique key (email or phone). + + To create a new customer omit the `identifier` argument. + To update an existing customer, include the `identifier` with the id of the customer to update. + + To perform an 'upsert' by unique key (email or phone) + use the `identifier` argument to upsert a customer by a unique key (email or phone). If a customer + with the specified unique key exists, it will be updated. If not, a new customer will be created with + that unique key. + + As of API version 2022-10, apps using protected customer data must meet the + protected customer data [requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data) + + Any list field (e.g. + [addresses](https://shopify.dev/api/admin-graphql/unstable/input-objects/MailingAddressInput), + will be updated so that all included entries are either created or updated, and all existing entries not + included will be deleted. + + All other fields will be updated to the value passed. Omitted fields will not be updated. + """ + customerSet("The properties of the customer." input: CustomerSetInput!, "Specifies the identifier that will be used to lookup the resource." identifier: CustomerSetIdentifiers): CustomerSetPayload + + """ + Updates a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s SMS marketing consent information. The customer must have a phone number on their account to receive SMS marketing. + + You can set whether the customer subscribes or unsubscribes to SMS marketing and specify the [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.marketingOptInLevel). Optionally include when the consent was collected and which [location](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.sourceLocationId) collected it. + """ + customerSmsMarketingConsentUpdate("Specifies the input fields to update a customer's SMS marketing consent information." input: CustomerSmsMarketingConsentUpdateInput!): CustomerSmsMarketingConsentUpdatePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s attributes including personal information and [`tax exemptions`](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption). + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerUpdate("Provides updated fields for the customer. To set marketing consent, use the `customerEmailMarketingConsentUpdate` or `customerSmsMarketingConsentUpdate` mutations instead." input: CustomerInput!): CustomerUpdatePayload + + """ + Updates a customer's default address. + """ + customerUpdateDefaultAddress("The ID of the customer whose default address is being updated." customerId: ID!, "The ID of the customer's new default address." addressId: ID!): CustomerUpdateDefaultAddressPayload + + """ + Opt out a customer from data sale. + """ + dataSaleOptOut("The email address of the customer to opt out of data sale." email: String!): DataSaleOptOutPayload + + """ + Creates a [`DelegateAccessToken`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DelegateAccessToken) with a subset of the parent token's permissions. + + Delegate access tokens enable secure permission delegation to subsystems or services that need limited access to shop resources. Each token inherits only the scopes you specify, ensuring subsystems operate with minimal required permissions rather than full app access. + + Learn more about [delegating access tokens to subsystems](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/use-delegate-tokens). + """ + delegateAccessTokenCreate("The input fields for creating a delegate access token." input: DelegateAccessTokenInput!): DelegateAccessTokenCreatePayload + + """ + Destroys a delegate access token. + """ + delegateAccessTokenDestroy("Provides the delegate access token to destroy." accessToken: String!): DelegateAccessTokenDestroyPayload + + """ + Activates and deactivates delivery customizations. + """ + deliveryCustomizationActivation("The global IDs of the delivery customizations." ids: [ID!]!, "The enabled status of the delivery customizations." enabled: Boolean!): DeliveryCustomizationActivationPayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationCreate("The input data used to create the delivery customization." deliveryCustomization: DeliveryCustomizationInput!): DeliveryCustomizationCreatePayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationDelete("The global ID of the delivery customization." id: ID!): DeliveryCustomizationDeletePayload + + """ + Updates a delivery customization. + """ + deliveryCustomizationUpdate("The global ID of the delivery customization." id: ID!, "The input data used to update the delivery customization." deliveryCustomization: DeliveryCustomizationInput!): DeliveryCustomizationUpdatePayload + + """ + Creates a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) that defines shipping rates for specific products and locations. + + A delivery profile groups products with their shipping zones and rates. You can associate profiles with [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) objects to customize shipping for subscriptions and pre-orders. Each profile contains [`DeliveryProfileLocationGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfileLocationGroup) objects that specify which [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects ship to which [`DeliveryZone`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone) objects with specific [`DeliveryMethodDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethodDefinition) objects and rates. + + Learn more about [building delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). + """ + deliveryProfileCreate("Specifies the input fields for a delivery profile." profile: DeliveryProfileInput!): DeliveryProfileCreatePayload + + """ + Enqueue the removal of a delivery profile. + """ + deliveryProfileRemove("The ID of the delivery profile to remove." id: ID!): DeliveryProfileRemovePayload + + """ + Updates a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile)'s configuration, including its shipping zones, rates, and associated products. + + Modify location groups to control which fulfillment [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects serve specific geographic areas. Add or remove shipping zones with custom countries and provinces. Create or update shipping methods with rate definitions and delivery conditions. Associate or dissociate [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects and [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) objects to determine which products use this profile's shipping rules. + + The mutation supports partial updates through dedicated input fields for creating, updating, and deleting specific components without affecting the entire profile structure. + + Learn more about [building delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). + """ + deliveryProfileUpdate("The ID of the delivery profile to update." id: ID!, "Specifies the input fields for a delivery profile." profile: DeliveryProfileInput!, "Whether this delivery profile should leave legacy mode." leaveLegacyModeProfiles: Boolean @deprecated(reason: "Legacy mode profiles are no longer supported. This will be removed in 2026-04.")): DeliveryProfileUpdatePayload + + """ + Updates the delivery promise participants by adding or removing owners based on a branded promise handle. + """ + deliveryPromiseParticipantsUpdate("The branded promise handle to update the delivery promise participants for." brandedPromiseHandle: String!, "The owners to add to the delivery promise participants." ownersToAdd: [ID!] = [], "The owners to remove from the delivery promise participants." ownersToRemove: [ID!] = []): DeliveryPromiseParticipantsUpdatePayload + + """ + Creates or updates a delivery promise provider. Currently restricted to select approved delivery promise partners. + """ + deliveryPromiseProviderUpsert("Whether the delivery promise provider is active. Defaults to `true` when creating a provider." active: Boolean, "The number of seconds to add to the current time as a buffer when looking up delivery promises. Represents how long the shop requires before releasing an order to the fulfillment provider." fulfillmentDelay: Int, "The time zone to be used for interpreting day of week and cutoff times in delivery schedules when looking up delivery promises. Defaults to `UTC` when creating a provider." timeZone: String, "The ID of the location that will be associated with the delivery promise provider." locationId: ID!): DeliveryPromiseProviderUpsertPayload + + """ + Set the delivery settings for a shop. + """ + deliverySettingUpdate("Specifies the input fields for the delivery shop level settings." setting: DeliverySettingInput!): DeliverySettingUpdatePayload + + """ + Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles. + Deprecated as of 2026-04 and will be removed in a future version as single origin shipping mode has been retired. + """ + deliveryShippingOriginAssign("The ID of the location to assign as the shipping origin." locationId: ID!): DeliveryShippingOriginAssignPayload @deprecated(reason: "Single origin shipping mode is no longer supported.") + + """ + Activates an automatic discount. + """ + discountAutomaticActivate("The ID of the automatic discount to activate." id: ID!): DiscountAutomaticActivatePayload + + """ + Creates an automatic discount that's managed by an app. + Use this mutation with [Shopify Functions](https://shopify.dev/docs/apps/build/functions) + when you need advanced, custom, or dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create an automatic discount using an app's + "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create code discounts with custom logic, use the + [`discountCodeAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppCreate) + mutation. + """ + discountAutomaticAppCreate("The input data used to create the automatic discount." automaticAppDiscount: DiscountAutomaticAppInput!): DiscountAutomaticAppCreatePayload + + """ + Updates an existing automatic discount that's managed by an app using + [Shopify Functions](https://shopify.dev/docs/apps/build/functions). + Use this mutation when you need advanced, custom, or + dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to update a new "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To update code discounts with custom logic, use the + [`discountCodeAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppUpdate) + mutation instead. + """ + discountAutomaticAppUpdate("The ID of the automatic discount to update." id: ID!, "The input fields required to update the automatic discount." automaticAppDiscount: DiscountAutomaticAppInput!): DiscountAutomaticAppUpdatePayload + + """ + Creates an + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) + mutation. + """ + discountAutomaticBasicCreate("The input data used to create the automatic amount off discount." automaticBasicDiscount: DiscountAutomaticBasicInput!): DiscountAutomaticBasicCreatePayload + + """ + Updates an existing + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate) + mutation instead. + """ + discountAutomaticBasicUpdate("The ID of the automatic amount off discount to update." id: ID!, "The input data used to update the automatic amount off discount." automaticBasicDiscount: DiscountAutomaticBasicInput!): DiscountAutomaticBasicUpdatePayload + + """ + Deletes multiple automatic discounts in a single operation, providing efficient bulk management for stores with extensive discount catalogs. This mutation processes deletions asynchronously to handle large volumes without blocking other operations. + + For example, when cleaning up expired seasonal promotions or removing outdated automatic discounts across product categories, merchants can delete dozens of discounts simultaneously rather than processing each individually. + + Use `DiscountAutomaticBulkDelete` to: + - Remove multiple automatic discounts efficiently + - Clean up expired or obsolete promotions + - Streamline discount management workflows + - Process large-scale discount removals asynchronously + + The operation returns a job object for tracking deletion progress and any validation errors encountered during processing. + + Learn more about [discount management](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomatic). + """ + discountAutomaticBulkDelete("The search query for filtering automatic discounts to delete.\n\nFor more information on the list of supported fields and search syntax, refer to the [AutomaticDiscountNodes query section](https://shopify.dev/api/admin-graphql/latest/queries/automaticDiscountNodes#argument-automaticdiscountnodes-query)." search: String, "The ID of the saved search to use for filtering automatic discounts to delete." savedSearchId: ID, "The IDs of the automatic discounts to delete." ids: [ID!]): DiscountAutomaticBulkDeletePayload + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyCreate) + mutation. + """ + discountAutomaticBxgyCreate("The input data used to create the automatic BXGY discount." automaticBxgyDiscount: DiscountAutomaticBxgyInput!): DiscountAutomaticBxgyCreatePayload + + """ + Updates an existing + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyUpdate) + mutation instead. + """ + discountAutomaticBxgyUpdate("The ID of the automatic BXGY discount to update." id: ID!, "The input data used to update the automatic BXGY discount." automaticBxgyDiscount: DiscountAutomaticBxgyInput!): DiscountAutomaticBxgyUpdatePayload + + """ + Deactivates an automatic discount. + """ + discountAutomaticDeactivate("The ID of the automatic discount to deactivate." id: ID!): DiscountAutomaticDeactivatePayload + + """ + Deletes an existing automatic discount from the store, permanently removing it from all future order calculations. This mutation provides a clean way to remove promotional campaigns that are no longer needed. + + For example, when a seasonal promotion ends or a flash sale concludes, merchants can use this mutation to ensure the discount no longer applies to new orders while preserving historical order data. + + Use `DiscountAutomaticDelete` to: + - Remove expired promotional campaigns + - Clean up test discounts during development + - Delete automatic discounts that conflict with new promotions + - Maintain a clean discount configuration + + The mutation returns the ID of the deleted discount for confirmation and any validation errors if the deletion cannot be completed. Once deleted, the automatic discount will no longer appear in discount lists or apply to new customer orders. + """ + discountAutomaticDelete("The ID of the automatic discount to delete." id: ID!): DiscountAutomaticDeletePayload + + """ + Creates automatic free shipping discounts that apply to qualifying orders without requiring discount codes. These promotions automatically activate when customers meet specified criteria, streamlining the checkout experience. + + For example, a store might create an automatic free shipping discount for orders over variable pricing to encourage larger purchases, or offer free shipping to specific customer segments during promotional periods. + + Use `DiscountAutomaticFreeShippingCreate` to: + - Set up code-free shipping promotions + - Create order value-based shipping incentives + - Target specific customer groups with shipping benefits + - Establish location-based shipping discounts + + The mutation validates discount configuration and returns the created automatic discount node along with any configuration errors that need resolution. + + Learn more about [automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticNode). + """ + discountAutomaticFreeShippingCreate("The input data used to create the automatic free shipping discount." freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput!): DiscountAutomaticFreeShippingCreatePayload + + """ + Updates existing automatic free shipping discounts, allowing merchants to modify promotion criteria, shipping destinations, and eligibility requirements without recreating the entire discount structure. + + For example, extending a holiday free shipping promotion to include additional countries, adjusting the minimum order value threshold, or expanding customer eligibility to include new segments. + + Use `DiscountAutomaticFreeShippingUpdate` to: + - Modify shipping discount thresholds and criteria + - Expand or restrict geographic availability + - Update customer targeting and eligibility rules + - Adjust promotion timing and activation periods + + Changes take effect immediately for new orders, while the mutation validates all modifications and reports any configuration conflicts through user errors. + + Learn more about [managing automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping). + """ + discountAutomaticFreeShippingUpdate("The ID of the automatic free shipping discount to update." id: ID!, "The input data used to update the automatic free shipping discount." freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput!): DiscountAutomaticFreeShippingUpdatePayload + + """ + Activates a previously created code discount, making it available for customers to use during checkout. This mutation transitions inactive discount codes into an active state where they can be applied to orders. + + For example, after creating a "SUMMER20" discount code but leaving it inactive during setup, merchants can activate it when ready to launch their summer promotion campaign. + + Use `DiscountCodeActivate` to: + - Launch scheduled promotional campaigns + - Reactivate previously paused discount codes + - Enable discount codes after configuration changes + - Control the timing of discount availability + + The mutation returns the updated discount code node with its new active status and handles any validation errors that might prevent activation, such as conflicting discount rules or invalid date ranges. + """ + discountCodeActivate("The ID of the code discount to activate." id: ID!): DiscountCodeActivatePayload + + """ + Creates a code discount. The discount type must be provided by an app extension that uses [Shopify Functions](https://shopify.dev/docs/apps/build/functions). Functions can implement [order](https://shopify.dev/docs/api/functions/reference/order-discounts), [product](https://shopify.dev/docs/api/functions/reference/product-discounts), or [shipping](https://shopify.dev/docs/api/functions/reference/shipping-discounts) discount functions. Use this mutation with Shopify Functions when you need custom logic beyond [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create a code discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity + of a product. For an example implementation, refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create automatic discounts with custom logic, use [`discountAutomaticAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppCreate). + """ + discountCodeAppCreate("The input data used to create the discount." codeAppDiscount: DiscountCodeAppInput!): DiscountCodeAppCreatePayload + + """ + Updates a code discount, where the discount type is provided by an app extension that uses [Shopify Functions](https://shopify.dev/docs/apps/build/functions). Use this mutation when you need advanced, custom, or dynamic discount capabilities that aren't supported by [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + > Note: + > To update automatic discounts, use [`discountAutomaticAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppUpdate). + """ + discountCodeAppUpdate("The ID of the discount to update." id: ID!, "The input fields required to update the discount." codeAppDiscount: DiscountCodeAppInput!): DiscountCodeAppUpdatePayload + + """ + Creates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the [`discountAutomaticBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicCreate) mutation. + """ + discountCodeBasicCreate("The input data used to create the discount code." basicCodeDiscount: DiscountCodeBasicInput!): DiscountCodeBasicCreatePayload + + """ + Updates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off. + + > Note: + > To update discounts that are automatically applied on a cart and at checkout, use the [`discountAutomaticBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicUpdate) mutation. + """ + discountCodeBasicUpdate("The ID of the discount code to update." id: ID!, "The input data used to update the discount code." basicCodeDiscount: DiscountCodeBasicInput!): DiscountCodeBasicUpdatePayload + + """ + Activates multiple [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can activate discounts for all codes that match a search criteria, or activate a predefined set of discount codes. + """ + discountCodeBulkActivate("The search query for filtering discounts.\n

\nFor more information on the list of supported fields and search syntax, refer to the [`codeDiscountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#query-arguments) query." search: String, "The ID of the saved search for filtering discounts to activate. Saved searches represent [customer segments](https://help.shopify.com/manual/customers/customer-segments) that merchants have built in the Shopify admin." savedSearchId: ID, "The IDs of the discounts to activate." ids: [ID!]): DiscountCodeBulkActivatePayload + + """ + Deactivates multiple [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can deactivate discounts for all codes that match a search criteria, or deactivate a predefined set of discount codes. + """ + discountCodeBulkDeactivate("The search query for filtering discounts.\n

\nFor more information on the list of supported fields and search syntax, refer to the [`codeDiscountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#query-arguments) query." search: String, "The ID of the saved search for filtering discounts to deactivate. Saved searches represent [customer segments](https://help.shopify.com/manual/customers/customer-segments) that merchants have built in the Shopify admin." savedSearchId: ID, "The IDs of the discounts to deactivate." ids: [ID!]): DiscountCodeBulkDeactivatePayload + + """ + Deletes multiple [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can delete discounts for all codes that match a search criteria, or delete a predefined set of discount codes. + """ + discountCodeBulkDelete("The search query for filtering discounts.\n

\nFor more information on the list of supported fields and search syntax, refer to the [`codeDiscountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#query-arguments) query." search: String, "The ID of the saved search for filtering discounts to delete. Saved searches represent [customer segments](https://help.shopify.com/manual/customers/customer-segments) that merchants have built in the Shopify admin." savedSearchId: ID, "The IDs of the discounts to delete." ids: [ID!]): DiscountCodeBulkDeletePayload + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyCreate) + mutation. + """ + discountCodeBxgyCreate("The input data used to create the BXGY code discount." bxgyCodeDiscount: DiscountCodeBxgyInput!): DiscountCodeBxgyCreatePayload + + """ + Updates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyUpdate) + mutation. + """ + discountCodeBxgyUpdate("The ID of the BXGY code discount to update." id: ID!, "The input data used to update the BXGY code discount." bxgyCodeDiscount: DiscountCodeBxgyInput!): DiscountCodeBxgyUpdatePayload + + """ + Temporarily suspends a code discount without permanently removing it from the store. Deactivation allows merchants to pause promotional campaigns while preserving the discount configuration for potential future use. + + For example, when a flash sale needs to end immediately or a discount code requires temporary suspension due to inventory issues, merchants can deactivate it to stop new redemptions while keeping the discount structure intact. + + Use `DiscountCodeDeactivate` to: + - Pause active promotional campaigns timely + - Temporarily suspend problematic discount codes + - Control discount availability during inventory shortages + - Maintain discount history while stopping usage + + Deactivated discounts remain in the system and can be reactivated later, unlike deletion which persistently removes the code. Customers attempting to use deactivated codes will receive appropriate error messages. + """ + discountCodeDeactivate("The ID of the code discount to deactivate." id: ID!): DiscountCodeDeactivatePayload + + """ + Removes a code discount from the store, making it permanently unavailable for customer use. This mutation provides a clean way to eliminate discount codes that are no longer needed or have been replaced. + + For example, when a seasonal promotion ends or a discount code has been compromised, merchants can delete it entirely rather than just deactivating it, ensuring customers cannot attempt to use expired promotional codes. + + Use `DiscountCodeDelete` to: + - persistently remove outdated promotional codes + - Clean up discount code lists after campaigns end + - Eliminate compromised or leaked discount codes + - Maintain organized discount management + + Once deleted, the discount code cannot be recovered and any customer attempts to use it will fail. This differs from deactivation, which preserves the code for potential future reactivation. + """ + discountCodeDelete("The ID of the code discount to delete." id: ID!): DiscountCodeDeletePayload + + """ + Creates an [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the [`discountAutomaticFreeShippingCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingCreate) mutation. + """ + discountCodeFreeShippingCreate("The input data used to create the discount code." freeShippingCodeDiscount: DiscountCodeFreeShippingInput!): DiscountCodeFreeShippingCreatePayload + + """ + Updates a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update a free shipping discount that's automatically applied on a cart and at checkout, use the [`discountAutomaticFreeShippingUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingUpdate) mutation. + """ + discountCodeFreeShippingUpdate("The ID of the discount code to update." id: ID!, "The input data used to update the discount code." freeShippingCodeDiscount: DiscountCodeFreeShippingInput!): DiscountCodeFreeShippingUpdatePayload + + """ + Asynchronously delete + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. + """ + discountCodeRedeemCodeBulkDelete("The ID of the\n[`DiscountCodeNode`](https://help.shopify.com/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id)\nobject that the codes will be removed from. For example, `gid://shopify/DiscountCodeNode/123`.\nYou can use the\n[`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes)\nto retrieve the ID." discountId: ID!, "A filter made up of terms, connectives, modifiers, and comparators that you can use to\nsearch for code discounts. You can apply one or more filters to a query. Learn more about\n[Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax).\n\nFor a list of accepted values for the `search` field, refer to the\n[`query` argument on the `codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#argument-query)." search: String, "The ID of a\n[saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id)." savedSearchId: ID, "The IDs of the\n[`DiscountRedeemCode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/discountredeemcode#field-id)\nobjects to delete.\nFor example, `gid://shopify/DiscountRedeemCode/123`.\nYou can use the\n[`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes)\nto retrieve the ID." ids: [ID!]): DiscountCodeRedeemCodeBulkDeletePayload + + """ + Asynchronously add + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. You can use the `discountRedeemCodeBulkAdd` mutation + to automate the distribution of discount codes through emails or other + marketing channels. + """ + discountRedeemCodeBulkAdd("The ID of the\n[`DiscountCodeNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id)\nobject that the codes will be added to. For example, `gid://shopify/DiscountCodeNode/123`.\nYou can use the\n[`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes)\nto retrieve the ID." discountId: ID!, "The list of codes to associate with the\n[code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes).\nMaximum: 250 codes." codes: [DiscountRedeemCodeInput!]!): DiscountRedeemCodeBulkAddPayload + + """ + Updates the evidence package for a Shopify Payments dispute. Merchants submit evidence — such as shipping confirmations, customer communications, and refund policies — to contest a dispute filed by a cardholder. This mutation updates the evidence fields. + """ + disputeEvidenceUpdate("The ID of the dispute evidence to be updated." id: ID!, "The updated properties for a dispute evidence." input: ShopifyPaymentsDisputeEvidenceUpdateInput!): DisputeEvidenceUpdatePayload + + """ + Adds tags to multiple draft orders. + """ + draftOrderBulkAddTags("The conditions for filtering draft orders on.\nSee the detailed [search syntax](https://shopify.dev/api/usage/search-syntax)." search: String, "The ID of the draft order saved search for filtering draft orders on." savedSearchId: ID, "The IDs of the draft orders to add tags to." ids: [ID!], "List of tags to be added." tags: [String!]!): DraftOrderBulkAddTagsPayload + + """ + Deletes multiple draft orders. + """ + draftOrderBulkDelete("The conditions for filtering draft orders on.\nSee the detailed [search syntax](https://shopify.dev/api/usage/search-syntax)." search: String, "The ID of the draft order saved search for filtering draft orders on." savedSearchId: ID, "The IDs of the draft orders to delete." ids: [ID!]): DraftOrderBulkDeletePayload + + """ + Removes tags from multiple draft orders. + """ + draftOrderBulkRemoveTags("The conditions for filtering draft orders on.\nSee the detailed [search syntax](https://shopify.dev/api/usage/search-syntax)." search: String, "The ID of the draft order saved search for filtering draft orders on." savedSearchId: ID, "The IDs of the draft orders to remove tags from." ids: [ID!], "List of tags to be removed." tags: [String!]!): DraftOrderBulkRemoveTagsPayload + + """ + Calculates the properties of a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) without creating it. Returns pricing information including [`CalculatedDraftOrderLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedDraftOrderLineItem) totals, shipping charges, applicable discounts, and tax calculations based on the provided [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) and [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) information. + + Use this mutation to preview total taxes and prices before creating a draft order. It's particularly useful when working with B2B [`PurchasingEntity`](https://shopify.dev/docs/api/admin-graphql/latest/unions/PurchasingEntity) or when you need to determine costs without committing to a draft order. Learn more about [calculating draft orders for B2B purchasing entities](https://shopify.dev/docs/apps/build/b2b/draft-orders#step-1-calculate-a-draft-order-for-a-purchasing-entity). + """ + draftOrderCalculate("The fields for the draft order." input: DraftOrderInput!): DraftOrderCalculatePayload + + """ + Completes a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) and + converts it into a [regular order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + The order appears in the merchant's orders list, and the customer can be notified about their order. + + Use the `draftOrderComplete` mutation when a merchant is ready to finalize a draft order and create a real + order in their store. The `draftOrderComplete` mutation also supports sales channel attribution for tracking + order sources using the [`sourceName`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete#arguments-sourceName) + argument, [cart validation](https://shopify.dev/docs/apps/build/checkout/cart-checkout-validation) + controls for app integrations, and detailed error reporting for failed completions. + + You can complete a draft order with different [payment scenarios](https://help.shopify.com/manual/fulfillment/managing-orders/payments): + + - Mark the order as paid immediately. + - Set the order as payment pending using [payment terms](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms). + - Specify a custom payment amount. + - Select a specific payment gateway. + + > Note: + > When completing a draft order, inventory is [reserved](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + for the items in the order. This means the items will no longer be available for other customers to purchase. + Make sure to verify inventory availability before completing the draft order. + """ + draftOrderComplete("The draft order to complete." id: ID!, "Whether the payment is pending." paymentPending: Boolean = false @deprecated(reason: "Create a draft with payment terms rather than marking the draft as pending."), "The gateway for the completed draft order." paymentGatewayId: ID, "A channel definition handle used for sales channel attribution." sourceName: String): DraftOrderCompletePayload + + """ + Creates a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) + with attributes such as customer information, line items, shipping and billing addresses, and payment terms. + Draft orders are useful for merchants that need to: + + - Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created. + - Send invoices to customers with a secure checkout link. + - Use custom items to represent additional costs or products not in inventory. + - Re-create orders manually from active sales channels. + - Sell products at discount or wholesale rates. + - Take pre-orders. + + After creating a draft order, you can: + - Send an invoice to the customer using the [`draftOrderInvoiceSend`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderInvoiceSend) mutation. + - Complete the draft order using the [`draftOrderComplete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete) mutation. + - Update the draft order using the [`draftOrderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderUpdate) mutation. + - Duplicate a draft order using the [`draftOrderDuplicate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDuplicate) mutation. + - Delete the draft order using the [`draftOrderDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDelete) mutation. + + > Note: + > When you create a draft order, you can't [reserve or hold inventory](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) for the items in the order by default. + > However, you can reserve inventory using the [`reserveInventoryUntil`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderCreate#arguments-input.fields.reserveInventoryUntil) input. + """ + draftOrderCreate("The fields used to create the draft order." input: DraftOrderInput!): DraftOrderCreatePayload + + """ + Creates a draft order from order. + """ + draftOrderCreateFromOrder("Specifies the order's id that we create the draft order from." orderId: ID!): DraftOrderCreateFromOrderPayload + + """ + Deletes a draft order. + """ + draftOrderDelete("Specify the draft order to delete by its ID." input: DraftOrderDeleteInput!): DraftOrderDeletePayload + + """ + Duplicates a draft order. + """ + draftOrderDuplicate("The ID of the draft order to duplicate." draftOrderId: ID @deprecated(reason: "Use `id` instead."), "The ID of the draft order to duplicate." id: ID): DraftOrderDuplicatePayload + + """ + Previews a draft order invoice email. + """ + draftOrderInvoicePreview("Specifies the draft order invoice email to preview." id: ID!, "Specifies the draft order invoice email fields." email: EmailInput): DraftOrderInvoicePreviewPayload + + """ + Sends an invoice email for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder). The invoice includes a secure checkout link for reviewing and paying for the order. Use the [`email`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderInvoiceSend#arguments-email) argument to customize the email, such as the subject and message. + """ + draftOrderInvoiceSend("Specifies the draft order to send the invoice for." id: ID!, "Specifies the draft order invoice email fields." email: EmailInput): DraftOrderInvoiceSendPayload + + """ + Updates a draft order. + + If a checkout has been started for a draft order, any update to the draft will unlink the checkout. Checkouts + are created but not immediately completed when opening the merchant credit card modal in the admin, and when a + buyer opens the invoice URL. This is usually fine, but there is an edge case where a checkout is in progress + and the draft is updated before the checkout completes. This will not interfere with the checkout and order + creation, but if the link from draft to checkout is broken the draft will remain open even after the order is + created. + """ + draftOrderUpdate("Specifies the draft order to update." id: ID!, "The draft order properties to update." input: DraftOrderInput!): DraftOrderUpdatePayload + + """ + Updates the server pixel to connect to an EventBridge endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + eventBridgeServerPixelUpdate("The ARN for the EventBridge endpoint to which customer events are to be sent." arn: ARN!): EventBridgeServerPixelUpdatePayload + + """ + Creates a webhook subscription that notifies your [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling. + + This mutation configures webhook delivery to an Amazon EventBridge partner event source. You can filter events using [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only relevant webhooks, control which data fields are included in webhook payloads, and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + eventBridgeWebhookSubscriptionCreate("The type of event that triggers the webhook." topic: WebhookSubscriptionTopic!, "Specifies the input fields for an EventBridge webhook subscription." webhookSubscription: EventBridgeWebhookSubscriptionInput!): EventBridgeWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates an Amazon EventBridge webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + eventBridgeWebhookSubscriptionUpdate("The ID of the webhook subscription to update." id: ID!, "Specifies the input fields for an EventBridge webhook subscription." webhookSubscription: EventBridgeWebhookSubscriptionInput!): EventBridgeWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Acknowledges file update failure by resetting FAILED status to READY and clearing any media errors. + """ + fileAcknowledgeUpdateFailed("Specifies the file(s) to acknowledge the failed updates of." fileIds: [ID!]!): FileAcknowledgeUpdateFailedPayload + + """ + Creates file assets for a store from external URLs or files that were previously uploaded using the + [`stagedUploadsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/stageduploadscreate) + mutation. + + Use the `fileCreate` mutation to add various types of media and documents to your store. These files are added to the + [**Files** page](https://shopify.com/admin/settings/files) in the Shopify admin and can be referenced by other + resources in your store. + + The `fileCreate` mutation supports multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing + - **External videos**: YouTube and Vimeo videos for enhanced product experiences + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types for store resources + + The mutation handles duplicate filenames using configurable resolution modes that automatically append UUIDs, + replace existing files, or raise errors when conflicts occur. + + > Note: + > Files are processed asynchronously. Check the + > [`fileStatus`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/File#fields-fileStatus) + > field to monitor processing completion. The maximum number of files that can be created in a single batch is 250. + + After creating files, you can make subsequent updates using the following mutations: + + - [`fileUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileUpdate): + Update file properties such as alt text or replace file contents while preserving the same URL. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + To list all files in your store, use the + [`files`](https://shopify.dev/docs/api/admin-graphql/latest/queries/files) query. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileCreate("List of new files to be created." files: [FileCreateInput!]!): FileCreatePayload + + """ + Deletes file assets that were previously uploaded to your store. + + Use the `fileDelete` mutation to permanently remove media and file assets from your store when they are no longer needed. + This mutation handles the complete removal of files from both your store's file library and any associated references + to products or other resources. + + The `fileDelete` mutation supports removal of multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing content + - **External Videos**: YouTube and Vimeo videos linked to your products + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types stored in your + [**Files** page](https://shopify.com/admin/settings/files) + + When you delete files that are referenced by products, the mutation automatically removes those references and + reorders any remaining media to maintain proper positioning. Product file references are database relationships + managed through a media reference system, not just links in product descriptions. The Shopify admin provides a UI + to manage these relationships, and when files are deleted, the system automatically cleans up all references. + Files that are currently being processed by other operations are rejected to prevent conflicts. + + > Caution: + > File deletion is permanent and can't be undone. When you delete a file that's being used in your store, + > it will immediately stop appearing wherever it was displayed. For example, if you delete a product image, + > that product will show a broken image or placeholder on your storefront and in the admin. The same applies + > to any other files linked from themes, blog posts, or pages. Before deleting files, you can use the + > [`files` query](https://shopify.dev/api/admin-graphql/latest/queries/files) to list and review + > your store's file assets. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileDelete("The IDs of the files to be deleted." fileIds: [ID!]!): FileDeletePayload + + """ + Updates properties, content, and metadata associated with an existing file asset that has already been uploaded to Shopify. + + Use the `fileUpdate` mutation to modify various aspects of files already stored in your store. + Files can be updated individually or in batches. + + The `fileUpdate` mutation supports updating multiple file properties: + + - **Alt text**: Update accessibility descriptions for images and other media. + - **File content**: Replace image or generic file content while maintaining the same URL. + - **Filename**: Modify file names (extension must match the original). + - **Product references**: Add or remove associations between files and products. Removing file-product associations + deletes the file from the product's media gallery and clears the image from any product variants that were using it. + + The mutation handles different file types with specific capabilities: + + - **Images**: Update preview images, original source, filename, and alt text. + - **Generic files**: Update original source, filename, and alt text. + - **Videos and 3D models**: Update alt text and product references. + + > Note: + > Files must be in `ready` state before they can be updated. The mutation includes file locking to prevent + > conflicts during updates. You can't simultaneously update both `originalSource` and `previewImageSource`. + + After updating files, you can use related mutations for additional file management: + + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Create new file assets from external URLs or staged uploads. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileUpdate("List of files to be updated." files: [FileUpdateInput!]!): FileUpdatePayload + + """ + Generates a signature for a Flow action payload. + """ + flowGenerateSignature("The unique identifier of the Flow action definition." id: ID!, "The request payload used to generate the signature." payload: String!): FlowGenerateSignaturePayload + + """ + Triggers any workflows that begin with the trigger specified in the request body. To learn more, refer to [_Create Shopify Flow triggers_](https://shopify.dev/apps/flow/triggers). + """ + flowTriggerReceive("The payload needed to run the Trigger." body: String @deprecated(reason: "Use `payload` and `handle` to execute your Flow trigger."), "The handle of the trigger." handle: String, "The payload needed to run the Trigger." payload: JSON): FlowTriggerReceivePayload + + """ + Cancels an existing [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment) and reverses its effects on associated [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects. When you cancel a fulfillment, the system creates new fulfillment orders for the cancelled items so they can be fulfilled again. + + The cancellation affects fulfillment orders differently based on their fulfillment status. If a fulfillment order was entirely fulfilled, then it automatically closes. If a fulfillment order is partially fulfilled, then the remaining quantities adjust to include the cancelled items. The system creates new fulfillment orders at the original [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) when items are still stocked there, or at alternative locations based on the store's fulfillment priority settings. + + Learn more about [canceling fulfillments](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-7-cancel-a-fulfillment). + """ + fulfillmentCancel("The ID of the fulfillment to be canceled." id: ID!): FulfillmentCancelPayload + + """ + Creates a fulfillment constraint rule and its metafield. + """ + fulfillmentConstraintRuleCreate("The identifier of the function providing the constraint rule." functionId: String @deprecated(reason: "Use `functionHandle` instead."), "The handle of the function providing the constraint rule." functionHandle: String, "Associate the function with one or multiple delivery method types." deliveryMethodTypes: [DeliveryMethodType!]!, "Metafields to associate to the fulfillment constraint rule." metafields: [MetafieldInput!] = []): FulfillmentConstraintRuleCreatePayload + + """ + Deletes a fulfillment constraint rule and its metafields. + """ + fulfillmentConstraintRuleDelete("A globally-unique identifier for the fulfillment constraint rule." id: ID!): FulfillmentConstraintRuleDeletePayload + + """ + Update a fulfillment constraint rule. + """ + fulfillmentConstraintRuleUpdate("A globally-unique identifier for the fulfillment constraint rule." id: ID!, "Specifies the delivery method types to be updated.\nIf not provided or providing an empty list will associate the function with all delivery methods." deliveryMethodTypes: [DeliveryMethodType!]!): FulfillmentConstraintRuleUpdatePayload + + """ + Creates a fulfillment for one or more [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects. The fulfillment orders are associated with the same [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) and are assigned to the same [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). + + Use this mutation to mark items as fulfilled when they're ready to ship. You can specify tracking information, customer notification preferences, and which [`FulfillmentOrderLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorderlineitem) objects to fulfill from each fulfillment order. If you don't specify line items, then the mutation fulfills all items in the fulfillment order. + + Learn more about [building fulfillment solutions](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions#create-a-fulfillment). + """ + fulfillmentCreate("The input fields used to create a fulfillment from fulfillment orders." fulfillment: FulfillmentInput!, "An optional message for the fulfillment request." message: String): FulfillmentCreatePayload + + """ + Creates a fulfillment for one or many fulfillment orders. + The fulfillment orders are associated with the same order and are assigned to the same location. + """ + fulfillmentCreateV2("The input fields used to create a fulfillment from fulfillment orders." fulfillment: FulfillmentV2Input!, "An optional message for the fulfillment request." message: String): FulfillmentCreateV2Payload @deprecated(reason: "Use `fulfillmentCreate` instead.") + + """ + Creates a [`FulfillmentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) to track the shipment status and location of items that have shipped. Events capture status updates like carrier pickup, in transit, out for delivery, or delivered. + + Each event records the timestamp and current status of the [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment). You can include optional details such as the location where the event occurred, estimated arrival time, and messages for tracking purposes. + """ + fulfillmentEventCreate("The input fields used to create a fulfillment event for a fulfillment." fulfillmentEvent: FulfillmentEventInput!): FulfillmentEventCreatePayload + + """ + Accept a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderAcceptCancellationRequest("The ID of the fulfillment order associated with the cancellation request." id: ID!, "An optional reason for accepting the cancellation request." message: String): FulfillmentOrderAcceptCancellationRequestPayload + + """ + Accepts a fulfillment request that the fulfillment service has received for a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) which signals that the fulfillment service will process and fulfill the order. The fulfillment service can optionally provide a message to the merchant and an estimated shipped date when accepting the request. + + Learn more about [accepting fulfillment requests](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#accept-a-fulfillment-request). + """ + fulfillmentOrderAcceptFulfillmentRequest("The ID of the fulfillment order associated with the fulfillment request." id: ID!, "An optional reason for accepting the fulfillment request." message: String, "The estimated date and time when the fulfillment order will be shipped." estimatedShippedAt: DateTime): FulfillmentOrderAcceptFulfillmentRequestPayload + + """ + Cancels a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) and creates a replacement fulfillment order to represent the work left to be done. The original fulfillment order will be marked as closed. + + This mutation works when the fulfillment order has a `SUBMITTED` or `CANCELLATION_REQUESTED` status. For `SUBMITTED` orders, cancellation happens immediately because the fulfillment service hasn't accepted the request. + + > Note: Orders that have had cancellation requested but the cancellation has yet to be accepted by the fulfillment service might still have work completed despite cancellation. + """ + fulfillmentOrderCancel("The ID of the fulfillment order to mark as canceled." id: ID!): FulfillmentOrderCancelPayload + + """ + Marks an in-progress fulfillment order as incomplete, + indicating the fulfillment service is unable to ship any remaining items, + and closes the fulfillment request. + + This mutation can only be called for fulfillment orders that meet the following criteria: + - Assigned to a fulfillment service location, + - The fulfillment request has been accepted, + - The fulfillment order status is `IN_PROGRESS`. + + This mutation can only be called by the fulfillment service app that accepted the fulfillment request. + Calling this mutation returns the control of the fulfillment order to the merchant, allowing them to + move the fulfillment order line items to another location and fulfill from there, + remove and refund the line items, or to request fulfillment from the same fulfillment service again. + + Closing a fulfillment order is explained in + [the fulfillment service guide](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-7-optional-close-a-fulfillment-order). + """ + fulfillmentOrderClose("The ID of the fulfillment order to mark as incomplete." id: ID!, "An optional reason for marking the fulfillment order as incomplete." message: String): FulfillmentOrderClosePayload + + """ + Applies a fulfillment hold on a fulfillment order. + + As of the + [2025-01 API version](https://shopify.dev/changelog/apply-multiple-holds-to-a-single-fulfillment-order), + the mutation can be successfully executed on fulfillment orders that are already on hold. + To place multiple holds on a fulfillment order, apps need to supply the + [handle](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentHold#field-handle) + field. Each app can place up to + 10 active holds + per fulfillment order. If an app attempts to place more than this, the mutation will return + [a user error indicating that the limit has been reached](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-fulfillmentorderholdlimitreached). + The app would need to release one of its existing holds before being able to apply a new one. + """ + fulfillmentOrderHold("The ID of the fulfillment order on which a fulfillment hold is applied." id: ID!, "The details of the fulfillment hold applied on the fulfillment order." fulfillmentHold: FulfillmentOrderHoldInput!): FulfillmentOrderHoldPayload + + """ + Marks [fulfillment order line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLineItem) as ready for customer pickup. When executed, this mutation automatically sends a "Ready For Pickup" notification to the customer. + + Use this mutation for local pickup orders after the items have been prepared and are available for the customer to collect. You can specify one or more [fulfillment order](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects by providing the fulfillment order IDs in the [`lineItemsByFulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/PreparedFulfillmentOrderLineItemsInput) field. This allows you to mark fulfillment order line items from different fulfillment orders as ready for pickup. + """ + fulfillmentOrderLineItemsPreparedForPickup("The input for marking fulfillment order line items as ready for pickup." input: FulfillmentOrderLineItemsPreparedForPickupInput!): FulfillmentOrderLineItemsPreparedForPickupPayload + + """ + Merges a set or multiple sets of fulfillment orders together into one based on + line item inputs and quantities. + """ + fulfillmentOrderMerge("One or more sets of fulfillment orders to be merged." fulfillmentOrderMergeInputs: [FulfillmentOrderMergeInput!]!): FulfillmentOrderMergePayload + + """ + Changes the location which is assigned to fulfill a number of unfulfilled fulfillment order line items. + + Moving a fulfillment order will fail in the following circumstances: + + * The fulfillment order is closed. + * The fulfillment order has had progress manually reported. To move a fulfillment order that has had progress manually reported, the fulfillment order must first be marked as open resolving the ongoing progress state. + * The destination location doesn't stock the requested inventory item. + * The API client doesn't have the correct permissions. + + Line items which have already been fulfilled can't be re-assigned + and will always remain assigned to the original location. + + You can't change the assigned location while a fulfillment order has a + [request status](https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus) + of `SUBMITTED`, `ACCEPTED`, `CANCELLATION_REQUESTED`, or `CANCELLATION_REJECTED`. + These request statuses mean that a fulfillment order is awaiting action by a fulfillment service + and can't be re-assigned without first having the fulfillment service accept a cancellation request. + This behavior is intended to prevent items from being fulfilled by multiple locations or fulfillment services. + + ### How re-assigning line items affects fulfillment orders + + **First scenario:** Re-assign all line items belonging to a fulfillment order to a new location. + + In this case, the + [assignedLocation](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorder#field-fulfillmentorder-assignedlocation) + of the original fulfillment order will be updated to the new location. + + **Second scenario:** Re-assign a subset of the line items belonging to a fulfillment order to a new location. + You can specify a subset of line items using the `fulfillmentOrderLineItems` parameter + (available as of the `2023-04` API version), + or specify that the original fulfillment order contains line items which have already been fulfilled. + + If the new location is already assigned to another active fulfillment order, on the same order, then + a new fulfillment order is created. The existing fulfillment order is closed and line items are recreated + in a new fulfillment order. + """ + fulfillmentOrderMove("The ID of the fulfillment order to be moved." id: ID!, "The ID of the location where the fulfillment order will be moved." newLocationId: ID!, "The fulfillment order line items to be moved.\nIf left blank, all unfulfilled line items belonging to the fulfillment order are moved." fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]): FulfillmentOrderMovePayload + + """ + Marks a scheduled fulfillment order as open. + + From API version 2026-01, this will also mark a fulfillment order as open when it is assigned to a merchant managed location and has had progress reported. + """ + fulfillmentOrderOpen("The ID of the fulfillment order to mark as open." id: ID!): FulfillmentOrderOpenPayload + + """ + Rejects a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectCancellationRequest("The ID of the fulfillment order associated with the cancellation request." id: ID!, "An optional reason for rejecting the cancellation request." message: String): FulfillmentOrderRejectCancellationRequestPayload + + """ + Rejects a fulfillment request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectFulfillmentRequest("The ID of the fulfillment order associated with the fulfillment request." id: ID!, "The reason for the fulfillment order rejection." reason: FulfillmentOrderRejectionReason, "An optional reason for rejecting the fulfillment request." message: String, "An optional array of line item rejection details. If none are provided, all line items will be assumed to be unfulfillable.\n\n**Note**: After the fulfillment request has been rejected, none of the line items will be able to be fulfilled. This field documents which line items specifically were unable to be fulfilled and why." lineItems: [IncomingRequestLineItemInput!]): FulfillmentOrderRejectFulfillmentRequestPayload + + """ + Releases the fulfillment hold on a fulfillment order. + """ + fulfillmentOrderReleaseHold("The ID of the fulfillment order for which to release the fulfillment hold." id: ID!, "The IDs of the fulfillment holds to release.
\n
\n Holds will only be released if they belong to the fulfillment order specified by the `id` argument.
\n
\n NOTE: If not supplied, all holds for the fulfillment order will be released.\n It is highly recommended that apps supply the ids of the holds that they intend to release.\n Releasing all holds on a fulfillment order will result in the fulfillment order being released prematurely\n and items being incorrectly fulfilled." holdIds: [ID!], "A configurable ID used to track the automation system releasing this hold." externalId: String): FulfillmentOrderReleaseHoldPayload + + """ + Reschedules a scheduled fulfillment order. + + Updates the value of the `fulfillAt` field on a scheduled fulfillment order. + + The fulfillment order will be marked as ready for fulfillment at this date and time. + """ + fulfillmentOrderReschedule("The ID of the fulfillment order to reschedule." id: ID!, "A future date and time when the fulfillment order will be marked as ready for fulfillment." fulfillAt: DateTime!): FulfillmentOrderReschedulePayload + + """ + Splits [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects by moving the specified [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects and quantities into a new fulfillment order. + + If the original fulfillment order can't be split due to its current state, then the mutation creates a replacement fulfillment order instead. + """ + fulfillmentOrderSplit("The fulfillment orders, line items and quantities to be split into new fulfillment orders." fulfillmentOrderSplits: [FulfillmentOrderSplitInput!]!): FulfillmentOrderSplitPayload + + """ + Sends a cancellation request to the fulfillment service of a fulfillment order. + """ + fulfillmentOrderSubmitCancellationRequest("The ID of the fulfillment order associated with the cancellation request." id: ID!, "An optional reason for the cancellation request." message: String): FulfillmentOrderSubmitCancellationRequestPayload + + """ + Sends a fulfillment request to the fulfillment service assigned to a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder). The fulfillment service must then accept or reject the request before processing can begin. + + You can either request fulfillment for all line items or specify individual items with quantities for partial fulfillment. When requesting partial fulfillment, Shopify splits the original fulfillment order into two: one with the submitted items and another with the remaining unsubmitted items. Include an optional message to communicate special instructions to the fulfillment service, such as gift wrapping or handling requirements. + + Learn more about [managing fulfillment requests as a fulfillment service](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-4-act-on-fulfillment-requests). + """ + fulfillmentOrderSubmitFulfillmentRequest("The ID of the fulfillment order associated with fulfillment request." id: ID!, "An optional message for the fulfillment request." message: String, "Whether the customer should be notified when fulfillments are created for this fulfillment order." notifyCustomer: Boolean, "The fulfillment order line items to be requested for fulfillment.\nIf left blank, all line items of the fulfillment order are requested for fulfillment." fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]): FulfillmentOrderSubmitFulfillmentRequestPayload + + """ + Route the fulfillment orders to an alternative location, according to the shop's order routing settings. This involves: + * Finding an alternate location that can fulfill the fulfillment orders. + * Assigning the fulfillment orders to the new location. + """ + fulfillmentOrdersReroute("The list of IDs of the fulfillment orders." fulfillmentOrderIds: [ID!]!, "The list of IDs of the locations to include for rerouting. By default, all locations are included." includedLocationIds: [ID!], "The list of IDs of the locations to exclude for rerouting. Excluded locations specified here take precedence over included locations provided through included_location_ids." excludedLocationIds: [ID!]): FulfillmentOrdersReroutePayload + + """ + Sets the latest date and time by which the fulfillment orders need to be fulfilled. + """ + fulfillmentOrdersSetFulfillmentDeadline("The IDs of the fulfillment orders for which the deadline is being set." fulfillmentOrderIds: [ID!]!, "The new fulfillment deadline of the fulfillment orders." fulfillmentDeadline: DateTime!): FulfillmentOrdersSetFulfillmentDeadlinePayload + + """ + Creates a fulfillment service. + + ## Fulfillment service location + + When creating a fulfillment service, a new location will be automatically created on the shop + and will be associated with this fulfillment service. + This location will be named after the fulfillment service and inherit the shop's address. + + If you are using API version `2023-10` or later, and you need to specify custom attributes for the fulfillment service location + (for example, to change its address to a country different from the shop's country), + use the + [LocationEdit](https://shopify.dev/api/admin-graphql/latest/mutations/locationEdit) + mutation after creating the fulfillment service. + """ + fulfillmentServiceCreate("The name of the fulfillment service." name: String!, "The URL to send requests for the fulfillment service.\n\nIf `callbackUrl` is provided:\n- Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers\n for orders, if `trackingSupport` is set to `true`.\n- Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels,\n if `inventoryManagement` is set to `true`.\n- Shopify uses the callback_url/fulfillment_order_notification endpoint to send\n [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations).\n\nOtherwise, if no `callbackUrl` is provided you need to submit this information via the api:\n- For submitting tracking info and handling fulfillment requests, see our docs on [building for fulfillment services](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services).\n- For managing inventory quantities, see our docs on [managing inventory quantities and states](https://shopify.dev/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states)." callbackUrl: URL, "Whether the fulfillment service provides tracking numbers for packages.\n\nIf `callbackUrl` is provided ([optional as of API version \"2026-01\"](https://shopify.dev/changelog/fulfillment-service-callback-url-is-now-optional)), Shopify will periodically fetch tracking numbers via the callback endpoint.\n\nIf no `callbackUrl` is provided you need to submit this information via the api, see our docs on [building for fulfillment services](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services)." trackingSupport: Boolean = false, "Whether the fulfillment service uses the [fulfillment order based workflow](\n https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments\n) for managing fulfillments.\n\n[As of 2022-07 API version](https://shopify.dev/changelog/legacy-fulfillment-api-deprecation),\nthe fulfillment order based workflow is the only way to manage fulfillments.\nAs the migration is now finished, the `fulfillmentOrdersOptIn` property is deprecated\nand is always set to `true` on correctly functioning fulfillment services.\n\nThe `fulfillmentOrdersOptIn` input field is [deprecated and will be removed in the next API version](\nhttps://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field).\nThis API version makes it optional and defaults to `true` for a smooth migration experience.\nDo not set the `fulfillmentOrdersOptIn` argument, and you are ready for the next API version release." fulfillmentOrdersOptIn: Boolean = true @deprecated(reason: "Migration period ended. Defaults to `true`."), "Whether the fulfillment service can stock inventory alongside other locations.\n\nAs of API version `2025-01`, all new fulfillment services are created with `permitsSkuSharing` set to `true`,\nregardless of the value provided for this argument. Passing `false` has no effect.\nAs of API version `2025-10`, passing `false` will return an error.\nThis argument will be removed entirely in API version `2026-04`." permitsSkuSharing: Boolean = true @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https://shopify.dev/changelog/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\nAs of API version `2026-04` this argument will be removed.\n"), "Whether the fulfillment service manages product inventory and provides updates to Shopify.\n\nIf `callbackUrl` is provided ([optional as of API version \"2026-01\"](https://shopify.dev/changelog/fulfillment-service-callback-url-is-now-optional)), Shopify will periodically fetch inventory levels via the callback endpoint.\n\nIf no `callbackUrl` is provided you need to submit this information via the api, see our docs on [managing inventory quantities and states](https://shopify.dev/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states)." inventoryManagement: Boolean = false, "Whether the fulfillment service requires products to be physically shipped." requiresShippingMethod: Boolean = true): FulfillmentServiceCreatePayload + + """ + Deletes a fulfillment service. + """ + fulfillmentServiceDelete("The ID of the fulfillment service to delete." id: ID!, "The ID of an active merchant managed location where inventory and commitments will be relocated\nafter the fulfillment service is deleted.\n\nInventory will only be transferred if the\n[`TRANSFER`](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentServiceDeleteInventoryAction#value-transfer)\ninventory action has been chosen." destinationLocationId: ID, "The action to take with the location after the fulfillment service is deleted." inventoryAction: FulfillmentServiceDeleteInventoryAction = TRANSFER): FulfillmentServiceDeletePayload + + """ + Updates the [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) configuration, including its name, callback URL, and operational settings. + + The mutation modifies how the fulfillment service handles inventory tracking, shipping requirements, and package tracking support. + + > Note: + > To update the physical address or other location details of the fulfillment service, use the [`locationEdit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationEdit) mutation instead. + + Learn more about [editing fulfillment service locations](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-2-edit-locations). + """ + fulfillmentServiceUpdate("The id of the fulfillment service." id: ID!, "The name of the fulfillment service." name: String, "The URL to send requests for the fulfillment service.\n\nIf `callbackUrl` is provided:\n- Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers\n for orders, if `trackingSupport` is set to `true`.\n- Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels,\n if `inventoryManagement` is set to `true`.\n- Shopify uses the callback_url/fulfillment_order_notification endpoint to send\n [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations).\n\nOtherwise, if no `callbackUrl` is provided you need to submit this information via the api:\n- For submitting tracking info and handling fulfillment requests, see our docs on [building for fulfillment services](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services).\n- For managing inventory quantities, see our docs on [managing inventory quantities and states](https://shopify.dev/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states)." callbackUrl: URL, "Whether the fulfillment service provides tracking numbers for packages.\n\nIf `callbackUrl` is provided, Shopify will periodically fetch tracking numbers via the callback endpoint.\n\nIf no `callbackUrl` is provided you need to submit this information via the api, see our docs on [building for fulfillment services](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services)." trackingSupport: Boolean, "Whether the fulfillment service uses the [fulfillment order based workflow](\n https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments\n) for managing fulfillments.\n\n[As of 2022-07 API version](https://shopify.dev/changelog/legacy-fulfillment-api-deprecation),\nthe fulfillment order based workflow is the only way to manage fulfillments,\nand `true` is the only valid value for `fulfillmentOrdersOptIn`." fulfillmentOrdersOptIn: Boolean @deprecated(reason: "Migration period has ended."), "Whether the fulfillment service can stock inventory alongside other locations.\n\nAll fulfillment services now permit SKU sharing. Setting this to `false` is no longer supported.\nThis argument will be removed in API version `2026-04`." permitsSkuSharing: Boolean @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting `permitsSkuSharing` to false is no longer supported.\nAs of API version `2026-04` this argument will be removed.\n"), "Whether the fulfillment service manages product inventory and provides updates to Shopify.\n\nIf `callbackUrl` is provided, Shopify will periodically fetch inventory levels via the callback endpoint.\n\nIf no `callbackUrl` is provided you need to submit this information via the api, see our docs on [managing inventory quantities and states](https://shopify.dev/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states)." inventoryManagement: Boolean, "Whether the fulfillment service requires products to be physically shipped." requiresShippingMethod: Boolean = true): FulfillmentServiceUpdatePayload + + """ + Updates tracking information for a fulfillment, including the carrier name, tracking numbers, and tracking URLs. You can provide either single or multiple tracking numbers for shipments with multiple packages. + + The mutation accepts a [`FulfillmentTrackingInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/FulfillmentTrackingInput) that supports both single tracking (using [`number`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate#arguments-trackingInfoInput.fields.number) and [`url`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate#arguments-trackingInfoInput.fields.url) fields) and multi-package tracking (using [`numbers`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate#arguments-trackingInfoInput.fields.numbers) and [`urls`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate#arguments-trackingInfoInput.fields.urls) fields). When you specify a [supported carrier name](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), Shopify automatically generates tracking URLs for the provided tracking numbers. + + You can optionally notify customers about tracking updates with the [`notifyCustomer`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate#arguments-notifyCustomer) argument. When enabled, customers receive shipping update emails with tracking details and receive notifications about future updates to the fulfillment. + + Learn more about [enabling tracking support](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support) for fulfillment services. + """ + fulfillmentTrackingInfoUpdate("The ID of the fulfillment." fulfillmentId: ID!, "The tracking input for the mutation, including tracking URL, number, and company." trackingInfoInput: FulfillmentTrackingInput!, "Whether the customer will be notified of this update and future updates for the fulfillment.\nIf this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated." notifyCustomer: Boolean): FulfillmentTrackingInfoUpdatePayload + + """ + Updates tracking information for a fulfillment. + """ + fulfillmentTrackingInfoUpdateV2("The ID of the fulfillment." fulfillmentId: ID!, "The tracking input for the mutation, including tracking URL, number, and company." trackingInfoInput: FulfillmentTrackingInput!, "Whether the customer will be notified of this update and future updates for the fulfillment.\nIf this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated." notifyCustomer: Boolean): FulfillmentTrackingInfoUpdateV2Payload @deprecated(reason: "Use `fulfillmentTrackingInfoUpdate` instead.") + + """ + Creates a new [`GiftCard`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) with a specified initial value. You can assign the gift card to a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) or create it without assignment for manual distribution. + + You can customize the gift card with an optional code, expiration date, and internal note. If you don't provide a code, the system generates a random 16 character alphanumeric code. The mutation also supports scheduling gift card notifications to recipients, with a personalized message, through the [`recipientAttributes`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardCreateInput#fields-recipientAttributes) field on the `GiftCardCreateInput` input object. + """ + giftCardCreate("The input fields to create a gift card." input: GiftCardCreateInput!): GiftCardCreatePayload + + """ + Adds funds to an existing gift card, increasing its available balance. Use this when a merchant wants to top up a customer's gift card — for example, as a promotional bonus, a customer service gesture, or to reload a reusable gift card. + """ + giftCardCredit("The ID of the gift card to be credited." id: ID!, "The input fields to credit a gift card." creditInput: GiftCardCreditInput!): GiftCardCreditPayload + + """ + Deactivate a gift card. A deactivated gift card cannot be used by a customer. + A deactivated gift card cannot be re-enabled. + """ + giftCardDeactivate("The ID of the gift card to deactivate." id: ID!): GiftCardDeactivatePayload + + """ + Removes funds from a gift card, decreasing its available balance. Use this for manual balance adjustments — for example, correcting an accidental over-credit or applying a fee. + """ + giftCardDebit("The ID of the gift card to be debited." id: ID!, "The input fields to debit a gift card." debitInput: GiftCardDebitInput!): GiftCardDebitPayload + + """ + Sends a notification to the customer who purchased a gift card, including the gift card details and code. The notification is delivered using the customer's available contact method. Use this to resend the purchase confirmation or remind the purchaser about a gift card they bought. + """ + giftCardSendNotificationToCustomer("The ID of the gift card to send." id: ID!): GiftCardSendNotificationToCustomerPayload + + """ + Sends a notification to the designated recipient of a gift card, delivering the gift card code and redemption instructions. The notification is delivered using the recipient's available contact method. Use this to deliver or re-deliver the gift card to the intended recipient. + """ + giftCardSendNotificationToRecipient("The ID of the gift card to send." id: ID!): GiftCardSendNotificationToRecipientPayload + + """ + Updates the properties of an existing gift card, such as its expiration date, note, or template suffix. Use this to modify gift card details — for example, extending an expiration date for a loyal customer or adding an internal note for tracking purposes. + """ + giftCardUpdate("The ID of the gift card to be updated." id: ID!, "The input fields to update the gift card." input: GiftCardUpdateInput!): GiftCardUpdatePayload + + """ + Activates an inventory item at a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) by creating an [`InventoryLevel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) that tracks stock quantities. This enables you to manage inventory for a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) at the specified location. + + When you activate an inventory item, you can set its initial quantities. The [`available`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryActivate#arguments-available) argument sets the quantity that's available for sale. [`onHand`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryActivate#arguments-onHand) argument sets the total physical quantity at the location. If you don't specify quantities, then `available` and `onHand` default to zero. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states). + """ + inventoryActivate("The ID of the inventory item to activate." inventoryItemId: ID!, "The ID of the location of the inventory item being activated." locationId: ID!, "The initial available quantity of the inventory item being activated at the location." available: Int, "The initial on_hand quantity of the inventory item being activated at the location." onHand: Int, "Allow activation at or away from fulfillment service location with sku sharing off. This will deactivate inventory at all other locations." stockAtLegacyLocation: Boolean = false): InventoryActivatePayload + + """ + Adjusts quantities for inventory items by applying incremental changes at specific locations. Each adjustment modifies the quantity by a delta value rather than setting an absolute amount. + + The mutation tracks adjustments with a reason code and optional reference URI for audit trails. Returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) that records all changes made in the operation. + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#adjust-inventory-quantities). + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryAdjustQuantities("The information required to adjust inventory quantities." input: InventoryAdjustQuantitiesInput!): InventoryAdjustQuantitiesPayload + + """ + Activates or deactivates an inventory item at multiple locations. When you activate an [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) at a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location), that location can stock and track quantities for that item. When you deactivate an inventory item at a location, the inventory item is no longer stocked at that location. + + The mutation accepts an inventory item ID and a list of location-specific activation settings. It returns the updated inventory item and any activated [`InventoryLevel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) objects. + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). + """ + inventoryBulkToggleActivation("The ID of the inventory item to modify the activation status locations for." inventoryItemId: ID!, "A list of pairs of locations and activate status to update for the specified inventory item." inventoryItemUpdates: [InventoryBulkToggleActivationInput!]!): InventoryBulkToggleActivationPayload + + """ + Removes an inventory item's quantities from a location, and turns off inventory at the location. + """ + inventoryDeactivate("The ID of the inventory level to deactivate." inventoryLevelId: ID!): InventoryDeactivatePayload + + """ + Updates an [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem)'s properties including whether inventory is tracked, cost, SKU, and whether shipping is required. Inventory items represent the goods available to be shipped to customers. + """ + inventoryItemUpdate("The ID of the inventory item to update." id: ID!, "The input fields that update an\n[`inventoryItem`](https://shopify.dev/api/admin-graphql/latest/queries/inventoryitem)." input: InventoryItemInput!): InventoryItemUpdatePayload + + """ + Moves inventory quantities for a single inventory item between different states at a single location. Use this mutation to reallocate inventory across quantity states without moving it between locations. + + Each change specifies the quantity to move, the source state and location, and the destination state and location. The mutation returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) that tracks all changes made in a single operation, providing an audit trail with the reason and reference document URI. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryMoveQuantities("The information required to move inventory quantities." input: InventoryMoveQuantitiesInput!): InventoryMoveQuantitiesPayload + + """ + Sets an inventory item's on-hand quantities to specific absolute values at designated locations. The mutation takes a reason for tracking purposes and a reference document URI for audit trails. + + Returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) that tracks all changes made in this operation, including the delta values calculated from the previous quantities. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetOnHandQuantities("The information required to set inventory on hand quantities." input: InventorySetOnHandQuantitiesInput!): InventorySetOnHandQuantitiesPayload @deprecated(reason: "Use `inventorySetQuantities` to set on_hand or available quantites instead.") + + """ + Set quantities of specified name using absolute values. This mutation supports compare-and-set functionality to handle + concurrent requests properly. If `ignoreCompareQuantity` is not set to true, + the mutation will only update the quantity if the persisted quantity matches the `compareQuantity` value. + If the `compareQuantity` value does not match the persisted value, the mutation will return an error. In order to opt out + of the `compareQuantity` check, the `ignoreCompareQuantity` argument can be set to true. + + > Note: + > Only use this mutation if calling on behalf of a system that acts as the source of truth for inventory quantities, + > otherwise please consider using the [inventoryAdjustQuantities](https://shopify.dev/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) mutation. + > + > + > Opting out of the `compareQuantity` check can lead to inaccurate inventory quantities if multiple requests are made concurrently. + > It is recommended to always include the `compareQuantity` value to ensure the accuracy of the inventory quantities and to opt out + > of the check using `ignoreCompareQuantity` only when necessary. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetQuantities("The information required to set inventory quantities." input: InventorySetQuantitiesInput!): InventorySetQuantitiesPayload + + """ + Set up scheduled changes of inventory items. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetScheduledChanges("The input fields for setting up scheduled changes of inventory items." input: InventorySetScheduledChangesInput!): InventorySetScheduledChangesPayload @deprecated(reason: "Scheduled changes will be phased out in 2026-07.") + + """ + Adds items to an inventory shipment. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentAddItems("The ID of the inventory shipment to modify." id: ID!, "The list of line items to add to the inventory shipment." lineItems: [InventoryShipmentLineItemInput!]!): InventoryShipmentAddItemsPayload + + """ + Adds a draft shipment to an inventory transfer. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentCreate("The input fields for the inventory shipment." input: InventoryShipmentCreateInput!): InventoryShipmentCreatePayload + + """ + Adds an in-transit shipment to an inventory transfer. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentCreateInTransit("The input fields for the inventory shipment." input: InventoryShipmentCreateInput!): InventoryShipmentCreateInTransitPayload + + """ + Deletes an inventory shipment. Only draft shipments can be deleted. + """ + inventoryShipmentDelete("The ID of the inventory shipment to be deleted." id: ID!): InventoryShipmentDeletePayload + + """ + Marks a draft inventory shipment as in transit. + """ + inventoryShipmentMarkInTransit("The ID of the inventory shipment to mark in transit." id: ID!, "The date the shipment was shipped." dateShipped: DateTime): InventoryShipmentMarkInTransitPayload + + """ + Receive an inventory shipment. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentReceive("The ID of the inventory shipment to receive." id: ID!, "The list of receive line items for the inventory shipment." lineItems: [InventoryShipmentReceiveItemInput!], "The date the inventory shipment was initially received." dateReceived: DateTime, "The bulk receive action for the inventory shipment." bulkReceiveAction: InventoryShipmentReceiveLineItemReason): InventoryShipmentReceivePayload + + """ + Remove items from an inventory shipment. + """ + inventoryShipmentRemoveItems("The ID of the inventory shipment to remove items from." id: ID!, "A list of inventory shipment line item ids representing the items to be removed from the shipment." lineItems: [ID!]!): InventoryShipmentRemoveItemsPayload + + """ + Edits the tracking info on an inventory shipment. + """ + inventoryShipmentSetTracking("The ID of the inventory shipment whose tracking info is being edited." id: ID!, "The tracking info to edit on the inventory shipment." tracking: InventoryShipmentTrackingInput!): InventoryShipmentSetTrackingPayload + + """ + Updates items on an inventory shipment. + """ + inventoryShipmentUpdateItemQuantities("The ID of the inventory shipment to update item quantities." id: ID!, "The list of line items to be updated to the shipment." items: [InventoryShipmentUpdateItemQuantitiesInput!] = []): InventoryShipmentUpdateItemQuantitiesPayload + + """ + Cancels an inventory transfer. + """ + inventoryTransferCancel("The ID of the inventory transfer to cancel." id: ID!): InventoryTransferCancelPayload + + """ + Creates a draft inventory transfer to move inventory items between [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects in your store. The transfer tracks which items to move, their quantities, and the origin and destination locations. + + Use [`inventoryTransferMarkAsReadyToShip`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryTransferMarkAsReadyToShip) to mark the transfer as ready to ship. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferCreate("The input fields for the inventory transfer." input: InventoryTransferCreateInput!): InventoryTransferCreatePayload + + """ + Creates an inventory transfer in ready to ship. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferCreateAsReadyToShip("The input fields for the inventory transfer." input: InventoryTransferCreateAsReadyToShipInput!): InventoryTransferCreateAsReadyToShipPayload + + """ + Deletes an inventory transfer. + """ + inventoryTransferDelete("The ID of the inventory transfer to delete." id: ID!): InventoryTransferDeletePayload + + """ + This mutation allows duplicating an existing inventory transfer. The duplicated transfer will have the same + line items and quantities as the original transfer, but will be in a draft state with no shipments. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferDuplicate("The ID of the inventory transfer to duplicate." id: ID!): InventoryTransferDuplicatePayload + + """ + Edits an inventory transfer. + """ + inventoryTransferEdit("The ID of the inventory Transfer to be edited." id: ID!, "The input fields to edit the inventory transfer." input: InventoryTransferEditInput!): InventoryTransferEditPayload + + """ + Sets an inventory transfer to ready to ship. + """ + inventoryTransferMarkAsReadyToShip("The ID of the inventory transfer to mark as ready to ship." id: ID!): InventoryTransferMarkAsReadyToShipPayload + + """ + This mutation removes [`InventoryTransferLineItem`s](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem), + or portions of them, from a `DRAFT` or `READY_TO_SHIP` Transfer. + + For each referenced line item, if its entire quantity is still unallocated to a + shipment, the line item is removed; otherwise the line item remains on the + transfer with its quantity reduced to the allocated portion. Quantity allocated + to a shipment (whether the shipment is in draft, in transit, or already + received) is preserved. + + On `READY_TO_SHIP` transfers, removing items also returns the affected reserved + quantity to available inventory at the origin location. + + To change the quantity of a line item without removing it, use + [`inventoryTransferSetItems`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryTransferSetItems). + """ + inventoryTransferRemoveItems("The input fields for the InventoryTransferRemoveItems mutation." input: InventoryTransferRemoveItemsInput!): InventoryTransferRemoveItemsPayload + + """ + This mutation sets the quantity for one or more line items on a Transfer. + + Only the items you include in the `lineItems` field are updated. Items already on + the transfer but not referenced in your update will stay unchanged. Each inventory + item may appear at most once in `lineItems`; duplicate `inventoryItemId` entries + are rejected. + + For each entry in `lineItems`: + - If the inventory item isn't yet on the transfer, a new line item is added with + the provided quantity. + - If the inventory item is already on the transfer, the provided quantity + replaces the line item's [`processableQuantity`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem#field-InventoryTransferLineItem.fields.processableQuantity). + Any quantity outside the processable portion (for example, already shipped or + picked for shipment) is preserved, so the resulting total quantity equals the + preserved portion plus the provided quantity. + + Passing a quantity of `0` is only allowed for transfers in `DRAFT` status; on + `READY_TO_SHIP` or `IN_PROGRESS` transfers it returns an `INVALID_QUANTITY` error. + On `DRAFT` transfers, `quantity: 0` leaves a zero-quantity line item on the + transfer; it does not remove the item. To remove a line item from a transfer, use + [`inventoryTransferRemoveItems`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryTransferRemoveItems). + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferSetItems("The input fields for the InventoryTransferSetItems mutation." input: InventoryTransferSetItemsInput!): InventoryTransferSetItemsPayload + + """ + Activates a location so that you can stock inventory at the location. Refer to the + [`isActive`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-isactive) and + [`activatable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-activatable) + fields on the `Location` object. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + locationActivate("The ID of a location to activate." locationId: ID!): LocationActivatePayload + + """ + Adds a new [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) where you can stock inventory and fulfill orders. Locations represent physical places like warehouses, retail stores, or fulfillment centers. + + The location requires a name and address with at least a country code. You can specify whether the location fulfills online orders, which determines if its inventory is available for online sales. You can also attach custom [metafields](https://shopify.dev/docs/apps/build/custom-data) to store additional information about the location. + """ + locationAdd("The properties of the location to add." input: LocationAddInput!): LocationAddPayload + + """ + Deactivates a location and moves inventory, pending orders, and moving transfers " "to a destination location. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + locationDeactivate("The ID of a location to deactivate." locationId: ID!, "The ID of a destination location to which inventory, pending orders and moving transfers will be moved from the location to deactivate." destinationLocationId: ID): LocationDeactivatePayload + + """ + Deletes a location. + """ + locationDelete("The ID of a location to delete." locationId: ID!): LocationDeletePayload + + """ + Updates the properties of an existing [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). You can modify the location's name, address, whether it fulfills online orders, and custom [`metafields`](https://shopify.dev/docs/apps/build/custom-data). + + Apps that created a [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) can edit the associated location to ensure accurate representation of their fulfillment network. + + > Note: + > You can't disable the [`fulfillsOnlineOrders`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationEdit#arguments-input.fields.fulfillsOnlineOrders) setting for fulfillment service locations. + + Learn more about [editing locations for fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-2-edit-locations). + """ + locationEdit("The ID of a location to edit." id: ID!, "The updated properties for the location." input: LocationEditInput!): LocationEditPayload + + """ + Disables local pickup for a location. + """ + locationLocalPickupDisable("The ID of the location to disable local pickup for." locationId: ID!): LocationLocalPickupDisablePayload + + """ + Enables local pickup for a location so customers can collect their orders in person. Configures the estimated pickup time that customers see at checkout and optional instructions for finding or accessing the pickup location. + """ + locationLocalPickupEnable("The settings required to enable local pickup for a location." localPickupSettings: DeliveryLocationLocalPickupEnableInput!): LocationLocalPickupEnablePayload + + """ + Creates a [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) to deliver customized shopping experiences. Markets define various aspects of the buyer experience including pricing, product availability, custom content, inventory and fulfillment priorities, and payment methods. + + Define conditions to match buyers by region, company location, retail location, or other criteria. Configure [`MarketCurrencySettings`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketCurrencySettings) to control currency behavior. Set [`MarketPriceInclusions`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketPriceInclusions) to determine tax and duty display. Assign [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) objects and [`MarketWebPresence`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketWebPresence) configurations to control product availability and SEO strategy. + + Learn more about [Shopify Markets](https://shopify.dev/docs/apps/build/markets). + """ + marketCreate("The properties of the new market." input: MarketCreateInput!): MarketCreatePayload + + """ + Updates currency settings of a market. + """ + marketCurrencySettingsUpdate("The ID of the market definition to target." marketId: ID!, "Properties to update for the market currency settings." input: MarketCurrencySettingsUpdateInput!): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") + + """ + Deletes a market definition. + """ + marketDelete("The ID of the market to delete." id: ID!): MarketDeletePayload + + """ + Creates or updates market localizations. + """ + marketLocalizationsRegister("The ID of the resource that is being localized within the context of a market." resourceId: ID!, "The input fields for a market localization." marketLocalizations: [MarketLocalizationRegisterInput!]!): MarketLocalizationsRegisterPayload + + """ + Deletes market localizations. + """ + marketLocalizationsRemove("The ID of the resource for which market localizations are being deleted." resourceId: ID!, "The list of market localization keys." marketLocalizationKeys: [String!]!, "The list of market IDs." marketIds: [ID!]!): MarketLocalizationsRemovePayload + + """ + Deletes a market region. + """ + marketRegionDelete("The ID of the market region to delete." id: ID!): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Creates regions that belong to an existing market. + """ + marketRegionsCreate("The ID of the market to add the regions to." marketId: ID!, "The regions to be created." regions: [MarketRegionCreateInput!]!): MarketRegionsCreatePayload @deprecated(reason: "This mutation is deprecated and will be removed in the future. Use `marketCreate` or `marketUpdate` instead.") + + """ + Deletes a list of market regions. + """ + marketRegionsDelete("A list of IDs of the market regions to delete." ids: [ID!]!): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Updates the properties of a market. + """ + marketUpdate("The ID of the market to update." id: ID!, "The properties to update." input: MarketUpdateInput!): MarketUpdatePayload + + """ + Creates a web presence for a market. + """ + marketWebPresenceCreate("The ID of the market for which to create a web presence." marketId: ID!, "The details of the web presence to be created." webPresence: MarketWebPresenceCreateInput!): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") + + """ + Deletes a market web presence. + """ + marketWebPresenceDelete("The ID of the web presence to delete." webPresenceId: ID!): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") + + """ + Updates a market web presence. + """ + marketWebPresenceUpdate("The ID of the web presence to update." webPresenceId: ID!, "The web_presence fields used to update the market's web presence." webPresence: MarketWebPresenceUpdateInput!): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") + + """ + Deletes all external marketing activities. Deletion is performed by a background job, as it may take a bit of time to complete if a large number of activities are to be deleted. Attempting to create or modify external activities before the job has completed will result in the create/update/upsert mutation returning an error. + """ + marketingActivitiesDeleteAllExternal: MarketingActivitiesDeleteAllExternalPayload + + """ + Create new marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. + """ + marketingActivityCreate("The Input of marketing activity create." input: MarketingActivityCreateInput!): MarketingActivityCreatePayload + + """ + Creates a new external marketing activity. + """ + marketingActivityCreateExternal("The input field for creating an external marketing activity." input: MarketingActivityCreateExternalInput!): MarketingActivityCreateExternalPayload @deprecated(reason: "Use `marketingActivityUpsertExternal` instead.") + + """ + Deletes an external marketing activity. + """ + marketingActivityDeleteExternal("The ID of the marketing activity. A marketing activity ID or remote ID must be provided." marketingActivityId: ID, "A custom unique identifier for the marketing activity, which can be used to manage the activity and send engagement metrics without having to store our marketing activity ID in your systems. A marketing activity ID or remote ID must be provided." remoteId: String): MarketingActivityDeleteExternalPayload + + """ + Updates a marketing activity with the latest information. Marketing activity app extensions are deprecated and will be removed in the near future. + """ + marketingActivityUpdate("The Input of the marketing activity." input: MarketingActivityUpdateInput!): MarketingActivityUpdatePayload + + """ + Update an external marketing activity. + """ + marketingActivityUpdateExternal("The input field for updating an external marketing activity." input: MarketingActivityUpdateExternalInput!, "The ID of the marketing activity. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity." marketingActivityId: ID, "A custom unique identifier for the marketing activity, which can be used to manage the activity and send engagement metrics without having to store our marketing activity ID in your systems. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity." remoteId: String, "Specifies the [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated with a related marketing campaign. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity." utm: UTMInput): MarketingActivityUpdateExternalPayload + + """ + Creates a new external marketing activity or updates an existing one. When optional fields are absent or null, associated information will be removed from an existing marketing activity. + """ + marketingActivityUpsertExternal("The input field for creating or updating an external marketing activity." input: MarketingActivityUpsertExternalInput!): MarketingActivityUpsertExternalPayload + + """ + Creates a new marketing engagement for a marketing activity or a marketing channel. + """ + marketingEngagementCreate("The identifier of the marketing activity for which the engagement metrics are being provided. This or the remoteId should be set when and only when providing activity-level engagements. This should be nil when providing channel-level engagements." marketingActivityId: ID, "A custom unique identifier for the marketing activity, which can be used to manage the activity and send engagement metrics without having to store our marketing activity ID in your systems. This or the marketingActivityId should be set when and only when providing activity-level engagements. This should be nil when providing channel-level engagements." remoteId: String, "The unique string identifier of the channel to which the engagement metrics are being provided. This should be set when and only when providing channel-level engagements. This should be nil when providing activity-level engagements. For the correct handle for your channel, contact your partner manager." channelHandle: String, "The marketing engagement's attributes." marketingEngagement: MarketingEngagementInput!): MarketingEngagementCreatePayload + + """ + Marks channel-level engagement data such that it no longer appears in reports. + Activity-level data cannot be deleted directly, instead the MarketingActivity itself should be deleted to + hide it from reports. + """ + marketingEngagementsDelete("The handle of the channel for which engagement data should be deleted." channelHandle: String, "When true, engagements for all channels that belong to the api client will be deleted." deleteEngagementsForAllChannels: Boolean = false): MarketingEngagementsDeletePayload + + """ + Creates a navigation [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) for the online store. Menus organize links that help customers navigate to [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), [pages](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page), [blogs](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog), and custom URLs. + + Each menu requires a unique handle for identification and can contain multiple [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) objects with nested sub-items up to three levels deep. + """ + menuCreate("The menu's title." title: String!, "The menu's handle." handle: String!, "List of the menu's items." items: [MenuItemCreateInput!]!): MenuCreatePayload + + """ + Deletes a menu. + """ + menuDelete("The ID of the menu to be deleted." id: ID!): MenuDeletePayload + + """ + Updates a [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) for display on the storefront. Modifies the menu's title and navigation structure, including nested [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) objects. You can update the handle for non-default menus. + + The items argument accepts a list of menu items with their nested structure. Each item can include nested items to create multi-level navigation hierarchies. Default menus have restricted updates—you can't change their handles. + """ + menuUpdate("ID of the menu to be updated." id: ID!, "The menu's title." title: String!, "The menu's handle." handle: String, "List of the menu's items." items: [MenuItemUpdateInput!]!): MenuUpdatePayload + + """ + Creates a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) that establishes structure and validation rules for metafields. The definition specifies the data type, validation constraints, and access permissions for metafields with a given namespace and key combination. + + When you create a new definition, the system validates any existing unstructured metafields matching the same owner type, namespace, and key against it. The system updates each valid metafield's type to match the definition. Invalid metafields remain unchanged but must conform to the definition when updated. + + Learn more about [creating metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionCreate("Specifies the input fields for a metafield definition." definition: MetafieldDefinitionInput!): MetafieldDefinitionCreatePayload + + """ + Deletes a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition). You can identify the definition by providing either its owner type, namespace, and key, or its global ID. + + When you set [`deleteAllAssociatedMetafields`](https://shopify.dev/docs/api/admin-graphql/current/mutations/metafieldDefinitionDelete#arguments-deleteAllAssociatedMetafields) to `true`, the mutation asynchronously deletes all [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) objects that use this definition. This option must be `true` when deleting definitions under the `$app` namespace. + + Learn more about [deleting metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionDelete("The id of the metafield definition to delete. Using `identifier` is preferred." id: ID, "The identifier of the metafield definition to delete." identifier: MetafieldDefinitionIdentifierInput, "Whether to delete all associated metafields." deleteAllAssociatedMetafields: Boolean = false): MetafieldDefinitionDeletePayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionPin("The id of the metafield definition to pin. Using `identifier` is preferred." definitionId: ID, "The identifier of the metafield definition to pin." identifier: MetafieldDefinitionIdentifierInput): MetafieldDefinitionPinPayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionUnpin("The ID of the metafield definition to unpin. Using `identifier` is preferred." definitionId: ID, "The identifier of the metafield definition to unpin." identifier: MetafieldDefinitionIdentifierInput): MetafieldDefinitionUnpinPayload + + """ + Updates a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition)'s configuration and settings. You can modify the definition's name, description, validation rules, access settings, capabilities, and constraints. + + The mutation updates access settings that control visibility across different APIs, such as the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql), [Storefront API](https://shopify.dev/docs/api/storefront), and [Customer Account API](https://shopify.dev/docs/api/customer). It also enables capabilities like admin filtering or unique value validation, and modifies constraints that determine which resource subtypes the definition applies to. + + > Note: The type, namespace, key, and owner type identify the definition and so can't be changed. + + Learn more about [updating metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionUpdate("The input fields for the metafield definition update." definition: MetafieldDefinitionUpdateInput!): MetafieldDefinitionUpdatePayload + + """ + Deletes [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) objects in bulk by specifying combinations of owner ID, namespace, and key. + + Returns the identifiers of successfully deleted metafields. If a specified metafield doesn't exist, then the mutation still succeeds but returns `null` for that identifier in the response. + """ + metafieldsDelete("A list of identifiers specifying metafields to delete. At least one identifier must be specified." metafields: [MetafieldIdentifierInput!]!): MetafieldsDeletePayload + + """ + Sets metafield values. Metafield values will be set regardless if they were previously created or not. + + Allows a maximum of 25 metafields to be set at a time, with a maximum total request payload size of 10MB. + + This operation is atomic, meaning no changes are persisted if an error is encountered. + + As of `2024-07`, this operation supports compare-and-set functionality to better handle concurrent requests. + If `compareDigest` is set for any metafield, the mutation will only set that metafield if the persisted metafield value matches the digest used on `compareDigest`. + If the metafield doesn't exist yet, but you want to guarantee that the operation will run in a safe manner, set `compareDigest` to `null`. + The `compareDigest` value can be acquired by querying the metafield object and selecting `compareDigest` as a field. + If the `compareDigest` value does not match the digest for the persisted value, the mutation will return an error. + You can opt out of write guarantees by not sending `compareDigest` in the request. + """ + metafieldsSet("The list of metafield values to set. Maximum of 25." metafields: [MetafieldsSetInput!]!): MetafieldsSetPayload + + """ + Asynchronously delete metaobjects and their associated metafields in bulk. + """ + metaobjectBulkDelete("Specifies the condition by which metaobjects are deleted.\nExactly one field of input is required." where: MetaobjectBulkDeleteWhereCondition!): MetaobjectBulkDeletePayload + + """ + Creates a metaobject entry based on an existing [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition). The type must match a definition that already exists in the shop. + + Specify field values using key-value pairs that correspond to the field definitions. The mutation generates a unique handle automatically if you don't provide one. You can also configure capabilities like publishable status to control the metaobject's visibility across channels. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectCreate("The parameters for the metaobject to create." metaobject: MetaobjectCreateInput!): MetaobjectCreatePayload + + """ + Creates a metaobject definition that establishes the structure for custom data objects in your store. The definition specifies the fields, data types, and access permissions that all [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) entries of this type share. + + Use the `type` field to create a unique namespace for your metaobjects. Prefix the type with `$app:` to reserve the definition for your app's exclusive use. The definition can include capabilities like publishable status or translation eligibility, to extend how metaobjects integrate with Shopify's features. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitionCreate("The input fields for creating a metaobject definition." definition: MetaobjectDefinitionCreateInput!): MetaobjectDefinitionCreatePayload + + """ + Deletes the specified metaobject definition. + Also deletes all related metafield definitions, metaobjects, and metafields asynchronously. + """ + metaobjectDefinitionDelete("The ID of the metaobjects definition to delete." id: ID!): MetaobjectDefinitionDeletePayload + + """ + Updates a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition)'s configuration and field structure. You can modify the definition's name, description, display name key, access controls, and capabilities, as well as those of all its fields. + + The mutation supports reordering fields when `resetFieldOrder` is `true`, which arranges submitted fields first followed by alphabetized omitted fields. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitionUpdate("The ID of the metaobject definition to update." id: ID!, "The input fields for updating a metaobject definition." definition: MetaobjectDefinitionUpdateInput!): MetaobjectDefinitionUpdatePayload + + """ + Deletes the specified metaobject and its associated metafields. + """ + metaobjectDelete("The ID of the metaobject to delete." id: ID!): MetaobjectDeletePayload + + """ + Updates a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) with new field values, handle, or capabilities. [Metaobjects](https://shopify.dev/docs/apps/build/custom-data#what-are-metaobjects) are custom data structures that extend Shopify's data model. + + You can modify field values mapped to the metaobject's [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition), update the handle for a unique identifier, and adjust capabilities like publishing status. When updating the handle, you can optionally create a redirect from the old handle to maintain existing references. + """ + metaobjectUpdate("The ID of the metaobject to update." id: ID!, "Specifies parameters to update on the metaobject." metaobject: MetaobjectUpdateInput!): MetaobjectUpdatePayload + + """ + Creates or updates a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) based on its handle. If a metaobject with the specified handle exists, the mutation updates it with the provided field values. If no matching metaobject exists, the mutation creates a new one. + + The handle serves as a unique identifier within a metaobject type. Field values map to the [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition)'s field keys and overwrite existing values during updates. + """ + metaobjectUpsert("The identifier of the metaobject to upsert." handle: MetaobjectHandleInput!, "The parameters to upsert the metaobject." metaobject: MetaobjectUpsertInput!): MetaobjectUpsertPayload + + """ + Create a mobile platform application. + """ + mobilePlatformApplicationCreate("The input to create a mobile platform application." input: MobilePlatformApplicationCreateInput!): MobilePlatformApplicationCreatePayload + + """ + Delete a mobile platform application. + """ + mobilePlatformApplicationDelete("The ID of the Mobile Platform Application to be deleted." id: ID!): MobilePlatformApplicationDeletePayload + + """ + Update a mobile platform application. + """ + mobilePlatformApplicationUpdate("The ID of the Mobile Platform Application to be updated." id: ID!, "The input to updat a Mobile Platform Application." input: MobilePlatformApplicationUpdateInput!): MobilePlatformApplicationUpdatePayload + + """ + Cancels an order, with options for refunding, restocking inventory, and customer notification. + + > Caution: + > Order cancellation is irreversible. An order that has been cancelled can't be restored to its original state. + + Use the `orderCancel` mutation to programmatically cancel orders in scenarios such as: + + - Customer-requested cancellations due to size, color, or other preference changes + - Payment processing failures or declined transactions + - Fraud detection and prevention + - Insufficient inventory availability + - Staff errors in order processing + - Wholesale or B2B order management workflows + + The `orderCancel` mutation provides flexible refund options including refunding to original payment methods + or issuing store credit. If a payment was only authorized (temporarily held) but not yet charged, + that hold will be automatically released when the order is cancelled, even if you choose not to refund other payments. + + The mutation supports different cancellation reasons: customer requests, payment declines, fraud, + inventory issues, staff errors, or other unspecified reasons. Each cancellation can include optional + staff notes for internal documentation (notes aren't visible to customers). + + An order can only be cancelled if it meets the following criteria: + + - The order hasn't already been cancelled. + - The order has no pending payment authorizations. + - The order has no active returns in progress. + - The order has no outstanding fulfillments that can't be cancelled. + + Orders might be assigned to locations that become + [deactivated](https://help.shopify.com/manual/fulfillment/setup/locations-management#deactivate-and-reactivate-locations) + after the order was created. When cancelling such orders, inventory behavior depends on payment status: + + - **Paid orders**: Cancellation will fail with an error if restocking is enabled, since inventory + can't be returned to deactivated locations. + - **Unpaid orders**: Cancellation succeeds but inventory is not restocked anywhere, even when the + restock option is enabled. The committed inventory effectively becomes unavailable rather than being + returned to stock at the deactivated location. + + After you cancel an order, you can still make limited updates to certain fields (like + notes and tags) using the + [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate). + + For partial refunds or more complex refund scenarios on active orders, + such as refunding only specific line items while keeping the rest of the order fulfilled, + consider using the [`refundCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/refundCreate) + mutation instead of full order cancellation. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCancel("The ID of the order to be canceled." orderId: ID!, "Indicates whether to refund the amount paid by the customer. Authorized payments will be voided regardless of this setting." refund: Boolean @deprecated(reason: "Use `refundMethod` instead."), "Indicates how to refund the amount paid by the customer. Authorized payments will be voided regardless of this setting." refundMethod: OrderCancelRefundMethodInput, "Whether to restock the inventory committed to the order. For unpaid orders fulfilled from locations that have been deactivated, inventory will not be restocked to the deactivated locations even if this argument is set to true." restock: Boolean!, "The reason for canceling the order." reason: OrderCancelReason!, "Whether to send a notification to the customer about the order cancellation." notifyCustomer: Boolean = false, "A staff-facing note about the order cancellation. This is not visible to the customer. Maximum length of 255 characters." staffNote: String = null): OrderCancelPayload + + """ + Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously + reserved by an authorization transaction. + + The `orderCapture` mutation can be used in the following scenarios: + + - To capture the full amount of an authorized transaction + - To capture a partial payment by specifying an amount less than the total order amount + - To perform multiple captures on the same order, as long as the order transaction is + [multi-capturable](https://shopify.dev/docs/api/admin-graphql/latest/objects/ordertransaction#field-OrderTransaction.fields.multiCapturable) + + > Note: + > Multi-capture functionality is only available to stores on a + [Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan). + For multi-currency orders, the [`currency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.currency) + field is required and should match the presentment currency from the order. + + After capturing a payment, you can: + + - View the transaction details including status, amount, and processing information. + - Track the captured amount in both shop and presentment currencies. + - Monitor the transaction's settlement status. + + Learn more about [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction). + """ + orderCapture("The input for the mutation." input: OrderCaptureInput!): OrderCapturePayload + + """ + Marks an open [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) as closed. A closed order is one where merchants fulfill or cancel all [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects and complete all financial transactions. + + Once closed, the order indicates that no further work is required. The order's [`closedAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-closedAt) timestamp is set when this mutation completes successfully. + """ + orderClose("The input for the mutation." input: OrderCloseInput!): OrderClosePayload + + """ + Creates an order with attributes such as customer information, line items, and shipping and billing addresses. + + Use the `orderCreate` mutation to programmatically generate orders in scenarios where + orders aren't created through the standard checkout process, such as when importing orders from an external + system or creating orders for wholesale customers. + + The `orderCreate` mutation doesn't support applying multiple discounts, such as discounts on line items. + Automatic discounts won't be applied unless you replicate the logic of those discounts in your custom + implementation. You can [apply a discount code](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCreateDiscountCodeInput), + but only one discount code can be set for each order. + + > Note: + > If you're using the `orderCreate` mutation with a + > [trial](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/free-trial) or + > [development store](https://shopify.dev/docs/api/development-stores), then you can create a + > maximum of five new orders per minute. + + After you create an order, you can make subsequent edits to the order using one of the following mutations: + * [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate): + Used for simple updates to an order, such as changing the order's note, tags, or customer information. + * [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin): + Used when you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCreate("The attributes of the new order." order: OrderCreateOrderInput!, "The strategies for updating inventory and whether to send shipping and order confirmations to customers." options: OrderCreateOptionsInput): OrderCreatePayload + + """ + Creates a payment for an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) using a stored [`PaymentMandate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentMandate). A payment mandate represents the customer's authorization to charge their payment method for deferred payments, such as pre-orders or try-before-you-buy purchases. + + The mutation processes the payment asynchronously and returns a [`Job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) for tracking the payment status. You can specify the payment amount to collect, and use the [`autoCapture`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateMandatePayment#arguments-autoCapture) argument to either immediately capture the payment or only authorize it for later capture. Each payment request requires a unique [`idempotencyKey`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateMandatePayment#arguments-idempotencyKey) to prevent duplicate charges. Subsequent calls with the same key return the original payment result rather than creating a new payment. + + Learn more about [deferred payments and payment mandates](https://shopify.dev/docs/apps/build/purchase-options/deferred#charging-the-remaining-balance) and [idempotent requests](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + orderCreateMandatePayment("The ID of the order to collect the balance for." id: ID!, "The ID of the payment schedule to collect the balance for." paymentScheduleId: ID, "A unique key to identify the payment request." idempotencyKey: String!, "The mandate ID used for payment." mandateId: ID!, "The payment amount to collect." amount: MoneyInput, "Whether the payment should be authorized or captured. If `false`, then the authorization of\n the payment is triggered." autoCapture: Boolean = true): OrderCreateMandatePaymentPayload + + """ + Records a manual payment for an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) that isn't fully paid. Use this mutation to track payments received outside the standard checkout process, such as cash, check, bank transfer, or other offline payment methods. + + You can specify the payment [amount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-amount), [method name](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-paymentMethodName), and [when it was processed](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-processedAt). + """ + orderCreateManualPayment("The ID of the order to create a manual payment for." id: ID!, "The manual payment amount to be created." amount: MoneyInput, "The name of the payment method used for creating the payment. If none is provided, then the default manual payment method ('Other') will be used." paymentMethodName: String, "The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when a manual payment was processed. If you're importing transactions from an app or another platform, then you can set processedAt to a date and time in the past to match when the original transaction was created." processedAt: DateTime): OrderCreateManualPaymentPayload + + """ + Removes customer from an order. + """ + orderCustomerRemove("The ID of the order having its customer removed." orderId: ID!): OrderCustomerRemovePayload + + """ + Sets a customer on an order. + """ + orderCustomerSet("The ID of the order having a customer set." orderId: ID!, "The ID of the customer being set on the order." customerId: ID!): OrderCustomerSetPayload + + """ + Permanently deletes an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) from the store. + + You can only delete [specific order types](https://help.shopify.com/manual/orders/cancel-delete-order#delete-an-order). Other orders you can cancel using the [`orderCancel`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCancel) mutation instead. + + > Caution: + > This action is irreversible. You can't recover deleted orders. + """ + orderDelete("The ID of the order to be deleted." orderId: ID!): OrderDeletePayload + + """ + Adds a custom line item to an existing [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). Custom line items represent products or services not in your catalog, such as gift wrapping, installation fees, or one-off charges. + + Creates a [`CalculatedLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedLineItem) with the specified title, price, and quantity. Changes remain in the edit session until you commit them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [adding custom line items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders#add-a-custom-line-item). + """ + orderEditAddCustomItem("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit to which the custom item is added." id: ID!, "The name of the custom item to add." title: String!, "The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/location)\n(if applicable) from which the custom item is sold. Used for tax calculations. A default location will be chosen automatically if none is provided." locationId: ID, "The unit price of the custom item. This value can't be negative." price: MoneyInput!, "The quantity of the custom item. This value must be greater than zero." quantity: Int!, "Whether the custom item is taxable. Defaults to `true`." taxable: Boolean, "Whether the custom item requires shipping. Defaults to `false`." requiresShipping: Boolean): OrderEditAddCustomItemPayload + + """ + Applies a discount to a [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) during an order edit session. The discount can be either a fixed amount or percentage value. + + To modify pricing on specific line items, use this mutation after starting an order edit with the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) mutation. The changes remain staged until you commit them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditAddLineItemDiscount("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit." id: ID!, "The ID of the calculated line item to add the discount to." lineItemId: ID!, "The discount to add to the line item." discount: OrderEditAppliedDiscountInput!): OrderEditAddLineItemDiscountPayload + + """ + Adds a custom shipping line to an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) during an edit session. Specify the shipping title and price to create a new [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine). + + Returns a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) showing the order with edits applied but not yet saved. To save your changes, use the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditAddShippingLine("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit to which the shipping line is added." id: ID!, "The shipping line to be added." shippingLine: OrderEditAddShippingLineInput!): OrderEditAddShippingLinePayload + + """ + Adds a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) as a line item to an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) that's being edited. The mutation respects the variant's contextual pricing. + + You can specify a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) to check for inventory availability and control whether duplicate variants are allowed. The [`quantity`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant#arguments-quantity) must be a positive value. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders#add-a-new-variant). + """ + orderEditAddVariant("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit." id: ID!, "The ID of the variant to add." variantId: ID!, "The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location)\nto check for inventory availability. Used for tax calculations. A default location ID is chosen automatically if none is provided." locationId: ID, "The quantity of the item to add to the order. Must be a positive value." quantity: Int!, "Whether the mutation can create a line item for a variant that's already on the calculated order." allowDuplicates: Boolean = false): OrderEditAddVariantPayload + + """ + Starts an order editing session that enables you to modify an existing [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). This mutation creates an [`OrderEditSession`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderEditSession) and returns a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) showing how the order looks with your changes applied. + + Order editing follows a three-step workflow: Begin the edit with [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin), apply changes using mutations like [`orderEditAddVariant`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant) or [`orderEditSetQuantity`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditSetQuantity), and then save the changes with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. The session tracks all staged changes until you commit or abandon them. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditBegin("The ID of the order to begin editing." id: ID!): OrderEditBeginPayload + + """ + Applies staged changes from an order editing session to the original order. This finalizes all modifications made during the edit session, including changes to line items, quantities, discounts, and shipping lines. + + Order editing follows a three-step workflow: start with [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) to create an editing session, apply changes using various orderEdit mutations, and then save the changes with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. The mutation can optionally notify the customer of changes and add staff notes for internal tracking. + + You can only edit unfulfilled line items. If an edit changes the total order value, then the customer might need to pay a balance or receive a refund. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditCommit("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session that will have its changes applied to the order." id: ID!, "Whether to notify the customer or not." notifyCustomer: Boolean, "Note for staff members." staffNote: String): OrderEditCommitPayload + + """ + Removes a discount on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveDiscount("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit from which the discount is removed." id: ID!, "The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication)\nto remove." discountApplicationId: ID!): OrderEditRemoveDiscountPayload + + """ + Removes a line item discount that was applied as part of an order edit. + """ + orderEditRemoveLineItemDiscount("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit from which the line item discount is removed." id: ID!, "The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication)\nto remove." discountApplicationId: ID!): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") + + """ + Removes a shipping line from an existing order. For more information on how to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveShippingLine("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit from which the shipping line is removed." id: ID!, "The ID of the calculated shipping line to remove." shippingLineId: ID!): OrderEditRemoveShippingLinePayload + + """ + Sets the quantity of a line item on an order that's being edited. Use this mutation to increase, decrease, or remove items by adjusting their quantities. + + Setting the quantity to zero effectively removes the line item from the order. The item still exists as a data structure with zero quantity. When decreasing quantities, you can optionally restock the removed items to inventory by setting the `restock` parameter to `true`. + + Learn more about [editing workflows for existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditSetQuantity("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. The edit changes the quantity on the line item." id: ID!, "The ID of the calculated line item to edit." lineItemId: ID!, "The new quantity to set for the line item. This value cannot be negative." quantity: Int!, "Whether or not to restock the line item when the updated quantity is less than the original quantity." restock: Boolean, "The ID of the location. If 'restock' is set to true, the restocked item will be made available\nat the specified location." locationId: ID @deprecated(reason: "No longer supported.")): OrderEditSetQuantityPayload + + """ + Updates a manual line level discount on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditUpdateDiscount("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit used to update the discount." id: ID!, "The updated discount." discount: OrderEditAppliedDiscountInput!, "The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication)\nto update." discountApplicationId: ID!): OrderEditUpdateDiscountPayload + + """ + Updates a shipping line on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditUpdateShippingLine("The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)\nor the order edit session to edit. This is the edit used to update the shipping line." id: ID!, "The updated shipping line." shippingLine: OrderEditUpdateShippingLineInput!, "The ID of the calculated shipping line to update." shippingLineId: ID!): OrderEditUpdateShippingLinePayload + + """ + Sends an email invoice for an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + You can customize the email recipient, sender, and subject line using the [`email`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email) argument. + + > Note: + > Use store or staff account email addresses for the [`from`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email.fields.from) and [`bcc`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email.fields.bcc) input fields. + """ + orderInvoiceSend("The order associated with the invoice." id: ID!, "The email input fields for the order invoice. The `bcc` and `from` fields should be store or staff account emails." email: EmailInput): OrderInvoiceSendPayload + + """ + Marks an order as paid by recording a payment transaction for the outstanding amount. + + Use the `orderMarkAsPaid` mutation to record payments received outside the standard checkout + process. The `orderMarkAsPaid` mutation is particularly useful in scenarios where: + + - Orders were created with manual payment methods (cash on delivery, bank deposit, money order) + - Payments were received offline and need to be recorded in the system + - Previously authorized payments need to be captured manually + - Orders require manual payment reconciliation due to external payment processing + + The mutation validates that the order can be marked as paid before processing. + An order can be marked as paid only if it has a positive outstanding balance and its + [financial status](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) + isn't already `PAID`. The mutation will either create a new sale transaction for the full + outstanding amount or capture an existing authorized transaction, depending on the order's current payment state. + + After successfully marking an order as paid, the order's financial status is updated to + reflect the payment, and payment events are logged for tracking and analytics + purposes. + + Learn more about [managing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + in apps. + """ + orderMarkAsPaid("The input for the mutation." input: OrderMarkAsPaidInput!): OrderMarkAsPaidPayload + + """ + Opens a closed order. + """ + orderOpen("The input for the mutation." input: OrderOpenInput!): OrderOpenPayload + + """ + Creates a fraud risk assessment for a specific order, evaluating the likelihood that the order is fraudulent based on various risk signals. Use this to trigger risk analysis on orders that need manual review or to integrate custom risk scoring into order processing workflows. + """ + orderRiskAssessmentCreate("The input fields required to create a risk assessment." orderRiskAssessmentInput: OrderRiskAssessmentCreateInput!): OrderRiskAssessmentCreatePayload + + """ + Updates the attributes of an order, such as the customer's email, the shipping address for the order, + tags, and [metafields](https://shopify.dev/docs/apps/build/custom-data) associated with the order. + + If you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts, then use + the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) + mutation instead. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + If you need to remove a customer from an order, then use the [`orderCustomerRemove`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCustomerRemove) + mutation instead. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderUpdate("The attributes of the updated order." input: OrderInput!): OrderUpdatePayload + + """ + Creates a [`Page`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page) for the online store. + + Pages contain custom content like "About Us" or "Contact" information that merchants display outside their product catalog. The page requires a [`title`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.title) and can include HTML content, publishing settings, and custom [template suffixes](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.templateSuffix). You can control visibility through the [`isPublished`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.isPublished) flag or schedule publication with a specific date. + + The mutation returns the complete page object upon successful creation or validation errors if the input is invalid. + """ + pageCreate("The properties of the new page." page: PageCreateInput!): PageCreatePayload + + """ + Permanently deletes a page from the online store. + + For example, merchants might delete seasonal landing pages after campaigns end, or remove outdated policy pages when terms change. + + Use the `pageDelete` mutation to: + - Remove outdated or unnecessary pages + - Clean up seasonal landing pages + - Delete duplicate pages + + The deletion is permanent and returns the deleted page's ID for confirmation. + """ + pageDelete("The ID of the page to be deleted." id: ID!): PageDeletePayload + + """ + Updates an existing page's content and settings. + + For example, merchants can update their "Shipping Policy" page when rates change, or refresh their "About Us" page with new team information. + + Use the `pageUpdate` mutation to: + - Update page content and titles + - Modify publication status + - Change page handles for URL structure + - Adjust template settings + + The mutation supports partial updates, allowing specific changes while preserving other page properties. + """ + pageUpdate("The ID of the page to be updated." id: ID!, "The properties of the page to be updated." page: PageUpdateInput!): PageUpdatePayload + + """ + Activates or deactivates payment customizations for the shop. Payment customizations allow apps to hide, reorder, or rename payment methods at checkout based on cart contents, customer attributes, or other conditions. Use this to toggle customizations on or off without deleting them. + """ + paymentCustomizationActivation("The global IDs of the payment customizations." ids: [ID!]!, "The enabled status of the payment customizations." enabled: Boolean!): PaymentCustomizationActivationPayload + + """ + Creates a new payment customization for the shop. Payment customizations let apps modify the payment methods shown at checkout — hiding, reordering, or renaming options based on cart contents, customer attributes, or other business logic. + """ + paymentCustomizationCreate("The input data used to create the payment customization." paymentCustomization: PaymentCustomizationInput!): PaymentCustomizationCreatePayload + + """ + Permanently deletes a payment customization. Once deleted, the customization will no longer affect which payment methods appear at checkout. + """ + paymentCustomizationDelete("The global ID of the payment customization." id: ID!): PaymentCustomizationDeletePayload + + """ + Updates an existing payment customization, modifying its configuration for how payment methods are displayed at checkout. Use this to change the customization's title or enabled state. The customization's function can't be changed once set; create a new payment customization to use a different function. + """ + paymentCustomizationUpdate("The global ID of the payment customization." id: ID!, "The input data used to update the payment customization." paymentCustomization: PaymentCustomizationInput!): PaymentCustomizationUpdatePayload + + """ + Sends an email payment reminder for a payment schedule. + """ + paymentReminderSend("The payment schedule id associated with the reminder." paymentScheduleId: ID!): PaymentReminderSendPayload + + """ + Create payment terms on an order. To create payment terms on a draft order, use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsCreate("Specifies the reference orderId to add the payment terms for." referenceId: ID!, "The attributes used to create the payment terms." paymentTermsAttributes: PaymentTermsCreateInput!): PaymentTermsCreatePayload + + """ + Delete payment terms for an order. To delete payment terms on a draft order, use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsDelete("The input fields used to delete the payment terms." input: PaymentTermsDeleteInput!): PaymentTermsDeletePayload + + """ + Update payment terms on an order. To update payment terms on a draft order, use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsUpdate("The input fields used to update the payment terms." input: PaymentTermsUpdateInput!): PaymentTermsUpdatePayload + + """ + Creates a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Price lists enable contextual pricing by defining fixed prices or percentage-based adjustments. + + The price list requires a unique name, currency for fixed prices, and parent adjustment settings that determine how the system calculates prices relative to base prices. To apply contextual pricing, link the price list to a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). When that catalog's context is matched, customers receive the price list's prices. + + Learn more about [building catalogs with price lists](https://shopify.dev/docs/apps/build/markets/build-catalog#step-2-associate-a-price-list-with-the-catalog). + """ + priceListCreate("The properties of the new price list." input: PriceListCreateInput!): PriceListCreatePayload + + """ + Deletes a price list. For example, you can delete a price list so that it no longer applies for products in the associated market. + """ + priceListDelete("The ID of the price list to be deleted." id: ID!): PriceListDeletePayload + + """ + Creates or updates fixed prices on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Use this mutation to set specific prices for [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects that override the price list's default percentage-based adjustments. + + When you add fixed prices, the mutation replaces any existing fixed prices for those variants on the price list. + """ + priceListFixedPricesAdd("The ID of the price list to which the fixed prices will be added or updated." priceListId: ID!, "The list of fixed prices to add or update in the price list." prices: [PriceListPriceInput!]!): PriceListFixedPricesAddPayload + + """ + Sets or removes fixed prices for all variants of a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Simplifies pricing management when all variants of a product should have the same price on a price list, rather than setting individual variant prices. + + When you add a fixed price for a product, all its [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects receive the same price on the price list. When you remove a product's fixed prices, all variant prices revert to the price list's adjustment rules. + """ + priceListFixedPricesByProductUpdate("A list of `PriceListProductPriceInput` that identifies which products to update the fixed prices for." pricesToAdd: [PriceListProductPriceInput!], "A list of product IDs that identifies which products to remove the fixed prices for." pricesToDeleteByProductIds: [ID!], "The price list to update the prices for." priceListId: ID!): PriceListFixedPricesByProductUpdatePayload + + """ + Deletes specific fixed prices from a price list using a product variant ID. You can use the `priceListFixedPricesDelete` mutation to delete a set of fixed prices from a price list. After deleting the set of fixed prices from the price list, the price of each product variant reverts to the original price that was determined by the price list adjustment. + """ + priceListFixedPricesDelete("The ID of the price list from which the fixed prices will be removed." priceListId: ID!, "A list of product variant IDs whose fixed prices will be removed from the price list." variantIds: [ID!]!): PriceListFixedPricesDeletePayload + + """ + Updates fixed prices on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). This mutation lets you add new fixed prices for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects and remove existing prices in a single operation. + + Use this mutation to modify variant pricing on a price list by providing prices to add and variant IDs to delete. + + Learn more about [setting fixed prices for product variants](https://shopify.dev/docs/apps/build/markets/build-catalog#step-3-set-fixed-prices-for-specific-product-variants). + """ + priceListFixedPricesUpdate("The price list that the prices will be updated against." priceListId: ID!, "The fixed prices to add." pricesToAdd: [PriceListPriceInput!]!, "A list of product variant IDs to remove from the price list." variantIdsToDelete: [ID!]!): PriceListFixedPricesUpdatePayload + + """ + Updates a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList)'s configuration, including its name, currency, [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) association, and pricing adjustments. + + Changing the currency removes all fixed prices from the price list. The affected [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects revert to prices calculated from the price list's adjustment settings. + """ + priceListUpdate("The ID of the price list to update." id: ID!, "The input data used to update the price list." input: PriceListUpdateInput!): PriceListUpdatePayload + + """ + Disable a shop's privacy features. + """ + privacyFeaturesDisable("The list of privacy features to disable." featuresToDisable: [PrivacyFeaturesEnum!]!): PrivacyFeaturesDisablePayload + + """ + Creates a product bundle that groups multiple [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects together as components. The bundle appears as a single product in the store, with its price determined by the parent product and inventory calculated from the component products. + + The mutation runs asynchronously and returns a [`ProductBundleOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleOperation) object to track the creation status. Poll the operation using the [`productOperation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/productOperation) query to determine when the bundle is ready. + + Learn more about [creating product fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle#step-1-create-a-bundle). + """ + productBundleCreate("Input for creating a product bundle or componentized product." input: ProductBundleCreateInput!): ProductBundleCreatePayload + + """ + Updates a product bundle or componentized product. + """ + productBundleUpdate("Input for updating a product bundle or componentized product." input: ProductBundleUpdateInput!): ProductBundleUpdatePayload + + """ + Changes the status of a product. This allows you to set the availability of the product across all channels. + """ + productChangeStatus("The ID of the product." productId: ID!, "The status to be assigned to the product." status: ProductStatus!): ProductChangeStatusPayload @deprecated(reason: "Use `productUpdate` instead.") + + """ + Creates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productCreate` mutation helps you create many products at once, avoiding the tedious or time-consuming + process of adding them one by one in the Shopify admin. Common examples include creating products for a + new collection, launching a new product line, or adding seasonal products. + + You can define product + [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue), + allowing you to create products with different variations like sizes or colors. You can also associate media + files to your products, including images and videos. + + The `productCreate` mutation only supports creating a product with its initial + [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To create multiple product variants for a single product and manage prices, use the + [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + mutation. + + > Note: + > The `productCreate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be created per day. + + After you create a product, you can make subsequent edits to the product using one of the following mutations: + + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers. The `productCreate` mutation creates products + in an unpublished state by default, so you must perform a separate operation to publish the product. + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Used to update a single product, such as changing the product's title, description, vendor, or associated media. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productCreate("The properties of the new product." input: ProductInput @deprecated(reason: "Use `product` instead."), "The attributes of the new product." product: ProductCreateInput, "The media to add to the product." media: [CreateMediaInput!]): ProductCreatePayload + + """ + Adds media files to a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), such as images, videos, or 3D models. Media files enhance product listings by providing visual representations that help customers understand the product. + + The mutation accepts an array of [`CreateMediaInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CreateMediaInput) objects, each specifying the source URL, content type, and optional alt text. + + You can add multiple media files in a single request. The mutation adds all valid files and returns errors for any invalid ones. + """ + productCreateMedia("Specifies the product associated with the media." productId: ID!, "List of new media to be added to a product." media: [CreateMediaInput!]!): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") + + """ + Permanently deletes a product and all its associated data, including variants, media, publications, and inventory items. + + Use the `productDelete` mutation to programmatically remove products from your store when they need to be + permanently deleted from your catalog, such as when removing discontinued items, cleaning up test data, or + synchronizing with external inventory management systems. + + The `productDelete` mutation removes the product from all associated collections, + and removes all associated data for the product, including: + + - All product variants and their inventory items + - Product media (images, videos) that are not referenced by other products + - [Product options](https://shopify.dev/api/admin-graphql/latest/objects/ProductOption) and [option values](https://shopify.dev/api/admin-graphql/latest/objects/ProductOptionValue) + - Product publications across all sales channels + - Product tags and metadata associations + + The `productDelete` mutation also has the following effects on existing orders and transactions: + + - **Draft orders**: Existing draft orders that reference this product will retain the product information as stored data, but the product reference will be removed. Draft orders can still be completed with the stored product details. + - **Completed orders and refunds**: Previously completed orders that included this product aren't affected. The product information in completed orders is preserved for record-keeping, and existing refunds for this product remain valid and processable. + + > Caution: + > Product deletion is irreversible. After a product is deleted, it can't be recovered. Consider archiving + > or unpublishing products instead if you might need to restore them later. + + If you need to delete a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/objects/Location), + you might encounter timeout errors. To avoid these timeout errors, you can set the + [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productDelete#arguments-synchronous) + parameter to `false` to run the deletion asynchronously, which returns a + [`ProductDeleteOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductDeleteOperation) + that you can monitor for completion status. + + If you need more granular control over product cleanup, consider using these alternative mutations: + + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Update the product status to archived or unpublished instead of deleting. + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete): + Delete specific variants while keeping the product. + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete): + Delete the choices available for a product, such as size, color, or material. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model). + """ + productDelete("Specifies the product to delete by its ID." input: ProductDeleteInput!, "Specifies whether or not to run the mutation synchronously." synchronous: Boolean = true): ProductDeletePayload + + """ + Deletes media from a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), such as images, videos, and 3D models. + + When you delete media images, the mutation also removes any corresponding product images. The mutation returns the IDs of both the deleted media and any product images that the deletion removed. + + > Caution: + > This action is irreversible. You can't recover deleted media. + """ + productDeleteMedia("Specifies the product ID from which the media will be deleted." productId: ID!, "The media IDs to be deleted." mediaIds: [ID!]!): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Duplicates a product. + + If you need to duplicate a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/input-objects/ProductVariantInput) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/input-objects/InventoryLevelInput), + you might encounter timeout errors. + + To avoid these timeout errors, you can instead duplicate the product asynchronously. + + In API version 2024-10 and higher, include `synchronous: false` argument in this mutation to perform the duplication asynchronously. + + In API version 2024-07 and lower, use the asynchronous [`ProductDuplicateAsyncV2`](https://shopify.dev/api/admin-graphql/2024-07/mutations/productDuplicateAsyncV2). + + Metafield values are not duplicated if the unique values capability is enabled. + """ + productDuplicate("The ID of the product to be duplicated." productId: ID!, "The new title of the product." newTitle: String!, "The new status of the product. If no value is provided the status will be inherited from the original product." newStatus: ProductStatus, "Specifies whether or not to duplicate images." includeImages: Boolean = false, "Specifies whether or not to duplicate translations." includeTranslations: Boolean = false, "Specifies whether or not to run the mutation synchronously." synchronous: Boolean = true): ProductDuplicatePayload + + """ + Creates a product feed for a specific publication. + """ + productFeedCreate("The properties of the new product feed." input: ProductFeedInput): ProductFeedCreatePayload + + """ + Deletes a product feed for a specific publication. + """ + productFeedDelete("The ID of the product feed to be deleted." id: ID!): ProductFeedDeletePayload + + """ + Runs the full product sync for a given shop. + """ + productFullSync("Syncs only products that haven't changed since the specified timestamp." beforeUpdatedAt: DateTime, "The product feed which needs syncing." id: ID!, "Syncs only products that have changed since the specified timestamp." updatedAtSince: DateTime): ProductFullSyncPayload + + """ + Adds multiple selling plan groups to a product. + """ + productJoinSellingPlanGroups("The ID of the product." id: ID!, "The IDs of the selling plan groups to add." sellingPlanGroupIds: [ID!]!): ProductJoinSellingPlanGroupsPayload + + """ + Removes multiple groups from a product. + """ + productLeaveSellingPlanGroups("The ID of the product." id: ID!, "The IDs of the selling plan groups to add." sellingPlanGroupIds: [ID!]!): ProductLeaveSellingPlanGroupsPayload + + """ + Updates an [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + on a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as size, color, or material. Each option includes a name, position, and a list of values. The combination + of a product option and value creates a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + + Use the `productOptionUpdate` mutation for the following use cases: + + - **Update product choices**: Modify an existing option, like "Size" (Small, Medium, Large) or + "Color" (Red, Blue, Green), so customers can select their preferred variant. + - **Enable personalization features**: Update an option (for example, "Engraving text") to let customers customize their purchase. + - **Offer seasonal or limited edition products**: Update a value + (for example, "Holiday red") on an existing option to support limited-time or seasonal variants. + - **Integrate with apps that manage product configuration**: Allow third-party apps to update options, like + "Bundle size", when customers select or customize + [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). + - **Link options to metafields**: Associate a product option with a custom + [metafield](https://shopify.dev/docs/apps/build/custom-data), like "Fabric code", for + richer integrations with other systems or apps. + + > Note: + > The `productOptionUpdate` mutation enforces strict data integrity for product options and variants. + All option positions must be sequential, and every option should be used by at least one variant. + + After you update a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionUpdate("Option to update." option: OptionUpdateInput!, "The ID of the Product the Option belongs to." productId: ID!, "New option values to create." optionValuesToAdd: [OptionValueCreateInput!], "Existing option values to update." optionValuesToUpdate: [OptionValueUpdateInput!], "IDs of the existing option values to delete." optionValuesToDelete: [ID!], "The strategy defines which behavior the mutation should observe regarding variants,\nsuch as creating variants or deleting them in response to option values to add or to delete.\nIf not provided or set to null, the strategy `LEAVE_AS_IS` will be used." variantStrategy: ProductOptionUpdateVariantStrategy): ProductOptionUpdatePayload + + """ + Creates one or more [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + on a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as size, color, or material. Each option includes a name, position, and a list of values. The combination + of a product option and value creates a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + + Use the `productOptionsCreate` mutation for the following use cases: + + - **Add product choices**: Add a new option, like "Size" (Small, Medium, Large) or + "Color" (Red, Blue, Green), to an existing product so customers can select their preferred variant. + - **Enable personalization features**: Add options such as "Engraving text" to let customers customize their purchase. + - **Offer seasonal or limited edition products**: Add a new value + (for example, "Holiday red") to an existing option to support limited-time or seasonal variants. + - **Integrate with apps that manage product configuration**: Allow third-party apps to add options, like + "Bundle size", when customers select or customize + [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). + - **Link options to metafields**: Associate a product option with a custom + [metafield](https://shopify.dev/docs/apps/build/custom-data), like "Fabric code", for + richer integrations with other systems or apps. + + > Note: + > The `productOptionsCreate` mutation enforces strict data integrity for product options and variants. + All option positions must be sequential, and every option should be used by at least one variant. + If you use the [`CREATE` variant strategy](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate#arguments-variantStrategy.enums.CREATE), consider the maximum allowed number of variants for each product is 2048. + + After you create product options, you can further manage a product's configuration using related mutations: + + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsCreate("The ID of the product to update." productId: ID!, "Options to add to the product." options: [OptionCreateInput!]!, "The strategy defines which behavior the mutation should observe regarding variants.\nIf not provided or set to null, the strategy `LEAVE_AS_IS` will be used." variantStrategy: ProductOptionCreateVariantStrategy = LEAVE_AS_IS): ProductOptionsCreatePayload + + """ + Deletes one or more [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + from a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). Product options + define the choices available for a product, such as size, color, or material. + + > Caution: + > Removing an option can affect a product's + > [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) and their + > configuration. Deleting an option might also delete associated option values and, depending on the chosen + > [strategy](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productoptionsdelete#arguments-strategy), + > might affect variants. + + Use the `productOptionsDelete` mutation for the following use cases: + + - **Simplify product configuration**: Remove obsolete or unnecessary options + (for example, discontinue "Material" if all variants are now the same material). + - **Clean up after seasonal or limited-time offerings**: Delete options that are no longer + relevant (for example, "Holiday edition"). + - **Automate catalog management**: Enable apps or integrations to programmatically remove options as product + data changes. + + > Note: + > The `productOptionsDelete` mutation enforces strict data integrity for product options and variants. + > All option positions must remain sequential, and every remaining option must be used by at least one variant. + + After you delete a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsDelete("ID of the product from which to delete the options." productId: ID!, "IDs of the options to delete from the product." options: [ID!]!, "The strategy defines which behavior the mutation should observe,such as how to handle a situation where deleting an option would result in duplicate variants." strategy: ProductOptionDeleteStrategy = DEFAULT): ProductOptionsDeletePayload + + """ + Reorders the [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [option values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue) on a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + updating the order in which [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + are presented to customers. + + The `productOptionsReorder` mutation accepts a list of product options, each identified by `id` or `name`, and an + optional list of values (also by `id` or `name`) specifying the new order. The order of options in the + mutation's input determines their new positions (for example, the first option becomes `option1`). + The order of values within each option determines their new positions. The mutation recalculates the order of + variants based on the new option and value order. + + Suppose a product has the following variants: + + 1. `"Red / Small"` + 2. `"Green / Medium"` + 3. `"Blue / Small"` + + You reorder options and values: + + ``` + options: [ + { name: "Size", values: [{ name: "Small" }, { name: "Medium" }] }, + { name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } + ] + ``` + + The resulting variant order will be: + + 1. `"Small / Green"` + 2. `"Small / Red"` + 3. `"Small / Blue"` + 4. `"Medium / Green"` + + Use the `productOptionsReorder` mutation for the following use cases: + + - **Change the order of product options**: For example, display "Color" before "Size" in a store. + - **Reorder option values within an option**: For example, show "Red" before "Blue" in a color picker. + - **Control the order of product variants**: The order of options and their values determines the sequence in which variants are listed and selected. + - **Highlight best-selling options**: Present the most popular or relevant options and values first. + - **Promote merchandising strategies**: Highlight seasonal colors, limited editions, or featured sizes. + + > Note: + > The `productOptionsReorder` mutation enforces strict data integrity for product options and variants. + > All option positions must be sequential, and every option should be used by at least one variant. + + After you reorder product options, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [managing product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsReorder("The ID of the product to update." productId: ID!, "Options to reorder on the product." options: [OptionReorderInput!]!): ProductOptionsReorderPayload + + """ + Publishes a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) to specified [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) objects. + + Products sold exclusively on subscription (`requiresSellingPlan: true`) can only be published to online stores. + """ + productPublish("Specifies the product to publish and the channels to publish it to." input: ProductPublishInput!): ProductPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Reorders [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Media) attached to a product, changing their sequence in product displays. The operation processes asynchronously to handle [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) with large media collections. + + Specify the [product ID](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productReorderMedia#arguments-id) and an array of [moves](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productReorderMedia#arguments-moves), where each move contains a media ID and its new zero-based position. + + > Note: + > Only include media items that need repositioning. Unchanged items maintain their relative order automatically. + + The mutation returns a [`Job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) to track the reordering progress. Poll the job status to determine when the operation completes and media positions update across all sales channels. + + Learn more about [reordering product media](https://shopify.dev/docs/apps/build/online-store/product-media#step-6-reorder-media-objects). + """ + productReorderMedia("The ID of the product on which to reorder medias." id: ID!, "A list of moves to perform which will be evaluated in order." moves: [MoveInput!]!): ProductReorderMediaPayload + + """ + Performs multiple operations to create or update products in a single request. + + Use the `productSet` mutation to sync information from an external data source into Shopify, manage large + product catalogs, and perform batch updates. The mutation is helpful for bulk product management, including price + adjustments, inventory updates, and product lifecycle management. + + The behavior of `productSet` depends on the type of field it's modifying: + + - **For list fields**: Creates new entries, updates existing entries, and deletes existing entries + that aren't included in the mutation's input. Common examples of list fields include + [`collections`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.collections), + [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.metafields), + and [`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.variants). + + - **For all other field types**: Updates only the included fields. Any omitted fields will remain unchanged. + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + You can run `productSet` in one of the following modes: + + - **Synchronously**: Returns the updated product in the response. + - **Asynchronously**: Returns a [`ProductSetOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductSetOperation) object. + Use the [`productOperation`](https://shopify.dev/api/admin-graphql/latest/queries/productOperation) query to check the status of the operation and + retrieve details of the updated product and its product variants. + + If you need to only manage product variants, then use one of the following mutations: + + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete) + + If you need to only manage product options, then use one of the following mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about [syncing product data from an external source](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/sync-data). + """ + productSet("The properties of the newly created or updated product." input: ProductSetInput!, "Whether the mutation should be run synchronously or asynchronously.\n\nIf `true`, the mutation will return the updated `product`.\n\nIf `false`, the mutation will return a `productSetOperation`.\n\nDefaults to `true`.\n\nSetting `synchronous: false` may be desirable depending on the input complexity/size, and should be used if you are experiencing timeouts.\n\n**Note**: When run in the context of a\n[bulk operation](https://shopify.dev/api/usage/bulk-operations/imports), the mutation will\nalways run synchronously and this argument will be ignored." synchronous: Boolean = true, "Specifies the identifier that will be used to lookup the resource." identifier: ProductSetIdentifiers): ProductSetPayload + + """ + Unpublishes a product. + """ + productUnpublish("Specifies the product to unpublish and the channel to unpublish it from." input: ProductUnpublishInput!): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productUpdate` mutation helps you modify many products at once, avoiding the tedious or time-consuming + process of updating them one by one in the Shopify admin. Common examples including updating + product details like status or tags. + + The `productUpdate` mutation doesn't support updating + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To update multiple product variants for a single product and manage prices, use the + [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + mutation. + + > Note: + > The `productUpdate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be updated per day. + + After updating a product, you can make additional changes using one of the following mutations: + + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers, if the product is currently unpublished. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productUpdate("The updated properties for a product." input: ProductInput @deprecated(reason: "Use `product` instead."), "The updated properties for a product." product: ProductUpdateInput, "List of new media to be added to the product." media: [CreateMediaInput!]): ProductUpdatePayload + + """ + Updates properties of media attached to a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). You can modify alt text for accessibility or change preview images for existing media items. + + Provide the product ID and an array of [`UpdateMediaInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/UpdateMediaInput) objects. Each update specifies the media's ID and the properties to change. Updates apply only to media already attached to the product and don't affect their position in the product gallery. + """ + productUpdateMedia("Specifies the product on which media will be updated." productId: ID!, "A list of media updates." media: [UpdateMediaInput!]!): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Appends existing media from a product to specific variants of that product, creating associations between media files and particular product options. This allows different variants to showcase relevant images or videos. + + For example, a t-shirt product might have color variants where each color variant displays only the images showing that specific color, helping customers see exactly what they're purchasing. + + Use `ProductVariantAppendMedia` to: + - Associate specific images with product variants for accurate display + - Build variant-specific media management in product interfaces + - Implement automated media assignment based on variant attributes + + The operation links existing product media to variants without duplicating files, maintaining efficient media storage while enabling variant-specific displays. + + Learn more about [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + """ + productVariantAppendMedia("Specifies the product associated to the media." productId: ID!, "A list of pairs of variants and media to be attached to the variants." variantMedia: [ProductVariantAppendMediaInput!]!): ProductVariantAppendMediaPayload + + """ + Detaches media from product variants. + """ + productVariantDetachMedia("Specifies the product to which the variants and media are associated." productId: ID!, "A list of pairs of variants and media to be deleted from the variants." variantMedia: [ProductVariantDetachMediaInput!]!): ProductVariantDetachMediaPayload + + """ + Adds multiple selling plan groups to a product variant. + """ + productVariantJoinSellingPlanGroups("The ID of the product variant." id: ID!, "The IDs of the selling plan groups to add." sellingPlanGroupIds: [ID!]!): ProductVariantJoinSellingPlanGroupsPayload + + """ + Remove multiple groups from a product variant. + """ + productVariantLeaveSellingPlanGroups("The ID of the product variant." id: ID!, "The IDs of the selling plan groups to leave." sellingPlanGroupIds: [ID!]!): ProductVariantLeaveSellingPlanGroupsPayload + + """ + Creates new bundles, updates component quantities in existing bundles, and removes bundle components for one or multiple [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. + + Each bundle variant can contain up to 30 component variants with specified quantities. After an app assigns components to a bundle, only that app can manage those components. + + > Note: + > For most use cases, use [`productBundleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleCreate) instead, which creates product fixed bundles. `productVariantRelationshipBulkUpdate` is for [variant fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-variant-fixed-bundle), where each variant has its own component configuration. + """ + productVariantRelationshipBulkUpdate("The input options for the product variant being updated." input: [ProductVariantRelationshipUpdateInput!]!): ProductVariantRelationshipBulkUpdatePayload + + """ + Creates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkCreate` mutation to efficiently add new product variants—such as different sizes, + colors, or materials—to an existing product. The mutation is helpful if you need to add product variants in bulk, + such as importing from an external system. + + The mutation supports: + + - Creating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using one of the following mutations: + + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate): + Updates multiple product variants for a single product in one operation. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkCreate("An array of product variants to be created." variants: [ProductVariantsBulkInput!]!, "The ID of the product on which to create the variants." productId: ID!, "List of new media to be added to the product." media: [CreateMediaInput!], "The strategy defines which behavior the mutation should observe, such as whether to keep or delete the standalone variant (when product has only a single or default variant) when creating new variants in bulk." strategy: ProductVariantsBulkCreateStrategy = DEFAULT): ProductVariantsBulkCreatePayload + + """ + Deletes multiple variants in a single [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). Specify the product ID and an array of variant IDs to remove variants in bulk. You can call this mutation directly or through the [`bulkOperationRunMutation`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunMutation) mutation. Returns the updated product and any [`UserError`](https://shopify.dev/docs/api/admin-graphql/latest/objects/UserError) objects. + """ + productVariantsBulkDelete("An array of product variants IDs to delete." variantsIds: [ID!]!, "The ID of the product with the variants to update." productId: ID!): ProductVariantsBulkDeletePayload + + """ + Reorders multiple variants in a single product. This mutation can be called directly or via the bulkOperation. + """ + productVariantsBulkReorder("The product ID of the variants to be reordered." productId: ID!, "An array of variant positions." positions: [ProductVariantPositionInput!]!): ProductVariantsBulkReorderPayload + + """ + Updates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkUpdate` mutation to efficiently modify product variants—such as different sizes, + colors, or materials—associated with an existing product. The mutation is helpful if you need to update a + product's variants in bulk, such as importing from an external system. + + The mutation supports: + + - Updating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using the + [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) mutation, + which is used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkUpdate("An array of product variants to update." variants: [ProductVariantsBulkInput!]!, "The ID of the product associated with the variants to update." productId: ID!, "List of new media to be added to the product." media: [CreateMediaInput!], "When partial updates are allowed, valid variant changes may be persisted even if some of\nthe variants updated have invalid data and cannot be persisted.\nWhen partial updates are not allowed, any error will prevent all variants from updating." allowPartialUpdates: Boolean = false): ProductVariantsBulkUpdatePayload + + """ + Updates the server pixel to connect to a Google PubSub endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + pubSubServerPixelUpdate("The Google PubSub project ID." pubSubProject: String!, "The Google PubSub topic ID." pubSubTopic: String!): PubSubServerPixelUpdatePayload + + """ + Creates a webhook subscription that notifies your [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling. + + This mutation configures webhook delivery to a Google Cloud Pub/Sub topic. You can filter events using [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only relevant webhooks, control which data fields are included in webhook payloads, and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + pubSubWebhookSubscriptionCreate("The type of event that triggers the webhook." topic: WebhookSubscriptionTopic!, "Specifies the input fields for a Google Cloud Pub/Sub webhook subscription." webhookSubscription: PubSubWebhookSubscriptionInput!): PubSubWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates a Google Cloud Pub/Sub webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + pubSubWebhookSubscriptionUpdate("The ID of the webhook subscription to update." id: ID!, "Specifies the input fields for a Google Cloud Pub/Sub webhook subscription." webhookSubscription: PubSubWebhookSubscriptionInput!): PubSubWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Creates a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) that controls which [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) customers can access through a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). + + ### When to create a publication + + Publications are **optional** for catalogs. Only create a publication if you need to control which products are visible in a specific catalog context. When a publication isn't associated with a catalog, product availability is determined by the sales channel. + + **Create a publication if you need to:** + - Restrict product visibility to a subset of your inventory for a specific market or company location + - Publish different product selections to different contexts + + **Do NOT create a publication if:** + - You want product availability determined by the sales channel + - You only need custom pricing (use a price list on the catalog instead) + + ### Configuration options + + You can create an empty publication and add products later, or prepopulate it with all existing products. The [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publicationCreate#arguments-input.fields.autoPublish) field determines whether the publication automatically adds newly created products. + """ + publicationCreate("The input fields to use when creating the publication." input: PublicationCreateInput!): PublicationCreatePayload + + """ + Deletes a publication. + """ + publicationDelete("The ID of the publication to delete." id: ID!): PublicationDeletePayload + + """ + Updates a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + You can add or remove [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) from the publication, with a maximum of 50 items per operation. The [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publicationUpdate#arguments-input.fields.autoPublish) field determines whether new products automatically display in this publication. + """ + publicationUpdate("The ID of the publication to update." id: ID!, "The input fields to use when updating the publication." input: PublicationUpdateInput!): PublicationUpdatePayload + + """ + Publishes a resource, such as a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), to one or more [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + For products to be visible in a channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). Products sold exclusively on subscription (`requiresSellingPlan: true`) can only be published to online stores. + + You can schedule future publication by providing a publish date. Only online store channels support [scheduled publishing](https://shopify.dev/docs/apps/build/sales-channels/scheduled-product-publishing). + """ + publishablePublish("The resource to create or update publications for." id: ID!, "Specifies the input fields required to publish a resource." input: [PublicationInput!]!): PublishablePublishPayload + + """ + Publishes a resource to the current [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) associated with the requesting app. The system determines the current channel by the app's API client ID. Resources include [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) objects that implement the [`Publishable`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Publishable) interface. + + For products to be visible in the channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). Products sold exclusively on subscription ([`requiresSellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product#field-Product.fields.requiresSellingPlan): `true`) can only be published to online stores. + """ + publishablePublishToCurrentChannel("The resource to create or update publications for." id: ID!): PublishablePublishToCurrentChannelPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Unpublishes a resource, such as a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), from one or more [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). The resource remains in your store but becomes unavailable to customers. + + For products to be visible in a channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). + """ + publishableUnpublish("The resource to delete or update publications for." id: ID!, "Specifies the input fields required to unpublish a resource." input: [PublicationInput!]!): PublishableUnpublishPayload + + """ + Unpublishes a resource from the current channel. If the resource is a product, then it's visible in the channel only if the product status is `active`. + """ + publishableUnpublishToCurrentChannel("The resource to delete or update publications for." id: ID!): PublishableUnpublishToCurrentChannelPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates quantity pricing on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. You can set fixed prices (see [`PriceListPrice`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceListPrice)), quantity rules, and quantity price breaks in a single operation. + + [`QuantityRule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/QuantityRule) objects define minimum, maximum, and increment constraints for ordering. [`QuantityPriceBreak`](https://shopify.dev/docs/api/admin-graphql/latest/objects/QuantityPriceBreak) objects offer tiered pricing based on purchase volume. + + The mutation executes delete operations before create operations and doesn't allow partial updates. + + > Note: If any requested change fails, then the mutation doesn't apply any of the changes. + """ + quantityPricingByVariantUpdate("The ID of the price list for which quantity pricing will be updated." priceListId: ID!, "The input data used to update the quantity pricing in the price list." input: QuantityPricingByVariantUpdateInput!): QuantityPricingByVariantUpdatePayload + + """ + Creates or updates existing quantity rules on a price list. + You can use the `quantityRulesAdd` mutation to set order level minimums, maximumums and increments for specific product variants. + """ + quantityRulesAdd("The ID of the price list to which the quantity rules will be added or updated." priceListId: ID!, "The list of quantity rules to add or update in the price list." quantityRules: [QuantityRuleInput!]!): QuantityRulesAddPayload + + """ + Deletes specific quantity rules from a price list using a product variant ID. + You can use the `quantityRulesDelete` mutation to delete a set of quantity rules from a price list. + """ + quantityRulesDelete("The ID of the price list from which the quantity rules will be deleted." priceListId: ID!, "A list of product variant IDs whose quantity rules will be removed from the price list." variantIds: [ID!]!): QuantityRulesDeletePayload + + """ + Creates a refund for an order, allowing you to process returns and issue payments back to customers. + + Use the `refundCreate` mutation to programmatically process refunds in scenarios where you need to + return money to customers, such as when handling returns, processing chargebacks, or correcting + order errors. + + The `refundCreate` mutation supports various refund scenarios: + + - Refunding line items with optional restocking + - Refunding shipping costs + - Refunding duties and import taxes + - Refunding additional fees + - Processing refunds through different payment methods + - Issuing store credit refunds (when enabled) + + You can create both full and partial refunds, and optionally allow over-refunding in specific + cases. + + After creating a refund, you can track its status and details through the order's + [`refunds`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.refunds) + field. The refund is associated with the order and can be used for reporting and reconciliation purposes. + + Learn more about + [managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + and [refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties). + + > Note: + > The refunding behavior of the `refundCreate` mutation is similar to the + [`refundReturn`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnRefund) + mutation. The key difference is that the `refundCreate` mutation lets you to specify restocking behavior + for line items, whereas the `returnRefund` mutation focuses solely on handling the financial refund without + any restocking input. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + refundCreate("The input fields that are used in the mutation for creating a refund." input: RefundInput!): RefundCreatePayload + + """ + Removes return and/or exchange lines from a return. + """ + removeFromReturn("The ID of the return for line item removal." returnId: ID!, "The return line items to remove from the return." returnLineItems: [ReturnLineItemRemoveFromReturnInput!], "The exchange line items to remove from the return." exchangeLineItems: [ExchangeLineItemRemoveFromReturnInput!]): RemoveFromReturnPayload + + """ + Approves a customer's return request. + If this mutation is successful, then the `Return.status` field of the + approved return is set to `OPEN`. + """ + returnApproveRequest("The input fields to approve a return." input: ReturnApproveRequestInput!): ReturnApproveRequestPayload + + """ + Cancels a return and restores the items back to being fulfilled. + Canceling a return is only available before any work has been done + on the return (such as an inspection or refund). + """ + returnCancel("The ID of the return to cancel." id: ID!, "Whether the customer receives an email notification regarding the canceled return." notifyCustomer: Boolean = false @deprecated(reason: "Not supported. This argument will be removed in a future version.")): ReturnCancelPayload + + """ + Indicates a return is complete, either when a refund has been made and items restocked, + or simply when it has been marked as returned in the system. + """ + returnClose("The ID of the return to close." id: ID!): ReturnClosePayload + + """ + Creates a return from an existing order that has at least one fulfilled + [line item](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + that hasn't yet been refunded. If you create a return on an archived order, then the order is automatically + unarchived. + + Use the `returnCreate` mutation when your workflow involves + [approving](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnApproveRequest) or + [declining](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnDeclineRequest) requested returns + outside of the Shopify platform. + + The `returnCreate` mutation performs the following actions: + + - Creates a return in the `OPEN` state, and assumes that the return request from the customer has already been + approved + - Creates a [reverse fulfillment order](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), + and enables you to create a [reverse delivery](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) + for the reverse fulfillment order + + After you've created a return, use the + [`return`](https://shopify.dev/docs/api/admin-graphql/latest/queries/return) query to retrieve the + return by its ID. Learn more about providing a + [return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + for merchants. + """ + returnCreate("Specifies the input fields for a return." returnInput: ReturnInput!): ReturnCreatePayload + + """ + Declines a return on an order. + When a return is declined, each `ReturnLineItem.fulfillmentLineItem` can be associated to a new return. + Use the `ReturnCreate` or `ReturnRequest` mutation to initiate a new return. + """ + returnDeclineRequest("The input fields for declining a customer's return request." input: ReturnDeclineRequestInput!): ReturnDeclineRequestPayload + + """ + Removes return lines from a return. + """ + returnLineItemRemoveFromReturn("The ID of the return for line item removal." returnId: ID!, "The return line items to remove from the return." returnLineItems: [ReturnLineItemRemoveFromReturnInput!]!): ReturnLineItemRemoveFromReturnPayload @deprecated(reason: "Use `removeFromReturn` instead.") + + """ + Processes a return by confirming which items customers return and exchange, handling their disposition, and optionally issuing refunds. This mutation confirms the quantities for [`ReturnLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnLineItem) and [`ExchangeLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ExchangeLineItem) objects previously created on the [`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return). + + For returned items, you specify how to handle them through dispositions such as restocking or disposal. The mutation creates [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects for exchange items and records all transactions in the merchant's financial reports. You can optionally issue refunds through financial transfers, apply refund duties, and refund shipping costs. + + Learn more about [processing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnProcess("Specifies the input fields for processing a return." input: ReturnProcessInput!): ReturnProcessPayload + + """ + Creates a refund for items being returned when the return status is `OPEN` or `CLOSED`. This mutation processes the financial aspects of a return by refunding line items, shipping costs, and duties back to the customer. + """ + returnRefund("The input fields to refund a return." returnRefundInput: ReturnRefundInput!): ReturnRefundPayload @deprecated(reason: "Use `returnProcess` instead.") + + """ + Reopens a closed return. + """ + returnReopen("The ID of the return to reopen." id: ID!): ReturnReopenPayload + + """ + Creates a return request that requires merchant approval before processing. The return has its status set to `REQUESTED` and the merchant must approve or decline it. + + Use this mutation when customers initiate returns that need review. After creating a requested return, use [`returnApproveRequest`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnApproveRequest) to approve it or [`returnDeclineRequest`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnDeclineRequest) to decline it. + + For returns that should be immediately open for processing, use the [`returnCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnCreate) mutation instead. + + Learn more about [building return management workflows](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnRequest("The input fields for requesting a return." input: ReturnRequestInput!): ReturnRequestPayload + + """ + Creates a new reverse delivery with associated external shipping information. + """ + reverseDeliveryCreateWithShipping("The ID of the reverse fulfillment order that's associated to the reverse delivery." reverseFulfillmentOrderId: ID!, "The reverse delivery line items to be created. If an empty array is provided, then this mutation\n will create a reverse delivery line item for each reverse fulfillment order line item, with its quantity equal\n to the reverse fulfillment order line item total quantity." reverseDeliveryLineItems: [ReverseDeliveryLineItemInput!]!, "The tracking information for the reverse delivery." trackingInput: ReverseDeliveryTrackingInput = null, "The return label file information for the reverse delivery." labelInput: ReverseDeliveryLabelInput = null, "When `true` the customer is notified with delivery instructions if the `ReverseFulfillmentOrder.order.email` is present." notifyCustomer: Boolean = true): ReverseDeliveryCreateWithShippingPayload + + """ + Updates a reverse delivery with associated external shipping information. + """ + reverseDeliveryShippingUpdate("The ID of the reverse delivery to update." reverseDeliveryId: ID!, "The tracking information for the reverse delivery." trackingInput: ReverseDeliveryTrackingInput = null, "The return label file information for the reverse delivery." labelInput: ReverseDeliveryLabelInput = null, "If `true` and an email address exists on the `ReverseFulfillmentOrder.order`, then the customer is notified with the updated delivery instructions." notifyCustomer: Boolean = true): ReverseDeliveryShippingUpdatePayload + + """ + Disposes reverse fulfillment order line items. + """ + reverseFulfillmentOrderDispose("The input parameters required to dispose reverse fulfillment order line items." dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]!): ReverseFulfillmentOrderDisposePayload + + """ + Creates a saved search. + """ + savedSearchCreate("Specifies the input fields for a saved search." input: SavedSearchCreateInput!): SavedSearchCreatePayload + + """ + Delete a saved search. + """ + savedSearchDelete("The input fields to delete a saved search." input: SavedSearchDeleteInput!): SavedSearchDeletePayload + + """ + Updates a saved search. + """ + savedSearchUpdate("The input fields to update a saved search." input: SavedSearchUpdateInput!): SavedSearchUpdatePayload + + """ +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + + Creates a new script tag. + """ + scriptTagCreate("The input fields for a script tag." input: ScriptTagInput!): ScriptTagCreatePayload + + """ +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + + Deletes a script tag. + """ + scriptTagDelete("The ID of the script tag to delete." id: ID!): ScriptTagDeletePayload + + """ +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + + Updates a script tag. + """ + scriptTagUpdate("The ID of the script tag to update." id: ID!, "Specifies the input fields for a script tag." input: ScriptTagInput!): ScriptTagUpdatePayload + + """ + Creates a segment. + """ + segmentCreate("The name of the segment to be created. Segment names must be unique." name: String!, "A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as `email_subscription_status = 'SUBSCRIBED'` with [this syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference)." query: String!): SegmentCreatePayload + + """ + Deletes a segment. + """ + segmentDelete("Specifies the segment to delete." id: ID!): SegmentDeletePayload + + """ + Updates a segment. + """ + segmentUpdate("Specifies the segment to be updated." id: ID!, "The new name for the segment." name: String, "A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as `email_subscription_status = 'SUBSCRIBED'` with [this syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference)." query: String): SegmentUpdatePayload + + """ + Adds multiple product variants to a selling plan group. + """ + sellingPlanGroupAddProductVariants("The ID of the selling plan group." id: ID!, "The IDs of the product variants to add." productVariantIds: [ID!]!): SellingPlanGroupAddProductVariantsPayload + + """ + Adds multiple products to a selling plan group. + """ + sellingPlanGroupAddProducts("The ID of the selling plan group." id: ID!, "The IDs of the products to add." productIds: [ID!]!): SellingPlanGroupAddProductsPayload + + """ + Creates a selling plan group that defines how products can be sold and purchased. A selling plan group represents a selling method such as "Subscribe and save", "Pre-order", or "Try before you buy" and contains one or more selling plans with specific billing, delivery, and pricing policies. + + Use the [`resources`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate#arguments-resources) argument to associate products or product variants with the group during creation. You can also add products later using [`sellingPlanGroupAddProducts`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupAddProducts) or [`sellingPlanGroupAddProductVariants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupAddProductVariants). + + Learn more about [building selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan#step-1-create-a-selling-plan-group) or explore [examples of creating TBYB and other selling plan groups](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate?example=create-a-tbyb-selling-plan-group). + """ + sellingPlanGroupCreate("The properties of the new Selling Plan Group." input: SellingPlanGroupInput!, "The resources this Selling Plan Group should be applied to." resources: SellingPlanGroupResourceInput): SellingPlanGroupCreatePayload + + """ + Delete a Selling Plan Group. This does not affect subscription contracts. + """ + sellingPlanGroupDelete("The id of the selling plan group to delete." id: ID!): SellingPlanGroupDeletePayload + + """ + Removes multiple product variants from a selling plan group. + """ + sellingPlanGroupRemoveProductVariants("The ID of the selling plan group." id: ID!, "The IDs of the product variants to remove." productVariantIds: [ID!]!): SellingPlanGroupRemoveProductVariantsPayload + + """ + Removes multiple products from a selling plan group. + """ + sellingPlanGroupRemoveProducts("The ID of the selling plan group." id: ID!, "The IDs of the products to remove." productIds: [ID!]!): SellingPlanGroupRemoveProductsPayload + + """ + Update a Selling Plan Group. + """ + sellingPlanGroupUpdate("The Selling Plan Group to update." id: ID!, "The properties of the Selling Plan Group to update." input: SellingPlanGroupInput!): SellingPlanGroupUpdatePayload + + """ + Creates a new unconfigured server pixel. A single server pixel can exist for an app and shop combination. If you call this mutation when a server pixel already exists, then an error will return. + """ + serverPixelCreate: ServerPixelCreatePayload + + """ + Deletes the Server Pixel associated with the current app & shop. + """ + serverPixelDelete: ServerPixelDeletePayload + + """ + Deletes a shipping package. + """ + shippingPackageDelete("The ID of the shipping package to remove." id: ID!): ShippingPackageDeletePayload + + """ + Set a shipping package as the default. + The default shipping package is the one used to calculate shipping costs on checkout. + """ + shippingPackageMakeDefault("The ID of the shipping package to set as the default." id: ID!): ShippingPackageMakeDefaultPayload + + """ + Updates a shipping package. + """ + shippingPackageUpdate("The ID of the shipping package to update." id: ID!, "Specifies the input fields for a shipping package." shippingPackage: CustomShippingPackageInput!): ShippingPackageUpdatePayload + + """ + Deletes a locale for a shop. This also deletes all translations of this locale. + """ + shopLocaleDisable("ISO code of the locale to delete." locale: String!): ShopLocaleDisablePayload + + """ + Adds a locale for a shop. The newly added locale is in the unpublished state. + """ + shopLocaleEnable("ISO code of the locale to enable." locale: String!, "The list of markets web presences to add the locale to." marketWebPresenceIds: [ID!]): ShopLocaleEnablePayload + + """ + Updates a locale for a shop. + """ + shopLocaleUpdate("ISO code of the locale to update." locale: String!, "Specifies the input fields for a shop locale." shopLocale: ShopLocaleInput!): ShopLocaleUpdatePayload + + """ + Updates a shop policy. + """ + shopPolicyUpdate("The properties to use when updating the shop policy." shopPolicy: ShopPolicyInput!): ShopPolicyUpdatePayload + + """ + The `ResourceFeedback` object lets your app report the status of shops and their resources. For example, if + your app is a marketplace channel, then you can use resource feedback to alert merchants that they need to connect their marketplace account by signing in. + + Resource feedback notifications are displayed to the merchant on the home screen of their Shopify admin, and in the product details view for any products that are published to your app. + + This resource should be used only in cases where you're describing steps that a merchant is required to complete. If your app offers optional or promotional set-up steps, or if it makes recommendations, then don't use resource feedback to let merchants know about them. + + ## Sending feedback on a shop + + You can send resource feedback on a shop to let the merchant know what steps they need to take to make sure that your app is set up correctly. Feedback can have one of two states: `REQUIRES_ACTION` or `ACCEPTED`. You need to send a `REQUIRES_ACTION` feedback request for each step that the merchant is required to complete. + + If there are multiple set-up steps that require merchant action, then send feedback with a state of `REQUIRES_ACTION` as merchants complete prior steps. When all required actions are resolved, send an `ACCEPTED` feedback request to clear the active feedback signal. + + ### Clearing feedback with ACCEPTED + Sending `state: ACCEPTED` removes the active feedback entry. After this mutation succeeds, reading `channel.resourceFeedback`, `app.feedback`, or the `feedback` field on this payload may return `null`—this is expected behavior, not a mutation failure. A `null` result means no outstanding feedback exists for the channel. + + ### Important + Sending feedback replaces previously sent feedback for the shop. Send a new `shopResourceFeedbackCreate` mutation to push the latest state of a shop or its resources to Shopify. + """ + shopResourceFeedbackCreate("The fields required to create shop feedback." input: ResourceFeedbackCreateInput!): ShopResourceFeedbackCreatePayload + + """ + Creates an alternate currency payout for a Shopify Payments account. + """ + shopifyPaymentsPayoutAlternateCurrencyCreate("The ID of the Shopify Payments account on which the mutation is being performed." accountId: ID, "The currency of the balance to payout." currency: CurrencyCode!): ShopifyPaymentsPayoutAlternateCurrencyCreatePayload + + """ + Generates the URL and signed paramaters needed to upload an asset to Shopify. + """ + stagedUploadTargetGenerate("The input fields for generating a staged upload." input: StagedUploadTargetGenerateInput!): StagedUploadTargetGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Uploads multiple images. + """ + stagedUploadTargetsGenerate("The input fields for generating staged uploads." input: [StageImageInput!]!): StagedUploadTargetsGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Creates staged upload targets for file uploads such as images, videos, and 3D models. + + Use the `stagedUploadsCreate` mutation instead of direct file creation mutations when: + + - **Uploading large files**: Files over a few MB benefit from staged uploads for better reliability + - **Uploading media files**: Videos, 3D models, and high-resolution images + - **Bulk importing**: CSV files, product catalogs, or other bulk data + - **Using external file sources**: When files are stored remotely and need to be transferred to Shopify + + The `stagedUploadsCreate` mutation is the first step in Shopify's secure two-step upload process: + + **Step 1: Create staged upload targets** (this mutation) + - Generate secure, temporary upload URLs for your files. + - Receive authentication parameters for the upload. + + **Step 2: Upload files and create assets** + - Upload your files directly to the provided URLs using the authentication parameters. + - Use the returned `resourceUrl` as the `originalSource` in subsequent mutations like `fileCreate`. + + This approach provides better performance for large files, handles network interruptions gracefully, + and ensures secure file transfers to Shopify's storage infrastructure. + + > Note: + > File size is required when uploading + > [`VIDEO`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-VIDEO) or + > [`MODEL_3D`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-MODEL_3D) + > resources. + + After creating staged upload targets, complete the process by: + + 1. **Uploading files**: Send your files to the returned [`url`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.url) using the provided + [`parameters`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.parameters) + for authentication + 2. **Creating file assets**: Use the [`resourceUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.resourceUrl) + as the `originalSource` in mutations such as: + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Creates file assets from staged uploads + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Updates products with new media from staged uploads + + Learn more about [uploading media to Shopify](https://shopify.dev/apps/online-store/media/products). + """ + stagedUploadsCreate("The information required to generate staged upload targets." input: [StagedUploadInput!]!): StagedUploadsCreatePayload + + """ + Activates the specified standard metafield definition from its template. + + Refer to the [list of standard metafield definition templates](https://shopify.dev/apps/metafields/definitions/standard-definitions). + """ + standardMetafieldDefinitionEnable("The resource type that the metafield definition is scoped to." ownerType: MetafieldOwnerType!, "The ID of the standard metafield definition template to enable." id: ID, "The namespace of the standard metafield to enable. Used in combination with `key`." namespace: String, "The key of the standard metafield to enable. Used in combination with `namespace`." key: String, "Whether to pin the metafield definition." pin: Boolean = null, "Whether metafields for the definition are visible using the Storefront API." visibleToStorefrontApi: Boolean = null @deprecated(reason: "Use `access.storefront` instead."), "Whether the metafield definition can be used as a collection condition. Defaults to false." useAsCollectionCondition: Boolean = null @deprecated(reason: "Use `capabilities.smartCollectionCondition` instead."), "The capabilities of the metafield definition." capabilities: MetafieldCapabilityCreateInput, "The access settings that apply to each of the metafields that belong to the metafield definition." access: StandardMetafieldDefinitionAccessInput): StandardMetafieldDefinitionEnablePayload + + """ + Enables the specified standard metaobject definition from its template. + """ + standardMetaobjectDefinitionEnable("The type of the metaobject definition to enable." type: String!): StandardMetaobjectDefinitionEnablePayload + + """ + Adds funds to a [`StoreCreditAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccount) by creating a [`StoreCreditAccountCreditTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccountCreditTransaction). The mutation accepts either a store credit account ID, a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) ID, or a [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) ID. When you provide a customer or company location ID, it automatically creates an account if one doesn't exist for the specified currency. + + Store credit accounts are currency-specific. A single owner can have multiple accounts, each holding a different currency. Use the most appropriate currency for the given store credit account owner. + + Credits can optionally include an expiration date. + """ + storeCreditAccountCredit("The ID of the store credit account or the ID of the account owner." id: ID!, "The input fields for a store credit account credit transaction." creditInput: StoreCreditAccountCreditInput!): StoreCreditAccountCreditPayload + + """ + Creates a debit transaction that decreases the store credit account balance by the given amount. + """ + storeCreditAccountDebit("The ID of the store credit account or the ID of the account owner." id: ID!, "The input fields for a store credit account debit transaction." debitInput: StoreCreditAccountDebitInput!): StoreCreditAccountDebitPayload + + """ + Creates a storefront access token that delegates unauthenticated access scopes to clients using the [Storefront API](https://shopify.dev/docs/api/storefront). The token provides public access to storefront resources without requiring customer authentication. + + Each shop can have up to 100 active [`StorefrontAccessToken`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StorefrontAccessToken) objects. Headless storefronts, mobile apps, and other client applications typically use these tokens to access public storefront data. + + Learn more about [building with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started). + """ + storefrontAccessTokenCreate("Provides the input fields for creating a storefront access token." input: StorefrontAccessTokenInput!): StorefrontAccessTokenCreatePayload + + """ + Deletes a storefront access token. + """ + storefrontAccessTokenDelete("Provides the input fields required to delete a storefront access token." input: StorefrontAccessTokenDeleteInput!): StorefrontAccessTokenDeletePayload + + """ + Creates a billing attempt to charge for a [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). The mutation processes either the payment for the current billing cycle or for a specific cycle, if selected. + + The mutation creates an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) when successful. Failed billing attempts include a [`processingError`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate#returns-subscriptionBillingAttempt.fields.processingError) field with error details. + + > Tip: + > Use the [`idempotencyKey`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate#arguments-subscriptionBillingAttemptInput.fields.idempotencyKey) to ensure the billing attempt executes only once, preventing duplicate charges if the request is retried. + + You can target a specific billing cycle using the [`billingCycleSelector`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionBillingCycleSelector) to bill past or future cycles. The [`originTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingAttempt#field-SubscriptionBillingAttempt.fields.originTime) parameter adjusts fulfillment scheduling for attempts completed after the expected billing date. + + Learn more about [creating billing attempts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract#step-4-create-a-billing-attempt). + """ + subscriptionBillingAttemptCreate("The ID of the subscription contract." subscriptionContractId: ID!, "The information to apply as a billing attempt." subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput!): SubscriptionBillingAttemptCreatePayload + + """ + Asynchronously queries and charges all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) values fall within a specified date range and meet additional filtering criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkCharge("Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall." billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector!, "Criteria to filter the billing cycles on which the action is executed." filters: SubscriptionBillingCycleBulkFilters, "The behaviour to use when updating inventory." inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY): SubscriptionBillingCycleBulkChargePayload + + """ + Asynchronously queries all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) values fall within a specified date range and meet additional filtering criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkSearch("Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall." billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector!, "Criteria to filter the billing cycles on which the action is executed." filters: SubscriptionBillingCycleBulkFilters): SubscriptionBillingCycleBulkSearchPayload + + """ + Creates a new subscription billing attempt for a specified billing cycle. This is the alternative mutation for [subscriptionBillingAttemptCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate). For more information, refer to [Create a subscription contract](https://shopify.dev/docs/apps/selling-strategies/subscriptions/contracts/create#step-4-create-a-billing-attempt). + """ + subscriptionBillingCycleCharge("The ID of the subscription contract." subscriptionContractId: ID!, "Select the specific billing cycle to be billed.\nIf the selected billing cycle's [billingAttemptExpectedDate](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-subscriptionbillingcycle-billingattemptexpecteddate) is in the past, the [originTime](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingAttempt#field-subscriptionbillingattempt-origintime) of the billing attempt will be set to this date. However, if the [billingAttemptExpectedDate](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-subscriptionbillingcycle-billingattemptexpecteddate) is in the future, the originTime will be the current time." billingCycleSelector: SubscriptionBillingCycleSelector!, "The behaviour to use when updating inventory." inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY): SubscriptionBillingCycleChargePayload + + """ + Commits the updates of a Subscription Billing Cycle Contract draft. + """ + subscriptionBillingCycleContractDraftCommit("The gid of the Subscription Contract draft to commit." draftId: ID!): SubscriptionBillingCycleContractDraftCommitPayload + + """ + Concatenates a contract to a Subscription Draft. + """ + subscriptionBillingCycleContractDraftConcatenate("The gid of the Subscription Contract draft to update." draftId: ID!, "An array of Subscription Contracts with their selected billing cycles to concatenate to the subscription draft." concatenatedBillingCycleContracts: [SubscriptionBillingCycleInput!]!): SubscriptionBillingCycleContractDraftConcatenatePayload + + """ + Edit the contents of a subscription contract for the specified billing cycle. + """ + subscriptionBillingCycleContractEdit("Input object for selecting and using billing cycles." billingCycleInput: SubscriptionBillingCycleInput!): SubscriptionBillingCycleContractEditPayload + + """ + Delete the schedule and contract edits of the selected subscription billing cycle. + """ + subscriptionBillingCycleEditDelete("Input object used to select and use billing cycles." billingCycleInput: SubscriptionBillingCycleInput!): SubscriptionBillingCycleEditDeletePayload + + """ + Delete the current and future schedule and contract edits of a list of subscription billing cycles. + """ + subscriptionBillingCycleEditsDelete("The globally-unique identifier of the subscription contract that the billing cycle belongs to." contractId: ID!, "Select billing cycles to be deleted." targetSelection: SubscriptionBillingCyclesTargetSelection!): SubscriptionBillingCycleEditsDeletePayload + + """ + Modify the schedule of a specific billing cycle. + """ + subscriptionBillingCycleScheduleEdit("Input object for selecting and using billing cycles." billingCycleInput: SubscriptionBillingCycleInput!, "Data used to create or modify billing cycle schedule edit." input: SubscriptionBillingCycleScheduleEditInput!): SubscriptionBillingCycleScheduleEditPayload + + """ + Skips a Subscription Billing Cycle. + """ + subscriptionBillingCycleSkip("Input object for selecting and using billing cycles." billingCycleInput: SubscriptionBillingCycleInput!): SubscriptionBillingCycleSkipPayload + + """ + Unskips a Subscription Billing Cycle. + """ + subscriptionBillingCycleUnskip("Input object for selecting and using billing cycles." billingCycleInput: SubscriptionBillingCycleInput!): SubscriptionBillingCycleUnskipPayload + + """ + Activates a Subscription Contract. Contract status must be either active, paused, or failed. + """ + subscriptionContractActivate("The ID of the Subscription Contract." subscriptionContractId: ID!): SubscriptionContractActivatePayload + + """ + Creates a Subscription Contract. + """ + subscriptionContractAtomicCreate("The properties of the new Subscription Contract." input: SubscriptionContractAtomicCreateInput!): SubscriptionContractAtomicCreatePayload + + """ + Cancels a Subscription Contract. + """ + subscriptionContractCancel("The ID of the Subscription Contract." subscriptionContractId: ID!): SubscriptionContractCancelPayload + + """ + Creates a subscription contract draft, which is an intention to create a new subscription. The draft lets you incrementally build and modify subscription details before committing them to create the actual [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). + + The mutation requires [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) information, billing details, and contract configuration including the [`SubscriptionBillingPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingPolicy) and [`SubscriptionDeliveryPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDeliveryPolicy). You can specify the [`CustomerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod), the [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) for shipping, and subscription intervals. + + After you create the draft, you can either modify it with the [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftUpdate) mutation or finalize and create the active subscription contract with [`subscriptionDraftCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit). + + Learn more about [building subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract). + """ + subscriptionContractCreate("The properties of the new Subscription Contract." input: SubscriptionContractCreateInput!): SubscriptionContractCreatePayload + + """ + Expires a Subscription Contract. + """ + subscriptionContractExpire("The ID of the Subscription Contract." subscriptionContractId: ID!): SubscriptionContractExpirePayload + + """ + Fails a Subscription Contract. + """ + subscriptionContractFail("The ID of the Subscription Contract." subscriptionContractId: ID!): SubscriptionContractFailPayload + + """ + Pauses a Subscription Contract. + """ + subscriptionContractPause("The ID of the Subscription Contract." subscriptionContractId: ID!): SubscriptionContractPausePayload + + """ + Allows for the easy change of a Product in a Contract or a Product price change. + """ + subscriptionContractProductChange("The ID of the subscription contract." subscriptionContractId: ID!, "The gid of the Subscription Line to update." lineId: ID!, "The properties of the Product changes." input: SubscriptionContractProductChangeInput!): SubscriptionContractProductChangePayload + + """ + Sets the next billing date of a Subscription Contract. This field is managed by the apps. + Alternatively you can utilize our + [Billing Cycles APIs](https://shopify.dev/docs/apps/selling-strategies/subscriptions/billing-cycles), + which provide auto-computed billing dates and additional functionalities. + """ + subscriptionContractSetNextBillingDate("The gid of the Subscription Contract to set the next billing date for." contractId: ID!, "The next billing date." date: DateTime!): SubscriptionContractSetNextBillingDatePayload + + """ + Creates a draft of an existing [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). The draft captures the current state of the contract and allows incremental modifications through draft mutations such as [`subscriptionDraftLineAdd`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftLineAdd), [`subscriptionDraftDiscountAdd`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftDiscountAdd), and [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftUpdate). + + Changes remain in draft state and don't affect the live contract until committed. After you've made all necessary changes to the draft, commit it using [`subscriptionDraftCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit) to apply the updates to the original contract. + + Learn more about [updating subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract#step-2-create-a-draft-of-an-existing-contract). + """ + subscriptionContractUpdate("The gid of the Subscription Contract to update." contractId: ID!): SubscriptionContractUpdatePayload + + """ + Commits the updates of a Subscription Contract draft. + """ + subscriptionDraftCommit("The gid of the Subscription Contract draft to commit." draftId: ID!): SubscriptionDraftCommitPayload + + """ + Adds a subscription discount to a subscription draft. + """ + subscriptionDraftDiscountAdd("The ID of the Subscription Contract draft to add a subscription discount to." draftId: ID!, "The properties of the new Subscription Discount." input: SubscriptionManualDiscountInput!): SubscriptionDraftDiscountAddPayload + + """ + Applies a code discount on the subscription draft. + """ + subscriptionDraftDiscountCodeApply("The gid of the subscription contract draft to apply a subscription code discount on." draftId: ID!, "Code discount redeem code." redeemCode: String!): SubscriptionDraftDiscountCodeApplyPayload + + """ + Removes a subscription discount from a subscription draft. + """ + subscriptionDraftDiscountRemove("The gid of the subscription contract draft to remove a subscription discount from." draftId: ID!, "The gid of the subscription draft discount to remove." discountId: ID!): SubscriptionDraftDiscountRemovePayload + + """ + Updates a subscription discount on a subscription draft. + """ + subscriptionDraftDiscountUpdate("The ID of the Subscription Contract draft to update a subscription discount on." draftId: ID!, "The gid of the Subscription Discount to update." discountId: ID!, "The properties to update on the Subscription Discount." input: SubscriptionManualDiscountInput!): SubscriptionDraftDiscountUpdatePayload + + """ + Adds a subscription free shipping discount to a subscription draft. + """ + subscriptionDraftFreeShippingDiscountAdd("The ID of the subscription contract draft to add a subscription free shipping discount to." draftId: ID!, "The properties of the new subscription free shipping discount." input: SubscriptionFreeShippingDiscountInput!): SubscriptionDraftFreeShippingDiscountAddPayload + + """ + Updates a subscription free shipping discount on a subscription draft. + """ + subscriptionDraftFreeShippingDiscountUpdate("The ID of the Subscription Contract draft to update a subscription discount on." draftId: ID!, "The gid of the Subscription Discount to update." discountId: ID!, "The properties to update on the Subscription Free Shipping Discount." input: SubscriptionFreeShippingDiscountInput!): SubscriptionDraftFreeShippingDiscountUpdatePayload + + """ + Adds a subscription line to a subscription draft. + """ + subscriptionDraftLineAdd("The gid of the Subscription Contract draft to add a subscription line to." draftId: ID!, "The properties of the new Subscription Line." input: SubscriptionLineInput!): SubscriptionDraftLineAddPayload + + """ + Removes a subscription line from a subscription draft. + """ + subscriptionDraftLineRemove("The gid of the Subscription Contract draft to remove a subscription line from." draftId: ID!, "The gid of the Subscription Line to remove." lineId: ID!): SubscriptionDraftLineRemovePayload + + """ + Updates a subscription line on a subscription draft. + """ + subscriptionDraftLineUpdate("The gid of the Subscription Contract draft to update a subscription line from." draftId: ID!, "The gid of the Subscription Line to update." lineId: ID!, "The properties of the new Subscription Line." input: SubscriptionLineUpdateInput!): SubscriptionDraftLineUpdatePayload + + """ + Updates a Subscription Draft. + """ + subscriptionDraftUpdate("The gid of the Subscription Draft to update." draftId: ID!, "The properties of the new Subscription Contract." input: SubscriptionDraftInput!): SubscriptionDraftUpdatePayload + + """ + Adds tags to a resource. If the resource type doesn't support tagging, the `id` argument returns a resource-not-found error. + + Tags help merchants organize and filter resources. See the [`tags`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/tagsAdd#arguments-tags) argument for supported input formats. + + Learn more about [using tags to organize subscription orders](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/fulfillments/sync-orders-subscriptions#order-tagging). + """ + tagsAdd("The ID of a resource to add tags to. Supported resources: [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), and [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article)." id: ID!, "A list of tags to add to the resource. Can be an array of strings or a single string composed of a comma-separated list of values. Example values: `[\"tag1\", \"tag2\", \"tag3\"]`, `\"tag1, tag2, tag3\"`." tags: [String!]!): TagsAddPayload + + """ + Removes tags from a resource. If the resource type doesn't support tagging, the `id` argument returns a resource-not-found error. + + Tags are searchable keywords that help organize and filter these resources. + """ + tagsRemove("The ID of the resource to remove tags from. Supported resources: [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), and [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article)." id: ID!, "A list of tags to remove from the resource in the form of an array of strings. Example value: `[\"tag1\", \"tag2\", \"tag3\"]`." tags: [String!]!): TagsRemovePayload + + """ + Allows tax app configurations for tax partners. + """ + taxAppConfigure("Configures whether the tax app is correctly configured and ready to be used." ready: Boolean!): TaxAppConfigurePayload + + """ + Creates a tax summary for a given order. + If both an order ID and a start and end time are provided, the order ID will be used. + """ + taxSummaryCreate("The ID of the order to create the tax summary for." orderId: ID, "The start time of the range of orders to create the tax summary for." startTime: DateTime, "The end time of the range of orders to create the tax summary for." endTime: DateTime): TaxSummaryCreatePayload + + """ + Creates a theme from an external URL or staged upload. The theme source can either be a ZIP file hosted at a public URL or files previously uploaded using the [`stagedUploadsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/stageduploadscreate) mutation. The theme displays in the [Themes page](https://admin.shopify.com/themes) in the Shopify admin. + + New themes have an [`UNPUBLISHED`](https://shopify.dev//docs/api/admin-graphql/latest/mutations/themeCreate#arguments-role.enums.UNPUBLISHED) role by default. You can optionally specify a [`DEVELOPMENT`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeCreate#arguments-role.enums.DEVELOPMENT) role for temporary themes used during development. + """ + themeCreate("An external URL or a\n[staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate)\nof the theme to import." source: URL!, "The name of the theme to be created." name: String, "The role of the theme to be created. Only UNPUBLISHED and DEVELOPMENT roles are permitted." role: ThemeRole = UNPUBLISHED): ThemeCreatePayload + + """ + Deletes a theme. + """ + themeDelete("The ID of the theme to be deleted." id: ID!): ThemeDeletePayload + + """ + Duplicates a theme. + """ + themeDuplicate("ID of the theme to be duplicated." id: ID!, "Name of the new theme." name: String): ThemeDuplicatePayload + + """ + Copy theme files. Copying to existing theme files will overwrite them. + """ + themeFilesCopy("The theme to update." themeId: ID!, "The files to update." files: [ThemeFilesCopyFileInput!]!): ThemeFilesCopyPayload + + """ + Deletes a theme's files. + """ + themeFilesDelete("Specifies the theme to deleted." themeId: ID!, "The files to delete." files: [String!]!): ThemeFilesDeletePayload + + """ + Creates or updates theme files in an online store theme. This mutation allows batch operations on multiple theme files, either creating new files or overwriting existing ones with the same filename. + + > Note: You can process a maximum of 50 files in a single request. + + Each file requires a filename and body content. The body must specify a [`type`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#arguments-files.fields.body.type) with the corresponding [`value`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#arguments-files.fields.body.value). The mutation returns a [`job`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#returns-job) field for tracking asynchronous operations and an [`upsertedThemeFiles`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#returns-upsertedThemeFiles) field with details about the processed files. + """ + themeFilesUpsert("The theme to update." themeId: ID!, "The files to update." files: [OnlineStoreThemeFilesUpsertFileInput!]!): ThemeFilesUpsertPayload + + """ + Publishes a theme. + """ + themePublish("ID of the theme to be published." id: ID!): ThemePublishPayload + + """ + Updates a theme. + """ + themeUpdate("The ID of the theme to be updated." id: ID!, "The attributes of the theme to be updated." input: OnlineStoreThemeInput!): ThemeUpdatePayload + + """ + Trigger the voiding of an uncaptured authorization transaction. + """ + transactionVoid("An uncaptured authorization transaction." parentTransactionId: ID!): TransactionVoidPayload + + """ + Creates or updates translations for a resource's [translatable content](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableContent). + + Each translation requires a digest value from the resource's translatable content. Use the [`translatableResource`](https://shopify.dev/docs/api/admin-graphql/latest/queries/translatableResource) query to get a resource's translatable content and digest values before creating translations. You can optionally scope translations to specific markets using the `marketId` field in each translation input. + + Learn more about [managing translations](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translationsRegister("ID of the resource that is being translated." resourceId: ID!, "Specifies the input fields for a translation." translations: [TranslationInput!]!): TranslationsRegisterPayload + + """ + Deletes translations. + """ + translationsRemove("ID of the translatable resource for which translations are being deleted." resourceId: ID!, "The list of translation keys." translationKeys: [String!]!, "The list of translation locales. Only locales returned in `shopLocales` are valid." locales: [String!]!, "The list of market IDs." marketIds: [ID!]): TranslationsRemovePayload + + """ + Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. + """ + urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload + + """ + Asynchronously delete [URLRedirect](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) + objects in bulk by IDs. + Learn more about [URLRedirect](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect) + objects. + """ + urlRedirectBulkDeleteByIds("A list of [`URLRedirect`](\n https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect\n ) object IDs to delete." ids: [ID!]!): UrlRedirectBulkDeleteByIdsPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySavedSearch("The ID of the URL redirect saved search for filtering." savedSearchId: ID!): UrlRedirectBulkDeleteBySavedSearchPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySearch("Search query for filtering redirects on (both Redirect from and Redirect to fields)." search: String!): UrlRedirectBulkDeleteBySearchPayload + + """ + Creates a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectCreate("The fields to use when creating the redirect." urlRedirect: UrlRedirectInput!): UrlRedirectCreatePayload + + """ + Deletes a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectDelete("The ID of the redirect to delete." id: ID!): UrlRedirectDeletePayload + + """ + Creates a [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object. + + After creating the `UrlRedirectImport` object, the `UrlRedirectImport` request can be performed using the [`urlRedirectImportSubmit`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportSubmit) mutation. + """ + urlRedirectImportCreate("The staged upload URL of the CSV file.\nYou can download [a sample URL redirect CSV file](https://help.shopify.com/csv/sample-redirect-template.csv)." url: URL!): UrlRedirectImportCreatePayload + + """ + Submits a `UrlRedirectImport` request to be processed. + + The `UrlRedirectImport` request is first created with the [`urlRedirectImportCreate`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportCreate) mutation. + """ + urlRedirectImportSubmit("The ID of the [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object." id: ID!): UrlRedirectImportSubmitPayload + + """ + Updates a URL redirect. + """ + urlRedirectUpdate("The ID of the URL redirect to update." id: ID!, "The input fields required to update the URL redirect." urlRedirect: UrlRedirectInput!): UrlRedirectUpdatePayload + + """ + Creates a cart and checkout validation: a server-side rule enforced before a customer can complete checkout. Each validation is powered by a cart and checkout validation function that you provide using `functionId` or `functionHandle`. + + Use `validationCreate` to apply custom rules at checkout, such as limiting item quantities, enforcing order minimums or maximums, or blocking checkout for restricted shipping addresses. Validations run on Shopify's servers and are enforced throughout checkout, so they can't be bypassed by the client. + + Validation errors always block checkout progress. The `blockOnFailure` field controls whether runtime exceptions, such as timeouts, also block checkout. + """ + validationCreate("The input fields for a new validation." validation: ValidationCreateInput!): ValidationCreatePayload + + """ + Deletes a cart and checkout validation, removing its rule from the shop's checkout. Once deleted, its cart and checkout validation function no longer runs during checkout. + """ + validationDelete("The ID representing the installed validation." id: ID!): ValidationDeletePayload + + """ + Updates a cart and checkout validation. Use `validationUpdate` to rename it, toggle whether it's enabled at checkout, change its `blockOnFailure` behavior, or update its metafields. + + Validation errors always block checkout progress. The `blockOnFailure` field controls whether runtime exceptions, such as timeouts, also block checkout. + """ + validationUpdate("The input fields to update a validation." validation: ValidationUpdateInput!, "The ID representing the validation to update." id: ID!): ValidationUpdatePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by creating a web pixel record on the store where you installed your app. + + When you run the `webPixelCreate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelCreate("The web pixel settings in JSON format." webPixel: WebPixelInput!): WebPixelCreatePayload + + """ + Deletes the web pixel shop settings. + """ + webPixelDelete("The ID of the web pixel to delete." id: ID!): WebPixelDeletePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by updating a web pixel record on the store where you installed your app. + + When you run the `webPixelUpdate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelUpdate("The ID of the web pixel to update." id: ID!, "The web pixel settings in JSON format." webPixel: WebPixelInput!): WebPixelUpdatePayload + + """ + Creates a web presence. + """ + webPresenceCreate("The details of the web presence to be created." input: WebPresenceCreateInput!): WebPresenceCreatePayload + + """ + Deletes a web presence. + """ + webPresenceDelete("The ID of the web presence to delete." id: ID!): WebPresenceDeletePayload + + """ + Updates a web presence. + """ + webPresenceUpdate("The ID of the web presence to update." id: ID!, "The web presence properties to update." input: WebPresenceUpdateInput!): WebPresenceUpdatePayload + + """ + Creates a webhook subscription that notifies your [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling. + + The subscription configuration supports multiple endpoint types including HTTPS URLs, Google Pub/Sub topics, and AWS EventBridge event sources. You can filter events using [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only relevant webhooks, control which data fields are included in webhook payloads, and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionCreate("The type of event that triggers the webhook." topic: WebhookSubscriptionTopic!, "Specifies the input fields for a webhook subscription." webhookSubscription: WebhookSubscriptionInput!): WebhookSubscriptionCreatePayload + + """ + Deletes a [`WebhookSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/WebhookSubscription) and stops all future webhooks to its endpoint. Returns the deleted subscription's ID for confirmation. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionDelete("The ID of the webhook subscription to delete." id: ID!): WebhookSubscriptionDeletePayload + + """ + Updates a webhook subscription's configuration. Modify the endpoint URL, event filters, included fields, or metafield namespaces without recreating the subscription. + + The mutation accepts a [`WebhookSubscriptionInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/WebhookSubscriptionInput) that specifies the new configuration. You can switch between endpoint types (HTTP, Pub/Sub, EventBridge) by providing a different URI format. Updates apply atomically without interrupting webhook delivery. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionUpdate("The ID of the webhook subscription to update." id: ID!, "Specifies the input fields for a webhook subscription." webhookSubscription: WebhookSubscriptionInput!): WebhookSubscriptionUpdatePayload +} + +""" +A signed upload parameter for uploading an asset to Shopify. + +Deprecated in favor of +[StagedUploadParameter](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadParameter), +which is used in +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget) +and returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type MutationsStagedUploadTargetGenerateUploadParameter { + """ + The upload parameter name. + """ + name: String! + + """ + The upload parameter value. + """ + value: String! +} + +""" +A default cursor that you can use in queries to paginate your results. Each edge in a connection can +return a cursor, which is a reference to the edge's position in the connection. You can use an edge's cursor as +the starting point to retrieve the nodes before or after it in a connection. + +To learn more about using cursor-based pagination, refer to +[Paginating results with GraphQL](https://shopify.dev/api/usage/pagination-graphql). +""" +interface Navigable { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! +} + +""" +A navigation item, holding basic link attributes. +""" +type NavigationItem { + """ + The unique identifier of the navigation item. + """ + id: String! + + """ + The name of the navigation item. + """ + title: String! + + """ + The URL of the page that the navigation item links to. + """ + url: URL! +} + +""" +An object with an ID field to support global identification, in accordance with the +[Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). +This interface is used by the [node](https://shopify.dev/api/admin-graphql/unstable/queries/node) +and [nodes](https://shopify.dev/api/admin-graphql/unstable/queries/nodes) queries. +""" +interface Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The valid values for the notification usage, specifying the intended notification environment usage for certain operations. +""" +enum NotificationUsage { + """ + The notification environment is web. + """ + WEB + + """ + The notification environment is sms. + """ + SMS +} + +""" +The input fields for dimensions of an object. +""" +input ObjectDimensionsInput { + """ + The length in `unit`s. + """ + length: Float! + + """ + The width in `unit`s. + """ + width: Float! + + """ + The height in `unit`s. + """ + height: Float! + + """ + Unit of measurement for `length`, `width`, and `height`. + """ + unit: LengthUnit! +} + +""" +The shop's online store channel. +""" +type OnlineStore { + """ + Storefront password information. + """ + passwordProtection: OnlineStorePasswordProtection! +} + +""" +Storefront password information. +""" +type OnlineStorePasswordProtection { + """ + Whether the storefront password is enabled. + """ + enabled: Boolean! +} + +""" +Online Store preview URL of the object. +""" +interface OnlineStorePreviewable { + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL +} + +""" +A theme for display on the storefront. Themes control the visual appearance and functionality of the online store through templates, stylesheets, and assets that determine how [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), and other content display to customers. + +Each theme has a [role](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme#field-OnlineStoreTheme.fields.role) that indicates its status. Main themes are live on the storefront, unpublished themes are inactive, demo themes require purchase before publishing, and development themes are temporary for previewing during development. The theme includes [translations](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme#field-OnlineStoreTheme.fields.translations) for multi-language support. +""" +type OnlineStoreTheme implements HasPublishedTranslations & Node { + """ + The date and time when the theme was created. + """ + createdAt: DateTime! + + """ + The files in the theme. + """ + files("The filenames of the theme files. At most 50 filenames can be specified. Use '*' to match zero or more characters." filenames: [String!], "Returns at most the first n files for this theme. Fewer than n files may be returned to stay within the payload size limit, or when the end of the list is reached. At most 2500 can be fetched at once." first: Int = 50, "A cursor for use in pagination." after: String): OnlineStoreThemeFileConnection + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the theme, set by the merchant. + """ + name: String! + + """ + The prefix of the theme. + """ + prefix: String! + + """ + Whether the theme is processing. + """ + processing: Boolean! + + """ + Whether the theme processing failed. + """ + processingFailed: Boolean! + + """ + The role of the theme. + """ + role: ThemeRole! + + """ + The theme store ID. + """ + themeStoreId: Int + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The date and time when the theme was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemes. +""" +type OnlineStoreThemeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [OnlineStoreTheme!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OnlineStoreTheme and a cursor during pagination. +""" +type OnlineStoreThemeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OnlineStoreThemeEdge. + """ + node: OnlineStoreTheme! +} + +""" +Represents a theme file. +""" +type OnlineStoreThemeFile { + """ + The body of the theme file. + """ + body: OnlineStoreThemeFileBody! + + """ + The md5 digest of the theme file for data integrity. + """ + checksumMd5: String + + """ + The content type of the theme file. + """ + contentType: String! + + """ + The date and time when the theme file was created. + """ + createdAt: DateTime! + + """ + The unique identifier of the theme file. + """ + filename: String! + + """ + The size of the theme file in bytes. + """ + size: UnsignedInt64! + + """ + The date and time when the theme file was last updated. + """ + updatedAt: DateTime! +} + +""" +Represents the body of a theme file. +""" +union OnlineStoreThemeFileBody = OnlineStoreThemeFileBodyBase64|OnlineStoreThemeFileBodyText|OnlineStoreThemeFileBodyUrl + +""" +Represents the base64 encoded body of a theme file. +""" +type OnlineStoreThemeFileBodyBase64 { + """ + The body of the theme file, base64 encoded. + """ + contentBase64: String! +} + +""" +The input fields for the theme file body. +""" +input OnlineStoreThemeFileBodyInput { + """ + The input type of the theme file body. + """ + type: OnlineStoreThemeFileBodyInputType! + + """ + The body of the theme file. + """ + value: String! +} + +""" +The input type for a theme file body. +""" +enum OnlineStoreThemeFileBodyInputType { + """ + The text body of the theme file. + """ + TEXT + + """ + The base64 encoded body of a theme file. + """ + BASE64 + + """ + The url of the body of a theme file. + """ + URL +} + +""" +Represents the body of a theme file. +""" +type OnlineStoreThemeFileBodyText { + """ + The body of the theme file. + """ + content: String! +} + +""" +Represents the url of the body of a theme file. +""" +type OnlineStoreThemeFileBodyUrl { + """ + The short lived url for the body of the theme file. + """ + url: URL! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemeFiles. +""" +type OnlineStoreThemeFileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeFileEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeFileEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [OnlineStoreThemeFile!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + List of errors that occurred during the request. + """ + userErrors: [OnlineStoreThemeFileReadResult!]! +} + +""" +An auto-generated type which holds one OnlineStoreThemeFile and a cursor during pagination. +""" +type OnlineStoreThemeFileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OnlineStoreThemeFileEdge. + """ + node: OnlineStoreThemeFile! +} + +""" +Represents the result of a copy, delete, or write operation performed on a theme file. +""" +type OnlineStoreThemeFileOperationResult { + """ + The md5 digest of the theme file for data integrity. + """ + checksumMd5: String + + """ + The date and time when the theme file was created. + """ + createdAt: DateTime! + + """ + Unique identifier of the theme file. + """ + filename: String! + + """ + The size of the theme file in bytes. + """ + size: UnsignedInt64! + + """ + The date and time when the theme file was last updated. + """ + updatedAt: DateTime! +} + +""" +Represents the result of a read operation performed on a theme asset. +""" +type OnlineStoreThemeFileReadResult { + """ + Type that indicates the result of the operation. + """ + code: OnlineStoreThemeFileResultType! + + """ + Unique identifier associated with the operation and the theme file. + """ + filename: String! +} + +""" +Type of a theme file operation result. +""" +enum OnlineStoreThemeFileResultType { + """ + Operation was successful. + """ + SUCCESS + + """ + Operation encountered an error. + """ + ERROR + + """ + Operation faced a conflict with the current state of the file. + """ + CONFLICT + + """ + Operation could not be processed due to issues with input data. + """ + UNPROCESSABLE_ENTITY + + """ + Operation was malformed or invalid. + """ + BAD_REQUEST + + """ + Operation timed out. + """ + TIMEOUT + + """ + Operation file could not be found. + """ + NOT_FOUND +} + +""" +The input fields for the file to create or update. +""" +input OnlineStoreThemeFilesUpsertFileInput { + """ + The filename of the theme file. + """ + filename: String! + + """ + The body of the theme file. + """ + body: OnlineStoreThemeFileBodyInput! +} + +""" +User errors for theme file operations. +""" +type OnlineStoreThemeFilesUserErrors implements DisplayableError { + """ + The error code. + """ + code: OnlineStoreThemeFilesUserErrorsCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The filename of the theme file. + """ + filename: String + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OnlineStoreThemeFilesUserErrors`. +""" +enum OnlineStoreThemeFilesUserErrorsCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + There are theme files with conflicts. + """ + THEME_FILES_CONFLICT + + """ + There are files with the same filename. + """ + DUPLICATE_FILE_INPUT + + """ + Access denied. + """ + ACCESS_DENIED + + """ + This action is not available on your current plan. Please upgrade to access theme editing features. + """ + THEME_LIMITED_PLAN + + """ + The file is invalid. + """ + FILE_VALIDATION_ERROR + + """ + Error. + """ + ERROR + + """ + Too many updates in a short period. Please try again later. + """ + THROTTLED +} + +""" +The input fields for Theme attributes to update. +""" +input OnlineStoreThemeInput { + """ + The new name of the theme. + """ + name: String +} + +""" +The input fields for the options and values of the combined listing. +""" +input OptionAndValueInput { + """ + The name of the Product's Option. + """ + name: String! + + """ + The ordered values of the Product's Option. + """ + values: [String!]! + + """ + The ID of the option to update. If not present, the option will be created. + """ + optionId: ID + + """ + The linked metafield for the product's option. + """ + linkedMetafield: LinkedMetafieldInput +} + +""" +The input fields for creating a product option. +""" +input OptionCreateInput { + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Values associated with the option. + """ + values: [OptionValueCreateInput!] + + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldCreateInput +} + +""" +The input fields for reordering a product option and/or its values. +""" +input OptionReorderInput { + """ + Specifies the product option to reorder by ID. + """ + id: ID + + """ + Specifies the product option to reorder by name. + """ + name: String + + """ + Values associated with the option. + """ + values: [OptionValueReorderInput!] +} + +""" +The input fields for creating or updating a product option. +""" +input OptionSetInput { + """ + Specifies the product option to update. + """ + id: ID + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Value associated with an option. + """ + values: [OptionValueSetInput!] + + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldCreateInput +} + +""" +The input fields for updating a product option. +""" +input OptionUpdateInput { + """ + Specifies the product option to update. + """ + id: ID! + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldUpdateInput +} + +""" +The input fields required to create a product option value. +""" +input OptionValueCreateInput { + """ + Value associated with an option. + """ + name: String + + """ + Metafield value associated with an option. + """ + linkedMetafieldValue: String +} + +""" +The input fields for reordering a product option value. +""" +input OptionValueReorderInput { + """ + Specifies the product option value by ID. + """ + id: ID + + """ + Specifies the product option value by name. + """ + name: String +} + +""" +The input fields for creating or updating a product option value. +""" +input OptionValueSetInput { + """ + Specifies the product option value. + """ + id: ID + + """ + Value associated with an option. + """ + name: String +} + +""" +The input fields for updating a product option value. +""" +input OptionValueUpdateInput { + """ + Specifies the product option value. + """ + id: ID! + + """ + Value associated with an option. + """ + name: String + + """ + Metafield value associated with an option. + """ + linkedMetafieldValue: String +} + +""" +The `Order` object represents a customer's request to purchase one or more products from a store. Use the `Order` object to handle the complete purchase lifecycle from checkout to fulfillment. + +Use the `Order` object when you need to: + +- Display order details on customer account pages or admin dashboards. +- Create orders for phone sales, wholesale customers, or subscription services. +- Update order information like shipping addresses, notes, or fulfillment status. +- Process returns, exchanges, and partial refunds. +- Generate invoices, receipts, and shipping labels. + +The `Order` object serves as the central hub connecting customer information, product details, payment processing, and fulfillment data within the GraphQL Admin API schema. + +> Note: +> Only the last 60 days' worth of orders from a store are accessible from the `Order` object by default. If you want to access older records, +> then you need to [request access to all orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). If your app is granted +> access, then you can add the `read_all_orders`, `read_orders`, and `write_orders` scopes. + +> Caution: +> Only use orders data if it's required for your app's functionality. Shopify will restrict [access to scopes](https://shopify.dev/docs/api/usage/access-scopes#requesting-specific-permissions) for apps that don't have a legitimate use for the associated data. + +Learn more about [building apps for orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type Order implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLocalizedFields & HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + A list of additional fees applied to an order, such as duties, import fees, or [tax lines](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.additionalFees.taxLines). + """ + additionalFees: [AdditionalFee!]! + + """ + A list of sales agreements associated with the order, such as contracts defining payment terms, or delivery schedules between merchants and customers. + """ + agreements("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| happened_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SalesAgreementConnection! + + """ + A list of messages that appear on the **Orders** page in the Shopify admin. These alerts provide merchants with important information about an order's status or required actions. + """ + alerts: [ResourceAlert!]! + + """ + The application that created the order. For example, "Online Store", "Point of Sale", or a custom app name. + Use this to identify the order source for attribution and fulfillment workflows. + Learn more about [building apps for orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + app: OrderApp + + """ + The billing address associated with the payment method selected by the customer for an order. + Returns `null` if no billing address was provided during checkout. + """ + billingAddress: MailingAddress + + """ + Whether the billing address matches the [shipping address](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.shippingAddress). Returns `true` if both addresses are the same, and `false` if they're different or if an address is missing. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + Whether an order can be manually marked as paid. Returns `false` if the order is already paid, is canceled, has pending [Shopify Payments](https://help.shopify.com/en/manual/payments/shopify-payments/payouts) transactions, or has a negative payment amount. + """ + canMarkAsPaid: Boolean! + + """ + Whether order notifications can be sent to the customer. + Returns `true` if the customer has a valid [email address](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.email). + """ + canNotifyCustomer: Boolean! + + """ + The reason provided for an order cancellation. For example, a merchant might cancel an order if there's insufficient inventory. Returns `null` if the order hasn't been canceled. + """ + cancelReason: OrderCancelReason + + """ + Details of an order's cancellation, if it has been canceled. This includes the reason, date, and any [staff notes](https://shopify.dev/api/admin-graphql/latest/objects/OrderCancellation#field-OrderCancellation.fields.staffNote). + """ + cancellation: OrderCancellation + + """ + The date and time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when an order was canceled. + Returns `null` if the order hasn't been canceled. + """ + cancelledAt: DateTime + + """ + Whether an authorized payment for an order can be captured. + Returns `true` if an authorized payment exists that hasn't been fully captured yet. Learn more about [capturing payments](https://help.shopify.com/en/manual/fulfillment/managing-orders/payments/capturing-payments). + """ + capturable: Boolean! + + """ + The total discount amount that applies to the entire order in shop currency, before returns, refunds, order edits, and cancellations. + """ + cartDiscountAmount: Money @deprecated(reason: "Use `cartDiscountAmountSet` instead.") + + """ + The total discount amount applied at the time the order was created, displayed in both shop and presentment currencies, before returns, refunds, order edits, and cancellations. This field only includes discounts applied to the entire order. + """ + cartDiscountAmountSet: MoneyBag + + """ + The sales channel from which an order originated, such as the [Online Store](https://shopify.dev/docs/apps/build/app-surfaces#online-store) or [Shopify POS](https://shopify.dev/docs/apps/build/app-surfaces#point-of-sale). + """ + channel: Channel @deprecated(reason: "Use `publication` instead.") + + """ + Details about the sales channel that created the order, such as the [channel app type](https://shopify.dev/docs/api/admin-graphql/latest/objects/channel#field-Channel.fields.channelType) + and [channel name](https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelDefinition#field-ChannelDefinition.fields.channelName), which helps to track order sources. + """ + channelInformation: ChannelInformation @deprecated(reason: "Use `attribution` instead.") + + """ + The IP address of the customer who placed the order. Useful for fraud detection and geographic analysis. + """ + clientIp: String + + """ + Whether an order is closed. An order is considered closed if all its line items have been fulfilled or canceled, and all financial transactions are complete. + """ + closed: Boolean! + + """ + The date and time [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when an order was closed. Shopify automatically records this timestamp when all items have been fulfilled or canceled, and all financial transactions are complete. Returns `null` if the order isn't closed. + """ + closedAt: DateTime + + """ + A customer-facing order identifier, often shown instead of the sequential order name. + It uses a random alphanumeric format (for example, `XPAV284CT`) and isn't guaranteed to be unique across orders. + """ + confirmationNumber: String + + """ + Whether inventory has been reserved for an order. Returns `true` if inventory quantities for an order's [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) have been reserved. + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states). + """ + confirmed: Boolean! + + """ + The date and time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when an order was created. This timestamp is set when the customer completes checkout and remains unchanged throughout an order's lifecycle. + """ + createdAt: DateTime! + + """ + The shop currency when the order was placed. For example, "USD" or "CAD". + """ + currencyCode: CurrencyCode! + + """ + The current total of all discounts applied to the entire order, after returns, refunds, order edits, and cancellations. This includes discount codes, automatic discounts, and other promotions that affect the whole order rather than individual line items. To get the original discount amount at the time of order creation, use the [`cartDiscountAmountSet`](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.cartDiscountAmountSet) field. + """ + currentCartDiscountAmountSet: MoneyBag! + + """ + The current shipping price after applying refunds and discounts. + If the parent `order.taxesIncluded` field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. + """ + currentShippingPriceSet: MoneyBag! + + """ + The current sum of the quantities for all line items that contribute to the order's subtotal price, after returns, refunds, order edits, and cancellations. + """ + currentSubtotalLineItemsQuantity: Int! + + """ + The total price of the order, after returns and refunds, in shop and presentment currencies. + This includes taxes and discounts. + """ + currentSubtotalPriceSet: MoneyBag! + + """ + A list of all tax lines applied to line items on the order, after returns. + Tax line prices represent the total price for all tax lines with the same `rate` and `title`. + """ + currentTaxLines: [TaxLine!]! + + """ + The current total of all additional fees for an order, after any returns or modifications. Modifications include returns, refunds, order edits, and cancellations. Additional fees can include charges such as duties, import fees, and special handling. + """ + currentTotalAdditionalFeesSet: MoneyBag + + """ + The total amount discounted on the order after returns and refunds, in shop and presentment currencies. + This includes both order and line level discounts. + """ + currentTotalDiscountsSet: MoneyBag! + + """ + The current total duties amount for an order, after any returns or modifications. Modifications include returns, refunds, order edits, and cancellations. + """ + currentTotalDutiesSet: MoneyBag + + """ + The total price of the order, after returns, in shop and presentment currencies. + This includes taxes and discounts. + """ + currentTotalPriceSet: MoneyBag! + + """ + The sum of the prices of all tax lines applied to line items on the order, after returns and refunds, in shop and presentment currencies. + """ + currentTotalTaxSet: MoneyBag! + + """ + The total weight of the order after returns and refunds, in grams. + """ + currentTotalWeight: UnsignedInt64! + + """ + A list of additional information that has been attached to the order. For example, gift message, delivery instructions, or internal notes. + """ + customAttributes: [Attribute!]! + + """ + The customer who placed an order. Returns `null` if an order was created through a checkout without customer authentication, such as a guest checkout. + Learn more about [customer accounts](https://help.shopify.com/manual/customers/customer-accounts). + """ + customer: Customer + + """ + Whether the customer agreed to receive marketing emails at the time of purchase. + Use this to ensure compliance with marketing consent laws and to segment customers for email campaigns. + Learn more about [building customer segments](https://shopify.dev/docs/apps/build/marketing-analytics/customer-segments). + """ + customerAcceptsMarketing: Boolean! + + """ + The customer's visits and interactions with the online store before placing the order. + """ + customerJourney: CustomerJourney @deprecated(reason: "Use `customerJourneySummary` instead.") + + """ + The customer's visits and interactions with the online store before placing the order. + Use this to understand customer behavior, attribution sources, and marketing effectiveness to optimize your sales funnel. + """ + customerJourneySummary: CustomerJourneySummary + + """ + The customer's language and region preference at the time of purchase. For example, "en" for English, "fr-CA" for French (Canada), or "es-MX" for Spanish (Mexico). + Use this to provide localized customer service and targeted marketing in the customer's preferred language. + """ + customerLocale: String + + """ + A list of discounts that are applied to the order, excluding order edits and refunds. + Includes discount codes, automatic discounts, and other promotions that reduce the order total. + """ + discountApplications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DiscountApplicationConnection! + + """ + The discount code used for an order. Returns `null` if no discount code was applied. + """ + discountCode: String + + """ + The discount codes used for the order. Multiple codes can be applied to a single order. + """ + discountCodes: [String!]! + + """ + The primary address of the customer, prioritizing shipping address over billing address when both are available. + Returns `null` if neither shipping address nor billing address was provided. + """ + displayAddress: MailingAddress + + """ + An order's financial status for display in the Shopify admin. + """ + displayFinancialStatus: OrderDisplayFinancialStatus + + """ + The order's fulfillment status that displays in the Shopify admin to merchants. For example, an order might be unfulfilled or scheduled. + For detailed processing, use the [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + displayFulfillmentStatus: OrderDisplayFulfillmentStatus! + + """ + A list of payment disputes associated with the order, such as chargebacks or payment inquiries. + Disputes occur when customers challenge transactions with their bank or payment provider. + """ + disputes: [OrderDisputeSummary!]! + + """ + Whether duties are included in the subtotal price of the order. + Duties are import taxes charged by customs authorities when goods cross international borders. + """ + dutiesIncluded: Boolean! + + """ + Whether the order has had any edits applied. For example, adding or removing line items, updating quantities, or changing prices. + """ + edited: Boolean! + + """ + The email address associated with the customer for this order. + Used for sending order confirmations, shipping notifications, and other order-related communications. + Returns `null` if no email address was provided during checkout. + """ + email: String + + """ + Whether taxes on the order are estimated. + This field returns `false` when taxes on the order are finalized and aren't subject to any changes. + """ + estimatedTaxes: Boolean! + + """ + A list of events associated with the order. Events track significant changes and activities related to the order, such as creation, payment, fulfillment, and cancellation. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A list of ExchangeV2s for the order. + """ + exchangeV2s("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| completed_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| include_mirrored_exchanges | boolean |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ExchangeV2Connection! @deprecated(reason: "Use `returns` instead.") + + """ + Whether there are line items that can be fulfilled. + This field returns `false` when the order has no fulfillable line items. + For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + fulfillable: Boolean! + + """ + A list of [fulfillment orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) for an order. + Each fulfillment order groups [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.lineItems) that are fulfilled together, + allowing an order to be processed in parts if needed. + """ + fulfillmentOrders("If false, all fulfillment orders will be returned. If true, fulfillment orders that are normally hidden from the merchant will be excluded.\nFor example, fulfillment orders that were closed after being combined or moved are hidden." displayable: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| assigned_location_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): FulfillmentOrderConnection! + + """ + A list of shipments for the order. Fulfillments represent the physical shipment of products to customers. + """ + fulfillments("Truncate the array result to this size." first: Int, "Optional query string to filter fulfillments by timestamps. Examples:\n`created_at:>='2024-05-07T08:37:00Z' updated_at:<'2025-05-07T08:37:00Z'`,\n`created_at:'2024-05-07T08:37:00Z'`" query: String): [Fulfillment!]! + + """ + The total number of fulfillments for the order, including canceled ones. + """ + fulfillmentsCount: Count + + """ + Whether the order has been paid in full. This field returns `true` when the total amount received equals or exceeds the order total. + """ + fullyPaid: Boolean! + + """ + Whether the merchant has added a timeline comment to the order. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL of the first page of the online store that the customer visited before they submitted the order. + """ + landingPageDisplayText: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.landingPageHtml` instead") + + """ + The first page of the online store that the customer visited before they submitted the order. + """ + landingPageUrl: URL @deprecated(reason: "Use `customerJourneySummary.lastVisit.landingPage` instead") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + A list of the order's line items. Line items represent the individual products and quantities that make up the order. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LineItemConnection! + + """ + List of localization extensions for the resource. + """ + localizationExtensions("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizationExtensionPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") + + """ + List of localized fields for the resource. + """ + localizedFields("The country codes of the extensions." countryCodes: [CountryCode!], "The purpose of the extensions." purposes: [LocalizedFieldPurpose!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocalizedFieldConnection! + + """ + The legal business structure that the merchant operates under for this order, such as an LLC, corporation, or partnership. + Used for tax reporting, legal compliance, and determining which business entity is responsible for the order. + """ + merchantBusinessEntity: BusinessEntity! + + """ + Whether the order can be edited by the merchant. Returns `false` for orders that can't be modified, such as canceled orders or orders with specific payment statuses. + """ + merchantEditable: Boolean! + + """ + A list of reasons why the order can't be edited. For example, canceled orders can't be edited. + """ + merchantEditableErrors: [String!]! + + """ + The application acting as the Merchant of Record for the order. The Merchant of Record is responsible for tax collection and remittance. + """ + merchantOfRecordApp: OrderApp + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The unique identifier for the order that appears on the order page in the Shopify admin and the **Order status** page. + For example, "#1001", "EN1001", or "1001-A". + This value isn't unique across multiple stores. Use this field to identify orders in the Shopify admin and for order tracking. + """ + name: String! + + """ + The net payment for the order, based on the total amount received minus the total amount refunded, in shop currency. + """ + netPayment: Money! @deprecated(reason: "Use `netPaymentSet` instead.") + + """ + The net payment for the order, based on the total amount received minus the total amount refunded, in shop and presentment currencies. + """ + netPaymentSet: MoneyBag! + + """ + A list of line items that can't be fulfilled. + For example, tips and fully refunded line items can't be fulfilled. + For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + nonFulfillableLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LineItemConnection! + + """ + The note associated with the order. + Contains additional information or instructions added by merchants or customers during the order process. + Commonly used for special delivery instructions, gift messages, or internal processing notes. + """ + note: String + + """ + The order number used to generate the name using the store's configured order number prefix/suffix. This number isn't guaranteed to follow a consecutive integer sequence (e.g. 1, 2, 3..), nor is it guaranteed to be unique across multiple stores, or even for a single store. + """ + number: Int! + + """ + The total amount of all additional fees, such as import fees or taxes, that were applied when an order was created. + Returns `null` if additional fees aren't applicable. + """ + originalTotalAdditionalFeesSet: MoneyBag + + """ + The total amount of duties calculated when an order was created, before any modifications. Modifications include returns, refunds, order edits, and cancellations. Use [`currentTotalDutiesSet`](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.currentTotalDutiesSet) to retrieve the current duties amount after adjustments. + """ + originalTotalDutiesSet: MoneyBag + + """ + The total price of the order at the time of order creation, in shop and presentment currencies. + Use this to compare the original order value against the current total after edits, returns, or refunds. + """ + originalTotalPriceSet: MoneyBag! + + """ + The payment collection details for the order, including payment status, outstanding amounts, and collection information. + Use this to understand when and how payments should be collected, especially for orders with deferred or installment payment terms. + """ + paymentCollectionDetails: OrderPaymentCollectionDetails! + + """ + A list of the names of all payment gateways used for the order. + For example, "Shopify Payments" and "Cash on Delivery (COD)". + """ + paymentGatewayNames: [String!]! + + """ + The payment terms associated with the order, such as net payment due dates or early payment discounts. Payment terms define when and how an order should be paid. Returns `null` if no specific payment terms were set for the order. + """ + paymentTerms: PaymentTerms + + """ + The phone number associated with the customer for this order. + Useful for contacting customers about shipping updates, delivery notifications, or order issues. + Returns `null` if no phone number was provided during checkout. + """ + phone: String + + """ + The fulfillment location that was assigned when the order was created. + Orders can have multiple fulfillment orders. These fulfillment orders can each be assigned to a different location which is responsible for fulfilling a subset of the items in an order. The `Order.physicalLocation` field will only point to one of these locations. + Use the [`FulfillmentOrder`](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder) + object for up to date fulfillment location information. + """ + physicalLocation: Location @deprecated(reason: "Use `fulfillmentOrders` to get the fulfillment location for the order") + + """ + The purchase order (PO) number that's associated with an order. + This is typically provided by business customers who require a PO number for their procurement. + """ + poNumber: String + + """ + The currency used by the customer when placing the order. For example, "USD", "EUR", or "CAD". + This may differ from the shop's base currency when serving international customers or using multi-currency pricing. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The date and time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when the order was processed. + This date and time might not match the date and time when the order was created. + """ + processedAt: DateTime! + + """ + Whether the customer also purchased items from other stores in the network. + """ + productNetwork: Boolean! + + """ + The sales channel that the order was created from, such as the [Online Store](https://shopify.dev/docs/apps/build/app-surfaces#online-store) or [Shopify POS](https://shopify.dev/docs/apps/build/app-surfaces#point-of-sale). + """ + publication: Publication + + """ + The business entity that placed the order, including company details and purchasing relationships. + Used for B2B transactions to track which company or organization is responsible for the purchase and payment terms. + """ + purchasingEntity: PurchasingEntity + + """ + The marketing referral code from the link that the customer clicked to visit the store. + Supports the following URL attributes: "ref", "source", or "r". + For example, if the URL is `{shop}.myshopify.com/products/slide?ref=j2tj1tn2`, then this value is `j2tj1tn2`. + """ + referralCode: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.referralCode` instead") + + """ + A web domain or short description of the source that sent the customer to your online store. For example, "shopify.com" or "email". + """ + referrerDisplayText: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.referralInfoHtml` instead") + + """ + The URL of the webpage where the customer clicked a link that sent them to your online store. + """ + referrerUrl: URL @deprecated(reason: "Use `customerJourneySummary.lastVisit.referrerUrl` instead") + + """ + The difference between the suggested and actual refund amount of all refunds that have been applied to the order. + A positive value indicates a difference in the merchant's favor, and a negative value indicates a difference in the customer's favor. + """ + refundDiscrepancySet: MoneyBag! + + """ + Whether the order can be refunded based on its payment transactions. + Returns `false` for orders with no eligible payment transactions, such as fully refunded orders or orders with non-refundable payment methods. + """ + refundable: Boolean! + + """ + A list of refunds that have been applied to the order. + Refunds represent money returned to customers for returned items, cancellations, or adjustments. + """ + refunds("Truncate the array result to this size." first: Int): [Refund!]! + + """ + The URL of the source that the order originated from, if found in the domain registry. Returns `null` if the source URL isn't in the domain registry. + """ + registeredSourceUrl: URL + + """ + Whether the order requires physical shipping to the customer. + Returns `false` for digital-only orders (such as gift cards or downloadable products) and `true` for orders with physical products that need delivery. + Use this to determine shipping workflows and logistics requirements. + """ + requiresShipping: Boolean! + + """ + Whether any line items on the order can be restocked into inventory. + Returns `false` for digital products, custom items, or items that can't be resold. + """ + restockable: Boolean! + + """ + The physical location where a retail order is created or completed, except for draft POS orders completed using the "mark as paid" flow in the Shopify admin, which return `null`. Transactions associated with the order might have been processed at a different location. + """ + retailLocation: Location + + """ + The order's aggregated return status for display purposes. + Indicates the overall state of returns for the order, helping merchants track and manage the return process. + """ + returnStatus: OrderReturnStatus! + + """ + The returns associated with the order. + Contains information about items that customers have requested to return, including return reasons, status, and refund details. + Use this to track and manage the return process for order items. + """ + returns("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ReturnConnection! + + """ + The risk assessment summary for the order. + Provides fraud analysis and risk scoring to help you identify potentially fraudulent orders. + Use this to make informed decisions about order fulfillment and payment processing. + """ + risk: OrderRiskSummary! + + """ + The fraud risk level of the order. + """ + riskLevel: OrderRiskLevel! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """ + A list of risks associated with the order. + """ + risks("Truncate the array result to this size." first: Int): [OrderRisk!]! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment, which provides enhanced capabilities such as distinguishing risks from their provider.") + + """ + The shipping address where the order will be delivered. + Contains the customer's delivery location for fulfillment and shipping label generation. + Returns `null` for digital orders or orders that don't require shipping. + """ + shippingAddress: MailingAddress + + """ + A summary of all shipping costs on the order. + Aggregates shipping charges, discounts, and taxes to provide a single view of delivery costs. + """ + shippingLine: ShippingLine + + """ + The shipping methods applied to the order. + Each shipping line represents a shipping option chosen during checkout, including the carrier, service level, and cost. + Use this to understand shipping charges and delivery options for the order. + """ + shippingLines("Whether results should contain removed shipping lines." includeRemovals: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ShippingLineConnection! + + """ + The Shopify Protect details for the order, including fraud protection status and coverage information. + Shopify Protect helps protect eligible orders against fraudulent chargebacks. + Returns `null` if Shopify Protect is disabled for the shop or the order isn't eligible for protection. + Learn more about [Shopify Protect](https://www.shopify.com/protect). + """ + shopifyProtect: ShopifyProtectOrderSummary + + """ + A unique POS or third party order identifier. + For example, "1234-12-1000" or "111-98567-54". The [`receiptNumber`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-receiptNumber) field is derived from this value for POS orders. + """ + sourceIdentifier: String + + """ + The name of the source associated with the order, such as "web", "mobile_app", or "pos". Use this field to identify the platform where the order was placed. + """ + sourceName: String + + """ + The staff member who created or is responsible for the order. + Useful for tracking which team member handled phone orders, manual orders, or order modifications. + Returns `null` for orders created directly by customers through the online store. + """ + staffMember: StaffMember + + """ + The URL where customers can check their order's current status, including tracking information and delivery updates. + Provides order tracking links in emails, apps, or customer communications. + """ + statusPageUrl("Specifies the intended audience for the status page URL." audience: Audience, "Specifies the intended notification usage for the status page URL." notificationUsage: NotificationUsage): URL! + + """ + The sum of quantities for all line items that contribute to the order's subtotal price. + This excludes quantities for items like tips, shipping costs, or gift cards that don't affect the subtotal. + Use this to quickly understand the total item count for pricing calculations. + """ + subtotalLineItemsQuantity: Int! + + """ + The sum of the prices for all line items after discounts and before returns, in shop currency. + If `taxesIncluded` is `true`, then the subtotal also includes tax. + """ + subtotalPrice: Money @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The sum of the prices for all line items after discounts and before returns, in shop and presentment currencies. + If `taxesIncluded` is `true`, then the subtotal also includes tax. + """ + subtotalPriceSet: MoneyBag + + """ + A calculated refund suggestion for the order based on specified line items, shipping, and duties. + Use this to preview refund amounts, taxes, and processing fees before creating an actual refund. + """ + suggestedRefund("The amount to refund for shipping. Overrides the `refundShipping` argument." shippingAmount: Money, "Whether to refund the full shipping amount." refundShipping: Boolean, "The line items from the order to include in the refund." refundLineItems: [RefundLineItemInput!], "The duties from the order to include in the refund." refundDuties: [RefundDutyInput!], "Whether the suggested refund should be created from all refundable line items on the order.\nIf `true`, the `refundLineItems` argument will be ignored." suggestFullRefund: Boolean = false, "Specifies which refund methods to allocate the suggested refund amount to." refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS): SuggestedRefund + + """ + A comma separated list of tags associated with the order. Updating `tags` overwrites + any existing tags that were previously added to the order. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!]! + + """ + Whether taxes are exempt on the order. + Returns `true` for orders where the customer or business has a valid tax exemption, such as non-profit organizations or tax-free purchases. + Use this to understand if tax calculations were skipped during checkout. + """ + taxExempt: Boolean! + + """ + A list of all tax lines applied to line items on the order, before returns. + Tax line prices represent the total price for all tax lines with the same `rate` and `title`. + """ + taxLines: [TaxLine!]! + + """ + Whether taxes are included in the subtotal price of the order. + When `true`, the subtotal and line item prices include tax amounts. When `false`, taxes are calculated and displayed separately. + """ + taxesIncluded: Boolean! + + """ + Whether the order is a test. + Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. + A test order can't be converted into a real order and vice versa. + """ + test: Boolean! + + """ + The authorized amount that's uncaptured or undercaptured, in shop currency. + This amount isn't adjusted for returns. + """ + totalCapturable: Money! @deprecated(reason: "Use `totalCapturableSet` instead.") + + """ + The authorized amount that's uncaptured or undercaptured, in shop and presentment currencies. + This amount isn't adjusted for returns. + """ + totalCapturableSet: MoneyBag! + + """ + The total rounding adjustment applied to payments or refunds for an order involving cash payments. Applies to some countries where cash transactions are rounded to the nearest currency denomination. + """ + totalCashRoundingAdjustment: CashRoundingAdjustment! + + """ + The total amount discounted on the order before returns, in shop currency. + This includes both order and line level discounts. + """ + totalDiscounts: Money @deprecated(reason: "Use `totalDiscountsSet` instead.") + + """ + The total amount discounted on the order before returns, in shop and presentment currencies. + This includes both order and line level discounts. + """ + totalDiscountsSet: MoneyBag + + """ + The total amount not yet transacted for the order, in shop and presentment currencies. + A positive value indicates a difference in the merchant's favor (payment from customer to merchant) and a negative value indicates a difference in the customer's favor (refund from merchant to customer). + """ + totalOutstandingSet: MoneyBag! + + """ + The total price of the order, before returns, in shop currency. + This includes taxes and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price of the order, before returns, in shop and presentment currencies. + This includes taxes and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The total amount received from the customer before returns, in shop currency. + """ + totalReceived: Money! @deprecated(reason: "Use `totalReceivedSet` instead.") + + """ + The total amount received from the customer before returns, in shop and presentment currencies. + """ + totalReceivedSet: MoneyBag! + + """ + The total amount that was refunded, in shop currency. + """ + totalRefunded: Money! @deprecated(reason: "Use `totalRefundedSet` instead.") + + """ + The total amount that was refunded, in shop and presentment currencies. + """ + totalRefundedSet: MoneyBag! + + """ + The total amount of shipping that was refunded, in shop and presentment currencies. + """ + totalRefundedShippingSet: MoneyBag! + + """ + The total shipping amount before discounts and returns, in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping costs returned to the customer, in shop and presentment currencies. This includes fees and any related discounts that were refunded. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax amount before returns, in shop currency. + """ + totalTax: Money @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax amount before returns, in shop and presentment currencies. + """ + totalTaxSet: MoneyBag + + """ + The sum of all tip amounts for the order, in shop currency. + """ + totalTipReceived: MoneyV2! @deprecated(reason: "Use `totalTipReceivedSet` instead.") + + """ + The sum of all tip amounts for the order, in shop and presentment currencies. + """ + totalTipReceivedSet: MoneyBag! + + """ + The total weight of the order before returns, in grams. + """ + totalWeight: UnsignedInt64 + + """ + A list of transactions associated with the order. + """ + transactions("Truncate the array result to this size." first: Int, "Filter transactions by whether they are capturable." capturable: Boolean, "Filter transactions by whether they can be resolved manually.\nFor example, fully captured or voided transactions aren't manually resolvable." manuallyResolvable: Boolean): [OrderTransaction!]! + + """ + The number of transactions associated with the order. + """ + transactionsCount: Count + + """ + Whether no payments have been made for the order. + """ + unpaid: Boolean! + + """ + The date and time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when the order was last modified. + """ + updatedAt: DateTime! +} + +""" +The possible order action types for a +[sales agreement](https://shopify.dev/api/admin-graphql/latest/interfaces/salesagreement). +""" +enum OrderActionType { + """ + An order with a purchase or charge. + """ + ORDER + + """ + An edit to the order. + """ + ORDER_EDIT + + """ + A refund on the order. + """ + REFUND + + """ + A return on the order. + """ + RETURN + + """ + An unknown agreement action. Represents new actions that may be added in future versions. + """ + UNKNOWN +} + +""" +An order adjustment accounts for the difference between a calculated and actual refund amount. +""" +type OrderAdjustment implements Node { + """ + The amount of the order adjustment in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + An optional reason that explains a discrepancy between calculated and actual refund amounts. + """ + reason: OrderAdjustmentDiscrepancyReason + + """ + The tax amount of the order adjustment in shop and presentment currencies. + """ + taxAmountSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple OrderAdjustments. +""" +type OrderAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderAdjustmentEdge!]! + + """ + A list of nodes that are contained in OrderAdjustmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [OrderAdjustment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Discrepancy reasons for order adjustments. +""" +enum OrderAdjustmentDiscrepancyReason { + """ + The discrepancy reason is restocking. + """ + RESTOCK + + """ + The discrepancy reason is damage. + """ + DAMAGE + + """ + The discrepancy reason is customer. + """ + CUSTOMER + + """ + The discrepancy reason is not one of the predefined reasons. + """ + REFUND_DISCREPANCY + + """ + The discrepancy reason is balance adjustment. + """ + FULL_RETURN_BALANCING_ADJUSTMENT + + """ + The discrepancy reason is pending refund. + """ + PENDING_REFUND_DISCREPANCY +} + +""" +An auto-generated type which holds one OrderAdjustment and a cursor during pagination. +""" +type OrderAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderAdjustmentEdge. + """ + node: OrderAdjustment! +} + +""" +Discrepancy reasons for order adjustments. +""" +enum OrderAdjustmentInputDiscrepancyReason { + """ + The discrepancy reason is restocking. + """ + RESTOCK + + """ + The discrepancy reason is damage. + """ + DAMAGE + + """ + The discrepancy reason is customer. + """ + CUSTOMER + + """ + The discrepancy reason is not one of the predefined reasons. + """ + OTHER +} + +""" +An agreement associated with an order placement. +""" +type OrderAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The order associated with the agreement. + """ + order: Order! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SaleConnection! + + """ + The staff member associated with the agreement. + """ + user: StaffMember +} + +""" +Identifies the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) that created an order. Common sources include "online store" for web purchases, "Point of Sale" for in-person sales, or custom app names for orders created through third-party integrations. + +Use this information to track order attribution, analyze sales channels, and route orders to appropriate fulfillment workflows based on their source. +""" +type OrderApp { + """ + The application icon. + """ + icon: Image! + + """ + The application ID. + """ + id: ID! + + """ + The name of the application. + """ + name: String! +} + +""" +Return type for `orderCancel` mutation. +""" +type OrderCancelPayload { + """ + The job that asynchronously cancels the order. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + orderCancelUserErrors: [OrderCancelUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `orderCancelUserErrors` instead.") +} + +""" +Represents the reason for the order's cancellation. +""" +enum OrderCancelReason { + """ + The customer wanted to cancel the order. + """ + CUSTOMER + + """ + Payment was declined. + """ + DECLINED + + """ + The order was fraudulent. + """ + FRAUD + + """ + There was insufficient inventory. + """ + INVENTORY + + """ + Staff made an error. + """ + STAFF + + """ + The order was canceled for an unlisted reason. + """ + OTHER +} + +""" +The input fields used to specify the refund method for an order cancellation. +""" +input OrderCancelRefundMethodInput @oneOf { + """ + Whether to refund to the original payment method. + """ + originalPaymentMethodsRefund: Boolean + + """ + Whether to refund to store credit. + """ + storeCreditRefund: OrderCancelStoreCreditRefundInput +} + +""" +The input fields used to refund to store credit. +""" +input OrderCancelStoreCreditRefundInput { + """ + The expiration date of the store credit. + """ + expiresAt: DateTime +} + +""" +Errors related to order cancellation. +""" +type OrderCancelUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCancelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCancelUserError`. +""" +enum OrderCancelUserErrorCode { + """ + An order refund was requested but the user does not have the refund_orders permission. + """ + NO_REFUND_PERMISSION + + """ + An order refund was requested but the user does not have the refund_to_store_credit permission. + """ + NO_REFUND_TO_STORE_CREDIT_PERMISSION + + """ + A store credit order refund was requested but the expiration date is in the past. + """ + STORE_CREDIT_REFUND_EXPIRATION_IN_PAST + + """ + A store credit order refund was requested but the order has no customer. + """ + STORE_CREDIT_REFUND_MISSING_CUSTOMER + + """ + A store credit order refund was requested but the order is a B2B order. + """ + STORE_CREDIT_REFUND_B2B_NOT_SUPPORTED + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +Details about the order cancellation. +""" +type OrderCancellation { + """ + Staff provided note for the order cancellation. + """ + staffNote: String +} + +""" +The input fields for the authorized transaction to capture and the total amount to capture from it. +""" +input OrderCaptureInput { + """ + The ID of the order to capture. + """ + id: ID! + + """ + The ID of the authorized transaction to capture. + """ + parentTransactionId: ID! + + """ + The amount to capture. The capture amount can't be greater than the amount of the authorized transaction. + """ + amount: Money! + + """ + The currency (in ISO format) that's used to capture the order. This must be the presentment currency (the currency used by the customer) and is a required field for orders where the currency and presentment currency differ. + """ + currency: CurrencyCode + + """ + Indicates whether this is to be the final capture for the order transaction. Only applies to + Shopify Payments authorizations which are multi-capturable. If true, any uncaptured amount from the + authorization will be voided after the capture is completed. If false, the authorization will remain open + for future captures. + + For multi-capturable authorizations, this defaults to false if not provided. This field has no effect on + authorizations which aren't multi-capturable (can only be captured once), or on other types of + transactions. + """ + finalCapture: Boolean +} + +""" +Return type for `orderCapture` mutation. +""" +type OrderCapturePayload { + """ + The created capture transaction. + """ + transaction: OrderTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying an open order to close. +""" +input OrderCloseInput { + """ + The ID of the order to close. + """ + id: ID! +} + +""" +Return type for `orderClose` mutation. +""" +type OrderClosePayload { + """ + The closed order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Orders. +""" +type OrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderEdge!]! + + """ + A list of nodes that are contained in OrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Order!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for identifying an existing customer to associate with the order. +""" +input OrderCreateAssociateCustomerAttributesInput { + """ + The customer to associate to the order. + """ + id: ID + + """ + The email of the customer to associate to the order. + + > Note: + > If both this email input field and the email on `OrderCreateOrderInput` are provided, this field will + > take precedence. + """ + email: String +} + +""" +The input fields for a note attribute for an order. +""" +input OrderCreateCustomAttributeInput { + """ + The key or name of the custom attribute. + """ + key: String! + + """ + The value of the custom attribute. + """ + value: String! +} + +""" +The input fields for creating a customer's mailing address. +""" +input OrderCreateCustomerAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String + + """ + The first name of the customer. + """ + firstName: String + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields for a customer to associate with an order. Allows creation of a new customer or specifying an existing one. +""" +input OrderCreateCustomerInput @oneOf { + """ + An existing customer to associate with the order, specified by ID. + """ + toAssociate: OrderCreateAssociateCustomerAttributesInput + + """ + A new customer to create or update and associate with the order. + """ + toUpsert: OrderCreateUpsertCustomerAttributesInput +} + +""" +The input fields for a discount code to apply to an order. Only one type of discount can be applied to an order. +""" +input OrderCreateDiscountCodeInput { + """ + A percentage discount code applied to the line items on the order. + """ + itemPercentageDiscountCode: OrderCreatePercentageDiscountCodeAttributesInput + + """ + A fixed amount discount code applied to the line items on the order. + """ + itemFixedDiscountCode: OrderCreateFixedDiscountCodeAttributesInput + + """ + A free shipping discount code applied to the shipping on an order. + """ + freeShippingDiscountCode: OrderCreateFreeShippingDiscountCodeAttributesInput +} + +""" +The status of payments associated with the order. Can only be set when the order is created. +""" +enum OrderCreateFinancialStatus { + """ + The payments are pending. Payment might fail in this state. Check again to confirm whether the payments have been paid successfully. + """ + PENDING + + """ + The payments have been authorized. + """ + AUTHORIZED + + """ + The order has been partially paid. + """ + PARTIALLY_PAID + + """ + The payments have been paid. + """ + PAID + + """ + The payments have been partially refunded. + """ + PARTIALLY_REFUNDED + + """ + The payments have been refunded. + """ + REFUNDED + + """ + The payments have been voided. + """ + VOIDED + + """ + The payments have been expired. + """ + EXPIRED +} + +""" +The input fields for a fixed amount discount code to apply to an order. +""" +input OrderCreateFixedDiscountCodeAttributesInput { + """ + The discount code that was entered at checkout. + """ + code: String! + + """ + The amount that's deducted from the order total. When you create an order, this value is the monetary amount to deduct. + """ + amountSet: MoneyBagInput +} + +""" +The input fields for a free shipping discount code to apply to an order. +""" +input OrderCreateFreeShippingDiscountCodeAttributesInput { + """ + The discount code that was entered at checkout. + """ + code: String! +} + +""" +The input fields for a fulfillment to create for an order. +""" +input OrderCreateFulfillmentInput { + """ + The ID of the location to fulfill the order from. + """ + locationId: ID! + + """ + The address at which the fulfillment occurred. + """ + originAddress: FulfillmentOriginAddressInput + + """ + Whether the customer should be notified of changes with the fulfillment. + """ + notifyCustomer: Boolean = false + + """ + The status of the shipment. + """ + shipmentStatus: FulfillmentEventStatus + + """ + The tracking number of the fulfillment. + + The tracking number will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + """ + trackingNumber: String + + """ + The name of the tracking company. + + If you specify a tracking company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + The same tracking company will be applied to all tracking numbers specified. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + > Note: + > Send the tracking company name exactly as written in + > [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + > (capitalization matters). + """ + trackingCompany: String +} + +""" +The order's status in terms of fulfilled line items. +""" +enum OrderCreateFulfillmentStatus { + """ + Every line item in the order has been fulfilled. + """ + FULFILLED + + """ + At least one line item in the order has been fulfilled. + """ + PARTIAL + + """ + Every line item in the order has been restocked and the order canceled. + """ + RESTOCKED +} + +""" +The types of behavior to use when updating inventory. +""" +enum OrderCreateInputsInventoryBehavior { + """ + Do not claim inventory. + """ + BYPASS + + """ + Ignore the product's inventory policy and claim inventory. + """ + DECREMENT_IGNORING_POLICY + + """ + Follow the product's inventory policy and claim inventory, if possible. + """ + DECREMENT_OBEYING_POLICY +} + +""" +The input fields for a line item to create for an order. +""" +input OrderCreateLineItemInput { + """ + The handle of a fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) is a third-party fulfillment service. Third-party fulfillment services don't have a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was awaiting fulfillment by a third-party fulfillment service. Third-party fulfillment services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: String + + """ + Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges. + """ + giftCard: Boolean = false + + """ + The price of the item before discounts have been applied in the shop currency. + """ + priceSet: MoneyBagInput + + """ + The ID of the product that the line item belongs to. Can be `null` if the original product associated with the order is deleted at a later date. + """ + productId: ID + + """ + An array of custom information for the item that has been added to the cart. Often used to provide product customization options. + """ + properties: [OrderCreateLineItemPropertyInput!] + + """ + The number of items that were purchased. + """ + quantity: Int! + + """ + Whether the item requires shipping. + """ + requiresShipping: Boolean = false + + """ + The item's SKU (stock keeping unit). + """ + sku: String + + """ + A list of tax line objects, each of which details a tax applied to the item. + """ + taxLines: [OrderCreateTaxLineInput!] + + """ + Whether the item was taxable. + """ + taxable: Boolean = true + + """ + The title of the product. + """ + title: String + + """ + The ID of the product variant. If both `productId` and `variantId` are provided, then the product ID that corresponds to the `variantId` is used. + """ + variantId: ID + + """ + The title of the product variant. + """ + variantTitle: String + + """ + The name of the item's supplier. + """ + vendor: String + + """ + The weight of the line item. This will take precedence over the weight of the product variant, if one was specified. + """ + weight: WeightInput +} + +""" +The input fields for a line item property for an order. +""" +input OrderCreateLineItemPropertyInput { + """ + The name of the line item property. + """ + name: String! + + """ + The value of the line item property. + """ + value: String! +} + +""" +Return type for `orderCreateMandatePayment` mutation. +""" +type OrderCreateMandatePaymentPayload { + """ + The async job used for charging the payment. + """ + job: Job + + """ + The Unique ID for the created payment. + """ + paymentReferenceId: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateMandatePaymentUserError!]! +} + +""" +An error that occurs during the execution of `OrderCreateMandatePayment`. +""" +type OrderCreateMandatePaymentUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateMandatePaymentUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateMandatePaymentUserError`. +""" +enum OrderCreateMandatePaymentUserErrorCode { + """ + Errors for mandate payment on order. + """ + ORDER_MANDATE_PAYMENT_ERROR_CODE +} + +""" +An error that occurs during the execution of a order create manual payment mutation. +""" +type OrderCreateManualPaymentOrderCreateManualPaymentError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateManualPaymentOrderCreateManualPaymentErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateManualPaymentOrderCreateManualPaymentError`. +""" +enum OrderCreateManualPaymentOrderCreateManualPaymentErrorCode { + """ + Order is not found. + """ + ORDER_NOT_FOUND + + """ + Amount must be positive. + """ + AMOUNT_NOT_POSITIVE + + """ + Payment gateway is not found. + """ + GATEWAY_NOT_FOUND + + """ + Amount exceeds the remaining balance. + """ + AMOUNT_EXCEEDS_BALANCE + + """ + Order is temporarily unavailable. + """ + ORDER_IS_TEMPORARILY_UNAVAILABLE + + """ + Indicates that the processedAt field is invalid, such as when it references a future date. + """ + PROCESSED_AT_INVALID + + """ + The currency of the amount doesn't match the presentment currency of the order. + """ + CURRENCY_MISMATCH +} + +""" +Return type for `orderCreateManualPayment` mutation. +""" +type OrderCreateManualPaymentPayload { + """ + The order recorded a manual payment. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateManualPaymentOrderCreateManualPaymentError!]! +} + +""" +The input fields that define the strategies for updating inventory and +whether to send shipping and order confirmations to customers. +""" +input OrderCreateOptionsInput { + """ + The strategy for handling updates to inventory: not claiming inventory, ignoring inventory policies, + or following policies when claiming inventory. + """ + inventoryBehaviour: OrderCreateInputsInventoryBehavior = BYPASS + + """ + Whether to send an order confirmation to the customer. + """ + sendReceipt: Boolean = false + + """ + Whether to send a shipping confirmation to the customer. + """ + sendFulfillmentReceipt: Boolean = false +} + +""" +The input fields for creating an order. +""" +input OrderCreateOrderInput { + """ + The mailing address associated with the payment method. This address is an optional field that won't be + available on orders that don't require a payment method. + + > Note: + > If a customer is provided, this field or `shipping_address` (which has precedence) will be set as the + > customer's default address. Additionally, if the provided customer is new or hasn't created an order yet + > then their name will be set to the first/last name from this address (if provided). + """ + billingAddress: MailingAddressInput + + """ + Whether the customer consented to receive email updates from the shop. + """ + buyerAcceptsMarketing: Boolean = null + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the order was closed. Returns null if the order isn't closed. + """ + closedAt: DateTime + + """ + The ID of the purchasing company's location for the order. + """ + companyLocationId: ID + + """ + The shop-facing currency for the order. If not specified, then the shop's default currency is used. + """ + currency: CurrencyCode + + """ + A list of extra information that's added to the order. Appears in the **Additional details** section of an order details page. + """ + customAttributes: [OrderCreateCustomAttributeInput!] + + """ + The customer to associate to the order. + """ + customerId: ID @deprecated(reason: "This is replaced by the `customer` field in a future version.") + + """ + The customer to associate to the order. + """ + customer: OrderCreateCustomerInput + + """ + A discount code applied to the order. + """ + discountCode: OrderCreateDiscountCodeInput + + """ + A new customer email address for the order. + + > Note: + > If a customer is provided, and no email is provided, the customer's email will be set to this field. + """ + email: String + + """ + The financial status of the order. If not specified, then this will be derived through the given transactions. Note that it's possible to specify a status that doesn't match the given transactions and it will persist, but if an operation later occurs on the order, the status may then be recalculated to match the current state of transactions. + """ + financialStatus: OrderCreateFinancialStatus + + """ + The fulfillment to create for the order. This will apply to all line items. + """ + fulfillment: OrderCreateFulfillmentInput + + """ + The fulfillment status of the order. Will default to `unfulfilled` if not included. + """ + fulfillmentStatus: OrderCreateFulfillmentStatus + + """ + The line items to create for the order. + """ + lineItems: [OrderCreateLineItemInput!] + + """ + A list of metafields to add to the order. + """ + metafields: [MetafieldInput!] + + """ + The order name, generated by combining the `order_number` property with the order prefix and suffix that are set in the merchant's [general settings](https://www.shopify.com/admin/settings/general). This is different from the `id` property, which is the ID of the order used by the API. This field can also be set by the API to be any string value. + """ + name: String + + """ + The new contents for the note associated with the order. + """ + note: String + + """ + A new customer phone number for the order. + """ + phone: String + + """ + The purchase order number associated to this order. + """ + poNumber: String + + """ + The presentment currency that was used to display prices to the customer. This must be specified if any presentment currencies are used in the order. + """ + presentmentCurrency: CurrencyCode + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when an order was processed. This value is the date that appears on your orders and that's used in the analytic reports. If you're importing orders from an app or another platform, then you can set processed_at to a date and time in the past to match when the original order was created. As of API version 2026-07, values in the future are clamped to the current time. In earlier versions, future values return a `PROCESSED_AT_INVALID` error. + """ + processedAt: DateTime + + """ + The website where the customer clicked a link to the shop. + """ + referringSite: URL + + """ + The mailing address to where the order will be shipped. + + > Note: + > If a customer is provided, this field (which has precedence) or `billing_address` will be set as the + > customer's default address. Additionally, if the provided customer doesn't have a first or last name + > then it will be set to the first/last name from this address (if provided). + """ + shippingAddress: MailingAddressInput + + """ + An array of objects, each of which details a shipping method used. + """ + shippingLines: [OrderCreateShippingLineInput!] + + """ + The ID of the order placed on the originating platform. This value doesn't correspond to the Shopify ID that's generated from a completed draft. + """ + sourceIdentifier: String + + """ + The source channel that the order is attributed to. Set this to the handle of an order attribution definition configured for your sales channel app, such as `youtube` or `channel:amazon-us`. To set up order attribution for your app, follow the [order attribution guide](https://shopify.dev/docs/apps/build/sales-channels/order-attribution). + """ + sourceName: String + + """ + A valid URL to the original order on the originating surface. This URL is displayed to merchants on the Order Details page. If the URL is invalid, then it won't be displayed. + """ + sourceUrl: URL + + """ + A comma separated list of tags that have been added to the draft order. + """ + tags: [String!] + + """ + Whether taxes are included in the order subtotal. + """ + taxesIncluded: Boolean = false + + """ + An array of tax line objects, each of which details a tax applicable to the order. When creating an order through the API, tax lines can be specified on the order or the line items but not both. Tax lines specified on the order are split across the _taxable_ line items in the created order. + """ + taxLines: [OrderCreateTaxLineInput!] + + """ + Whether this is a test order. + """ + test: Boolean = false + + """ + The payment transactions to create for the order. + """ + transactions: [OrderCreateOrderTransactionInput!] + + """ + The ID of the user who processed the order, if applicable. + """ + userId: ID +} + +""" +The input fields for a transaction to create for an order. +""" +input OrderCreateOrderTransactionInput { + """ + The amount of the transaction. + """ + amountSet: MoneyBagInput! + + """ + The authorization code associated with the transaction. + """ + authorizationCode: String + + """ + The ID of the device used to process the transaction. + """ + deviceId: ID + + """ + The name of the gateway the transaction was issued through. + """ + gateway: String + + """ + The ID of the gift card used for this transaction. + """ + giftCardId: ID + + """ + The kind of transaction. + """ + kind: OrderTransactionKind = SALE + + """ + The ID of the location where the transaction was processed. + """ + locationId: ID + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime + + """ + The transaction receipt that the payment gateway attaches to the transaction. + The value of this field depends on which payment gateway processed the transaction. + """ + receiptJson: JSON + + """ + The status of the transaction. + """ + status: OrderTransactionStatus = SUCCESS + + """ + Whether the transaction is a test transaction. + """ + test: Boolean = false + + """ + The ID of the user who processed the transaction. + """ + userId: ID +} + +""" +Return type for `orderCreate` mutation. +""" +type OrderCreatePayload { + """ + The order that was created. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateUserError!]! +} + +""" +The input fields for a percentage discount code to apply to an order. +""" +input OrderCreatePercentageDiscountCodeAttributesInput { + """ + The discount code that was entered at checkout. + """ + code: String! + + """ + The amount that's deducted from the order total. When you create an order, this value is the percentage to deduct. + """ + percentage: Float +} + +""" +The input fields for a shipping line to create for an order. +""" +input OrderCreateShippingLineInput { + """ + A reference to the shipping method. + """ + code: String + + """ + The price of this shipping method in the shop currency. Can't be negative. + """ + priceSet: MoneyBagInput! + + """ + The source of the shipping method. + """ + source: String + + """ + A list of tax line objects, each of which details a tax applicable to this shipping line. + """ + taxLines: [OrderCreateTaxLineInput!] + + """ + The title of the shipping method. + """ + title: String! +} + +""" +The input fields for a tax line to create for an order. +""" +input OrderCreateTaxLineInput { + """ + Whether the channel that submitted the tax line is liable for remitting. A value of `null` indicates unknown liability for the tax line. + """ + channelLiable: Boolean = false + + """ + The amount added to the order for this tax in shop and presentment currencies after discounts are applied. + """ + priceSet: MoneyBagInput + + """ + The proportion of the item price that the tax represents as a decimal. + """ + rate: Decimal! + + """ + The name of the tax line to create. + """ + title: String! +} + +""" +The input fields for creating a new customer object or identifying an existing customer to update & associate with the order. +""" +input OrderCreateUpsertCustomerAttributesInput { + """ + A list of addresses to associate with the customer. + """ + addresses: [OrderCreateCustomerAddressInput!] + + """ + The email address to update the customer with. If no `id` is provided, this is used to uniquely identify + the customer. + + > Note: + > If both this email input field and the email on `OrderCreateOrderInput` are provided, this field will + > take precedence. + """ + email: String + + """ + The first name of the customer. + """ + firstName: String + + """ + The id of the customer to associate to the order. + """ + id: ID + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique identifier for the customer that's used with [Multipass login](https://shopify.dev/api/multipass). + """ + multipassIdentifier: String + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number ([E.164 format](https://en.wikipedia.org/wiki/E.164)) for this customer. + Attempting to assign the same phone number to multiple customers returns an error. The property can be + set using different formats, but each format must represent a number that can be dialed from anywhere + in the world. The following formats are all valid: + - 6135551212 + - +16135551212 + - (613)555-1212 + - +1 613-555-1212 + """ + phone: String + + """ + Tags that the shop owner has attached to the customer. A customer can have up to 250 tags. Each tag can have up to 255 characters. + """ + tags: [String!] + + """ + Whether the customer is exempt from paying taxes on their order. If `true`, then taxes won't be applied to an order at checkout. If `false`, then taxes will be applied at checkout. + """ + taxExempt: Boolean +} + +""" +An error that occurs during the execution of `OrderCreate`. +""" +type OrderCreateUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateUserError`. +""" +enum OrderCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + Indicates that the line item fulfillment service handle is invalid. + """ + FULFILLMENT_SERVICE_INVALID + + """ + Indicates that the inventory claim failed during order creation. + """ + INVENTORY_CLAIM_FAILED + + """ + Indicates that the processed_at field is invalid, such as when it references a future date. + """ + PROCESSED_AT_INVALID + + """ + Indicates that the tax line rate is missing - only enforced for LineItem or ShippingLine-level tax lines. + """ + TAX_LINE_RATE_MISSING + + """ + Indicates that both customer_id and customer were provided - only one is permitted. + """ + REDUNDANT_CUSTOMER_FIELDS + + """ + Indicates that the shop is dormant and cannot create orders. + """ + SHOP_DORMANT +} + +""" +Return type for `orderCustomerRemove` mutation. +""" +type OrderCustomerRemovePayload { + """ + The order that had its customer removed. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCustomerRemoveUserError!]! +} + +""" +Errors related to order customer removal. +""" +type OrderCustomerRemoveUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCustomerRemoveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerRemoveUserError`. +""" +enum OrderCustomerRemoveUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + An error ocurred while saving the order. + """ + NOT_SAVED +} + +""" +Return type for `orderCustomerSet` mutation. +""" +type OrderCustomerSetPayload { + """ + The order that had a customer set. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCustomerSetUserError!]! +} + +""" +Errors related to order customer set. +""" +type OrderCustomerSetUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCustomerSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerSetUserError`. +""" +enum OrderCustomerSetUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + An error ocurred while saving the order. + """ + NOT_SAVED + + """ + The customer does not have the permissions to place this order. + """ + NOT_PERMITTED +} + +""" +Return type for `orderDelete` mutation. +""" +type OrderDeletePayload { + """ + Deleted order ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderDeleteUserError!]! +} + +""" +Errors related to deleting an order. +""" +type OrderDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: OrderDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderDeleteUserError`. +""" +enum OrderDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is invalid. + """ + INVALID +} + +""" +Represents the order's current financial status. +""" +enum OrderDisplayFinancialStatus { + """ + Displayed as **Pending**. Orders have this status when the payment provider needs time to complete the payment, or when manual payment methods are being used. + """ + PENDING + + """ + Displayed as **Authorized**. The payment provider has validated the customer's payment information. This status appears only for manual payment capture and indicates payments should be captured before the authorization period expires. + """ + AUTHORIZED + + """ + Displayed as **Partially paid**. A payment was manually captured for the order with an amount less than the full order value. + """ + PARTIALLY_PAID + + """ + Displayed as **Partially refunded**. The amount refunded to a customer is less than the full amount paid for an order. + """ + PARTIALLY_REFUNDED + + """ + Displayed as **Voided**. An unpaid (payment authorized but not captured) order was manually + canceled. + """ + VOIDED + + """ + Displayed as **Paid**. Payment was automatically or manually captured, or the order was marked as paid. + """ + PAID + + """ + Displayed as **Refunded**. The full amount paid for an order was refunded to the customer. + """ + REFUNDED + + """ + Displayed as **Expired**. Payment wasn't captured before the payment provider's deadline on an authorized order. Some payment providers use this status to indicate failed payment processing. + """ + EXPIRED +} + +""" +Represents the order's aggregated fulfillment status for display purposes. +""" +enum OrderDisplayFulfillmentStatus { + """ + Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. + """ + UNFULFILLED + + """ + Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. + """ + PARTIALLY_FULFILLED + + """ + Displayed as **Fulfilled**. All the items in the order have been fulfilled. + """ + FULFILLED + + """ + Displayed as **Restocked**. All the items in the order have been restocked. Replaced by the "UNFULFILLED" status. + """ + RESTOCKED + + """ + Displayed as **Pending fulfillment**. A request for fulfillment of some items awaits a response from the fulfillment service. Replaced by the "IN_PROGRESS" status. + """ + PENDING_FULFILLMENT + + """ + Displayed as **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. + """ + OPEN + + """ + Displayed as **In progress**. All of the items in the order have had a request for fulfillment sent to the fulfillment service or all of the items have been marked as in progress. + """ + IN_PROGRESS + + """ + Displayed as **On hold**. All of the unfulfilled items in this order are on hold. + """ + ON_HOLD + + """ + Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. + """ + SCHEDULED + + """ + Displayed as **Request declined**. Some of the items in the order have been rejected for fulfillment by the fulfillment service. + """ + REQUEST_DECLINED +} + +""" +A summary of the important details for a dispute on an order. +""" +type OrderDisputeSummary implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The type that the dispute was initiated as. + """ + initiatedAs: DisputeType! + + """ + The current status of the dispute. + """ + status: DisputeStatus! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. +""" +type OrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderEdge. + """ + node: Order! +} + +""" +Return type for `orderEditAddCustomItem` mutation. +""" +type OrderEditAddCustomItemPayload { + """ + The custom line item that will be added to the order based on the current edits. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditAddLineItemDiscount` mutation. +""" +type OrderEditAddLineItemDiscountPayload { + """ + The discount applied to a line item during this order edit. + """ + addedDiscountStagedChange: OrderStagedChangeAddLineItemDiscount + + """ + The line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields used to add a shipping line. +""" +input OrderEditAddShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Return type for `orderEditAddShippingLine` mutation. +""" +type OrderEditAddShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The [calculated shipping line](https://shopify.dev/api/admin-graphql/latest/objects/calculatedshippingline) + that's added during this order edit. + """ + calculatedShippingLine: CalculatedShippingLine + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditAddShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditAddShippingLine`. +""" +type OrderEditAddShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditAddShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditAddShippingLineUserError`. +""" +enum OrderEditAddShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditAddVariant` mutation. +""" +type OrderEditAddVariantPayload { + """ + The [calculated line item](https://shopify.dev/api/admin-graphql/latest/objects/calculatedlineitem) + that's added during this order edit. + """ + calculatedLineItem: CalculatedLineItem + + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An agreement associated with an edit to the order. +""" +type OrderEditAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SaleConnection! + + """ + The staff member associated with the agreement. + """ + user: StaffMember +} + +""" +The input fields used to add a discount during an order edit. +""" +input OrderEditAppliedDiscountInput { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount. + """ + fixedValue: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentValue: Float +} + +""" +Return type for `orderEditBegin` mutation. +""" +type OrderEditBeginPayload { + """ + The order that will be edited. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session that was created. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditCommit` mutation. +""" +type OrderEditCommitPayload { + """ + The order with changes applied. + """ + order: Order + + """ + Messages to display to the user after the staged changes are commmitted. + """ + successMessages: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveDiscount` mutation. +""" +type OrderEditRemoveDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveDiscount`. +""" +type OrderEditRemoveDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveDiscountUserError`. +""" +enum OrderEditRemoveDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditRemoveLineItemDiscount` mutation. +""" +type OrderEditRemoveLineItemDiscountPayload { + """ + The calculated line item after removal of the discount. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveShippingLine` mutation. +""" +type OrderEditRemoveShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveShippingLine`. +""" +type OrderEditRemoveShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveShippingLineUserError`. +""" +enum OrderEditRemoveShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +An edit session for an order. +""" +type OrderEditSession implements Node { + """ + The unique ID of the order edit session. + """ + id: ID! +} + +""" +Return type for `orderEditSetQuantity` mutation. +""" +type OrderEditSetQuantityPayload { + """ + The calculated line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + The calculated order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditUpdateDiscount` mutation. +""" +type OrderEditUpdateDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateDiscount`. +""" +type OrderEditUpdateDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateDiscountUserError`. +""" +enum OrderEditUpdateDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields used to update a shipping line. +""" +input OrderEditUpdateShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput + + """ + The title of the shipping line. + """ + title: String +} + +""" +Return type for `orderEditUpdateShippingLine` mutation. +""" +type OrderEditUpdateShippingLinePayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateShippingLine`. +""" +type OrderEditUpdateShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateShippingLineUserError`. +""" +enum OrderEditUpdateShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a order. +""" +input OrderIdentifierInput @oneOf { + """ + The ID of the order. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the order. + """ + customId: UniqueMetafieldValueInput +} + +""" +The input fields for specifying the information to be updated on an order when using the orderUpdate mutation. +""" +input OrderInput { + """ + The ID of the order to update. + """ + id: ID! + + """ + A new customer email address for the order. Overwrites the existing email address. + """ + email: String + + """ + A new customer phone number for the order. Overwrites the existing phone number. + """ + phone: String + + """ + The new contents for the note associated with the order. Overwrites the existing note. + """ + note: String + + """ + A new list of tags for the order. Overwrites the existing tags. + """ + tags: [String!] + + """ + The new shipping address for the order. Overwrites the existing shipping address. + """ + shippingAddress: MailingAddressInput + + """ + A new list of custom attributes for the order. Overwrites the existing custom attributes. + """ + customAttributes: [AttributeInput!] + + """ + A list of new metafields to add to the existing metafields for the order. + """ + metafields: [MetafieldInput!] + + """ + A list of new [localization extensions](https://shopify.dev/api/admin-graphql/latest/objects/localizationextension) to add to the existing list of localization extensions for the order. + """ + localizationExtensions: [LocalizationExtensionInput!] @deprecated(reason: "This field will be removed in a future version. Use `localizedFields` instead.") + + """ + A list of new [localized fields](https://shopify.dev/api/admin-graphql/latest/objects/localizedfield) to add to the existing list of localized fields for the order. + """ + localizedFields: [LocalizedFieldInput!] + + """ + The new purchase order number for the order. + """ + poNumber: String +} + +""" +Return type for `orderInvoiceSend` mutation. +""" +type OrderInvoiceSendPayload { + """ + The order associated with the invoice email. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderInvoiceSendUserError!]! +} + +""" +An error that occurs during the execution of `OrderInvoiceSend`. +""" +type OrderInvoiceSendUserError implements DisplayableError { + """ + The error code. + """ + code: OrderInvoiceSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderInvoiceSendUserError`. +""" +enum OrderInvoiceSendUserErrorCode { + """ + An error occurred while sending the invoice. + """ + ORDER_INVOICE_SEND_UNSUCCESSFUL +} + +""" +The input fields for specifying the order to mark as paid. +""" +input OrderMarkAsPaidInput { + """ + The ID of the order to mark as paid. + """ + id: ID! +} + +""" +Return type for `orderMarkAsPaid` mutation. +""" +type OrderMarkAsPaidPayload { + """ + The order marked as paid. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying a closed order to open. +""" +input OrderOpenInput { + """ + The ID of the order to open. + """ + id: ID! +} + +""" +Return type for `orderOpen` mutation. +""" +type OrderOpenPayload { + """ + The opened order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The payment collection details for an order that requires additional payment following an edit to the order. +""" +type OrderPaymentCollectionDetails { + """ + The URL to use for collecting an additional payment on the order. + """ + additionalPaymentCollectionUrl: URL + + """ + The list of vaulted payment methods for the order with their permissions. + """ + vaultedPaymentMethods: [PaymentMandate!] +} + +""" +The status of a customer's payment for an order. +""" +type OrderPaymentStatus { + """ + A message describing an error during the asynchronous processing of a payment. + """ + errorMessage: String + + """ + The ID of the payment, initially returned by an `orderCreateMandatePayment` or `orderCreatePayment` mutation. + """ + paymentReferenceId: String! + + """ + The status of the payment. + """ + status: OrderPaymentStatusResult! + + """ + The transaction associated with the payment. + """ + transactions: [OrderTransaction!]! + + """ + A translated message describing an error during the asynchronous processing of a payment. + """ + translatedErrorMessage: String +} + +""" +The type of a payment status. +""" +enum OrderPaymentStatusResult { + """ + The payment succeeded. + """ + SUCCESS + + """ + The payment is authorized. + """ + AUTHORIZED + + """ + The payment is voided. + """ + VOIDED + + """ + The payment is refunded. + """ + REFUNDED + + """ + The payment is captured. + """ + CAPTURED + + """ + The payment is in purchased status. + """ + PURCHASED + + """ + There was an error initiating the payment. + """ + ERROR + + """ + The payment is still being processed. + """ + PROCESSING + + """ + Redirect required. + """ + REDIRECT_REQUIRED + + """ + Payment can be retried. + """ + RETRYABLE + + """ + Status is unknown. + """ + UNKNOWN + + """ + The payment is awaiting processing. + """ + INITIATED + + """ + The payment is pending with the provider, and may take a while. + """ + PENDING +} + +""" +The order's aggregated return status that's used for display purposes. +An order might have multiple returns, so this field communicates the prioritized return status. +The `OrderReturnStatus` enum is a supported filter parameter in the [`orders` query](https://shopify.dev/api/admin-graphql/latest/queries/orders#:~:text=reference_location_id-,return_status,-risk_level). +""" +enum OrderReturnStatus { + """ + Some items in the order are being returned. + """ + IN_PROGRESS + + """ + All return shipments from a return in this order were inspected. + """ + INSPECTION_COMPLETE + + """ + No items in the order were returned. + """ + NO_RETURN + + """ + Some items in the order were returned. + """ + RETURNED + + """ + Some returns in the order were not completed successfully. + """ + RETURN_FAILED + + """ + A return was requested for some items in the order. + """ + RETURN_REQUESTED +} + +""" +Represents a fraud check on an order. This object is deprecated in favor of [OrderRiskAssessment](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment) and its enhanced capabilities. +""" +type OrderRisk { + """ + Whether the risk level is shown in the Shopify admin. If false, then this order risk is ignored when Shopify determines the overall risk level for the order. + """ + display: Boolean! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") + + """ + The likelihood that an order is fraudulent, based on this order risk. The level can be set by Shopify risk analysis or by an app. + """ + level: OrderRiskLevel @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """ + The risk message that's shown to the merchant in the Shopify admin. + """ + message: String @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") +} + +""" +The risk assessments for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskAssessment { + """ + Optional facts used to describe the risk assessment. The values in here are specific to the provider. + See the [examples for the mutation orderRiskAssessmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/orderRiskAssessmentCreate#section-examples). + """ + facts: [RiskFact!]! + + """ + The app that provided the assessment, `null` if the assessment was provided by Shopify. + """ + provider: App + + """ + The likelihood that the order is fraudulent, based on this risk assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +The input fields for an order risk assessment. +""" +input OrderRiskAssessmentCreateInput { + """ + The ID of the order receiving the fraud assessment. + """ + orderId: ID! + + """ + The risk level of the fraud assessment. + """ + riskLevel: RiskAssessmentResult! + + """ + The list of facts used to determine the fraud assessment. + """ + facts: [OrderRiskAssessmentFactInput!]! +} + +""" +Return type for `orderRiskAssessmentCreate` mutation. +""" +type OrderRiskAssessmentCreatePayload { + """ + The order risk assessment created. + """ + orderRiskAssessment: OrderRiskAssessment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderRiskAssessmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `OrderRiskAssessmentCreate`. +""" +type OrderRiskAssessmentCreateUserError implements DisplayableError { + """ + The error code. + """ + code: OrderRiskAssessmentCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderRiskAssessmentCreateUserError`. +""" +enum OrderRiskAssessmentCreateUserErrorCode { + """ + Too many facts were provided for the risk assessment. + """ + TOO_MANY_FACTS + + """ + The order is marked as fulfilled and can no longer accept new risk assessments. + """ + ORDER_ALREADY_FULFILLED + + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The input fields to create a fact on an order risk assessment. +""" +input OrderRiskAssessmentFactInput { + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! + + """ + A description of the fact. Large values are truncated to 256 characters. + """ + description: String! +} + +""" +The likelihood that an order is fraudulent. +This enum is deprecated in favor of +[RiskAssessmentResult](https://shopify.dev/api/admin-graphql/latest/enums/RiskAssessmentResult) +which allows for more granular risk levels, including PENDING and NONE. +""" +enum OrderRiskLevel { + """ + There is a low level of risk that this order is fraudulent. + """ + LOW + + """ + There is a medium level of risk that this order is fraudulent. + """ + MEDIUM + + """ + There is a high level of risk that this order is fraudulent. + """ + HIGH +} + +""" +List of possible values for an OrderRiskRecommendation recommendation. +""" +enum OrderRiskRecommendationResult { + """ + Recommends cancelling the order. + """ + CANCEL + + """ + Recommends investigating the order by contacting buyers. + """ + INVESTIGATE + + """ + Recommends fulfilling the order. + """ + ACCEPT + + """ + There is no recommended action for the order. + """ + NONE +} + +""" +Summary of risk characteristics for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskSummary { + """ + The list of risk assessments for the order. + """ + assessments: [OrderRiskAssessment!]! + + """ + The recommendation for the order based on the results of the risk assessments. This suggests the action the merchant should take with regards to its risk of fraud. + """ + recommendation: OrderRiskRecommendationResult! +} + +""" +The set of valid sort keys for the Order query. +""" +enum OrderSortKeys { + """ + Sorts by the date and time the order was created. + """ + CREATED_AT + + """ + Sorts by the current total price of an order in the shop currency, including any returns/refunds/removals. + """ + CURRENT_TOTAL_PRICE + + """ + Sorts by the customer's name. + """ + CUSTOMER_NAME + + """ + Sort by shipping address to analyze regional sales patterns or plan logistics. + """ + DESTINATION + + """ + Sorts by the financial status of the order. + """ + FINANCIAL_STATUS + + """ + Sorts by the order's fulfillment status. + """ + FULFILLMENT_STATUS + + """ + Sort by the `id` value. + """ + ID + + """ + Sorts by the order number. + """ + ORDER_NUMBER + + """ + Sort by the purchase order number to match external procurement systems or track recent orders. + """ + PO_NUMBER + + """ + Sorts by the date and time the order was processed. + """ + PROCESSED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the total quantity of all line items to identify large purchases or analyze inventory demand patterns. + """ + TOTAL_ITEMS_QUANTITY + + """ + Sorts by the total sold price of an order in the shop currency, excluding any returns/refunds/removals. + """ + TOTAL_PRICE + + """ + Sorts by the date and time the order was last updated. + """ + UPDATED_AT +} + +""" +A change that has been applied to an order. +""" +union OrderStagedChange = OrderStagedChangeAddCustomItem|OrderStagedChangeAddLineItemDiscount|OrderStagedChangeAddShippingLine|OrderStagedChangeAddVariant|OrderStagedChangeDecrementItem|OrderStagedChangeIncrementItem|OrderStagedChangeRemoveDiscount|OrderStagedChangeRemoveShippingLine + +""" +A change to the order representing the addition of a +custom line item. For example, you might want to add gift wrapping service +as a custom line item. +""" +type OrderStagedChangeAddCustomItem { + """ + The price of an individual item without any discounts applied. This value can't be negative. + """ + originalUnitPrice: MoneyV2! + + """ + The quantity of the custom item to add to the order. This value must be greater than zero. + """ + quantity: Int! + + """ + The title of the custom item. + """ + title: String! +} + +""" +The discount applied to an item that was added during the current order edit. +""" +type OrderStagedChangeAddLineItemDiscount { + """ + The description of the discount. + """ + description: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The pricing value of the discount. + """ + value: PricingValue! +} + +""" +A new [shipping line](https://shopify.dev/api/admin-graphql/latest/objects/shippingline) +added as part of an order edit. +""" +type OrderStagedChangeAddShippingLine { + """ + The phone number at the shipping address. + """ + phone: String + + """ + The shipping line's title that's shown to the buyer. + """ + presentmentTitle: String + + """ + The price that applies to the shipping line. + """ + price: MoneyV2! + + """ + The title of the shipping line. + """ + title: String +} + +""" +A change to the order representing the addition of an existing product variant. +""" +type OrderStagedChangeAddVariant { + """ + The quantity of the product variant that was added. + """ + quantity: Int! + + """ + The product variant that was added. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple OrderStagedChanges. +""" +type OrderStagedChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderStagedChangeEdge!]! + + """ + A list of nodes that are contained in OrderStagedChangeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [OrderStagedChange!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An removal of items from an existing line item on the order. +""" +type OrderStagedChangeDecrementItem { + """ + The number of items removed. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! + + """ + The intention to restock the removed items. + """ + restock: Boolean! +} + +""" +An auto-generated type which holds one OrderStagedChange and a cursor during pagination. +""" +type OrderStagedChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderStagedChangeEdge. + """ + node: OrderStagedChange! +} + +""" +An addition of items to an existing line item on the order. +""" +type OrderStagedChangeIncrementItem { + """ + The number of items added. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! +} + +""" +A discount application removed during an order edit. +""" +type OrderStagedChangeRemoveDiscount { + """ + The removed discount application. + """ + discountApplication: DiscountApplication! +} + +""" +A shipping line removed during an order edit. +""" +type OrderStagedChangeRemoveShippingLine { + """ + The removed shipping line. + """ + shippingLine: ShippingLine! +} + +""" +The `OrderTransaction` object represents a payment transaction that's associated with an order. An order +transaction is a specific action or event that happens within the context of an order, such as a customer paying +for a purchase or receiving a refund, or other payment-related activity. + +Use the `OrderTransaction` object to capture the complete lifecycle of a payment, from initial +authorization to final settlement, including refunds and currency exchanges. Common use cases for using the +`OrderTransaction` object include: + +- Processing new payments for orders +- Managing payment authorizations and captures +- Processing refunds for returned items +- Tracking payment status and errors +- Managing multi-currency transactions +- Handling payment gateway integrations + +Each `OrderTransaction` object has a [`kind`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionKind) +that defines the type of transaction and a [`status`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionStatus) +that indicates the current state of the transaction. The object stores detailed information about payment +methods, gateway processing, and settlement details. + +Learn more about [payment processing](https://help.shopify.com/manual/payments) +and [payment gateway integrations](https://www.shopify.com/ca/payment-gateways). +""" +type OrderTransaction implements Node { + """ + The masked account number associated with the payment method. + """ + accountNumber: String + + """ + The amount of money. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The rounding adjustment applied on the cash amount in shop and presentment currencies. + """ + amountRoundingSet: MoneyBag + + """ + The amount and currency of the transaction in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The amount and currency of the transaction. + """ + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """ + Authorization code associated with the transaction. + """ + authorizationCode: String @deprecated(reason: "Use `paymentId` instead.") + + """ + The time when the authorization expires. This field is available only to stores on a Shopify Plus plan. + """ + authorizationExpiresAt: DateTime + + """ + Date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. + """ + currencyExchangeAdjustment: CurrencyExchangeAdjustment + + """ + The Shopify Point of Sale device used to process the transaction. + """ + device: PointOfSaleDevice + + """ + A standardized error code, independent of the payment provider. + """ + errorCode: OrderTransactionErrorCode + + """ + The transaction fees charged on the order transaction. Only present for Shopify Payments transactions. + """ + fees: [TransactionFee!]! + + """ + The human-readable payment gateway name used to process the transaction. + """ + formattedGateway: String + + """ + The payment gateway used to process the transaction. + """ + gateway: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The kind of transaction. + """ + kind: OrderTransactionKind! + + """ + The physical location where the transaction was processed. + """ + location: Location + + """ + Whether the transaction is processed by manual payment gateway. + """ + manualPaymentGateway: Boolean! + + """ + Whether the transaction can be manually captured. + """ + manuallyCapturable: Boolean! + + """ + Specifies the available amount to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableV2` instead.") + + """ + Specifies the available amount with currency to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundableV2: MoneyV2 + + """ + Whether the transaction can be captured multiple times. + """ + multiCapturable: Boolean! + + """ + The associated order. + """ + order: Order + + """ + The associated parent transaction, for example the authorization of a capture. + """ + parentTransaction: OrderTransaction + + """ + The payment details for the transaction. + """ + paymentDetails: PaymentDetails + + """ + The payment icon to display for the transaction. + """ + paymentIcon("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image + + """ + The payment ID associated with the transaction. + """ + paymentId: String + + """ + The payment method used for the transaction. This value is `null` if the payment method is unknown. + """ + paymentMethod: PaymentMethods @deprecated(reason: "Use `paymentIcon` instead.") + + """ + Date and time when the transaction was processed. + """ + processedAt: DateTime + + """ + The transaction receipt that the payment gateway attaches to the transaction. + > **Note:** This field is **gateway-specific** and **not a stable contract**. + > Its structure and contents can vary by payment gateway and may change without notice. + > Apps **shouldn't parse or rely on this field for business logic**; prefer typed fields on `OrderTransaction` and related objects. + """ + receiptJson: JSON + + """ + The settlement currency. + """ + settlementCurrency: CurrencyCode + + """ + The rate used when converting the transaction amount to settlement currency. + """ + settlementCurrencyRate: Decimal + + """ + Contains all Shopify Payments information related to an order transaction. This field is available only to stores on a Shopify Plus plan. + """ + shopifyPaymentsSet: ShopifyPaymentsTransactionSet + + """ + The status of this transaction. + """ + status: OrderTransactionStatus! + + """ + Whether the transaction is a test transaction. + """ + test: Boolean! + + """ + The amount of the original authorization that remains unsettled. + During a pending capture, this reflects the full outstanding balance including the pending amount. + When no capture is pending, this equals the capturable amount. + Only available when an amount is capturable or manually marked as paid. + """ + totalUnsettled: Money @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + The amount of the original authorization that remains unsettled, in shop and presentment currencies. + During a pending capture, this reflects the full outstanding balance including the pending amount. + When no capture is pending, this equals the capturable amount. + Only available when an amount is capturable or manually marked as paid. + """ + totalUnsettledSet: MoneyBag + + """ + The amount with currency of the original authorization that remains unsettled. + During a pending capture, this reflects the full outstanding balance including the pending amount. + When no capture is pending, this equals the capturable amount. + Only available when an amount is capturable or manually marked as paid. + """ + totalUnsettledV2: MoneyV2 @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + Staff member who was logged into the Shopify POS device when the transaction was processed. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple OrderTransactions. +""" +type OrderTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderTransactionEdge!]! + + """ + A list of nodes that are contained in OrderTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [OrderTransaction!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OrderTransaction and a cursor during pagination. +""" +type OrderTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderTransactionEdge. + """ + node: OrderTransaction! +} + +""" +A standardized error code, independent of the payment provider. +""" +enum OrderTransactionErrorCode { + """ + The card number is incorrect. + """ + INCORRECT_NUMBER + + """ + The format of the card number is incorrect. + """ + INVALID_NUMBER + + """ + The format of the expiry date is incorrect. + """ + INVALID_EXPIRY_DATE + + """ + The format of the CVC is incorrect. + """ + INVALID_CVC + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + The card security code (CVC/CVV) is incorrect. + """ + INCORRECT_CVC + + """ + The ZIP or postal code doesn't match the one on file. + """ + INCORRECT_ZIP + + """ + The address is incorrect. + """ + INCORRECT_ADDRESS + + """ + The PIN entered is incorrect. + """ + INCORRECT_PIN + + """ + The card was declined. + """ + CARD_DECLINED + + """ + There was an error while processing the payment. + """ + PROCESSING_ERROR + + """ + The issuer declined the transaction, the customer should contact their issuer for more details. + """ + CALL_ISSUER + + """ + The card has been reported as lost or stolen, and the card issuer has requested that the merchant keep the card and call the number on the back. + """ + PICK_UP_CARD + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + A real card was used but the gateway was in test mode. + """ + TEST_MODE_LIVE_CARD + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE + + """ + There was an unknown error with processing the payment. + """ + GENERIC_ERROR + + """ + The payment method is not available in the customer's country. + """ + INVALID_COUNTRY + + """ + The amount is invalid. + """ + INVALID_AMOUNT + + """ + The payment method is momentarily unavailable. + """ + PAYMENT_METHOD_UNAVAILABLE + + """ + The payment method was invalid. + """ + AMAZON_PAYMENTS_INVALID_PAYMENT_METHOD + + """ + The maximum amount has been captured. + """ + AMAZON_PAYMENTS_MAX_AMOUNT_CHARGED + + """ + The maximum amount has been refunded. + """ + AMAZON_PAYMENTS_MAX_AMOUNT_REFUNDED + + """ + The maximum of 10 authorizations has been captured for an order. + """ + AMAZON_PAYMENTS_MAX_AUTHORIZATIONS_CAPTURED + + """ + The maximum of 10 refunds has been processed for an order. + """ + AMAZON_PAYMENTS_MAX_REFUNDS_PROCESSED + + """ + The order was canceled, which canceled all open authorizations. + """ + AMAZON_PAYMENTS_ORDER_REFERENCE_CANCELED + + """ + The order was not confirmed within three hours. + """ + AMAZON_PAYMENTS_STALE +} + +""" +The input fields for the information needed to create an order transaction. +""" +input OrderTransactionInput { + """ + The amount of money for this transaction. + """ + amount: Money! + + """ + The payment gateway to use for this transaction. + """ + gateway: String! + + """ + The kind of transaction. + """ + kind: OrderTransactionKind! + + """ + The ID of the order associated with the transaction. + """ + orderId: ID! + + """ + The ID of the optional parent transaction, for example the authorization of a capture. + """ + parentId: ID +} + +""" +The different kinds of order transactions. +""" +enum OrderTransactionKind { + """ + An authorization and capture performed together in a single step. + """ + SALE + + """ + A transfer of the money that was reserved by an authorization. + """ + CAPTURE + + """ + An amount reserved against the cardholder's funding source. + Money does not change hands until the authorization is captured. + """ + AUTHORIZATION + + """ + A cancelation of an authorization transaction. + """ + VOID + + """ + A partial or full return of captured funds to the cardholder. + A refund can happen only after a capture is processed. + """ + REFUND + + """ + The money returned to the customer when they've paid too much during a cash transaction. + """ + CHANGE + + """ + An authorization for a payment taken with an EMV credit card reader. + """ + EMV_AUTHORIZATION + + """ + A suggested refund transaction that can be used to create a refund. + """ + SUGGESTED_REFUND +} + +""" +The different states that an `OrderTransaction` can have. +""" +enum OrderTransactionStatus { + """ + The transaction succeeded. + """ + SUCCESS + + """ + The transaction failed. + """ + FAILURE + + """ + The transaction is pending. + """ + PENDING + + """ + There was an error while processing the transaction. + """ + ERROR + + """ + Awaiting a response. + """ + AWAITING_RESPONSE + + """ + The transaction status is unknown. + """ + UNKNOWN +} + +""" +Return type for `orderUpdate` mutation. +""" +type OrderUpdatePayload { + """ + The updated order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A standalone content page in the online store. Pages display HTML-formatted content for informational pages like "About Us", contact information, or shipping policies. + +Each page has a unique handle for URL routing and supports custom template suffixes for specialized layouts. Pages can be published or hidden, and include creation and update timestamps. +""" +type Page implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { + """ + The text content of the page, complete with HTML markup. + """ + body: HTML! + + """ + The first 150 characters of the page body. If the page body contains more than 150 characters, additional characters are truncated by ellipses. + """ + bodySummary: String! + + """ + The date and time (ISO 8601 format) of the page creation. + """ + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A unique, human-friendly string for the page. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether or not the page is visible. + """ + isPublished: Boolean! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The date and time (ISO 8601 format) when the page became or will become visible. + Returns null when the page isn't visible. + """ + publishedAt: DateTime + + """ + The suffix of the template that's used to render the page. + """ + templateSuffix: String + + """ + Title of the page. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The date and time (ISO 8601 format) of the latest page update. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Pages. +""" +type PageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PageEdge!]! + + """ + A list of nodes that are contained in PageEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Page!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a page. +""" +input PageCreateInput { + """ + A unique, human-friendly string for the page. If no handle is specified, a handle will be generated automatically from the page title. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String + + """ + The text content of the page, complete with HTML markup. + """ + body: String + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the page should become visible. + """ + publishDate: DateTime + + """ + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default page template is used. + """ + templateSuffix: String + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + The title of the page. + """ + title: String! +} + +""" +Return type for `pageCreate` mutation. +""" +type PageCreatePayload { + """ + The page that was created. + """ + page: Page + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageCreateUserError!]! +} + +""" +An error that occurs during the execution of `PageCreate`. +""" +type PageCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PageCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageCreateUserError`. +""" +enum PageCreateUserErrorCode { + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The input value is blank. + """ + BLANK + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is invalid. + """ + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The metafield type is invalid. + """ + INVALID_TYPE +} + +""" +Return type for `pageDelete` mutation. +""" +type PageDeletePayload { + """ + The ID of the deleted page. + """ + deletedPageId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageDeleteUserError!]! +} + +""" +An error that occurs during the execution of `PageDelete`. +""" +type PageDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: PageDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageDeleteUserError`. +""" +enum PageDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Page and a cursor during pagination. +""" +type PageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PageEdge. + """ + node: Page! +} + +""" +Returns information about pagination in a connection, in accordance with the +[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). +For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +""" +type PageInfo { + """ + The cursor corresponding to the last node in edges. + """ + endCursor: String + + """ + Whether there are more pages to fetch following the current page. + """ + hasNextPage: Boolean! + + """ + Whether there are any pages prior to the current page. + """ + hasPreviousPage: Boolean! + + """ + The cursor corresponding to the first node in edges. + """ + startCursor: String +} + +""" +The set of valid sort keys for the Page query. +""" +enum PageSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields to update a page. +""" +input PageUpdateInput { + """ + A unique, human-friendly string for the page. If no handle is specified, a handle will be generated automatically from the page title. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String + + """ + The text content of the page, complete with HTML markup. + """ + body: String + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the page should become visible. + """ + publishDate: DateTime + + """ + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default page template is used. + """ + templateSuffix: String + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + The title of the page. + """ + title: String + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false +} + +""" +Return type for `pageUpdate` mutation. +""" +type PageUpdatePayload { + """ + The page that was updated. + """ + page: Page + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageUpdateUserError!]! +} + +""" +An error that occurs during the execution of `PageUpdate`. +""" +type PageUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PageUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageUpdateUserError`. +""" +enum PageUpdateUserErrorCode { + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is blank. + """ + BLANK + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is invalid. + """ + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The metafield type is invalid. + """ + INVALID_TYPE +} + +""" +A payment customization. +""" +type PaymentCustomization implements HasMetafieldDefinitions & HasMetafields & Node { + """ + The enabled status of the payment customization. + """ + enabled: Boolean! + + """ + The error history on the most recent version of the payment customization. + """ + errorHistory: FunctionsErrorHistory + + """ + The ID of the Shopify Function implementing the payment customization. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The Shopify Function implementing the payment customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the payment customization. + """ + title: String! +} + +""" +Return type for `paymentCustomizationActivation` mutation. +""" +type PaymentCustomizationActivationPayload { + """ + The IDs of the updated payment customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple PaymentCustomizations. +""" +type PaymentCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentCustomizationEdge!]! + + """ + A list of nodes that are contained in PaymentCustomizationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PaymentCustomization!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `paymentCustomizationCreate` mutation. +""" +type PaymentCustomizationCreatePayload { + """ + Returns the created payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Return type for `paymentCustomizationDelete` mutation. +""" +type PaymentCustomizationDeletePayload { + """ + Returns the deleted payment customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type which holds one PaymentCustomization and a cursor during pagination. +""" +type PaymentCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentCustomizationEdge. + """ + node: PaymentCustomization! +} + +""" +An error that occurs during the execution of a payment customization mutation. +""" +type PaymentCustomizationError implements DisplayableError { + """ + The error code. + """ + code: PaymentCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentCustomizationError`. +""" +enum PaymentCustomizationErrorCode { + """ + Shop plan not eligible to use Functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function not found. + """ + FUNCTION_NOT_FOUND + + """ + Function is pending deletion. + """ + FUNCTION_PENDING_DELETION + + """ + The input value is invalid. + """ + INVALID + + """ + Payment customization not found. + """ + PAYMENT_CUSTOMIZATION_NOT_FOUND + + """ + Shop must be on a Shopify Plus plan to activate payment customizations from a custom app. + """ + PAYMENT_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """ + Maximum payment customizations are already enabled. + """ + MAXIMUM_ACTIVE_PAYMENT_CUSTOMIZATIONS + + """ + Required input field must be present. + """ + REQUIRED_INPUT_FIELD + + """ + Could not create or update metafields. + """ + INVALID_METAFIELDS + + """ + The maximum number of payment customizations per shop has been reached. + """ + MAXIMUM_PAYMENT_CUSTOMIZATIONS + + """ + Function ID cannot be changed. + """ + FUNCTION_ID_CANNOT_BE_CHANGED + + """ + Either function_id or function_handle must be provided. + """ + MISSING_FUNCTION_IDENTIFIER + + """ + Only one of function_id or function_handle can be provided, not both. + """ + MULTIPLE_FUNCTION_IDENTIFIERS +} + +""" +The input fields to create and update a payment customization. +""" +input PaymentCustomizationInput { + """ + The ID of the function providing the payment customization. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Function handle scoped to your app ID. + """ + functionHandle: String + + """ + The title of the payment customization. + """ + title: String + + """ + The enabled status of the payment customization. + """ + enabled: Boolean + + """ + Additional metafields to associate to the payment customization. + """ + metafields: [MetafieldInput!] = [] +} + +""" +Return type for `paymentCustomizationUpdate` mutation. +""" +type PaymentCustomizationUpdatePayload { + """ + Returns the updated payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Payment details related to a transaction. +""" +union PaymentDetails = CardPaymentDetails|LocalPaymentMethodsPaymentDetails|PaypalWalletPaymentDetails|ShopPayInstallmentsPaymentDetails + +""" +All possible instrument outputs for Payment Mandates. +""" +union PaymentInstrument = BankAccount|VaultCreditCard|VaultPaypalBillingAgreement + +""" +A payment instrument and the permission +the owner of the instrument gives to the merchant to debit it. +""" +type PaymentMandate implements Node { + """ + The unique ID of a payment mandate. + """ + id: ID! + + """ + The outputs details of the payment instrument. + """ + paymentInstrument: PaymentInstrument! +} + +""" +A payment mandate with resource information, representing the permission +the owner of the payment instrument gives to the merchant to debit it +for specific resources (e.g., Order, Subscriptions). +""" +type PaymentMandateResource { + """ + The ID of the resource that this payment method was created for. + """ + resourceId: ID + + """ + The resource type that this payment method was created for (e.g., Order, Subscriptions). + """ + resourceType: MandateResourceType +} + +""" +An auto-generated type for paginating through multiple PaymentMandateResources. +""" +type PaymentMandateResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentMandateResourceEdge!]! + + """ + A list of nodes that are contained in PaymentMandateResourceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PaymentMandateResource!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentMandateResource and a cursor during pagination. +""" +type PaymentMandateResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentMandateResourceEdge. + """ + node: PaymentMandateResource! +} + +""" +Some of the payment methods used in Shopify. +""" +enum PaymentMethods { + VISA + + MASTERCARD + + DISCOVER + + AMERICAN_EXPRESS + + DINERS_CLUB + + JCB + + """ + The payment method for UnionPay payment. + """ + UNIONPAY + + """ + The payment method for Elo payment. + """ + ELO + + DANKORT + + MAESTRO + + FORBRUGSFORENINGEN + + PAYPAL + + BOGUS + + BITCOIN + + LITECOIN + + DOGECOIN + + """ + The payment method for Interac payment. + """ + INTERAC + + """ + The payment method for eftpos_au payment. + """ + EFTPOS + + """ + The payment method for Cartes Bancaires payment. + """ + CARTES_BANCAIRES + + """ + The payment method for Bancontact payment. + """ + BANCONTACT +} + +""" +Return type for `paymentReminderSend` mutation. +""" +type PaymentReminderSendPayload { + """ + Whether the payment reminder email was successfully sent. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentReminderSendUserError!]! +} + +""" +An error that occurs during the execution of `PaymentReminderSend`. +""" +type PaymentReminderSendUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentReminderSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentReminderSendUserError`. +""" +enum PaymentReminderSendUserErrorCode { + """ + An error occurred while sending the payment reminder. + """ + PAYMENT_REMINDER_SEND_UNSUCCESSFUL +} + +""" +Represents the payment schedule for a single payment defined in the payment terms. +""" +type PaymentSchedule implements Node { + """ + Amount owed for this payment schedule. + """ + amount: MoneyV2! @deprecated(reason: "Use `balanceDue`, `totalBalance`, or `Order.totalOutstandingSet` instead.") + + """ + Remaining balance to be captured for this payment schedule. + """ + balanceDue: MoneyV2! + + """ + Date and time when the payment schedule is paid or fulfilled. + """ + completedAt: DateTime + + """ + Whether the payment schedule is due. + """ + due: Boolean! + + """ + Date and time when the payment schedule is due. + """ + dueAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + Date and time when the invoice is sent. + """ + issuedAt: DateTime + + """ + The payment terms the payment schedule belongs to. + """ + paymentTerms: PaymentTerms! + + """ + Remaining balance to be paid or authorized by the customer for this payment schedule. + """ + totalBalance: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple PaymentSchedules. +""" +type PaymentScheduleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentScheduleEdge!]! + + """ + A list of nodes that are contained in PaymentScheduleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PaymentSchedule!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentSchedule and a cursor during pagination. +""" +type PaymentScheduleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentScheduleEdge. + """ + node: PaymentSchedule! +} + +""" +The input fields used to create a payment schedule for payment terms. +""" +input PaymentScheduleInput { + """ + Specifies the date and time that the payment schedule was issued. This field must be provided for net type payment terms. + """ + issuedAt: DateTime + + """ + Specifies the date and time when the payment schedule is due. This field must be provided for fixed type payment terms. + """ + dueAt: DateTime +} + +""" +Settings related to payments. +""" +type PaymentSettings { + """ + List of the digital wallets which the shop supports. + """ + supportedDigitalWallets: [DigitalWallet!]! +} + +""" +Payment conditions for an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) or [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), including when payment is due and how it's scheduled. Payment terms are created from templates that specify net terms (payment due after a certain number of days) or fixed schedules with specific due dates. You can optionally provide custom payment schedules using [`PaymentScheduleInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/PaymentScheduleInput). + +Each payment term contains one or more [`PaymentSchedule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentSchedule), which you can access through the [`paymentSchedules`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms#field-PaymentTerms.fields.paymentSchedules) field. Payment schedules contain detailed information for each payment installment. + +Learn more about [payment terms](https://shopify.dev/docs/apps/build/checkout/payments/payment-terms). +""" +type PaymentTerms implements Node { + """ + The draft order associated with the payment terms. + """ + draftOrder: DraftOrder + + """ + Whether payment terms have a payment schedule that's due. + """ + due: Boolean! + + """ + Duration of payment terms in days based on the payment terms template used to create the payment terms. + """ + dueInDays: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The order associated with the payment terms. + """ + order: Order + + """ + Whether the payment terms have overdue payment schedules. + """ + overdue: Boolean! + + """ + List of schedules for the payment terms. + """ + paymentSchedules("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PaymentScheduleConnection! + + """ + The name of the payment terms template used to create the payment terms. + """ + paymentTermsName: String! + + """ + The payment terms template type used to create the payment terms. + """ + paymentTermsType: PaymentTermsType! + + """ + The payment terms name, translated into the shop admin's preferred language. + """ + translatedName: String! +} + +""" +The input fields used to create a payment terms. +""" +input PaymentTermsCreateInput { + """ + Specifies the payment terms template ID used to generate payment terms. + """ + paymentTermsTemplateId: ID! + + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] +} + +""" +Return type for `paymentTermsCreate` mutation. +""" +type PaymentTermsCreatePayload { + """ + The created payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsCreateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsCreate`. +""" +type PaymentTermsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsCreateUserError`. +""" +enum PaymentTermsCreateUserErrorCode { + """ + An error occurred while creating payment terms. + """ + PAYMENT_TERMS_CREATION_UNSUCCESSFUL +} + +""" +The input fields used to delete the payment terms. +""" +input PaymentTermsDeleteInput { + """ + The ID of the payment terms being deleted. + """ + paymentTermsId: ID! +} + +""" +Return type for `paymentTermsDelete` mutation. +""" +type PaymentTermsDeletePayload { + """ + The deleted payment terms ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsDeleteUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsDelete`. +""" +type PaymentTermsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsDeleteUserError`. +""" +enum PaymentTermsDeleteUserErrorCode { + """ + An error occurred while deleting payment terms. + """ + PAYMENT_TERMS_DELETE_UNSUCCESSFUL +} + +""" +The input fields to create payment terms. Payment terms set the date that payment is due. +""" +input PaymentTermsInput { + """ + Specifies the ID of the payment terms template. + Payment terms templates provide preset configurations to create common payment terms. + Refer to the + [PaymentTermsTemplate](https://shopify.dev/api/admin-graphql/latest/objects/paymenttermstemplate) + object for more details. + """ + paymentTermsTemplateId: ID + + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] +} + +""" +Represents the payment terms template object. +""" +type PaymentTermsTemplate implements Node { + """ + The description of the payment terms template. + """ + description: String! + + """ + The number of days between the issued date and due date if this is the net type of payment terms. + """ + dueInDays: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the payment terms template. + """ + name: String! + + """ + The type of the payment terms template. + """ + paymentTermsType: PaymentTermsType! + + """ + The translated payment terms template name. + """ + translatedName: String! +} + +""" +The type of a payment terms or a payment terms template. +""" +enum PaymentTermsType { + """ + The payment terms or payment terms template is due on receipt. + """ + RECEIPT + + """ + The payment terms or payment terms template is a net type. It's due a number of days after issue. + """ + NET + + """ + The payment terms or payment terms template is a fixed type. It's due on a specified date. + """ + FIXED + + """ + The payment terms or payment terms template is due on fulfillment. + """ + FULFILLMENT + + """ + The type of the payment terms or payment terms template is unknown. + """ + UNKNOWN +} + +""" +The input fields used to update the payment terms. +""" +input PaymentTermsUpdateInput { + """ + The ID of the payment terms being updated. + """ + paymentTermsId: ID! + + """ + The attributes used to update the payment terms. + """ + paymentTermsAttributes: PaymentTermsInput! +} + +""" +Return type for `paymentTermsUpdate` mutation. +""" +type PaymentTermsUpdatePayload { + """ + The updated payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsUpdateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsUpdate`. +""" +type PaymentTermsUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsUpdateUserError`. +""" +enum PaymentTermsUpdateUserErrorCode { + """ + An error occurred while updating payment terms. + """ + PAYMENT_TERMS_UPDATE_UNSUCCESSFUL +} + +""" +The set of valid sort keys for the Payout query. +""" +enum PayoutSortKeys { + """ + Sort by the `adjustment_gross` value. + """ + ADJUSTMENT_GROSS + + """ + Sort by the `advance_gross` value. + """ + ADVANCE_GROSS + + """ + Sort by the `amount` value. + """ + AMOUNT + + """ + Sort by the `charge_gross` value. + """ + CHARGE_GROSS + + """ + Sort by the `duties_gross` value. + """ + DUTIES_GROSS + + """ + Sort by the `fee_amount` value. + """ + FEE_AMOUNT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `issued_at` value. + """ + ISSUED_AT + + """ + Sort by the `refund_gross` value. + """ + REFUND_GROSS + + """ + Sort by the `shipping_label_gross` value. + """ + SHIPPING_LABEL_GROSS + + """ + Sort by the `status` value. + """ + STATUS +} + +""" +Represents a valid PayPal Express subscriptions gateway status. +""" +enum PaypalExpressSubscriptionsGatewayStatus { + """ + The status is enabled. + """ + ENABLED + + """ + The status is disabled. + """ + DISABLED + + """ + The status is pending. + """ + PENDING +} + +""" +PayPal Wallet payment details related to a transaction. +""" +type PaypalWalletPaymentDetails implements BasePaymentDetails { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +A location for in-store pickup. +""" +type PickupInStoreLocation { + """ + The code of the pickup location. + """ + code: String! + + """ + Distance from the buyer to the pickup location. + """ + distanceFromBuyer: Distance + + """ + A unique identifier for this pickup location. + """ + handle: String! + + """ + Pickup instructions. + """ + instructions: String! + + """ + The location ID of the pickup location. + """ + locationId: ID! + + """ + The source of the pickup location. + """ + source: String! + + """ + Title of the pickup location. + """ + title: String! +} + +""" +Represents a mobile device that Shopify Point of Sale has been installed on. +""" +type PointOfSaleDevice implements Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The input fields used to include the line items of a specified fulfillment order that should be marked as prepared for pickup by a customer. +""" +input PreparedFulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! +} + +""" +How to calculate the parent product variant's price while bulk updating variant relationships. +""" +enum PriceCalculationType { + """ + The price of the parent will be the sum of the components price times their quantity. + """ + COMPONENTS_SUM + + """ + The price of the parent will be set to the price provided. + """ + FIXED + + """ + The price of the parent will not be adjusted. + """ + NONE +} + +""" +The input fields for updating the price of a parent product variant. +""" +input PriceInput { + """ + The specific type of calculation done to determine the price of the parent variant. + The price is calculated during Bundle creation. Updating a component variant won't recalculate the price. + """ + calculation: PriceCalculationType + + """ + The price of the parent product variant. This will be be used if calcualtion is set to 'FIXED'. + """ + price: Money +} + +""" +A list that defines pricing for [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). Price lists override default product prices with either fixed prices or percentage-based adjustments. + +Each price list associates with a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) to determine which customers see the pricing. The catalog's context rules control when the price list applies, such as for specific markets, company locations, or apps. + +Learn how to [support different pricing models](https://shopify.dev/docs/apps/build/markets/build-catalog). +""" +type PriceList implements Node { + """ + The catalog that the price list is associated with. + """ + catalog: Catalog + + """ + The currency for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """ + The number of fixed prices on the price list. + """ + fixedPricesCount: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Relative adjustments to other prices. + """ + parent: PriceListParent + + """ + A list of prices associated with the price list. + """ + prices("The origin of this price, either fixed (defined on the price list)\n or relative (calculated using an adjustment via a price list parent configuration)." originType: PriceListPriceOriginType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| product_id | id |\n| variant_id | id |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): PriceListPriceConnection! + + """ + A list of quantity rules associated with the price list, ordered by product variants. + """ + quantityRules("Whether the quantity rule is fixed (defined on the price list) or relative\n(the default quantity rule for the shop)." originType: QuantityRuleOriginType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): QuantityRuleConnection! +} + +""" +The type and value of a price list adjustment. + +For more information on price lists, refer to +[Support different pricing models](https://shopify.dev/apps/internationalization/product-price-lists). +""" +type PriceListAdjustment { + """ + The type of price adjustment, such as percentage increase or decrease. + """ + type: PriceListAdjustmentType! + + """ + The value of price adjustment, where positive numbers reduce the prices and negative numbers + increase them. + """ + value: Float! +} + +""" +The input fields to set a price list adjustment. +""" +input PriceListAdjustmentInput { + """ + The value of the price adjustment as specified by the `type`. + """ + value: Float! + + """ + The type of price adjustment, such as percentage increase or decrease. + """ + type: PriceListAdjustmentType! +} + +""" +Represents the settings of price list adjustments. +""" +type PriceListAdjustmentSettings { + """ + The type of price list adjustment setting for compare at price. + """ + compareAtMode: PriceListCompareAtMode! +} + +""" +The input fields to set a price list's adjustment settings. +""" +input PriceListAdjustmentSettingsInput { + """ + Determines how adjustments are applied to compare at prices. + """ + compareAtMode: PriceListCompareAtMode! = ADJUSTED +} + +""" +Represents a percentage price adjustment type. +""" +enum PriceListAdjustmentType { + """ + Percentage decrease type. Prices will have a lower value. + """ + PERCENTAGE_DECREASE + + """ + Percentage increase type. Prices will have a higher value. + """ + PERCENTAGE_INCREASE +} + +""" +Represents how the compare at price will be determined for a price list. +""" +enum PriceListCompareAtMode { + """ + The compare at price is adjusted based on percentage specified in price list. + """ + ADJUSTED + + """ + The compare at prices are set to `null` unless explicitly defined by a fixed price value. + """ + NULLIFY +} + +""" +An auto-generated type for paginating through multiple PriceLists. +""" +type PriceListConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListEdge!]! + + """ + A list of nodes that are contained in PriceListEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PriceList!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a price list. +""" +input PriceListCreateInput { + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Three letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """ + Relative adjustments to other prices. + """ + parent: PriceListParentCreateInput! + + """ + The ID of the catalog to associate with this price list.If the catalog was already associated with another price list then it will be unlinked. + """ + catalogId: ID +} + +""" +Return type for `priceListCreate` mutation. +""" +type PriceListCreatePayload { + """ + The newly created price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Return type for `priceListDelete` mutation. +""" +type PriceListDeletePayload { + """ + The ID of the deleted price list. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +An auto-generated type which holds one PriceList and a cursor during pagination. +""" +type PriceListEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListEdge. + """ + node: PriceList! +} + +""" +Return type for `priceListFixedPricesAdd` mutation. +""" +type PriceListFixedPricesAddPayload { + """ + The list of fixed prices that were added to or updated in the price list. + """ + prices: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Error codes for failed price list fixed prices by product bulk update operations. +""" +type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListFixedPricesByProductBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListFixedPricesByProductBulkUpdateUserError`. +""" +enum PriceListFixedPricesByProductBulkUpdateUserErrorCode { + """ + No update operations specified. + """ + NO_UPDATE_OPERATIONS_SPECIFIED + + """ + The currency specified does not match the price list's currency. + """ + PRICES_TO_ADD_CURRENCY_MISMATCH + + """ + Price list does not exist. + """ + PRICE_LIST_DOES_NOT_EXIST + + """ + Duplicate ID in input. + """ + DUPLICATE_ID_IN_INPUT + + """ + IDs must be mutually exclusive across add or delete operations. + """ + ID_MUST_BE_MUTUALLY_EXCLUSIVE + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Exceeded the 10000 prices to add limit. + """ + PRICE_LIMIT_EXCEEDED + + """ + The issuance currency of a local currency gift card must match the price list currency. + """ + LOCAL_CURRENCY_GIFT_CARD_ISSUANCE_CURRENCY_MISMATCH + + """ + The price of a local currency gift card cannot exceed the maximum gift card purchase limit. + """ + LOCAL_CURRENCY_GIFT_CARD_LIMIT_EXCEEDED +} + +""" +Return type for `priceListFixedPricesByProductUpdate` mutation. +""" +type PriceListFixedPricesByProductUpdatePayload { + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The product for which the fixed prices were added. + """ + pricesToAddProducts: [Product!] + + """ + The product for which the fixed prices were deleted. + """ + pricesToDeleteProducts: [Product!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListFixedPricesByProductBulkUpdateUserError!]! +} + +""" +Return type for `priceListFixedPricesDelete` mutation. +""" +type PriceListFixedPricesDeletePayload { + """ + A list of product variant IDs whose fixed prices were removed from the price list. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Return type for `priceListFixedPricesUpdate` mutation. +""" +type PriceListFixedPricesUpdatePayload { + """ + A list of deleted variant IDs for prices. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The prices that were added to the price list. + """ + pricesAdded: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Represents relative adjustments from one price list to other prices. + You can use a `PriceListParent` to specify an adjusted relative price using a percentage-based + adjustment. Adjusted prices work in conjunction with exchange rules and rounding. + + [Adjustment types](https://shopify.dev/api/admin-graphql/latest/enums/pricelistadjustmenttype) + support both percentage increases and decreases. +""" +type PriceListParent { + """ + A price list adjustment. + """ + adjustment: PriceListAdjustment! + + """ + A price list's settings for adjustment. + """ + settings: PriceListAdjustmentSettings! +} + +""" +The input fields to create a price list adjustment. +""" +input PriceListParentCreateInput { + """ + The relative adjustments to other prices. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +The input fields used to update a price list's adjustment. +""" +input PriceListParentUpdateInput { + """ + The relative adjustments to other prices.. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +Pricing for a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Represents the variant's price, compare-at price, and whether the price is fixed or calculated using percentage-based adjustments. The [`PriceListPriceOriginType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/PriceListPriceOriginType) distinguishes between prices set directly on the price list (fixed) and prices calculated using the price list's adjustment configuration (relative). + +Learn more about [building catalogs with different pricing models](https://shopify.dev/docs/apps/build/markets/build-catalog). +""" +type PriceListPrice { + """ + The compare-at price of the product variant on this price list. + """ + compareAtPrice: MoneyV2 + + """ + The origin of a price, either fixed (defined on the price list) or relative (calculated using a price list adjustment configuration). + """ + originType: PriceListPriceOriginType! + + """ + The price of the product variant on this price list. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: QuantityPriceBreakSortKeys = MINIMUM_QUANTITY): QuantityPriceBreakConnection! + + """ + The product variant associated with this price. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple PriceListPrices. +""" +type PriceListPriceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListPriceEdge!]! + + """ + A list of nodes that are contained in PriceListPriceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PriceListPrice!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceListPrice and a cursor during pagination. +""" +type PriceListPriceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListPriceEdge. + """ + node: PriceListPrice! +} + +""" +The input fields for providing the fields and values to use when creating or updating a fixed price list price. +""" +input PriceListPriceInput { + """ + The product variant ID associated with the price list price. + """ + variantId: ID! + + """ + The price of the product variant on this price list. + """ + price: MoneyInput! + + """ + The compare-at price of the product variant on this price list. + """ + compareAtPrice: MoneyInput +} + +""" +Represents the origin of a price, either fixed (defined on the price list) or relative (calculated using a price list adjustment configuration). For examples, refer to [PriceList](https://shopify.dev/api/admin-graphql/latest/queries/priceList#section-examples). +""" +enum PriceListPriceOriginType { + """ + The price is defined on the price list. + """ + FIXED + + """ + The price is relative to the adjustment type and value. + """ + RELATIVE +} + +""" +An error for a failed price list price operation. +""" +type PriceListPriceUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListPriceUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListPriceUserError`. +""" +enum PriceListPriceUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The price list doesn't exist. + """ + PRICE_LIST_NOT_FOUND + + """ + The specified currency doesn't match the price list's currency. + """ + PRICE_LIST_CURRENCY_MISMATCH + + """ + The issuance currency of a local currency gift card must match the price list currency. + """ + LOCAL_CURRENCY_GIFT_CARD_ISSUANCE_CURRENCY_MISMATCH + + """ + The price of a local currency gift card cannot exceed the maximum gift card purchase limit. + """ + LOCAL_CURRENCY_GIFT_CARD_LIMIT_EXCEEDED + + """ + A fixed price for the specified product variant doesn't exist. + """ + VARIANT_NOT_FOUND + + """ + Only fixed prices can be deleted. + """ + PRICE_NOT_FIXED +} + +""" +The input fields representing the price for all variants of a product. +""" +input PriceListProductPriceInput { + """ + Specifies the ID of the product to update its variants for. + """ + productId: ID! + + """ + Specifies the price and currency to apply to the product's variants on the price list. + """ + price: MoneyInput! + + """ + Specifies the compare-at price and currency to apply to the product's variants on the price list. + """ + compareAtPrice: MoneyInput +} + +""" +The set of valid sort keys for the PriceList query. +""" +enum PriceListSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The input fields used to update a price list. +""" +input PriceListUpdateInput { + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String + + """ + The three-letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode + + """ + Relative adjustments to other prices. + """ + parent: PriceListParentUpdateInput + + """ + The ID of the catalog to associate with this price list. + """ + catalogId: ID +} + +""" +Return type for `priceListUpdate` mutation. +""" +type PriceListUpdatePayload { + """ + The updated price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Error codes for failed contextual pricing operations. +""" +type PriceListUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListUserError`. +""" +enum PriceListUserErrorCode { + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is blank. + """ + BLANK + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is too long. + """ + TOO_LONG + + """ + The specified price list doesn't exist. + """ + PRICE_LIST_NOT_FOUND + + """ + The price list is currently being modified. Please try again later. + """ + PRICE_LIST_LOCKED + + """ + A price list’s currency must be the market currency. + """ + CURRENCY_MARKET_MISMATCH + + """ + The adjustment value must be a positive value and not be greater than 100% for `type` `PERCENTAGE_DECREASE` and not be greater than 1000% for `type` `PERCENTAGE_INCREASE`. + """ + INVALID_ADJUSTMENT_VALUE + + """ + The adjustment value must not be greater than 100% for `type` `PERCENTAGE_DECREASE`. + """ + INVALID_ADJUSTMENT_MIN_VALUE + + """ + The adjustment value must not be greater than 1000% for `type` `PERCENTAGE_INCREASE`. + """ + INVALID_ADJUSTMENT_MAX_VALUE + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + Quantity price breaks can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_PRICE_BREAKS + + """ + Only one context rule option may be specified. + """ + CONTEXT_RULE_LIMIT_ONE_OPTION + + """ + The price list currency is not supported by the shop's payment gateway. + """ + CURRENCY_NOT_SUPPORTED + + """ + Cannot create price list for a primary market. + """ + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """ + The specified catalog does not exist. + """ + CATALOG_DOES_NOT_EXIST + + """ + The price list currency must match the market catalog currency. + """ + CATALOG_MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH + + """ + Catalog has a price list already assigned. + """ + CATALOG_TAKEN + + """ + A country catalog cannot be assigned to a price list. + """ + COUNTRY_PRICE_LIST_ASSIGNMENT + + """ + Something went wrong when trying to save the price list. Please try again. + """ + GENERIC_ERROR +} + +""" +A set of conditions, including entitlements and prerequisites, that must be met for a discount code to apply. + +> Note: +> Use the types and queries included our [discount tutorials](https://shopify.dev/docs/apps/selling-strategies/discounts/getting-started) instead. These will replace the GraphQL Admin API's [`PriceRule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRule) object and [`DiscountCode`](https://shopify.dev/docs/api/admin-graphql/latest/unions/DiscountCode) union, and the REST Admin API's deprecated[`PriceRule`](https://shopify.dev/docs/api/admin-rest/unstable/resources/pricerule) resource. +""" +type PriceRule implements CommentEventSubject & HasEvents & LegacyInteroperability & Node { + """ + The maximum number of times that the price rule can be allocated onto an order. + """ + allocationLimit: Int + + """ + The method by which the price rule's value is allocated to its entitled items. + """ + allocationMethod: PriceRuleAllocationMethod! + + """ + The application that created the price rule. + """ + app: App + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The date and time when the price rule was created. + """ + createdAt: DateTime! + + """ + The customers that can use this price rule. + """ + customerSelection: PriceRuleCustomerSelection! + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + List of the price rule's discount codes. + """ + discountCodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): PriceRuleDiscountCodeConnection! + + """ + How many discount codes associated with the price rule. + """ + discountCodesCount: Count + + """ + The date and time when the price rule ends. For open-ended price rules, use `null`. + """ + endsAt: DateTime + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatio @deprecated(reason: "Use `prerequisiteToEntitlementQuantityRatio` instead.") + + """ + The paginated list of events associated with the price rule. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A list of the price rule's features. + """ + features: [PriceRuleFeature!]! + + """ + Indicates whether there are any timeline comments on the price rule. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The items to which the price rule applies. + """ + itemEntitlements: PriceRuleItemEntitlements! + + """ + The items required for the price rule to be applicable. + """ + itemPrerequisites: PriceRuleLineItemPrerequisites! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + Whether the price rule can be applied only once per customer. + """ + oncePerCustomer: Boolean! + + """ + The number of the entitled items must fall within this range for the price rule to be applicable. + """ + prerequisiteQuantityRange: PriceRuleQuantityRange + + """ + The shipping cost must fall within this range for the price rule to be applicable. + """ + prerequisiteShippingPriceRange: PriceRuleMoneyRange + + """ + The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable. + """ + prerequisiteSubtotalRange: PriceRuleMoneyRange + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + prerequisiteToEntitlementQuantityRatio: PriceRulePrerequisiteToEntitlementQuantityRatio + + """ + URLs that can be used to share the discount. + """ + shareableUrls: [PriceRuleShareableUrl!]! + + """ + The shipping lines to which the price rule applies. + """ + shippingEntitlements: PriceRuleShippingLineEntitlements! + + """ + The date and time when the price rule starts. + """ + startsAt: DateTime! + + """ + The status of the price rule. + """ + status: PriceRuleStatus! + + """ + A detailed summary of the price rule. + """ + summary: String + + """ + The type of lines (line_item or shipping_line) to which the price rule applies. + """ + target: PriceRuleTarget! + + """ + The title of the price rule. + """ + title: String! + + """ + The total sales from orders where the price rule was used. + """ + totalSales: MoneyV2 + + """ + A list of the price rule's features. + """ + traits: [PriceRuleTrait!]! @deprecated(reason: "Use `features` instead.") + + """ + The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count. + """ + usageCount: Int! + + """ + The maximum number of times that the price rule can be used in total. + """ + usageLimit: Int + + """ + A time period during which a price rule is applicable. + """ + validityPeriod: PriceRuleValidityPeriod! + + """ + The value of the price rule. + """ + value: PriceRuleValue! @deprecated(reason: "Use `valueV2` instead.") + + """ + The value of the price rule. + """ + valueV2: PricingValue! +} + +""" +The method by which the price rule's value is allocated to its entitled items. +""" +enum PriceRuleAllocationMethod { + """ + The value will be applied to each of the entitled items. + """ + EACH + + """ + The value will be applied once across the entitled items. + """ + ACROSS +} + +""" +A selection of customers for whom the price rule applies. +""" +type PriceRuleCustomerSelection { + """ + List of customers to whom the price rule applies. + """ + customers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CustomerSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| accepts_marketing | boolean | Filter by whether a customer has consented to receive marketing material. | | | - `accepts_marketing:true` |\n| country | string | Filter by the country associated with the customer's address. Use either the country name or the two-letter country code. | | | - `country:Canada`
- `country:JP` |\n| customer_date | time | Filter by the date and time when the customer record was created. This query parameter filters by the [`createdAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-createdAt) field. | | | - `customer_date:'2024-03-15T14:30:00Z'`
- `customer_date: >='2024-01-01'` |\n| email | string | The customer's email address, used to communicate information about orders and for the purposes of email marketing campaigns. You can use a wildcard value to filter the query by customers who have an email address specified. Please note that _email_ is a tokenized field: To retrieve exact matches, quote the email address (_phrase query_) as described in [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). | | | - `email:gmail.com`
- `email:\"bo.wang@example.com\"`
- `email:*` |\n| first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| last_abandoned_order_date | time | Filter by the date and time of the customer's most recent abandoned checkout. An abandoned checkout occurs when a customer adds items to their cart, begins the checkout process, but leaves the site without completing their purchase. | | | - `last_abandoned_order_date:'2024-04-01T10:00:00Z'`
- `last_abandoned_order_date: >='2024-01-01'` |\n| last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` |\n| order_date | time | Filter by the date and time that the order was placed by the customer. Use this query filter to check if a customer has placed at least one order within a specified date range. | | | - `order_date:'2024-02-20T00:00:00Z'`
- `order_date: >='2024-01-01'`
- `order_date:'2024-01-01..2024-03-31'` |\n| orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` |\n| phone | string | The phone number of the customer, used to communicate information about orders and for the purposes of SMS marketing campaigns. You can use a wildcard value to filter the query by customers who have a phone number specified. | | | - `phone:+18005550100`
- `phone:*` |\n| state | string | Filter by the [state](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-state) of the customer's account with the shop. This filter is only valid when [Classic Customer Accounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-customerAccountsVersion) is active. | | | - `state:ENABLED`
- `state:INVITED`
- `state:DISABLED`
- `state:DECLINED` |\n| tag | string | Filter by the tags that are associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag:'VIP'`
- `tag:'Wholesale,Repeat'` |\n| tag_not | string | Filter by the tags that aren't associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag_not:'Prospect'`
- `tag_not:'Test,Internal'` |\n| total_spent | float | Filter by the total amount of money a customer has spent across all orders. | | | - `total_spent:100.50`
- `total_spent:50.00`
- `total_spent:>100.50`
- `total_spent:>50.00` |\n| updated_at | time | The date and time, matching a whole day, when the customer's information was last updated. | | | - `updated_at:2024-01-01T00:00:00Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): CustomerConnection! + + """ + Whether the price rule applies to all customers. + """ + forAllCustomers: Boolean! + + """ + A list of customer segments that contain the customers who can use the price rule. + """ + segments: [Segment!]! +} + +""" +A discount code of a price rule. +""" +type PriceRuleDiscountCode implements Node { + """ + The application that created the discount code. + """ + app: App + + """ + The code to apply the discount. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count. + """ + usageCount: Int! +} + +""" +An auto-generated type for paginating through multiple PriceRuleDiscountCodes. +""" +type PriceRuleDiscountCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceRuleDiscountCodeEdge!]! + + """ + A list of nodes that are contained in PriceRuleDiscountCodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [PriceRuleDiscountCode!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination. +""" +type PriceRuleDiscountCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceRuleDiscountCodeEdge. + """ + node: PriceRuleDiscountCode! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRuleEntitlementToPrerequisiteQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleFeature { + """ + The price rule supports Buy X, Get Y (BXGY) discounts. + """ + BUY_ONE_GET_ONE + + """ + The price rule supports Buy X, Get Y (BXGY) discounts that specify a custom allocation limit. + """ + BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT + + """ + The price rule supports bulk discounts. + """ + BULK + + """ + The price rule targets specific customers. + """ + SPECIFIC_CUSTOMERS + + """ + The price rule supports discounts that require a quantity. + """ + QUANTITY_DISCOUNTS +} + +""" +The value of a fixed amount price rule. +""" +type PriceRuleFixedAmountValue { + """ + The monetary value of the price rule. + """ + amount: Money! +} + +""" +The items to which this price rule applies. This may be multiple products, product variants, collections or combinations of the aforementioned. +""" +type PriceRuleItemEntitlements { + """ + The collections to which the price rule applies. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + + """ + The product variants to which the price rule applies. + """ + productVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The products to which the price rule applies. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductConnection! + + """ + Whether the price rule applies to all line items. + """ + targetAllLineItems: Boolean! +} + +""" +Single or multiple line item products, product variants or collections required for the price rule to be applicable, can also be provided in combination. +""" +type PriceRuleLineItemPrerequisites { + """ + The collections required for the price rule to be applicable. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + + """ + The product variants required for the price rule to be applicable. + """ + productVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The products required for the price rule to be applicable. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductConnection! +} + +""" +A money range within which the price rule is applicable. +""" +type PriceRuleMoneyRange { + """ + The lower bound of the money range. + """ + greaterThan: Money + + """ + The lower bound or equal of the money range. + """ + greaterThanOrEqualTo: Money + + """ + The upper bound of the money range. + """ + lessThan: Money + + """ + The upper bound or equal of the money range. + """ + lessThanOrEqualTo: Money +} + +""" +The value of a percent price rule. +""" +type PriceRulePercentValue { + """ + The percent value of the price rule. + """ + percentage: Float! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRulePrerequisiteToEntitlementQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +A quantity range within which the price rule is applicable. +""" +type PriceRuleQuantityRange { + """ + The lower bound of the quantity range. + """ + greaterThan: Int + + """ + The lower bound or equal of the quantity range. + """ + greaterThanOrEqualTo: Int + + """ + The upper bound of the quantity range. + """ + lessThan: Int + + """ + The upper bound or equal of the quantity range. + """ + lessThanOrEqualTo: Int +} + +""" +Shareable URL for the discount code associated with the price rule. +""" +type PriceRuleShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: PriceRuleShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable price rule URL lands. +""" +enum PriceRuleShareableUrlTargetType { + """ + The URL lands on a home page. + """ + HOME + + """ + The URL lands on a product page. + """ + PRODUCT + + """ + The URL lands on a collection page. + """ + COLLECTION +} + +""" +The shipping lines to which the price rule applies to. +""" +type PriceRuleShippingLineEntitlements { + """ + The codes for the countries to which the price rule applies to. + """ + countryCodes: [CountryCode!]! + + """ + Whether the price rule is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! + + """ + Whether the price rule applies to all shipping lines. + """ + targetAllShippingLines: Boolean! +} + +""" +The status of the price rule. +""" +enum PriceRuleStatus { + """ + The price rule is active. + """ + ACTIVE + + """ + The price rule is expired. + """ + EXPIRED + + """ + The price rule is scheduled. + """ + SCHEDULED +} + +""" +The type of lines (line_item or shipping_line) to which the price rule applies. +""" +enum PriceRuleTarget { + """ + The price rule applies to line items. + """ + LINE_ITEM + + """ + The price rule applies to shipping lines. + """ + SHIPPING_LINE +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleTrait { + """ + The price rule supports Buy X, Get Y (BXGY) discounts. + """ + BUY_ONE_GET_ONE + + """ + The price rule supports Buy X, Get Y (BXGY) discounts that specify a custom allocation limit. + """ + BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT + + """ + The price rule supports bulk discounts. + """ + BULK + + """ + The price rule targets specific customers. + """ + SPECIFIC_CUSTOMERS + + """ + The price rule supports discounts that require a quantity. + """ + QUANTITY_DISCOUNTS +} + +""" +A time period during which a price rule is applicable. +""" +type PriceRuleValidityPeriod { + """ + The time after which the price rule becomes invalid. + """ + end: DateTime + + """ + The time after which the price rule is valid. + """ + start: DateTime! +} + +""" +The type of the price rule value. The price rule value might be a percentage value, or a fixed amount. +""" +union PriceRuleValue = PriceRuleFixedAmountValue|PriceRulePercentValue + +""" +One type of value given to a customer when a discount is applied to an order. +The application of a discount with this value gives the customer the specified percentage off a specified item. +""" +type PricingPercentageValue { + """ + The percentage value of the object. This is a number between -100 (free) and 0 (no discount). + """ + percentage: Float! +} + +""" +The type of value given to a customer when a discount is applied to an order. For example, the application of the discount might give the customer a percentage off a specified item. Alternatively, the application of the discount might give the customer a monetary value in a given currency off an order. +""" +union PricingValue = MoneyV2|PricingPercentageValue + +""" +A country code from the `ISO 3166` standard. e.g. `CA` for Canada. +""" +enum PrivacyCountryCode { + """ + The `ISO 3166` country code of `AN`. + """ + AN + + """ + The `ISO 3166` country code of `AC`. + """ + AC + + """ + The `ISO 3166` country code of `AD`. + """ + AD + + """ + The `ISO 3166` country code of `AE`. + """ + AE + + """ + The `ISO 3166` country code of `AF`. + """ + AF + + """ + The `ISO 3166` country code of `AG`. + """ + AG + + """ + The `ISO 3166` country code of `AI`. + """ + AI + + """ + The `ISO 3166` country code of `AL`. + """ + AL + + """ + The `ISO 3166` country code of `AM`. + """ + AM + + """ + The `ISO 3166` country code of `AO`. + """ + AO + + """ + The `ISO 3166` country code of `AQ`. + """ + AQ + + """ + The `ISO 3166` country code of `AR`. + """ + AR + + """ + The `ISO 3166` country code of `AS`. + """ + AS + + """ + The `ISO 3166` country code of `AT`. + """ + AT + + """ + The `ISO 3166` country code of `AU`. + """ + AU + + """ + The `ISO 3166` country code of `AW`. + """ + AW + + """ + The `ISO 3166` country code of `AX`. + """ + AX + + """ + The `ISO 3166` country code of `AZ`. + """ + AZ + + """ + The `ISO 3166` country code of `BA`. + """ + BA + + """ + The `ISO 3166` country code of `BB`. + """ + BB + + """ + The `ISO 3166` country code of `BD`. + """ + BD + + """ + The `ISO 3166` country code of `BE`. + """ + BE + + """ + The `ISO 3166` country code of `BF`. + """ + BF + + """ + The `ISO 3166` country code of `BG`. + """ + BG + + """ + The `ISO 3166` country code of `BH`. + """ + BH + + """ + The `ISO 3166` country code of `BI`. + """ + BI + + """ + The `ISO 3166` country code of `BJ`. + """ + BJ + + """ + The `ISO 3166` country code of `BL`. + """ + BL + + """ + The `ISO 3166` country code of `BM`. + """ + BM + + """ + The `ISO 3166` country code of `BN`. + """ + BN + + """ + The `ISO 3166` country code of `BO`. + """ + BO + + """ + The `ISO 3166` country code of `BQ`. + """ + BQ + + """ + The `ISO 3166` country code of `BR`. + """ + BR + + """ + The `ISO 3166` country code of `BS`. + """ + BS + + """ + The `ISO 3166` country code of `BT`. + """ + BT + + """ + The `ISO 3166` country code of `BV`. + """ + BV + + """ + The `ISO 3166` country code of `BW`. + """ + BW + + """ + The `ISO 3166` country code of `BY`. + """ + BY + + """ + The `ISO 3166` country code of `BZ`. + """ + BZ + + """ + The `ISO 3166` country code of `CA`. + """ + CA + + """ + The `ISO 3166` country code of `CC`. + """ + CC + + """ + The `ISO 3166` country code of `CD`. + """ + CD + + """ + The `ISO 3166` country code of `CF`. + """ + CF + + """ + The `ISO 3166` country code of `CG`. + """ + CG + + """ + The `ISO 3166` country code of `CH`. + """ + CH + + """ + The `ISO 3166` country code of `CI`. + """ + CI + + """ + The `ISO 3166` country code of `CK`. + """ + CK + + """ + The `ISO 3166` country code of `CL`. + """ + CL + + """ + The `ISO 3166` country code of `CM`. + """ + CM + + """ + The `ISO 3166` country code of `CN`. + """ + CN + + """ + The `ISO 3166` country code of `CO`. + """ + CO + + """ + The `ISO 3166` country code of `CR`. + """ + CR + + """ + The `ISO 3166` country code of `CU`. + """ + CU + + """ + The `ISO 3166` country code of `CV`. + """ + CV + + """ + The `ISO 3166` country code of `CW`. + """ + CW + + """ + The `ISO 3166` country code of `CX`. + """ + CX + + """ + The `ISO 3166` country code of `CY`. + """ + CY + + """ + The `ISO 3166` country code of `CZ`. + """ + CZ + + """ + The `ISO 3166` country code of `DE`. + """ + DE + + """ + The `ISO 3166` country code of `DJ`. + """ + DJ + + """ + The `ISO 3166` country code of `DK`. + """ + DK + + """ + The `ISO 3166` country code of `DM`. + """ + DM + + """ + The `ISO 3166` country code of `DO`. + """ + DO + + """ + The `ISO 3166` country code of `DZ`. + """ + DZ + + """ + The `ISO 3166` country code of `EC`. + """ + EC + + """ + The `ISO 3166` country code of `EE`. + """ + EE + + """ + The `ISO 3166` country code of `EG`. + """ + EG + + """ + The `ISO 3166` country code of `EH`. + """ + EH + + """ + The `ISO 3166` country code of `ER`. + """ + ER + + """ + The `ISO 3166` country code of `ES`. + """ + ES + + """ + The `ISO 3166` country code of `ET`. + """ + ET + + """ + The `ISO 3166` country code of `FI`. + """ + FI + + """ + The `ISO 3166` country code of `FJ`. + """ + FJ + + """ + The `ISO 3166` country code of `FK`. + """ + FK + + """ + The `ISO 3166` country code of `FM`. + """ + FM + + """ + The `ISO 3166` country code of `FO`. + """ + FO + + """ + The `ISO 3166` country code of `FR`. + """ + FR + + """ + The `ISO 3166` country code of `GA`. + """ + GA + + """ + The `ISO 3166` country code of `GB`. + """ + GB + + """ + The `ISO 3166` country code of `GD`. + """ + GD + + """ + The `ISO 3166` country code of `GE`. + """ + GE + + """ + The `ISO 3166` country code of `GF`. + """ + GF + + """ + The `ISO 3166` country code of `GG`. + """ + GG + + """ + The `ISO 3166` country code of `GH`. + """ + GH + + """ + The `ISO 3166` country code of `GI`. + """ + GI + + """ + The `ISO 3166` country code of `GL`. + """ + GL + + """ + The `ISO 3166` country code of `GM`. + """ + GM + + """ + The `ISO 3166` country code of `GN`. + """ + GN + + """ + The `ISO 3166` country code of `GP`. + """ + GP + + """ + The `ISO 3166` country code of `GQ`. + """ + GQ + + """ + The `ISO 3166` country code of `GR`. + """ + GR + + """ + The `ISO 3166` country code of `GS`. + """ + GS + + """ + The `ISO 3166` country code of `GT`. + """ + GT + + """ + The `ISO 3166` country code of `GU`. + """ + GU + + """ + The `ISO 3166` country code of `GW`. + """ + GW + + """ + The `ISO 3166` country code of `GY`. + """ + GY + + """ + The `ISO 3166` country code of `HK`. + """ + HK + + """ + The `ISO 3166` country code of `HM`. + """ + HM + + """ + The `ISO 3166` country code of `HN`. + """ + HN + + """ + The `ISO 3166` country code of `HR`. + """ + HR + + """ + The `ISO 3166` country code of `HT`. + """ + HT + + """ + The `ISO 3166` country code of `HU`. + """ + HU + + """ + The `ISO 3166` country code of `ID`. + """ + ID + + """ + The `ISO 3166` country code of `IE`. + """ + IE + + """ + The `ISO 3166` country code of `IL`. + """ + IL + + """ + The `ISO 3166` country code of `IM`. + """ + IM + + """ + The `ISO 3166` country code of `IN`. + """ + IN + + """ + The `ISO 3166` country code of `IO`. + """ + IO + + """ + The `ISO 3166` country code of `IQ`. + """ + IQ + + """ + The `ISO 3166` country code of `IR`. + """ + IR + + """ + The `ISO 3166` country code of `IS`. + """ + IS + + """ + The `ISO 3166` country code of `IT`. + """ + IT + + """ + The `ISO 3166` country code of `JE`. + """ + JE + + """ + The `ISO 3166` country code of `JM`. + """ + JM + + """ + The `ISO 3166` country code of `JO`. + """ + JO + + """ + The `ISO 3166` country code of `JP`. + """ + JP + + """ + The `ISO 3166` country code of `KE`. + """ + KE + + """ + The `ISO 3166` country code of `KG`. + """ + KG + + """ + The `ISO 3166` country code of `KH`. + """ + KH + + """ + The `ISO 3166` country code of `KI`. + """ + KI + + """ + The `ISO 3166` country code of `KM`. + """ + KM + + """ + The `ISO 3166` country code of `KN`. + """ + KN + + """ + The `ISO 3166` country code of `KP`. + """ + KP + + """ + The `ISO 3166` country code of `KR`. + """ + KR + + """ + The `ISO 3166` country code of `KW`. + """ + KW + + """ + The `ISO 3166` country code of `KY`. + """ + KY + + """ + The `ISO 3166` country code of `KZ`. + """ + KZ + + """ + The `ISO 3166` country code of `LA`. + """ + LA + + """ + The `ISO 3166` country code of `LB`. + """ + LB + + """ + The `ISO 3166` country code of `LC`. + """ + LC + + """ + The `ISO 3166` country code of `LI`. + """ + LI + + """ + The `ISO 3166` country code of `LK`. + """ + LK + + """ + The `ISO 3166` country code of `LR`. + """ + LR + + """ + The `ISO 3166` country code of `LS`. + """ + LS + + """ + The `ISO 3166` country code of `LT`. + """ + LT + + """ + The `ISO 3166` country code of `LU`. + """ + LU + + """ + The `ISO 3166` country code of `LV`. + """ + LV + + """ + The `ISO 3166` country code of `LY`. + """ + LY + + """ + The `ISO 3166` country code of `MA`. + """ + MA + + """ + The `ISO 3166` country code of `MC`. + """ + MC + + """ + The `ISO 3166` country code of `MD`. + """ + MD + + """ + The `ISO 3166` country code of `ME`. + """ + ME + + """ + The `ISO 3166` country code of `MF`. + """ + MF + + """ + The `ISO 3166` country code of `MG`. + """ + MG + + """ + The `ISO 3166` country code of `MH`. + """ + MH + + """ + The `ISO 3166` country code of `MK`. + """ + MK + + """ + The `ISO 3166` country code of `ML`. + """ + ML + + """ + The `ISO 3166` country code of `MM`. + """ + MM + + """ + The `ISO 3166` country code of `MN`. + """ + MN + + """ + The `ISO 3166` country code of `MO`. + """ + MO + + """ + The `ISO 3166` country code of `MP`. + """ + MP + + """ + The `ISO 3166` country code of `MQ`. + """ + MQ + + """ + The `ISO 3166` country code of `MR`. + """ + MR + + """ + The `ISO 3166` country code of `MS`. + """ + MS + + """ + The `ISO 3166` country code of `MT`. + """ + MT + + """ + The `ISO 3166` country code of `MU`. + """ + MU + + """ + The `ISO 3166` country code of `MV`. + """ + MV + + """ + The `ISO 3166` country code of `MW`. + """ + MW + + """ + The `ISO 3166` country code of `MX`. + """ + MX + + """ + The `ISO 3166` country code of `MY`. + """ + MY + + """ + The `ISO 3166` country code of `MZ`. + """ + MZ + + """ + The `ISO 3166` country code of `NA`. + """ + NA + + """ + The `ISO 3166` country code of `NC`. + """ + NC + + """ + The `ISO 3166` country code of `NE`. + """ + NE + + """ + The `ISO 3166` country code of `NF`. + """ + NF + + """ + The `ISO 3166` country code of `NG`. + """ + NG + + """ + The `ISO 3166` country code of `NI`. + """ + NI + + """ + The `ISO 3166` country code of `NL`. + """ + NL + + """ + The `ISO 3166` country code of `NO`. + """ + NO + + """ + The `ISO 3166` country code of `NP`. + """ + NP + + """ + The `ISO 3166` country code of `NR`. + """ + NR + + """ + The `ISO 3166` country code of `NS`. + """ + NS + + """ + The `ISO 3166` country code of `NU`. + """ + NU + + """ + The `ISO 3166` country code of `NZ`. + """ + NZ + + """ + The `ISO 3166` country code of `OM`. + """ + OM + + """ + The `ISO 3166` country code of `PA`. + """ + PA + + """ + The `ISO 3166` country code of `PE`. + """ + PE + + """ + The `ISO 3166` country code of `PF`. + """ + PF + + """ + The `ISO 3166` country code of `PG`. + """ + PG + + """ + The `ISO 3166` country code of `PH`. + """ + PH + + """ + The `ISO 3166` country code of `PK`. + """ + PK + + """ + The `ISO 3166` country code of `PL`. + """ + PL + + """ + The `ISO 3166` country code of `PM`. + """ + PM + + """ + The `ISO 3166` country code of `PN`. + """ + PN + + """ + The `ISO 3166` country code of `PR`. + """ + PR + + """ + The `ISO 3166` country code of `PS`. + """ + PS + + """ + The `ISO 3166` country code of `PT`. + """ + PT + + """ + The `ISO 3166` country code of `PW`. + """ + PW + + """ + The `ISO 3166` country code of `PY`. + """ + PY + + """ + The `ISO 3166` country code of `QA`. + """ + QA + + """ + The `ISO 3166` country code of `RE`. + """ + RE + + """ + The `ISO 3166` country code of `RO`. + """ + RO + + """ + The `ISO 3166` country code of `RS`. + """ + RS + + """ + The `ISO 3166` country code of `RU`. + """ + RU + + """ + The `ISO 3166` country code of `RW`. + """ + RW + + """ + The `ISO 3166` country code of `SA`. + """ + SA + + """ + The `ISO 3166` country code of `SB`. + """ + SB + + """ + The `ISO 3166` country code of `SC`. + """ + SC + + """ + The `ISO 3166` country code of `SD`. + """ + SD + + """ + The `ISO 3166` country code of `SE`. + """ + SE + + """ + The `ISO 3166` country code of `SG`. + """ + SG + + """ + The `ISO 3166` country code of `SH`. + """ + SH + + """ + The `ISO 3166` country code of `SI`. + """ + SI + + """ + The `ISO 3166` country code of `SJ`. + """ + SJ + + """ + The `ISO 3166` country code of `SK`. + """ + SK + + """ + The `ISO 3166` country code of `SL`. + """ + SL + + """ + The `ISO 3166` country code of `SM`. + """ + SM + + """ + The `ISO 3166` country code of `SN`. + """ + SN + + """ + The `ISO 3166` country code of `SO`. + """ + SO + + """ + The `ISO 3166` country code of `SR`. + """ + SR + + """ + The `ISO 3166` country code of `SS`. + """ + SS + + """ + The `ISO 3166` country code of `ST`. + """ + ST + + """ + The `ISO 3166` country code of `SV`. + """ + SV + + """ + The `ISO 3166` country code of `SX`. + """ + SX + + """ + The `ISO 3166` country code of `SY`. + """ + SY + + """ + The `ISO 3166` country code of `SZ`. + """ + SZ + + """ + The `ISO 3166` country code of `TA`. + """ + TA + + """ + The `ISO 3166` country code of `TC`. + """ + TC + + """ + The `ISO 3166` country code of `TD`. + """ + TD + + """ + The `ISO 3166` country code of `TF`. + """ + TF + + """ + The `ISO 3166` country code of `TG`. + """ + TG + + """ + The `ISO 3166` country code of `TH`. + """ + TH + + """ + The `ISO 3166` country code of `TJ`. + """ + TJ + + """ + The `ISO 3166` country code of `TK`. + """ + TK + + """ + The `ISO 3166` country code of `TL`. + """ + TL + + """ + The `ISO 3166` country code of `TM`. + """ + TM + + """ + The `ISO 3166` country code of `TN`. + """ + TN + + """ + The `ISO 3166` country code of `TO`. + """ + TO + + """ + The `ISO 3166` country code of `TR`. + """ + TR + + """ + The `ISO 3166` country code of `TT`. + """ + TT + + """ + The `ISO 3166` country code of `TV`. + """ + TV + + """ + The `ISO 3166` country code of `TW`. + """ + TW + + """ + The `ISO 3166` country code of `TZ`. + """ + TZ + + """ + The `ISO 3166` country code of `UA`. + """ + UA + + """ + The `ISO 3166` country code of `UG`. + """ + UG + + """ + The `ISO 3166` country code of `UM`. + """ + UM + + """ + The `ISO 3166` country code of `US`. + """ + US + + """ + The `ISO 3166` country code of `UY`. + """ + UY + + """ + The `ISO 3166` country code of `UZ`. + """ + UZ + + """ + The `ISO 3166` country code of `VA`. + """ + VA + + """ + The `ISO 3166` country code of `VC`. + """ + VC + + """ + The `ISO 3166` country code of `VE`. + """ + VE + + """ + The `ISO 3166` country code of `VG`. + """ + VG + + """ + The `ISO 3166` country code of `VI`. + """ + VI + + """ + The `ISO 3166` country code of `VN`. + """ + VN + + """ + The `ISO 3166` country code of `VU`. + """ + VU + + """ + The `ISO 3166` country code of `WF`. + """ + WF + + """ + The `ISO 3166` country code of `WS`. + """ + WS + + """ + The `ISO 3166` country code of `XK`. + """ + XK + + """ + The `ISO 3166` country code of `YE`. + """ + YE + + """ + The `ISO 3166` country code of `YT`. + """ + YT + + """ + The `ISO 3166` country code of `ZA`. + """ + ZA + + """ + The `ISO 3166` country code of `ZM`. + """ + ZM + + """ + The `ISO 3166` country code of `ZW`. + """ + ZW + + """ + The `ISO 3166` country code of `XX`. + """ + XX +} + +""" +Return type for `privacyFeaturesDisable` mutation. +""" +type PrivacyFeaturesDisablePayload { + """ + The privacy features that were disabled. + """ + featuresDisabled: [PrivacyFeaturesEnum!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PrivacyFeaturesDisableUserError!]! +} + +""" +An error that occurs during the execution of `PrivacyFeaturesDisable`. +""" +type PrivacyFeaturesDisableUserError implements DisplayableError { + """ + The error code. + """ + code: PrivacyFeaturesDisableUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PrivacyFeaturesDisableUserError`. +""" +enum PrivacyFeaturesDisableUserErrorCode { + """ + Failed to disable privacy features. + """ + FAILED +} + +""" +The input fields for a shop's privacy settings. +""" +enum PrivacyFeaturesEnum { + """ + The cookie banner feature. + """ + COOKIE_BANNER + + """ + The data sale opt out page feature. + """ + DATA_SALE_OPT_OUT_PAGE + + """ + The privacy policy feature. + """ + PRIVACY_POLICY +} + +""" +A shop's privacy policy settings. +""" +type PrivacyPolicy { + """ + Whether the policy is auto managed. + """ + autoManaged: Boolean! + + """ + Policy template supported locales. + """ + supportedLocales: [String!]! +} + +""" +A shop's privacy settings. +""" +type PrivacySettings { + """ + Banner customizations for the 'cookie banner'. + """ + banner: CookieBanner + + """ + A shop's data sale opt out page (e.g. CCPA). + """ + dataSaleOptOutPage: DataSaleOptOutPage + + """ + A shop's privacy policy settings. + """ + privacyPolicy: PrivacyPolicy +} + +""" +The `Product` object lets you manage products in a merchant’s store. + +Products are the goods and services that merchants offer to customers. They can include various details such as title, description, price, images, and options such as size or color. +You can use [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) to create or update different versions of the same product. +You can also add or update product [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/media). +Products can be organized by grouping them into a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection). + +Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components), +including limitations and considerations. +""" +type Product implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node & OnlineStorePreviewable & Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + bodyHtml: String @deprecated(reason: "Use `descriptionHtml` instead.") + + """ + A list of [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) + that are associated with a product in a bundle. + """ + bundleComponents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductBundleComponentConnection! + + """ + A list of consolidated options for a product in a bundle. + """ + bundleConsolidatedOptions: [ComponentizedProductsBundleConsolidatedOption!] + + """ + The category of a product + from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). + """ + category: TaxonomyCategory + + """ + A list of [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + that include the product. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CollectionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| collection_type | string | | - `custom`
- `smart` |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| product_id | id | Filter by collections containing a product by its ID. |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the collection was published to the Online Store. |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CollectionConnection! + + """ + A special product type that combines separate products from a store into a single product listing. + [Combined listings](https://shopify.dev/apps/build/product-merchandising/combined-listings) are connected + by a shared option, such as color, model, or dimension. + """ + combinedListing: CombinedListing + + """ + The [role of the product](https://shopify.dev/docs/apps/build/product-merchandising/combined-listings/build-for-combined-listings) + in a combined listing. + + If `null`, then the product isn't part of any combined listing. + """ + combinedListingRole: CombinedListingsRole + + """ + The [compare-at price range](https://help.shopify.com/manual/products/details/product-pricing/sale-pricing) + of the product in the shop's default currency. + """ + compareAtPriceRange: ProductCompareAtPriceRange + + """ + The pricing that applies to a customer in a specific context. For example, a price might vary depending on the customer's location. Only active markets are considered in the price resolution. + """ + contextualPricing("The context used to generate contextual pricing for the variant." context: ContextualPricingContext!): ProductContextualPricing! + + """ + The date and time when the product was created. + """ + createdAt: DateTime! + + """ + The custom product type specified by the merchant. + """ + customProductType: String @deprecated(reason: "Use `productType` instead.") + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A single-line description of the product, + with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed. + """ + description("Truncates a string after the given length." truncateAt: Int): String! + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + descriptionHtml: HTML! + + """ + Stripped description of the product, single line with HTML tags removed. + Truncated to 60 characters. + """ + descriptionPlainSummary: String! @deprecated(reason: "Use `description` instead.") + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + The featured image for the product. + """ + featuredImage: Image @deprecated(reason: "Use `featuredMedia` instead.") + + """ + The featured [media](https://shopify.dev/docs/apps/build/online-store/product-media) + associated with the product. + """ + featuredMedia: Media + + """ + The information that lets merchants know what steps they need to take + to make sure that the app is set up correctly. + + For example, if a merchant hasn't set up a product correctly in the app, + then the feedback might include a message that says "You need to add a price + to this product". + """ + feedback: ResourceFeedback + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view the gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + A unique, human-readable string of the product's title. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + The handle is used in the online store URL for the product. + """ + handle: String! + + """ + Whether the product has only a single variant with the default option and value. + """ + hasOnlyDefaultVariant: Boolean! + + """ + Whether the product has variants that are out of stock. + """ + hasOutOfStockVariants: Boolean! + + """ + Whether at least one of the product variants requires + [bundle components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle). + + Learn more about + [store eligibility for bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles#store-eligibility). + """ + hasVariantsThatRequiresComponents: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The images associated with the product. + """ + images("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead."), "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductImageSortKeys = POSITION): ImageConnection! @deprecated(reason: "Use `media` instead.") + + """ + Whether the product + is in a specified + [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection). + """ + inCollection("The ID of the collection to check. For example, `id: \"gid://shopify/Collection/123\"`." id: ID!): Boolean! + + """ + Whether the product is a gift card. + """ + isGiftCard: Boolean! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The [media](https://shopify.dev/docs/apps/build/online-store/product-media) associated with the product. Valid media are images, 3D models, videos. + """ + media("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductMediaSortKeys = POSITION, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| media_type | string | | - `IMAGE`
- `VIDEO`
- `MODEL_3D`
- `EXTERNAL_VIDEO` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MediaConnection! + + """ + The total count of [media](https://shopify.dev/docs/apps/build/online-store/product-media) + that's associated with a product. + """ + mediaCount: Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL + + """ + The product's URL on the online store. + If `null`, then the product isn't published to the online store sales channel. + """ + onlineStoreUrl: URL + + """ + A list of product options. The limit is defined by the + [shop's resource limits for product options](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) (`Shop.resourceLimits.maxProductOptions`). + """ + options("Truncate the array result to this size." first: Int): [ProductOption!]! + + """ + The price range of the product. + """ + priceRange: ProductPriceRange! @deprecated(reason: "Use `priceRangeV2` instead.") + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRangeV2: ProductPriceRangeV2! + + """ + The product category specified by the merchant. + """ + productCategory: ProductCategory @deprecated(reason: "Use `category` instead.") + + """ + A list of products that contain at least one variant associated with + at least one of the current products' variants via group relationship. + """ + productComponents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductComponentTypeConnection! + + """ + A count of unique products that contain at least one variant associated with + at least one of the current products' variants via group relationship. + """ + productComponentsCount: Count + + """ + A list of products that has a variant that contains any of this product's variants as a component. + """ + productParents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ProductConnection! + + """ + A list of the channels where the product is published. + """ + productPublications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String! + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + publicationCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + A list of the channels where the product is published. + """ + publications("Return only the publications that are published. If false, then return all publications." onlyPublished: Boolean = true, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """ + The date and time when the product was published to the online store. + """ + publishedAt: DateTime + + """ + Whether the product is published for a customer only in a specified context. For example, a product might be published for a customer only in a specific location. + """ + publishedInContext("The context used to determine publication status." context: ContextualPublicationContext!): Boolean! + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel("The ID of the channel to check." channelId: ID!): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication("The ID of the publication to check. For example, `id: \"gid://shopify/Publication/123\"`." publicationId: ID!): Boolean! + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels, except the online store. + """ + requiresSellingPlan: Boolean! + + """ + The resource that's either published or staged to be published to + the [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublicationOnCurrentPublication: ResourcePublicationV2 @deprecated(reason: "Use `resourcePublications` instead.") + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled to be published." onlyPublished: Boolean = true, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + resourcePublicationsCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + By default, only publications to `APP` catalog types are returned. + For `Product` and `ProductVariant`, use the `catalogType` argument to retrieve + publications for other catalog types, such as `COMPANY_LOCATION` (B2B) or `MARKET`. + `Collection` only supports publications to `APP` catalog types. + """ + resourcePublicationsV2("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled or staged to be published." onlyPublished: Boolean = true, "Filter publications by catalog type. When not specified, defaults to APP. Has no effect on Collection, which only supports APP." catalogType: CatalogType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationV2Connection! + + """ + Whether the merchant can make changes to the product when they + [edit the order](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders) + associated with the product. For example, a merchant might be restricted from changing product details when they + edit an order. + """ + restrictedForResource("The resource Id of the order with edits applied but not saved." calculatedOrderId: ID!): RestrictedForResource + + """ + A count of [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product either directly, or through the product's variants. + """ + sellingPlanGroups("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanGroupConnection! + + """ + A count of [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product. + """ + sellingPlanGroupsCount: Count + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEO! + + """ + The standardized product type in the Shopify product taxonomy. + """ + standardizedProductType: StandardizedProductType @deprecated(reason: "Use `productCategory` instead.") + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus! + + """ + The Storefront GraphQL API ID of the `Product`. + + The Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + A comma-separated list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites + any existing tags that were previously added to the product. To add new tags without overwriting + existing tags, use the [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!]! + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view the product in a store. + """ + templateSuffix: String + + """ + The name for the product that displays to customers. The title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. + """ + title: String! + + """ + The quantity of inventory that's in stock. + """ + totalInventory: Int! + + """ + The number of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + that are associated with the product. + """ + totalVariants: Int! @deprecated(reason: "Use `variantsCount` instead.") + + """ + Whether [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + has been enabled for the product. + """ + tracksInventory: Boolean! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PublicationConnection! + + """ + The date and time when the product was last modified. + A product's `updatedAt` value can change for different reasons. For example, if an order + is placed for a product that has inventory tracking set up, then the inventory adjustment + is counted as an update. + """ + updatedAt: DateTime! + + """ + A list of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) associated with the product. + If querying a single product at the root, you can fetch up to 2048 variants. + """ + variants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductVariantSortKeys = POSITION): ProductVariantConnection! + + """ + The number of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + that are associated with the product. + """ + variantsCount: Count + + """ + The name of the product's vendor. + """ + vendor: String! +} + +""" +The product's component information. +""" +type ProductBundleComponent { + """ + The product that's related as a component. + """ + componentProduct: Product! + + """ + The list of products' variants that are components. + """ + componentVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The number of component variants for the product component. + """ + componentVariantsCount: Count + + """ + The options in the parent and the component options they're connected to, along with the chosen option values + that appear in the bundle. + """ + optionSelections: [ProductBundleComponentOptionSelection!]! + + """ + The quantity of the component product set for this bundle line. + It will be null if there's a quantityOption present. + """ + quantity: Int + + """ + The quantity as option of the component product. It will be null if there's a quantity set. + """ + quantityOption: ProductBundleComponentQuantityOption +} + +""" +An auto-generated type for paginating through multiple ProductBundleComponents. +""" +type ProductBundleComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductBundleComponentEdge!]! + + """ + A list of nodes that are contained in ProductBundleComponentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductBundleComponent!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductBundleComponent and a cursor during pagination. +""" +type ProductBundleComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductBundleComponentEdge. + """ + node: ProductBundleComponent! +} + +""" +The input fields for a single component related to a componentized product. +""" +input ProductBundleComponentInput { + """ + The quantity of the component product to add to the bundle product. This field can't exceed 2000. + """ + quantity: Int + + """ + The ID of the component product to add to the bundle product. + """ + productId: ID! + + """ + The options to use in the component product, and the values for the option. + """ + optionSelections: [ProductBundleComponentOptionSelectionInput!]! + + """ + New option to be created on the bundle parent that enables the buyer to select different quantities for + this component (e.g. two-pack, three-pack). Can only be used if quantity isn't set. + """ + quantityOption: ProductBundleComponentQuantityOptionInput +} + +""" +A relationship between a component option and a parent option. +""" +type ProductBundleComponentOptionSelection { + """ + The option that existed on the component product prior to the fixed bundle creation. + """ + componentOption: ProductOption! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The component option values that are actively selected for this relationship. + """ + values: [ProductBundleComponentOptionSelectionValue!]! +} + +""" +The input fields for a single option related to a component product. +""" +input ProductBundleComponentOptionSelectionInput { + """ + The ID of the option present on the component product. + """ + componentOptionId: ID! + + """ + The name to create for this option on the parent product. + """ + name: String! + + """ + Array of selected option values. + """ + values: [String!]! +} + +""" +The status of a component option value related to a bundle. +""" +enum ProductBundleComponentOptionSelectionStatus { + """ + The component option value is selected as sellable in the bundle. + """ + SELECTED + + """ + The component option value is not selected as sellable in the bundle. + """ + DESELECTED + + """ + The component option value was not initially selected, but is now available for the bundle. + """ + NEW + + """ + The component option value was selected, is no longer available for the bundle. + """ + UNAVAILABLE +} + +""" +A component option value related to a bundle line. +""" +type ProductBundleComponentOptionSelectionValue { + """ + Selection status of the option. + """ + selectionStatus: ProductBundleComponentOptionSelectionStatus! + + """ + The value of the option. + """ + value: String! +} + +""" +A quantity option related to a bundle. +""" +type ProductBundleComponentQuantityOption { + """ + The name of the option value. + """ + name: String! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The quantity values of the option. + """ + values: [ProductBundleComponentQuantityOptionValue!]! +} + +""" +Input for the quantity option related to a component product. This will become a new option on the parent bundle product that doesn't have a corresponding option on the component. +""" +input ProductBundleComponentQuantityOptionInput { + """ + The option name to create on the parent product. + """ + name: String! + + """ + Array of option values. + """ + values: [ProductBundleComponentQuantityOptionValueInput!]! +} + +""" +A quantity option value related to a componentized product. +""" +type ProductBundleComponentQuantityOptionValue { + """ + The name of the option value. + """ + name: String! + + """ + The quantity of the option value. + """ + quantity: Int! +} + +""" +The input fields for a single quantity option value related to a component product. +""" +input ProductBundleComponentQuantityOptionValueInput { + """ + The name associated with the option, e.g. one-pack, two-pack. + """ + name: String! + + """ + How many of the variant will be included for the option value (e.g. two-pack has quantity 2). + """ + quantity: Int! +} + +""" +The input fields for mapping a consolidated option to a specific component option. +""" +input ProductBundleConsolidatedOptionComponentInput { + """ + The value to use for the component option (e.g., 'Small', 'Red'). + """ + componentOptionValue: String! + + """ + The ID of the component option that this consolidated option maps to. + If null, this selection targets the component's quantity option with the given name. + """ + componentOptionId: ID +} + +""" +The input fields for a consolidated option on a componentized product. +""" +input ProductBundleConsolidatedOptionInput { + """ + The name of the consolidated option (e.g., 'Size', 'Color'). + """ + optionName: String! + + """ + The option selections that define how this consolidated option maps to component options. + """ + optionSelections: [ProductBundleConsolidatedOptionSelectionInput!]! +} + +""" +The input fields for a consolidated option selection that maps to component options. +""" +input ProductBundleConsolidatedOptionSelectionInput { + """ + The value for this consolidated option selection (e.g., 'Small', 'Medium', 'Large'). + """ + optionValue: String! + + """ + The component mappings that define how this option value maps to specific component options. + """ + components: [ProductBundleConsolidatedOptionComponentInput!]! +} + +""" +The input fields for creating a componentized product. +""" +input ProductBundleCreateInput { + """ + The title of the product to create. + """ + title: String! + + """ + The consolidated options of the componentized product to create, if provided. + """ + consolidatedOptions: [ProductBundleConsolidatedOptionInput!] + + """ + The component products to bundle with the bundle product. + """ + components: [ProductBundleComponentInput!]! +} + +""" +Return type for `productBundleCreate` mutation. +""" +type ProductBundleCreatePayload { + """ + The asynchronous ProductBundleOperation creating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Defines errors encountered while managing a product bundle. +""" +type ProductBundleMutationUserError implements DisplayableError { + """ + The error code. + """ + code: ProductBundleMutationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductBundleMutationUserError`. +""" +enum ProductBundleMutationUserErrorCode { + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Input is not valid. + """ + INVALID_INPUT + + """ + Error processing request in the background job. + """ + JOB_ERROR +} + +""" +An entity that represents details of an asynchronous +[ProductBundleCreate](https://shopify.dev/api/admin-graphql/current/mutations/productBundleCreate) or +[ProductBundleUpdate](https://shopify.dev/api/admin-graphql/current/mutations/productBundleUpdate) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned when the bundle was created or updated, this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductBundleOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductBundleMutationUserError!]! +} + +""" +The input fields for updating a componentized product. +""" +input ProductBundleUpdateInput { + """ + The ID of the componentized product to update. + """ + productId: ID! + + """ + The title to rename the componentized product to, if provided. + """ + title: String + + """ + The consolidated options of the componentized product to update, if provided. + """ + consolidatedOptions: [ProductBundleConsolidatedOptionInput!] + + """ + The components to update existing ones. If none provided, no changes occur. Note: This replaces, not adds to, current components. + """ + components: [ProductBundleComponentInput!] +} + +""" +Return type for `productBundleUpdate` mutation. +""" +type ProductBundleUpdatePayload { + """ + The asynchronous ProductBundleOperation updating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The details of a specific product category within Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). Provides access to the associated [`ProductTaxonomyNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductTaxonomyNode). +""" +type ProductCategory { + """ + The product taxonomy node associated with the product category. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +Return type for `productChangeStatus` mutation. +""" +type ProductChangeStatusPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductChangeStatusUserError!]! +} + +""" +An error that occurs during the execution of `ProductChangeStatus`. +""" +type ProductChangeStatusUserError implements DisplayableError { + """ + The error code. + """ + code: ProductChangeStatusUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductChangeStatusUserError`. +""" +enum ProductChangeStatusUserErrorCode { + """ + Product could not be found. + """ + PRODUCT_NOT_FOUND + + """ + Cannot be unarchived because combined listings are not compatible with this store. + """ + COMBINED_LISTINGS_NOT_COMPATIBLE_WITH_SHOP +} + +""" +The input fields to claim ownership for Product features such as Bundles. +""" +input ProductClaimOwnershipInput { + """ + Claiming ownership of bundles lets the app render a custom UI for the bundles' card on the + products details page in the Shopify admin. + + Bundle ownership can only be claimed when creating the product. If you create `ProductVariantComponents` + in any of its product variants, then the bundle ownership is automatically assigned to the app making the call. + + [Learn more](https://shopify.dev/docs/apps/selling-strategies/bundles/product-config). + """ + bundles: Boolean +} + +""" +The set of valid sort keys for products belonging to a collection. +""" +enum ProductCollectionSortKeys { + """ + Sort by best selling. + """ + BEST_SELLING + + """ + Sort by collection default order. + """ + COLLECTION_DEFAULT + + """ + Sort by creation time. + """ + CREATED + + """ + Sort by id. + """ + ID + + """ + Sort by manual order. + """ + MANUAL + + """ + Sort by price. + """ + PRICE + + """ + Sort by relevance. + """ + RELEVANCE + + """ + Sort by title. + """ + TITLE +} + +""" +The compare-at price range of the product. +""" +type ProductCompareAtPriceRange { + """ + The highest variant's compare-at price. + """ + maxVariantCompareAtPrice: MoneyV2! + + """ + The lowest variant's compare-at price. + """ + minVariantCompareAtPrice: MoneyV2! +} + +""" +The product component information. +""" +type ProductComponentType { + """ + The list of products' variants that are components. + """ + componentVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The number of component variants for the product component. + """ + componentVariantsCount: Count + + """ + The list of products' variants that are not components. + """ + nonComponentVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + The number of non_components variants for the product component. + """ + nonComponentVariantsCount: Count + + """ + The product that's a component. + """ + product: Product! +} + +""" +An auto-generated type for paginating through multiple ProductComponentTypes. +""" +type ProductComponentTypeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductComponentTypeEdge!]! + + """ + A list of nodes that are contained in ProductComponentTypeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductComponentType!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductComponentType and a cursor during pagination. +""" +type ProductComponentTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductComponentTypeEdge. + """ + node: ProductComponentType! +} + +""" +An auto-generated type for paginating through multiple Products. +""" +type ProductConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductEdge!]! + + """ + A list of nodes that are contained in ProductEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Product!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in a specific country. Shows the minimum and maximum variant prices through the price range and the count of fixed quantity rules that apply to the product's variants in the given pricing context. +""" +type ProductContextualPricing { + """ + The number of fixed quantity rules for the product's variants on the price list. + """ + fixedQuantityRulesCount: Int! + + """ + The pricing of the variant with the highest price in the given context. + """ + maxVariantPricing: ProductVariantContextualPricing + + """ + The pricing of the variant with the lowest price in the given context. + """ + minVariantPricing: ProductVariantContextualPricing + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRange: ProductPriceRangeV2! +} + +""" +The input fields required to create a product. +""" +input ProductCreateInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + A list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """ + The name of the product's vendor. + """ + vendor: String + + """ + The ID of the [category](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) + that's associated with the product. + """ + category: ID + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + """ + combinedListingRole: CombinedListingsRole + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + A list of product options and option values. Maximum product options: three. There's no limit on the number of option values. + """ + productOptions: [OptionCreateInput!] + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput +} + +""" +Return type for `productCreateMedia` mutation. +""" +type ProductCreateMediaPayload { + """ + The newly created media. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productCreate` mutation. +""" +type ProductCreatePayload { + """ + The product object. + """ + product: Product + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the product to delete. +""" +input ProductDeleteInput { + """ + The ID of the product. + """ + id: ID! +} + +""" +Return type for `productDeleteMedia` mutation. +""" +type ProductDeleteMediaPayload { + """ + List of media IDs which were deleted. + """ + deletedMediaIds: [ID!] + + """ + List of product image IDs which were deleted. + """ + deletedProductImageIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the deleted media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +An entity that represents details of an asynchronous +[ProductDelete](https://shopify.dev/api/admin-graphql/current/mutations/productDelete) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned when the product was deleted, this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `deletedProductId` field provides the ID of the deleted product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDeleteOperation implements Node & ProductOperation { + """ + The ID of the deleted product. + """ + deletedProductId: ID + + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productDelete` mutation. +""" +type ProductDeletePayload { + """ + The ID of the deleted product. + """ + deletedProductId: ID + + """ + The product delete operation, returned when run in asynchronous mode. + """ + productDeleteOperation: ProductDeleteOperation + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a product duplication job. +""" +type ProductDuplicateJob { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +An entity that represents details of an asynchronous +[ProductDuplicate](https://shopify.dev/api/admin-graphql/current/mutations/productDuplicate) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was duplicated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the original product. + +The `newProduct` field provides the details of the new duplicate of the product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDuplicateOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The newly created duplicate of the original product. + """ + newProduct: Product + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productDuplicate` mutation. +""" +type ProductDuplicatePayload { + """ + The asynchronous job that duplicates the product images. + """ + imageJob: Job + + """ + The duplicated product. + """ + newProduct: Product + + """ + The product duplicate operation, returned when run in asynchronous mode. + """ + productDuplicateOperation: ProductDuplicateOperation + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. +""" +type ProductEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductEdge. + """ + node: Product! +} + +""" +A product feed. +""" +type ProductFeed implements Node { + """ + The country of the product feed. + """ + country: CountryCode + + """ + A globally-unique ID. + """ + id: ID! + + """ + The language of the product feed. + """ + language: LanguageCode + + """ + The status of the product feed. + """ + status: ProductFeedStatus! +} + +""" +An auto-generated type for paginating through multiple ProductFeeds. +""" +type ProductFeedConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductFeedEdge!]! + + """ + A list of nodes that are contained in ProductFeedEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductFeed!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `productFeedCreate` mutation. +""" +type ProductFeedCreatePayload { + """ + The newly created product feed. + """ + productFeed: ProductFeed + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedCreateUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedCreate`. +""" +type ProductFeedCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedCreateUserError`. +""" +enum ProductFeedCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Return type for `productFeedDelete` mutation. +""" +type ProductFeedDeletePayload { + """ + The ID of the product feed that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedDelete`. +""" +type ProductFeedDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedDeleteUserError`. +""" +enum ProductFeedDeleteUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +An auto-generated type which holds one ProductFeed and a cursor during pagination. +""" +type ProductFeedEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductFeedEdge. + """ + node: ProductFeed! +} + +""" +The input fields required to create a product feed. +""" +input ProductFeedInput { + """ + The language of the product feed. + """ + language: LanguageCode! + + """ + The country of the product feed. + """ + country: CountryCode! +} + +""" +The valid values for the status of product feed. +""" +enum ProductFeedStatus { + """ + The product feed is active. + """ + ACTIVE + + """ + The product feed is inactive. + """ + INACTIVE +} + +""" +Return type for `productFullSync` mutation. +""" +type ProductFullSyncPayload { + """ + The ID for the full sync operation. + """ + id: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFullSyncUserError!]! +} + +""" +An error that occurs during the execution of `ProductFullSync`. +""" +type ProductFullSyncUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFullSyncUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFullSyncUserError`. +""" +enum ProductFullSyncUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a product. +""" +input ProductIdentifierInput @oneOf { + """ + The ID of the product. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product. + """ + customId: UniqueMetafieldValueInput + + """ + The handle of the product. + """ + handle: String +} + +""" +The set of valid sort keys for the ProductImage query. +""" +enum ProductImageSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION +} + +""" +The input fields for creating or updating a product. +""" +input ProductInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + A list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """ + The name of the product's vendor. + """ + vendor: String + + """ + The ID of the [category](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) + that's associated with the product. + """ + category: ID + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + You can specify this field only when you create a product. + """ + combinedListingRole: CombinedListingsRole + + """ + The product's ID. + + If you're creating a product, then you don't need to pass the `id` as input to the + [`productCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate) mutation. + If you're updating a product, then you do need to pass the `id` as input to the + [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate) mutation + to identify which product you want to update. + """ + id: ID + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + A list of product options and option values. Maximum product options: three. There's no limit on the number of option values. + This input is supported only with the [`productCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate) + mutation. + """ + productOptions: [OptionCreateInput!] + + """ + A list of the channels where the product is published. + """ + productPublications: [ProductPublicationInput!] @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + A list of the channels where the product is published. + """ + publications: [ProductPublicationInput!] @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + Only products with an active status can be published. + """ + publishDate: DateTime @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + Only products with an active status can be published. + """ + publishOn: DateTime @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + Only products with an active status can be published. + """ + published: Boolean @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + Only products with an active status can be published. + """ + publishedAt: DateTime @deprecated(reason: "Use [`PublishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish)\ninstead.\n") + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput +} + +""" +Return type for `productJoinSellingPlanGroups` mutation. +""" +type ProductJoinSellingPlanGroupsPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productLeaveSellingPlanGroups` mutation. +""" +type ProductLeaveSellingPlanGroupsPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The set of valid sort keys for the ProductMedia query. +""" +enum ProductMediaSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION +} + +""" +An interface representing asynchronous operations on products. Tracks the status and details of background product mutations like `productSet`, `productDelete`, `productDuplicate`, and `productBundle` operations. Provides status field (CREATED, ACTIVE, COMPLETE) and product field to monitor long-running product operations. +""" +interface ProductOperation { + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! +} + +""" +Represents the state of this product operation. +""" +enum ProductOperationStatus { + """ + Operation has been created. + """ + CREATED + + """ + Operation is currently running. + """ + ACTIVE + + """ + Operation is complete. + """ + COMPLETE +} + +""" +A product attribute that customers can choose from, such as "Size", "Color", or "Material". [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects use options to define the different variations available for purchase. Each option has a name and a set of possible values that combine to create [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. + +The option includes its display position, associated values, and optional [`LinkedMetafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LinkedMetafield) for structured data. Options support translations for international selling and track which [`ProductOptionValue`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue) objects that variants actively use versus unused values that exist without associated variants. +""" +type ProductOption implements HasPublishedTranslations & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The metafield identifier linked to this option. + """ + linkedMetafield: LinkedMetafield + + """ + The product option’s name. + """ + name: String! + + """ + Similar to values, option_values returns all the corresponding option value objects to the product option, including values not assigned to any variants. + """ + optionValues: [ProductOptionValue!]! + + """ + The product option's position. + """ + position: Int! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The corresponding value to the product option name. + """ + values: [String!]! +} + +""" +The set of variant strategies available for use in the `productOptionsCreate` mutation. +""" +enum ProductOptionCreateVariantStrategy { + """ + No additional variants are created in response to the added options. Existing variants are updated with the + first option value of each option added. + """ + LEAVE_AS_IS + + """ + Existing variants are updated with the first option value of each added option. New variants are + created for each combination of existing variant option values and new option values. + """ + CREATE +} + +""" +The set of strategies available for use on the `productOptionDelete` mutation. +""" +enum ProductOptionDeleteStrategy { + """ + The default strategy, the specified `Option` may only have one corresponding `value`. + """ + DEFAULT + + """ + An `Option` with multiple `values` can be deleted. Remaining variants will be deleted, highest `position` first, in the event of duplicates being detected. + """ + POSITION + + """ + An `Option` with multiple `values` can be deleted, but the operation only succeeds if no product variants get deleted. + """ + NON_DESTRUCTIVE +} + +""" +Return type for `productOptionUpdate` mutation. +""" +type ProductOptionUpdatePayload { + """ + The product with which the option being updated is associated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionUpdateUserError!]! +} + +""" +Error codes for failed `ProductOptionUpdate` mutation. +""" +type ProductOptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionUpdateUserError`. +""" +enum ProductOptionUpdateUserErrorCode { + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Option already exists. + """ + OPTION_ALREADY_EXISTS + + """ + The option position provided is not valid. + """ + INVALID_POSITION + + """ + The name provided is not valid. + """ + INVALID_NAME + + """ + Option values count is over the allowed limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Option value already exists. + """ + OPTION_VALUE_ALREADY_EXISTS + + """ + Option value with variants linked cannot be deleted. + """ + OPTION_VALUE_HAS_VARIANTS + + """ + Deleting all option values of an option is not allowed. + """ + CANNOT_DELETE_ALL_OPTION_VALUES_IN_OPTION + + """ + An option cannot be left only with option values that are not linked to any variant. + """ + CANNOT_LEAVE_OPTIONS_WITHOUT_VARIANTS + + """ + On create, this key cannot be used. + """ + NO_KEY_ON_CREATE + + """ + A key is missing in the input. + """ + KEY_MISSING_IN_INPUT + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Option name is too long. + """ + OPTION_NAME_TOO_LONG + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + Performing conflicting actions on an option value. + """ + OPTION_VALUE_CONFLICTING_OPERATION + + """ + The number of variants will be above the limit after this operation. + """ + CANNOT_CREATE_VARIANTS_ABOVE_LIMIT + + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + An option linked to the provided metafield already exists. + """ + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """ + Updating the linked_metafield of an option requires a linked_metafield_value for each option value. + """ + LINKED_OPTION_UPDATE_MISSING_VALUES + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot update the option because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION + + """ + The number of option values created with the MANAGE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED +} + +""" +The set of variant strategies available for use in the `productOptionUpdate` mutation. +""" +enum ProductOptionUpdateVariantStrategy { + """ + Variants are not created nor deleted in response to option values to add or delete. + In cases where deleting a variant would be necessary to complete the operation, an error will be returned. + """ + LEAVE_AS_IS + + """ + Variants are created and deleted according to the option values to add and to delete. + + If an option value is added, a new variant will be added for each existing option combination + available on the product. For example, if the existing options are `Size` and `Color`, with + values `S`/`XL` and `Red`/`Blue`, adding a new option value `Green` for the option `Color` will create + variants with the option value combinations `S`/`Green` and `XL`/`Green`. + + If an option value is deleted, all variants referencing that option value will be deleted. + """ + MANAGE +} + +""" +A specific value for a [`ProductOption`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), such as "Red" or "Blue" for a "Color" option. Each value can be assigned to [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects to create different versions of a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + +The value tracks whether any variants currently use it through the [`hasVariants`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue#field-hasVariants) field. Values can include visual representations through swatches that display colors or images. When linked to a [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield), the [`linkedMetafieldValue`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue#field-linkedMetafieldValue) provides additional structured data for the option value. +""" +type ProductOptionValue implements HasPublishedTranslations & Node { + """ + Whether the product option value has any linked variants. + """ + hasVariants: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the linked metafield. + """ + linkedMetafieldValue: String + + """ + The name of the product option value. + """ + name: String! + + """ + The swatch associated with the product option value. + """ + swatch: ProductOptionValueSwatch + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +A swatch associated with a product option value. +""" +type ProductOptionValueSwatch { + """ + The color representation of the swatch. + """ + color: Color + + """ + An image representation of the swatch. + """ + image: MediaImage +} + +""" +Return type for `productOptionsCreate` mutation. +""" +type ProductOptionsCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsCreateUserError!]! +} + +""" +Error codes for failed `ProductOptionsCreate` mutation. +""" +type ProductOptionsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsCreateUserError`. +""" +enum ProductOptionsCreateUserErrorCode { + """ + Option already exists. + """ + OPTION_ALREADY_EXISTS + + """ + Options count is over the allowed limit. + """ + OPTIONS_OVER_LIMIT + + """ + Option values count is over the allowed limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + The name provided is not valid. + """ + INVALID_NAME + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Cannot create new options without values for all existing variants. + """ + NEW_OPTION_WITHOUT_VALUE_FOR_EXISTING_VARIANTS + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Each option must have a name specified. + """ + OPTION_NAME_MISSING + + """ + Each option must have at least one option value specified. + """ + OPTION_VALUES_MISSING + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + Option name is too long. + """ + OPTION_NAME_TOO_LONG + + """ + Position must be between 1 and the maximum number of options per product. + """ + POSITION_OUT_OF_BOUNDS + + """ + If specified, position field must be present in all option inputs. + """ + OPTION_POSITION_MISSING + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + Missing metafield values for linked option. + """ + MISSING_METAFIELD_VALUES_FOR_LINKED_OPTION + + """ + Cannot combine linked metafield and option values. + """ + CANNOT_COMBINE_LINKED_METAFIELD_AND_OPTION_VALUES + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + An option linked to the provided metafield already exists. + """ + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot specify 'linkedMetafieldValue' for an option that is not linked to a metafield. + """ + LINKED_METAFIELD_VALUE_WITHOUT_LINKED_OPTION + + """ + The number of option values created with the CREATE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED +} + +""" +Return type for `productOptionsDelete` mutation. +""" +type ProductOptionsDeletePayload { + """ + IDs of the options deleted. + """ + deletedOptionsIds: [ID!] + + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsDeleteUserError!]! +} + +""" +Error codes for failed `ProductOptionsDelete` mutation. +""" +type ProductOptionsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsDeleteUserError`. +""" +enum ProductOptionsDeleteUserErrorCode { + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Options do not belong to the same product. + """ + OPTIONS_DO_NOT_BELONG_TO_THE_SAME_PRODUCT + + """ + Can't delete option with multiple values. + """ + CANNOT_DELETE_OPTION_WITH_MULTIPLE_VALUES + + """ + Cannot delete options without deleting variants. + """ + CANNOT_USE_NON_DESTRUCTIVE_STRATEGY + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot perform option deletion because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION +} + +""" +Return type for `productOptionsReorder` mutation. +""" +type ProductOptionsReorderPayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsReorderUserError!]! +} + +""" +Error codes for failed `ProductOptionsReorder` mutation. +""" +type ProductOptionsReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsReorderUserError`. +""" +enum ProductOptionsReorderUserErrorCode { + """ + Option name does not exist. + """ + OPTION_NAME_DOES_NOT_EXIST + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Option id does not exist. + """ + OPTION_ID_DOES_NOT_EXIST + + """ + Option value id does not exist. + """ + OPTION_VALUE_ID_DOES_NOT_EXIST + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Missing option name. + """ + MISSING_OPTION_NAME + + """ + Missing option value. + """ + MISSING_OPTION_VALUE + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + On reorder, this key cannot be used. + """ + NO_KEY_ON_REORDER + + """ + Cannot specify different options or option values using mixed id and name reference key. + """ + MIXING_ID_AND_NAME_KEYS_IS_NOT_ALLOWED + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU +} + +""" +The price range of the product. +""" +type ProductPriceRange { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +The price range of the product. +""" +type ProductPriceRangeV2 { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +Represents the channels where a product is published. +""" +type ProductPublication { + """ + The channel where the product was or is published. + """ + channel: Channel! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The product that was or is going to be published on the channel. + """ + product: Product! + + """ + The date that the product was or is going to be published on the channel. + """ + publishDate: DateTime +} + +""" +An auto-generated type for paginating through multiple ProductPublications. +""" +type ProductPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductPublicationEdge!]! + + """ + A list of nodes that are contained in ProductPublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductPublication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductPublication and a cursor during pagination. +""" +type ProductPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductPublicationEdge. + """ + node: ProductPublication! +} + +""" +The input fields for specifying a publication to which a product will be published. +""" +input ProductPublicationInput { + """ + ID of the publication. + """ + publicationId: ID + + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + The date and time that the product was (or will be) published. + """ + publishDate: DateTime +} + +""" +The input fields for specifying a product to publish and the channels to publish it to. +""" +input ProductPublishInput { + """ + The product to create or update publications for. + """ + id: ID! + + """ + The publication that the product is published to. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productPublish` mutation. +""" +type ProductPublishPayload { + """ + The product that has been published. + """ + product: Product + + """ + The channels where the product is published. + """ + productPublications: [ProductPublication!] @deprecated(reason: "Use Product.publications instead.") + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productReorderMedia` mutation. +""" +type ProductReorderMediaPayload { + """ + The asynchronous job which reorders the media. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Reports the status of product for a Sales Channel or Storefront API. +This might include why a product is not available in a Sales Channel +and how a merchant might fix this. +""" +type ProductResourceFeedback { + """ + The time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + The feedback messages presented to the merchant. + """ + messages: [String!]! + + """ + The ID of the product associated with the feedback. + """ + productId: ID! + + """ + The timestamp of the product associated with the feedback. + """ + productUpdatedAt: DateTime! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +""" +The input fields used to create a product feedback. +""" +input ProductResourceFeedbackInput { + """ + The ID of the product that the feedback was created on. + """ + productId: ID! + + """ + Whether the merchant needs to take action on the product. + """ + state: ResourceFeedbackState! + + """ + The date and time when the payload is constructed. + Used to help determine whether incoming feedback is outdated compared to feedback already received, and if it should be ignored upon arrival. + """ + feedbackGeneratedAt: DateTime! + + """ + The timestamp of the product associated with the feedback. + """ + productUpdatedAt: DateTime! + + """ + A concise set of copy strings to be displayed to merchants. Used to guide merchants in resolving problems that your app encounters when trying to make use of their products. + You can specify up to ten messages. Each message is limited to 100 characters. + """ + messages: [String!] +} + +""" +A sale associated with a product. +""" +type ProductSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line item for the associated sale. + """ + lineItem: LineItem! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The input fields required to identify a resource. +""" +input ProductSetIdentifiers @oneOf { + """ + ID of product to update. + """ + id: ID + + """ + Handle of product to upsert. + """ + handle: String + + """ + Custom ID of product to upsert. + """ + customId: UniqueMetafieldValueInput +} + +""" +The input fields required to create or update a product via ProductSet mutation. +""" +input ProductSetInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + A list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """ + The name of the product's vendor. + """ + vendor: String + + """ + The ID of the [category](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) + that's associated with the product. + """ + category: ID + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """ + The status of the product. + """ + status: ProductStatus + + """ + The IDs of collections that this product will be a member of. + """ + collections: [ID!] + + """ + The metafields to associate with this product. + + Complexity cost: 0.4 per metafield. + """ + metafields: [MetafieldInput!] + + """ + The files to associate with the product. + + Complexity cost: 1.9 per file. + """ + files: [FileSetInput!] + + """ + List of custom product options and option values (maximum of 3 per product). + """ + productOptions: [OptionSetInput!] + + """ + The product's ID. + + If you're creating a product, then you don't need to pass the `id` as input to the + [`productCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate) mutation. + If you're updating a product, then you do need to pass the `id` as input to the + [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate) mutation + to identify which product you want to update. + """ + id: ID @deprecated(reason: "Use `identifier` instead to get the product's ID") + + """ + A list of variants associated with the product. + + Complexity cost: 0.2 per variant. + """ + variants: [ProductVariantSetInput!] + + """ + Whether the product can only be purchased with a selling plan (subscription). Products that are sold exclusively on subscription can only be created on online stores. If set to `true` on an already existing product, then the product will be marked unavailable on channels that don't support subscriptions. + """ + requiresSellingPlan: Boolean + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput + + """ + The role of the product in a product grouping. It can only be set during creation. + """ + combinedListingRole: CombinedListingsRole +} + +""" +The input fields required to set inventory quantities using `productSet` mutation. +""" +input ProductSetInventoryInput { + """ + The ID of the location of the inventory quantity being set. + """ + locationId: ID! + + """ + The name of the inventory quantity being set. Must be one of `available` or `on_hand`. + """ + name: String! + + """ + The values to which each quantities will be set. + """ + quantity: Int! +} + +""" +An entity that represents details of an asynchronous +[ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductSetOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Return type for `productSet` mutation. +""" +type ProductSetPayload { + """ + The product object. + """ + product: Product + + """ + The product set operation, returned when run in asynchronous mode. + """ + productSetOperation: ProductSetOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Defines errors for ProductSet mutation. +""" +type ProductSetUserError implements DisplayableError { + """ + The error code. + """ + code: ProductSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductSetUserError`. +""" +enum ProductSetUserErrorCode { + """ + The id field is not allowed if identifier is provided. + """ + ID_NOT_ALLOWED + + """ + The input field corresponding to the identifier is required. + """ + MISSING_FIELD_REQUIRED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """ + Resource matching the identifier was not found. + """ + NOT_FOUND + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + Metafield is not valid. + """ + INVALID_METAFIELD + + """ + Product variant is not valid. + """ + INVALID_VARIANT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Options over limit. + """ + OPTIONS_OVER_LIMIT + + """ + Option values over limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Each option must have at least one option value specified. + """ + OPTION_VALUES_MISSING + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Number of product variants exceeds shop limit. + """ + VARIANTS_OVER_LIMIT + + """ + Must specify product options when updating variants. + """ + PRODUCT_OPTIONS_INPUT_MISSING + + """ + Must specify variants when updating options. + """ + VARIANTS_INPUT_MISSING + + """ + Gift card products can only be created after they have been activated. + """ + GIFT_CARDS_NOT_ACTIVATED + + """ + The product gift_card attribute cannot be changed after creation. + """ + GIFT_CARD_ATTRIBUTE_CANNOT_BE_CHANGED + + """ + Product is not valid. + """ + INVALID_PRODUCT + + """ + Input is not valid. + """ + INVALID_INPUT + + """ + Error processing request in the background job. + """ + JOB_ERROR + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + Duplicated metafield value for linked option. + """ + DUPLICATED_METAFIELD_VALUE + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Duplicated value. + """ + DUPLICATED_VALUE + + """ + Handle already in use. Please provide a new handle. + """ + HANDLE_NOT_UNIQUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +""" +The set of valid sort keys for the Product query. +""" +enum ProductSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +The possible product statuses. +""" +enum ProductStatus { + """ + The product is ready to sell and can be published to sales channels and apps. Products with an active status aren't automatically published to sales channels, such as the online store, or apps. By default, existing products are set to active. + """ + ACTIVE + + """ + The product is no longer being sold and isn't available to customers on sales channels and apps. + """ + ARCHIVED + + """ + The product isn't ready to sell and is unavailable to customers on sales channels and apps. By default, duplicated and unarchived products are set to draft. + """ + DRAFT + + """ + The product is active but you need a direct link to view it. The product doesn't show up in search, collections, or product recommendations. It will be returned in Storefront API and Liquid only when referenced individually by handle, id, or metafield reference.This status is only visible from 2025-10 and up, is translated to active in older versions and can't be changed from unlisted in older versions. + """ + UNLISTED +} + +""" +Represents a [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) node. +""" +type ProductTaxonomyNode implements Node { + """ + The full name of the product taxonomy node. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. + """ + fullName: String! + + """ + The ID of the product taxonomy node. + """ + id: ID! + + """ + Whether the node is a leaf node. + """ + isLeaf: Boolean! + + """ + Whether the node is a root node. + """ + isRoot: Boolean! + + """ + The name of the product taxonomy node. For example, Dog Beds. + """ + name: String! +} + +""" +The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. +""" +input ProductUnpublishInput { + """ + The ID of the product to create or update publications for. + """ + id: ID! + + """ + The channels to unpublish the product from. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productUnpublish` mutation. +""" +type ProductUnpublishPayload { + """ + The product that has been unpublished. + """ + product: Product + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for updating a product. +""" +input ProductUpdateInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + A list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """ + The name of the product's vendor. + """ + vendor: String + + """ + The ID of the [category](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) + that's associated with the product. + """ + category: ID + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """ + The product's ID. + """ + id: ID + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] + + """ + Whether to delete metafields whose constraints don't match the product's category. + Can only be used when updating the product's category. + """ + deleteConflictingConstrainedMetafields: Boolean = false + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean +} + +""" +Return type for `productUpdateMedia` mutation. +""" +type ProductUpdateMediaPayload { + """ + The updated media object. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product on which media was updated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productUpdate` mutation. +""" +type ProductUpdatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The `ProductVariant` object represents a version of a +[product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that comes in more than one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), +such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, +blue t-shirt would be one product variant and a large, blue t-shirt would be another. + +Use the `ProductVariant` object to manage the full lifecycle and configuration of a product's variants. Common +use cases for using the `ProductVariant` object include: + +- Tracking inventory for each variant +- Setting unique prices for each variant +- Assigning barcodes and SKUs to connect variants to fulfillment services +- Attaching variant-specific images and media +- Setting delivery and tax requirements +- Supporting product bundles, subscriptions, and selling plans + +A `ProductVariant` is associated with a parent +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) object. +`ProductVariant` serves as the central link between a product's merchandising configuration, inventory, +pricing, fulfillment, and sales channels within the GraphQL Admin API schema. Each variant +can reference other GraphQL types such as: + +- [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem): Used for inventory tracking +- [`Image`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Image): Used for variant-specific images +- [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup): Used for subscriptions and selling plans + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). +""" +type ProductVariant implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node { + """ + Whether the product variant is available for sale. + """ + availableForSale: Boolean! + + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant in the default shop currency. + """ + compareAtPrice: Money + + """ + The pricing that applies for a customer in a given context. As of API version 2025-04, only active markets are considered in the price resolution. + """ + contextualPricing("The context used to generate contextual pricing for the variant." context: ContextualPricingContext!): ProductVariantContextualPricing! + + """ + The date and time when the variant was created. + """ + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The [delivery profile](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile) for the variant. + """ + deliveryProfile: DeliveryProfile + + """ + Display name of the variant, based on product's title + variant's title. + """ + displayName: String! + + """ + The paginated list of events associated with the host subject. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The featured image for the variant. + """ + image("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead.")): Image @deprecated(reason: "Use `media` instead.") + + """ + The inventory item, which is used to query for inventory information. + """ + inventoryItem: InventoryItem! + + """ + Whether customers are allowed to place an order for the product variant when it's out of stock. + """ + inventoryPolicy: ProductVariantInventoryPolicy! + + """ + The total sellable quantity of the variant. + """ + inventoryQuantity: Int + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The media associated with the product variant. + """ + media("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MediaConnection! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! + + """ + List of prices and compare-at prices in the presentment currencies for this shop. + """ + presentmentPrices("The presentment currencies prices should return in." presentmentCurrencies: [CurrencyCode!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantPricePairConnection! @deprecated(reason: "Use `contextualPricing` instead.") + + """ + The price of the product variant in the default shop currency. + """ + price: Money! + + """ + The product that this variant belongs to. + """ + product: Product! + + """ + A list of products that have product variants that contain this variant as a product component. + """ + productParents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ProductConnection! + + """ + A list of the product variant components. + """ + productVariantComponents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantComponentConnection! + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be omitted + from channels that don't support bundles. + """ + requiresComponents: Boolean! + + """ + List of product options applied to the variant. + """ + selectedOptions: [SelectedOption!]! + + """ + The total sellable quantity of the variant for online channels. + This doesn't represent the total available inventory or capture + [limitations based on customer location](https://help.shopify.com/manual/markets/inventory_and_fulfillment). + """ + sellableOnlineQuantity: Int! + + """ + Count of selling plan groups associated with the product variant. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all selling plan groups defined in the current shop associated with the product variant. + """ + sellingPlanGroups("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanGroupConnection! + + """ + Count of selling plan groups associated with the product variant. + """ + sellingPlanGroupsCount: Count + + """ + Whether to show the unit price for this product variant. + """ + showUnitPrice: Boolean! + + """ + A case-sensitive identifier for the product variant in the shop. + Required in order to connect to a fulfillment service. + """ + sku: String + + """ + The Storefront GraphQL API ID of the `ProductVariant`. + + The Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + Avalara tax code for the product variant. Applies only to the stores that have the Avalara AvaTax app installed. + """ + taxCode: String @deprecated(reason: "This field should no longer be used in new integrations. This field will not be available in future API versions.") + + """ + Whether a tax is charged when the product variant is sold. + """ + taxable: Boolean! + + """ + The title of the product variant. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The unit price value for the variant based on the variant measurement. + """ + unitPrice: MoneyV2 + + """ + The unit price measurement for the variant. + """ + unitPriceMeasurement: UnitPriceMeasurement + + """ + The date and time (ISO 8601 format) when the product variant was last modified. + """ + updatedAt: DateTime! +} + +""" +The input fields required to append media to a single variant. +""" +input ProductVariantAppendMediaInput { + """ + Specifies the variant to which media will be appended. + """ + variantId: ID! + + """ + Specifies the media to append to the variant. + """ + mediaIds: [ID!]! +} + +""" +Return type for `productVariantAppendMedia` mutation. +""" +type ProductVariantAppendMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +A product variant component that is included within a bundle. + +These are the individual product variants that make up a bundle product, +where each component has a specific required quantity. +""" +type ProductVariantComponent implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product variant associated with the component. + """ + productVariant: ProductVariant! + + """ + The required quantity of the component. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ProductVariantComponents. +""" +type ProductVariantComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantComponentEdge!]! + + """ + A list of nodes that are contained in ProductVariantComponentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductVariantComponent!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +""" +type ProductVariantComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantComponentEdge. + """ + node: ProductVariantComponent! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. +""" +type ProductVariantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantEdge!]! + + """ + A list of nodes that are contained in ProductVariantEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductVariant!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product variant in a specific country. +Prices vary between countries. +""" +type ProductVariantContextualPricing { + """ + The final compare-at price after all adjustments are applied. + """ + compareAtPrice: MoneyV2 + + """ + The final price after all adjustments are applied. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: QuantityPriceBreakSortKeys = MINIMUM_QUANTITY): QuantityPriceBreakConnection! + + """ + The quantity rule applied for a given context. + """ + quantityRule: QuantityRule! + + """ + The unit price value for the given context based on the variant measurement. + """ + unitPrice: MoneyV2 +} + +""" +The input fields required to detach media from a single variant. +""" +input ProductVariantDetachMediaInput { + """ + Specifies the variant from which media will be detached. + """ + variantId: ID! + + """ + Specifies the media to detach from the variant. + """ + mediaIds: [ID!]! +} + +""" +Return type for `productVariantDetachMedia` mutation. +""" +type ProductVariantDetachMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. +""" +type ProductVariantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantEdge. + """ + node: ProductVariant! +} + +""" +The input fields for the bundle components for core. +""" +input ProductVariantGroupRelationshipInput { + """ + The ID of the product variant that's a component of the bundle. + """ + id: ID! + + """ + The number of units of the product variant required to construct one unit of the bundle. + """ + quantity: Int! +} + +""" +The input fields for identifying a product variant. +""" +input ProductVariantIdentifierInput @oneOf { + """ + The ID of the product variant. + """ + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product variant. + """ + customId: UniqueMetafieldValueInput +} + +""" +The valid values for the inventory policy of a product variant once it is out of stock. +""" +enum ProductVariantInventoryPolicy { + """ + Customers can't buy this product variant after it's out of stock. + """ + DENY + + """ + Customers can buy this product variant after it's out of stock. + """ + CONTINUE +} + +""" +Return type for `productVariantJoinSellingPlanGroups` mutation. +""" +type ProductVariantJoinSellingPlanGroupsPayload { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productVariantLeaveSellingPlanGroups` mutation. +""" +type ProductVariantLeaveSellingPlanGroupsPayload { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields representing a product variant position. +""" +input ProductVariantPositionInput { + """ + Specifies the ID of the product variant to update. + """ + id: ID! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! +} + +""" +The compare-at price and price of a variant sharing a currency. +""" +type ProductVariantPricePair { + """ + The compare-at price of the variant with associated currency. + """ + compareAtPrice: MoneyV2 + + """ + The price of the variant with associated currency. + """ + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductVariantPricePairs. +""" +type ProductVariantPricePairConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantPricePairEdge!]! + + """ + A list of nodes that are contained in ProductVariantPricePairEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ProductVariantPricePair!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. +""" +type ProductVariantPricePairEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantPricePairEdge. + """ + node: ProductVariantPricePair! +} + +""" +Return type for `productVariantRelationshipBulkUpdate` mutation. +""" +type ProductVariantRelationshipBulkUpdatePayload { + """ + The product variants with successfully updated product variant relationships. + """ + parentProductVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantRelationshipBulkUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ProductVariantRelationshipBulkUpdate`. +""" +type ProductVariantRelationshipBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantRelationshipBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantRelationshipBulkUpdateUserError`. +""" +enum ProductVariantRelationshipBulkUpdateUserErrorCode { + """ + A parent product variant ID or product ID must be provided. + """ + PARENT_REQUIRED + + """ + Unable to create parent product variant. + """ + FAILED_TO_CREATE + + """ + The product variants were not found. + """ + PRODUCT_VARIANTS_NOT_FOUND + + """ + A parent product variant cannot contain itself as a component. + """ + CIRCULAR_REFERENCE + + """ + Nested parent product variants aren't supported. + """ + NESTED_PARENT_PRODUCT_VARIANT + + """ + Product variant relationships must have a quantity greater than 0. + """ + INVALID_QUANTITY + + """ + A parent product variant must not contain duplicate product variant relationships. + """ + DUPLICATE_PRODUCT_VARIANT_RELATIONSHIP + + """ + Exceeded the maximum allowable product variant relationships in a parent product variant. + """ + EXCEEDED_PRODUCT_VARIANT_RELATIONSHIP_LIMIT + + """ + A Core type relationship cannot be added to a composite product variant with SFN type relationships. + """ + PRODUCT_VARIANT_RELATIONSHIP_TYPE_CONFLICT + + """ + Unexpected error. + """ + UNEXPECTED_ERROR + + """ + Unable to remove product variant relationships. + """ + FAILED_TO_REMOVE + + """ + The product variant relationships to remove must be specified if all the parent product variant's components aren't being removed. + """ + MUST_SPECIFY_COMPONENTS + + """ + Unable to update product variant relationships. + """ + FAILED_TO_UPDATE + + """ + Unable to update parent product variant price. + """ + FAILED_TO_UPDATE_PARENT_PRODUCT_VARIANT_PRICE + + """ + A price must be provided for a parent product variant if the price calculation is set to fixed. + """ + UPDATE_PARENT_VARIANT_PRICE_REQUIRED + + """ + Some of the provided product variants are not components of the specified parent product variant. + """ + PRODUCT_VARIANTS_NOT_COMPONENTS + + """ + The products for these product variants are already owned by another App. + """ + PRODUCT_EXPANDER_APP_OWNERSHIP_ALREADY_EXISTS + + """ + Multipack bundles are not supported. + """ + UNSUPPORTED_MULTIPACK_RELATIONSHIP + + """ + Gift cards cannot be parent product variants. + """ + PARENT_PRODUCT_VARIANT_CANNOT_BE_GIFT_CARD + + """ + Parent product variants cannot require a selling plan. + """ + PARENT_PRODUCT_VARIANT_CANNOT_REQUIRE_SELLING_PLAN + + """ + Combined listing cannot be parent product variants. + """ + PARENT_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING + + """ + Combined listing cannot be child product variants. + """ + CHILD_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING +} + +""" +The input fields for updating a composite product variant. +""" +input ProductVariantRelationshipUpdateInput { + """ + The product variant ID representing that which contains the relationships with other variants. + """ + parentProductVariantId: ID + + """ + A product ID which contains product variants that have relationships with other variants. + """ + parentProductId: ID + + """ + The product variants and associated quantitites to add to the product variant. + """ + productVariantRelationshipsToCreate: [ProductVariantGroupRelationshipInput!] = null + + """ + The product variants and associated quantitites to update in specified product variant. + """ + productVariantRelationshipsToUpdate: [ProductVariantGroupRelationshipInput!] = null + + """ + The bundle component product variants to be removed from the product variant. + """ + productVariantRelationshipsToRemove: [ID!] = null + + """ + Whether to remove all components from the product variant. The default value is `false`. + """ + removeAllProductVariantRelationships: Boolean = false + + """ + Method in which to update the price of the parent product variant. + """ + priceInput: PriceInput = null +} + +""" +The input fields for specifying a product variant to create or update. +""" +input ProductVariantSetInput { + """ + Specifies the product variant to update or create a new variant if absent. + """ + id: ID + + """ + The custom properties that a shop owner uses to define product variants. + """ + optionValues: [VariantOptionValueInput!]! + + """ + The price of the variant. + """ + price: Money + + """ + The SKU for the variant. Case-sensitive string. + """ + sku: String + + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int + + """ + The file to associate with the variant. + + Complexity cost: 0.6 per variant file. + + Any file specified here must also be specified in the `files` input for the product. + """ + file: FileSetInput + + """ + Additional customizable information about the product variant. + + Complexity cost: 0.4 per variant metafield. + """ + metafields: [MetafieldInput!] + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be omitted + from channels that don't support bundles. + """ + requiresComponents: Boolean + + """ + Whether customers are allowed to place an order for the product variant when it's out of stock. Defaults to `DENY`. + """ + inventoryPolicy: ProductVariantInventoryPolicy + + """ + The inventory quantities at each location where the variant is stocked. + If you're updating an existing variant, then you can only update the + quantities at locations where the variant is already stocked. + + The total number of inventory quantities across all variants in the mutation can't exceed 50000. + """ + inventoryQuantities: [ProductSetInventoryInput!] + + """ + The inventory item associated with the variant, used for unit cost. + """ + inventoryItem: InventoryItemInput + + """ + Whether the variant is taxable. + """ + taxable: Boolean + + """ + The tax code associated with the variant. + """ + taxCode: String + + """ + The unit price measurement for the product variant. + """ + unitPriceMeasurement: UnitPriceMeasurementInput + + """ + Whether or not unit price should be shown for this product variant. + """ + showUnitPrice: Boolean +} + +""" +The set of valid sort keys for the ProductVariant query. +""" +enum ProductVariantSortKeys { + """ + Sort by the `full_title` value. + """ + FULL_TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by available inventory quantity in the location specified by the `query:"location_id:"` argument. + Don't use this sort key when no `location_id` in query is specified. + """ + INVENTORY_LEVELS_AVAILABLE + + """ + Sort by the `inventory_management` value. + """ + INVENTORY_MANAGEMENT + + """ + Sort by the `inventory_policy` value. + """ + INVENTORY_POLICY + + """ + Sort by the `inventory_quantity` value. + """ + INVENTORY_QUANTITY + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `popular` value. + """ + POPULAR + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `sku` value. + """ + SKU + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +Return type for `productVariantsBulkCreate` mutation. +""" +type ProductVariantsBulkCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The newly created variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkCreateUserError!]! +} + +""" +The set of strategies available for use on the `productVariantsBulkCreate` mutation. +""" +enum ProductVariantsBulkCreateStrategy { + """ + The default strategy. Deletes the standalone default ("Default Title") variant when it's the only variant on the product. Preserves the standalone custom variant. + """ + DEFAULT + + """ + Deletes the existing standalone variant when the product has only a single default ("Default Title") or custom variant. + """ + REMOVE_STANDALONE_VARIANT + + """ + Preserves the existing standalone variant when the product has only a single default ("Default Title") or a single custom variant. + """ + PRESERVE_STANDALONE_VARIANT +} + +""" +Error codes for failed product variant bulk create mutations. +""" +type ProductVariantsBulkCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkCreateUserError`. +""" +enum ProductVariantsBulkCreateUserErrorCode { + """ + Input is invalid. + """ + INVALID_INPUT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + On create, this key cannot be used. + """ + NO_KEY_ON_CREATE + + """ + Variant already exists. + """ + VARIANT_ALREADY_EXISTS + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Variant price must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Variant options are not enough. + """ + NEED_TO_ADD_OPTION_VALUES + + """ + Variant options are more than the product options. + """ + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """ + Inventory locations cannot exceed the allowed resource limit or 10. + """ + TOO_MANY_INVENTORY_LOCATIONS + + """ + You reached the limit of available SKUs in your current plan. + """ + SUBSCRIPTION_VIOLATION + + """ + Variant options already exist. Please change the variant option(s). + """ + VARIANT_ALREADY_EXISTS_CHANGE_OPTION_VALUE + + """ + Quantity could not be set. The location was not found. + """ + TRACKED_VARIANT_LOCATION_NOT_FOUND + + """ + Input must be for this product. + """ + MUST_BE_FOR_THIS_PRODUCT + + """ + Input is not defined for this shop. + """ + NOT_DEFINED_FOR_SHOP + + """ + Invalid input detected. + """ + INVALID + + """ + Price cannot take a negative value. + """ + NEGATIVE_PRICE_VALUE + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +""" +Return type for `productVariantsBulkDelete` mutation. +""" +type ProductVariantsBulkDeletePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkDeleteUserError!]! +} + +""" +Error codes for failed bulk variant delete mutations. +""" +type ProductVariantsBulkDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkDeleteUserError`. +""" +enum ProductVariantsBulkDeleteUserErrorCode { + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Cannot delete default variant. + """ + CANNOT_DELETE_LAST_VARIANT + + """ + The variant does not exist. + """ + AT_LEAST_ONE_VARIANT_DOES_NOT_BELONG_TO_THE_PRODUCT + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION +} + +""" +The input fields for specifying a product variant to create as part of a variant bulk mutation. +""" +input ProductVariantsBulkInput { + """ + The value of the barcode associated with the product variant. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Specifies the product variant to update or delete. + """ + id: ID + + """ + The URL of the media to associate with the variant. + """ + mediaSrc: [String!] + + """ + Whether customers are allowed to place an order for the variant when it's out of stock. Defaults to `DENY`. + """ + inventoryPolicy: ProductVariantInventoryPolicy + + """ + The inventory quantities at each location where the variant is stocked. The number of elements + in the array of inventory quantities can't exceed the amount specified for the plan. + Supported as input with the `productVariantsBulkCreate` mutation only. + """ + inventoryQuantities: [InventoryLevelInput!] + + """ + Adjust inventory quantities with deltas. + """ + quantityAdjustments: [InventoryAdjustmentInput!] + + """ + The inventory item associated with the variant, used for unit cost. + """ + inventoryItem: InventoryItemInput + + """ + The ID of the media that's associated with the variant. + """ + mediaId: ID + + """ + The additional customizable information about the product variant. + """ + metafields: [MetafieldInput!] + + """ + The custom properties that a shop owner uses to define product variants. + """ + optionValues: [VariantOptionValueInput!] + + """ + The price of the variant. + """ + price: Money + + """ + Whether the variant is taxable. + """ + taxable: Boolean + + """ + The tax code associated with the variant. + """ + taxCode: String + + """ + The unit price measurement for the product variant. + """ + unitPriceMeasurement: UnitPriceMeasurementInput + + """ + Whether the unit price should be shown for this product variant. + """ + showUnitPrice: Boolean + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be + omitted from channels that don't support bundles. + """ + requiresComponents: Boolean +} + +""" +Return type for `productVariantsBulkReorder` mutation. +""" +type ProductVariantsBulkReorderPayload { + """ + The updated product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkReorderUserError!]! +} + +""" +Error codes for failed bulk product variants reorder operation. +""" +type ProductVariantsBulkReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkReorderUserError`. +""" +enum ProductVariantsBulkReorderUserErrorCode { + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product variant does not exist. + """ + MISSING_VARIANT + + """ + Product variant position cannot be zero or negative number. + """ + INVALID_POSITION + + """ + Product variant IDs must be unique. + """ + DUPLICATED_VARIANT_ID + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR +} + +""" +Return type for `productVariantsBulkUpdate` mutation. +""" +type ProductVariantsBulkUpdatePayload { + """ + The updated product object. + """ + product: Product + + """ + The updated variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkUpdateUserError!]! +} + +""" +Error codes for failed variant bulk update mutations. +""" +type ProductVariantsBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkUpdateUserError`. +""" +enum ProductVariantsBulkUpdateUserErrorCode { + """ + Input is invalid. + """ + INVALID_INPUT + + """ + Mutually exclusive input fields provided. + """ + CANNOT_SPECIFY_BOTH + + """ + Mandatory field input field missing. + """ + MUST_SPECIFY_ONE_OF_PAIR + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product variant is missing ID attribute. + """ + PRODUCT_VARIANT_ID_MISSING + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Input must be for this product. + """ + MUST_BE_FOR_THIS_PRODUCT + + """ + Input is not defined for this shop. + """ + NOT_DEFINED_FOR_SHOP + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Inventory quantities can only be provided during create. To update inventory for existing variants, use inventoryAdjustQuantities. + """ + NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE + + """ + The variant already exists. + """ + VARIANT_ALREADY_EXISTS + + """ + The price of the variant must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Variant options are not enough. + """ + NEED_TO_ADD_OPTION_VALUES + + """ + Variant options are more than the product options. + """ + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """ + You reached the limit of available SKUs in your current plan. + """ + SUBSCRIPTION_VIOLATION + + """ + Inventory quantities cannot be provided during update. + """ + NO_INVENTORY_QUANTITES_DURING_UPDATE + + """ + Price cannot take a negative value. + """ + NEGATIVE_PRICE_VALUE + + """ + The input value is blank. + """ + BLANK + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is too long. + """ + TOO_LONG + + """ + Metafield value is invalid. + """ + INVALID_VALUE + + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +""" +The set of valid sort keys for the ProfileItem query. +""" +enum ProfileItemSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +Return type for `pubSubServerPixelUpdate` mutation. +""" +type PubSubServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `pubSubWebhookSubscriptionCreate` mutation. +""" +type PubSubWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionCreateUserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionCreate`. +""" +type PubSubWebhookSubscriptionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionCreateUserError`. +""" +enum PubSubWebhookSubscriptionCreateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +The input fields for a PubSub webhook subscription. +""" +input PubSubWebhookSubscriptionInput { + """ + The format in which the webhook subscription should send the data. + """ + format: WebhookSubscriptionFormat + + """ + The list of fields to be included in the webhook subscription. Only the fields specified will be included in the webhook payload. If null, then all fields will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). + """ + includeFields: [String!] + + """ + A constraint specified using search syntax that ensures only webhooks that match the specified filter are emitted. See our [guide on filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. + """ + filter: String + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!] + + """ + A list of identifiers specifying metafields to include in the webhook payload. + """ + metafields: [HasMetafieldsMetafieldIdentifierInput!] + + """ + The Pub/Sub project ID. + """ + pubSubProject: String! + + """ + The Pub/Sub topic ID. + """ + pubSubTopic: String! +} + +""" +Return type for `pubSubWebhookSubscriptionUpdate` mutation. +""" +type PubSubWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionUpdateUserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionUpdate`. +""" +type PubSubWebhookSubscriptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionUpdateUserError`. +""" +enum PubSubWebhookSubscriptionUpdateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +A group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) that are published to an app. + +Each publication manages which products and collections display on its associated [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). Merchants can automatically publish products when they're created if [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication#field-Publication.fields.autoPublish) is enabled, or manually control publication through publication records. + +Publications support scheduled publishing through future publish dates for online store channels, allowing merchants to coordinate product launches and promotional campaigns. The [`catalog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication#field-Publication.fields.catalog) field links to pricing and availability rules specific to that publication's context. +""" +type Publication implements Node { + """ + The app associated with the publication. + """ + app: App! @deprecated(reason: "Use [AppCatalog.apps](https://shopify.dev/api/admin-graphql/unstable/objects/AppCatalog#connection-appcatalog-apps) instead.") + + """ + Whether new products are automatically published to this publication. + """ + autoPublish: Boolean! + + """ + The catalog associated with the publication. + """ + catalog: Catalog + + """ + The list of collection publication records, each representing the publication status and details for a collection published to this publication (typically channel). + """ + collectionPublicationsV3("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The list of collections published to the publication. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + + """ + Whether the collection is available to the publication. + """ + hasCollection("Collection ID to check." id: ID!): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of products included, but not necessarily published, in the publication. + """ + includedProducts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ProductConnection! + + """ + The count of products included in the publication. Limited to a maximum of 10000 by default. + """ + includedProductsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Name of the publication. + """ + name: String! @deprecated(reason: "Use [Catalog.title](https://shopify.dev/api/admin-graphql/unstable/interfaces/Catalog#field-catalog-title) instead.") + + """ + A background operation associated with this publication. + """ + operation: PublicationOperation + + """ + The product publications for the list of products published to the publication. + """ + productPublicationsV3("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The list of products published to the publication. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ProductConnection! + + """ + Whether the publication supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Publications. +""" +type PublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PublicationEdge!]! + + """ + A list of nodes that are contained in PublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Publication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a publication. +""" +input PublicationCreateInput { + """ + The ID of the catalog. + """ + catalogId: ID + + """ + Whether to create an empty publication or prepopulate it with all products. + """ + defaultState: PublicationCreateInputPublicationDefaultState = EMPTY + + """ + Whether to automatically add newly created products to this publication. + """ + autoPublish: Boolean = false +} + +""" +The input fields for the possible values for the default state of a publication. +""" +enum PublicationCreateInputPublicationDefaultState { + """ + The publication is empty. + """ + EMPTY + + """ + The publication is populated with all products. + """ + ALL_PRODUCTS +} + +""" +Return type for `publicationCreate` mutation. +""" +type PublicationCreatePayload { + """ + The publication that's been created. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Return type for `publicationDelete` mutation. +""" +type PublicationDeletePayload { + """ + The ID of the publication that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +An auto-generated type which holds one Publication and a cursor during pagination. +""" +type PublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PublicationEdge. + """ + node: Publication! +} + +""" +The input fields required to publish a resource. +""" +input PublicationInput { + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + ID of the publication. + """ + publicationId: ID + + """ + The date and time that the resource was published. Setting this to a date in the future will schedule the resource to be published. Only online store channels support future publishing. This field has no effect if you include it in the `publishableUnpublish` mutation. + """ + publishDate: DateTime +} + +""" +The possible types of publication operations. +""" +union PublicationOperation = AddAllProductsOperation|CatalogCsvOperation|PublicationResourceOperation + +""" +A bulk update operation on a publication. +""" +type PublicationResourceOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +The input fields for updating a publication. +""" +input PublicationUpdateInput { + """ + A list of publishable IDs to add. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToAdd: [ID!] = [] + + """ + A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToRemove: [ID!] = [] + + """ + Whether new products should be automatically published to the publication. + """ + autoPublish: Boolean +} + +""" +Return type for `publicationUpdate` mutation. +""" +type PublicationUpdatePayload { + """ + The publication that's been updated. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Defines errors encountered while managing a publication. +""" +type PublicationUserError implements DisplayableError { + """ + The error code. + """ + code: PublicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PublicationUserError`. +""" +enum PublicationUserErrorCode { + """ + Can't perform this action on a publication. + """ + UNSUPPORTED_PUBLICATION_ACTION + + """ + Publication not found. + """ + PUBLICATION_NOT_FOUND + + """ + The publication is currently being modified. Please try again later. + """ + PUBLICATION_LOCKED + + """ + A catalog publication can only contain products. + """ + UNSUPPORTED_PUBLISHABLE_TYPE + + """ + Publishable ID not found. + """ + INVALID_PUBLISHABLE_ID + + """ + Market does not exist. + """ + MARKET_NOT_FOUND + + """ + Catalog does not exist. + """ + CATALOG_NOT_FOUND + + """ + Can't modify a publication that belongs to an app catalog. + """ + CANNOT_MODIFY_APP_CATALOG_PUBLICATION + + """ + Can't modify a publication that belongs to a market catalog. + """ + CANNOT_MODIFY_MARKET_CATALOG_PUBLICATION + + """ + Cannot modify a catalog for an app. + """ + CANNOT_MODIFY_APP_CATALOG + + """ + Cannot modify a catalog for a market. + """ + CANNOT_MODIFY_MARKET_CATALOG + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is blank. + """ + BLANK + + """ + A product publication cannot be created because the catalog type associated with this publication does not permit publications of this product type. + """ + PRODUCT_TYPE_INCOMPATIBLE_WITH_CATALOG_TYPE + + """ + The limit for simultaneous publication updates has been exceeded. + """ + PUBLICATION_UPDATE_LIMIT_EXCEEDED +} + +""" +Represents a resource that can be published to a channel. +A publishable resource can be either a Product or Collection. +""" +interface Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + publicationCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel("The ID of the channel to check." channelId: ID!): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication("The ID of the publication to check. For example, `id: \"gid://shopify/Publication/123\"`." publicationId: ID!): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled to be published." onlyPublished: Boolean = true, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationConnection! + + """ + The total number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, including publications with + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + To get a count that excludes publications with feedback errors, use `availablePublicationsCount`. + """ + resourcePublicationsCount("Include only the resource's publications that are published. If false, then return all the resource's publications including future publications." onlyPublished: Boolean = true): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + By default, only publications to `APP` catalog types are returned. + For `Product` and `ProductVariant`, use the `catalogType` argument to retrieve + publications for other catalog types, such as `COMPANY_LOCATION` (B2B) or `MARKET`. + `Collection` only supports publications to `APP` catalog types. + """ + resourcePublicationsV2("Whether to return only the resources that are currently published. If false, then also returns the resources that are scheduled or staged to be published." onlyPublished: Boolean = true, "Filter publications by catalog type. When not specified, defaults to APP. Has no effect on Collection, which only supports APP." catalogType: CatalogType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ResourcePublicationV2Connection! + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PublicationConnection! +} + +""" +Return type for `publishablePublish` mutation. +""" +type PublishablePublishPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishablePublishToCurrentChannel` mutation. +""" +type PublishablePublishToCurrentChannelPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublish` mutation. +""" +type PublishableUnpublishPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublishToCurrentChannel` mutation. +""" +type PublishableUnpublishToCurrentChannelPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents information about the purchasing company for the order or draft order. +""" +type PurchasingCompany { + """ + The company associated to the order or draft order. + """ + company: Company! + + """ + The company contact associated to the order or draft order. + """ + contact: CompanyContact + + """ + The company location associated to the order or draft order. + """ + location: CompanyLocation! +} + +""" +The input fields for a purchasing company, which is a combination of company, company contact, and company location. +""" +input PurchasingCompanyInput { + """ + ID of the company. + """ + companyId: ID! + + """ + ID of the company contact. + """ + companyContactId: ID! + + """ + ID of the company location. + """ + companyLocationId: ID! +} + +""" +Represents information about the purchasing entity for the order or draft order. +""" +union PurchasingEntity = Customer|PurchasingCompany + +""" +The input fields for a purchasing entity. Can either be a customer or a purchasing company. +""" +input PurchasingEntityInput { + """ + Represents a customer. Null if there's a purchasing company. + """ + customerId: ID + + """ + Represents a purchasing company. Null if there's a customer. + """ + purchasingCompany: PurchasingCompanyInput +} + +""" +Quantity price breaks lets you offer different rates that are based on the +amount of a specific variant being ordered. +""" +type QuantityPriceBreak implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Minimum quantity required to reach new quantity break price. + """ + minimumQuantity: Int! + + """ + The price of variant after reaching the minimum quanity. + """ + price: MoneyV2! + + """ + The price list associated with this quantity break. + """ + priceList: PriceList! + + """ + The product variant associated with this quantity break. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityPriceBreaks. +""" +type QuantityPriceBreakConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityPriceBreakEdge!]! + + """ + A list of nodes that are contained in QuantityPriceBreakEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [QuantityPriceBreak!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +""" +type QuantityPriceBreakEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityPriceBreakEdge. + """ + node: QuantityPriceBreak! +} + +""" +The input fields and values to use when creating quantity price breaks. +""" +input QuantityPriceBreakInput { + """ + The product variant ID associated with the quantity break. + """ + variantId: ID! + + """ + The price of the product variant when its quantity meets the break's minimum quantity. + """ + price: MoneyInput! + + """ + The minimum required quantity for a variant to qualify for this price. + """ + minimumQuantity: Int! +} + +""" +The set of valid sort keys for the QuantityPriceBreak query. +""" +enum QuantityPriceBreakSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `minimum_quantity` value. + """ + MINIMUM_QUANTITY +} + +""" +The input fields used to update quantity pricing. +""" +input QuantityPricingByVariantUpdateInput { + """ + A list of quantity price breaks to add. + """ + quantityPriceBreaksToAdd: [QuantityPriceBreakInput!]! + + """ + A list of quantity price break IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDelete: [ID!]! + + """ + A list of product variant IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDeleteByVariantId: [ID!] + + """ + A list of quantity rules to add. + """ + quantityRulesToAdd: [QuantityRuleInput!]! + + """ + A list of variant IDs that identify which quantity rules to remove. + """ + quantityRulesToDeleteByVariantId: [ID!]! + + """ + A list of fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of variant IDs that identify which fixed prices to remove. + """ + pricesToDeleteByVariantId: [ID!]! +} + +""" +Return type for `quantityPricingByVariantUpdate` mutation. +""" +type QuantityPricingByVariantUpdatePayload { + """ + The variants for which quantity pricing was created successfully in the price list. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityPricingByVariantUserError!]! +} + +""" +Error codes for failed volume pricing operations. +""" +type QuantityPricingByVariantUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityPricingByVariantUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityPricingByVariantUserError`. +""" +enum QuantityPricingByVariantUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + Price List does not exist. + """ + PRICE_LIST_NOT_FOUND + + """ + Something went wrong when trying to update quantity pricing. Please try again later. + """ + GENERIC_ERROR + + """ + Invalid quantity price break. + """ + QUANTITY_PRICE_BREAK_ADD_INVALID + + """ + Quantity price break's fixed price not found. + """ + QUANTITY_PRICE_BREAK_ADD_PRICE_LIST_PRICE_NOT_FOUND + + """ + Exceeded the allowed number of quantity price breaks per variant. + """ + QUANTITY_PRICE_BREAK_ADD_LIMIT_EXCEEDED + + """ + Price list and quantity price break currency mismatch. + """ + QUANTITY_PRICE_BREAK_ADD_CURRENCY_MISMATCH + + """ + Failed to save quantity price break. + """ + QUANTITY_PRICE_BREAK_ADD_FAILED_TO_SAVE + + """ + Quantity price break miniumum is less than the quantity rule minimum. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_LOWER_THAN_QUANTITY_RULES_MIN + + """ + Quantity price break miniumum is higher than the quantity rule maximum. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_HIGHER_THAN_QUANTITY_RULES_MAX + + """ + Quantity price break miniumum is not multiple of the quantity rule increment. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_NOT_A_MULTIPLE_OF_QUANTITY_RULES_INCREMENT + + """ + Quantity price break variant not found. + """ + QUANTITY_PRICE_BREAK_ADD_VARIANT_NOT_FOUND + + """ + Quantity price breaks to add inputs must be unique by variant id and minimum quantity. + """ + QUANTITY_PRICE_BREAK_ADD_DUPLICATE_INPUT_FOR_VARIANT_AND_MIN + + """ + Quantity price break not found. + """ + QUANTITY_PRICE_BREAK_DELETE_NOT_FOUND + + """ + Failed to delete quantity price break. + """ + QUANTITY_PRICE_BREAK_DELETE_FAILED + + """ + Quantity rule variant not found. + """ + QUANTITY_RULE_ADD_VARIANT_NOT_FOUND + + """ + Quantity rule minimum is higher than the quantity price break minimum. + """ + QUANTITY_RULE_ADD_MIN_HIGHER_THAN_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule maximum is less than the quantity price break minimum. + """ + QUANTITY_RULE_ADD_MAX_LOWER_THAN_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule increment must be a multiple of the quantity price break minimum. + """ + QUANTITY_RULE_ADD_INCREMENT_NOT_A_MULTIPLE_OF_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule catalog context not supported. + """ + QUANTITY_RULE_ADD_CATALOG_CONTEXT_NOT_SUPPORTED + + """ + Quantity rule increment is greater than minimum. + """ + QUANTITY_RULE_ADD_INCREMENT_IS_GREATER_THAN_MINIMUM + + """ + Quantity rule minimum is not a multiple of increment. + """ + QUANTITY_RULE_ADD_MINIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """ + Quantity rule maximum is not a multiple of increment. + """ + QUANTITY_RULE_ADD_MAXIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """ + Quantity rule minimum is greater than maximum. + """ + QUANTITY_RULE_ADD_MINIMUM_GREATER_THAN_MAXIMUM + + """ + Quantity rule increment is less than one. + """ + QUANTITY_RULE_ADD_INCREMENT_IS_LESS_THAN_ONE + + """ + Quantity rule minimum is less than one. + """ + QUANTITY_RULE_ADD_MINIMUM_IS_LESS_THAN_ONE + + """ + Quantity rule maximum is less than one. + """ + QUANTITY_RULE_ADD_MAXIMUM_IS_LESS_THAN_ONE + + """ + Quantity rules to add inputs must be unique by variant id. + """ + QUANTITY_RULE_ADD_DUPLICATE_INPUT_FOR_VARIANT + + """ + Quantity rule not found. + """ + QUANTITY_RULE_DELETE_RULE_NOT_FOUND + + """ + Quantity rule variant not found. + """ + QUANTITY_RULE_DELETE_VARIANT_NOT_FOUND + + """ + Price list and fixed price currency mismatch. + """ + PRICE_ADD_CURRENCY_MISMATCH + + """ + Fixed price's variant not found. + """ + PRICE_ADD_VARIANT_NOT_FOUND + + """ + Prices to add inputs must be unique by variant id. + """ + PRICE_ADD_DUPLICATE_INPUT_FOR_VARIANT + + """ + The issuance currency of a local currency gift card must match the price list currency. + """ + PRICE_ADD_LOCAL_CURRENCY_GIFT_CARD_ISSUANCE_CURRENCY_MISMATCH + + """ + The price of a local currency gift card cannot exceed the maximum gift card purchase limit. + """ + PRICE_ADD_LOCAL_CURRENCY_GIFT_CARD_LIMIT_EXCEEDED + + """ + Price is not fixed. + """ + PRICE_DELETE_PRICE_NOT_FIXED + + """ + Fixed price's variant not found. + """ + PRICE_DELETE_VARIANT_NOT_FOUND + + """ + Variant to delete by is not found. + """ + QUANTITY_PRICE_BREAK_DELETE_BY_VARIANT_ID_VARIANT_NOT_FOUND +} + +""" +The quantity rule for the product variant in a given context. +""" +type QuantityRule { + """ + The value that specifies the quantity increment between minimum and maximum of the rule. + Only quantities divisible by this value will be considered valid. + + The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum + must be divisible by this value. + """ + increment: Int! + + """ + Whether the quantity rule fields match one increment, one minimum and no maximum. + """ + isDefault: Boolean! + + """ + An optional value that defines the highest allowed quantity purchased by the customer. + If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + """ + maximum: Int + + """ + The value that defines the lowest allowed quantity purchased by the customer. + The minimum must be a multiple of the quantity rule's increment. + """ + minimum: Int! + + """ + Whether the values of the quantity rule were explicitly set. + """ + originType: QuantityRuleOriginType! + + """ + The product variant for which the quantity rule is applied. + """ + productVariant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityRules. +""" +type QuantityRuleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityRuleEdge!]! + + """ + A list of nodes that are contained in QuantityRuleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [QuantityRule!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityRule and a cursor during pagination. +""" +type QuantityRuleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityRuleEdge. + """ + node: QuantityRule! +} + +""" +The input fields for the per-order quantity rule to be applied on the product variant. +""" +input QuantityRuleInput { + """ + The quantity increment. + """ + increment: Int! + + """ + The maximum quantity. + """ + maximum: Int = null + + """ + The minimum quantity. + """ + minimum: Int! + + """ + Product variant on which to apply the quantity rule. + """ + variantId: ID! +} + +""" +The origin of quantity rule on a price list. +""" +enum QuantityRuleOriginType { + """ + Quantity rule is explicitly defined. + """ + FIXED + + """ + Quantity rule falls back to the relative rule. + """ + RELATIVE +} + +""" +An error for a failed quantity rule operation. +""" +type QuantityRuleUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityRuleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityRuleUserError`. +""" +enum QuantityRuleUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + Product variant ID does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Price list does not exist. + """ + PRICE_LIST_DOES_NOT_EXIST + + """ + Quantity rule for variant associated with the price list provided does not exist. + """ + VARIANT_QUANTITY_RULE_DOES_NOT_EXIST + + """ + Minimum must be lower than or equal to the maximum. + """ + MINIMUM_IS_GREATER_THAN_MAXIMUM + + """ + Minimum must be less than or equal to all quantity price break minimums associated with this variant in the specified price list. + """ + MINIMUM_IS_HIGHER_THAN_QUANTITY_PRICE_BREAK_MINIMUM + + """ + Maximum must be greater than or equal to all quantity price break minimums associated with this variant in the specified price list. + """ + MAXIMUM_IS_LOWER_THAN_QUANTITY_PRICE_BREAK_MINIMUM + + """ + Increment must be a multiple of all quantity price break minimums associated with this variant in the specified price list. + """ + INCREMENT_NOT_A_MULTIPLE_OF_QUANTITY_PRICE_BREAK_MINIMUM + + """ + Increment must be lower than or equal to the minimum. + """ + INCREMENT_IS_GREATER_THAN_MINIMUM + + """ + Value must be greater than or equal to 1. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The maximum must be a multiple of the increment. + """ + MAXIMUM_NOT_MULTIPLE_OF_INCREMENT + + """ + The minimum must be a multiple of the increment. + """ + MINIMUM_NOT_MULTIPLE_OF_INCREMENT + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + Quantity rule inputs must be unique by variant id. + """ + DUPLICATE_INPUT_FOR_VARIANT + + """ + Something went wrong when trying to save the quantity rule. Please try again later. + """ + GENERIC_ERROR +} + +""" +Return type for `quantityRulesAdd` mutation. +""" +type QuantityRulesAddPayload { + """ + The list of quantity rules that were added to or updated in the price list. + """ + quantityRules: [QuantityRule!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +Return type for `quantityRulesDelete` mutation. +""" +type QuantityRulesDeletePayload { + """ + A list of product variant IDs whose quantity rules were removed from the price list. + """ + deletedQuantityRulesVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start. +""" +type QueryRoot { + """ + Returns a list of abandoned checkouts. A checkout is considered abandoned when a customer adds contact information but doesn't complete their purchase. Includes both abandoned and recovered checkouts. + + Each checkout provides [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) details, [`AbandonedCheckoutLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckoutLineItem) objects, pricing information, and a recovery URL for re-engaging customers who didn't complete their purchase. + """ + abandonedCheckouts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AbandonedCheckoutSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. |\n| email_state | string | Filter by `abandoned_email_state` value. Possible values: `sent`, `not_sent`, `scheduled` and `suppressed`. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| recovery_state | string | Possible values: `recovered` and `not_recovered`. |\n| status | string | Possible values: `open` and `closed`. |\n| updated_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was last updated. |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): AbandonedCheckoutConnection! + + """ + Returns the count of abandoned checkouts for the given shop. Limited to a maximum of 10000 by default. + """ + abandonedCheckoutsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. |\n| email_state | string | Filter by `abandoned_email_state` value. Possible values: `sent`, `not_sent`, `scheduled` and `suppressed`. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| recovery_state | string | Possible values: `recovered` and `not_recovered`. |\n| status | string | Possible values: `open` and `closed`. |\n| updated_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was last updated. |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `Abandonment` resource by ID. + """ + abandonment("The ID of the `Abandonment` to return." id: ID!): Abandonment + + """ + Returns an Abandonment by the Abandoned Checkout ID. + """ + abandonmentByAbandonedCheckoutId("The ID of the Abandoned Checkout ID to query by." abandonedCheckoutId: ID!): Abandonment + + """ + Retrieves an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) by its ID. If no ID is provided, returns details about the currently authenticated app. The query provides access to app details including title, icon, and pricing information. + + If the app isn't installed on the current shop, then the [`installation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/app#returns-App.fields.installation) field will be `null`. + """ + app("The ID to lookup the App by." id: ID): App + + """ + Retrieves an app by its unique handle. The handle is a URL-friendly identifier for the app. + + Returns the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) if found, or `null` if no app exists with the specified handle. + """ + appByHandle("Handle of the App." handle: String!): App + + """ + Retrieves an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) by its client ID (API key). Returns the app's configuration, installation status, [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) objects, and developer information. + + Returns `null` if no app exists with the specified client ID. + """ + appByKey("Client ID of the app." apiKey: String!): App + + """ + An app discount type. + """ + appDiscountType("The ID for the function providing the app discount type." functionId: String!): AppDiscountType + + """ + A list of app discount types installed by apps. + """ + appDiscountTypes: [AppDiscountType!]! + + """ + A list of app discount types installed by apps. + """ + appDiscountTypesNodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): AppDiscountTypeConnection! + + """ + Retrieves an [`AppInstallation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation) by ID. If no ID is provided, returns the installation for the currently authenticated [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App). The query provides essential data for validating installation state and managing app functionality within a store. + + Use this query to access installation details including granted [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) objects, active [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) objects, [`AppCredit`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppCredit) objects, [`AppPurchaseOneTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppPurchaseOneTime) objects, and app-specific metadata. + + Learn more about [app installation](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation). + """ + appInstallation("ID used to lookup AppInstallation." id: ID): AppInstallation + + """ + A paginated list of [`AppInstallation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation) objects across multiple stores where your app is installed. Use this query to monitor installation status, track billing and subscriptions through [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) objects, and review granted [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) objects. + + Filter by [`AppInstallationCategory`](https://shopify.dev/docs/api/admin-graphql/latest/enums/AppInstallationCategory) to find specific types of installations (such as POS or channel apps) and by [`AppInstallationPrivacy`](https://shopify.dev/docs/api/admin-graphql/latest/enums/AppInstallationPrivacy) to scope to public or private installations. + """ + appInstallations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AppInstallationSortKeys = INSTALLED_AT, "The category of app installations to fetch." category: AppInstallationCategory, "The privacy level of app installations to fetch." privacy: AppInstallationPrivacy = PUBLIC): AppInstallationConnection! + + """ + Returns a `Article` resource by ID. + """ + article("The ID of the `Article` to return." id: ID!): Article + + """ + List of article authors for the shop. + """ + articleAuthors("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ArticleAuthorConnection! + + """ + List of all article tags. + """ + articleTags("Type of sort order." sort: ArticleTagSort = ALPHABETICAL, "The maximum number of tags to return." limit: Int!): [String!]! + + """ + Returns a paginated list of articles from the shop's blogs. [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) objects are blog posts that contain content like text, images, and tags. + + Supports [cursor-based pagination](https://shopify.dev/docs/api/usage/pagination-graphql) to control the number of articles returned and their order. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/articles#arguments-query) argument to filter results by specific criteria. + """ + articles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ArticleSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=handle:summer-collection-announcement` |\n| author | string | Filter by the author of the article. |\n| blog_id | string | Filter by the ID of the blog the article belongs to. | | | - `blog_id:1234`
- `blog_id:>=1234`
- `blog_id:<=1234` |\n| blog_title | string |\n| created_at | time | Filter by the date and time when the article was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| handle | string | Filter by the article's handle. | | | - `handle:summer-collection-announcement`
- `handle:how-to-guide` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| published_at | time | Filter by the date and time when the article was published. | | | - `published_at:>'2020-10-21T23:39:20Z'`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter by published status |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the title of the article. | | | - `title:summer-collection`
- `title:green hoodie` |\n| updated_at | time | Filter by the date and time when the article was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ArticleConnection! + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have the `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve the fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders("The assigment status of the fulfillment orders that should be returned.\nIf `assignmentStatus` argument is not provided, then\nthe query will return all assigned fulfillment orders,\nexcept those that have the `CLOSED` status." assignmentStatus: FulfillmentOrderAssignmentStatus, "Returns fulfillment orders only for certain locations, specified by a list of location IDs." locationIds: [ID!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FulfillmentOrderSortKeys = ID): FulfillmentOrderConnection! + + """ + Returns a `DiscountAutomatic` resource by ID. + """ + automaticDiscount("The ID of the `DiscountAutomatic` to return." id: ID!): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") + + """ + Returns a `DiscountAutomaticNode` resource by ID. + """ + automaticDiscountNode("The ID of the `DiscountAutomaticNode` to return." id: ID!): DiscountAutomaticNode @deprecated(reason: "Use `discountNode` instead.") + + """ + Returns a list of [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscountNodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AutomaticDiscountSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string | Filter by the discount status. | - `active`
- `expired`
- `scheduled` | | - `status:scheduled` |\n| type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). | - `all`
- `all_with_app`
- `app`
- `bxgy`
- `fixed_amount`
- `percentage` | | - `type:bxgy` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountAutomaticNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") + + """ + List of the shop's automatic discount saved searches. + """ + automaticDiscountSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Returns a list of automatic discounts that are applied in the cart and at checkout without requiring a discount code. + """ + automaticDiscounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: AutomaticDiscountSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string | Filter by the discount status. | - `active`
- `expired`
- `scheduled` | | - `status:scheduled` |\n| type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). | - `all`
- `all_with_app`
- `app`
- `bxgy`
- `fixed_amount`
- `percentage` | | - `type:bxgy` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountAutomaticConnection! @deprecated(reason: "Use `automaticDiscountNodes` instead.") + + """ + The geographic regions that you can set as the [`Shop`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop)'s backup region. The backup region serves as a fallback when the system can't determine a buyer's actual location. + """ + availableBackupRegions: [MarketRegion!]! + + """ + Returns a list of activated carrier services and associated shop locations that support them. + """ + availableCarrierServices: [DeliveryCarrierServiceAndLocations!]! + + """ + Returns all locales that Shopify supports. Each [`Locale`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Locale) includes an ISO code and human-readable name. Use this query to discover which locales you can enable on a shop with the [`shopLocaleEnable`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/shopLocaleEnable) mutation. + """ + availableLocales: [Locale!]! + + """ + The backup region of the shop. + """ + backupRegion: MarketRegion! + + """ + Returns a `Blog` resource by ID. + """ + blog("The ID of the `Blog` to return." id: ID!): Blog + + """ + Returns a paginated list of the shop's [`Blog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog) objects. Blogs serve as containers for [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) objects and provide content management capabilities for the store's editorial content. + + Supports [cursor-based pagination](https://shopify.dev/docs/api/usage/pagination-graphql) to control the number of blogs returned and their order. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs#arguments-query) argument to filter results by specific criteria. + """ + blogs("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: BlogSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): BlogConnection! + + """ + Count of blogs. Limited to a maximum of 10000 by default. + """ + blogsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `BulkOperation` resource by ID. + """ + bulkOperation("The ID of the `BulkOperation` to return." id: ID!): BulkOperation + + """ + Returns the app's bulk operations meeting the specified filters. Defaults to sorting by created_at, with newest operations first. + """ + bulkOperations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: BulkOperationsSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time | Filter operations created after a specific date. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| operation_type | string | Filter operations by type. | - `query`
- `mutation` |\n| status | string | Filter operations by status. | - `canceled`
- `canceling`
- `completed`
- `created`
- `failed`
- `running` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): BulkOperationConnection! + + """ + Returns the list of [business entities](https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntity) associated with the shop. Use this query to retrieve business entities for assigning to markets, managing payment providers per entity, or viewing entity attribution on orders. + + Each shop can have multiple business entities with one designated as primary. To identify the primary entity in the query results, set the [`primary`](https://shopify.dev/docs/api/admin-graphql/latest/queries/businessEntities#returns-BusinessEntity.fields.primary) field to `true`. + + Learn more about [managing multiple legal entities](https://shopify.dev/docs/apps/build/markets/multiple-entities). + """ + businessEntities: [BusinessEntity!]! + + """ + Returns a Business Entity by ID. + """ + businessEntity("The ID of the Business Entity to return. Returns the primary Business Entity if not provided." id: ID): BusinessEntity + + """ + Returns a `DeliveryCarrierService` resource by ID. + """ + carrierService("The ID of the `DeliveryCarrierService` to return." id: ID!): DeliveryCarrierService + + """ + A paginated list of carrier services configured for the shop. Carrier services provide real-time shipping rates from external providers like FedEx, UPS, or custom shipping solutions. Use the `query` parameter to filter results by attributes such as active status. + """ + carrierServices("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CarrierServiceSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| active | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DeliveryCarrierServiceConnection! + + """ + Retrieves all cart transform functions currently deployed by your app within the merchant's store. This query provides comprehensive access to your active cart modification logic, enabling management and monitoring of bundling and merchandising features. + + The query returns paginated results with full cart transform details, including function IDs, configuration settings, and operational status. + + Cart Transform ownership is scoped to your API client, ensuring you only see and manage functions deployed by your specific app. This isolation prevents conflicts between different apps while maintaining security boundaries for sensitive merchandising logic. + + Learn more about [managing cart transforms](https://shopify.dev/docs/api/functions/latest/cart-transform). + """ + cartTransforms("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CartTransformConnection! + + """ + Returns a `CashTrackingSession` resource by ID. + """ + cashTrackingSession("The ID of the `CashTrackingSession` to return." id: ID!): CashTrackingSession + + """ + Returns a shop's cash tracking sessions for locations with a POS Pro subscription. + + Tip: To query for cash tracking sessions in bulk, you can + [perform a bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/queries). + """ + cashTrackingSessions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CashTrackingSessionsSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| closing_time | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_id | id |\n| opening_time | time |\n| point_of_sale_device_ids | string |\n| status | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CashTrackingSessionConnection! + + """ + Retrieves a [catalog](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) by its ID. + A catalog represents a list of products with publishing and pricing information, + and can be associated with a context, such as a market, company location, or app. + + Use the `catalog` query to retrieve information associated with the following workflows: + + - Managing product publications across different contexts + - Setting up contextual pricing with price lists + - Managing market-specific product availability + - Configuring B2B customer catalogs + + There are several types of catalogs: + + - [`MarketCatalog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketCatalog) + - [`AppCatalog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppCatalog) + - [`CompanyLocationCatalog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocationCatalog) + + Learn more about [catalogs for different markets](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalog("The ID of the `Catalog` to return." id: ID!): Catalog + + """ + Returns the most recent catalog operations for the shop. + """ + catalogOperations: [ResourceOperation!]! + + """ + Returns a paginated list of catalogs for the shop. Catalogs control which products are published and how they're priced in different contexts, such as international markets (Canada vs. United States), B2B company locations (different branches of the same business), or specific sales channels (such as online store vs. POS). + + Filter catalogs by [`type`](https://shopify.dev/docs/api/admin-graphql/latest/queries/catalogs#arguments-type) and use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/catalogs#arguments-query) argument to search and filter by additional criteria. + + Learn more about [Shopify Catalogs](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalogs("The type of the catalogs to be returned." type: CatalogType = null, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CatalogSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| app_id | id |\n| company_id | id |\n| company_location_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| managed_country_id | id |\n| market_id | id |\n| status | string |\n| title | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CatalogConnection! + + """ + The count of catalogs belonging to the shop. Limited to a maximum of 10000 by default. + """ + catalogsCount("The type of the catalogs to be returned." type: CatalogType = null, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| app_id | id |\n| company_id | id |\n| company_location_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| managed_country_id | id |\n| market_id | id |\n| status | string |\n| title | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) by ID. The channel must belong to the calling application. + """ + channel("The ID of the [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) to return." id: ID!): Channel + + """ + The list of [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) objects on the shop. When the calling application supports multi-channel, only channels established by the calling application are returned. Each channel represents an authenticated connection to an external selling platform such as a marketplace, social media platform, online store, or point-of-sale system. + """ + channels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ChannelConnection! + + """ + Returns the visual customizations for checkout for a given [checkout profile](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile). + + To update checkout branding settings, use the [`checkoutBrandingUpsert`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert) mutation. Learn more about [customizing checkout's appearance](https://shopify.dev/docs/apps/build/checkout/styling). + """ + checkoutBranding("A globally-unique identifier." checkoutProfileId: ID!): CheckoutBranding @deprecated(reason: "Use `checkoutAndAccountsConfiguration` instead.") + + """ + Returns a [`CheckoutProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile). Checkout profiles define the branding settings and UI extensions for a store's checkout experience. Stores can have one published profile that renders on their live checkout and multiple draft profiles for testing customizations in the checkout editor. + """ + checkoutProfile("The ID of the checkout profile." id: ID!): CheckoutProfile @deprecated(reason: "Use `checkoutAndAccountsConfiguration` instead.") + + """ + List of checkout profiles on a shop. + """ + checkoutProfiles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CheckoutProfileSortKeys = UPDATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| is_published | boolean |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CheckoutProfileConnection! @deprecated(reason: "Use `checkoutAndAccountsConfigurations` instead.") + + """ + Returns a [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes) resource by ID. + """ + codeDiscountNode("The ID of the `DiscountCodeNode` to return." id: ID!): DiscountCodeNode @deprecated(reason: "Use `discountNode` instead.") + + """ + Retrieves a [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes) by its discount code. The search is case-insensitive, enabling you to find discounts regardless of how customers enter the code. + + Returns a [`DiscountCodeNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeNode) that contains the underlying discount details, which could be a basic [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount), a ["Buy X Get Y" (BXGY) discount](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y), a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping), or an [app-provided discount](https://help.shopify.com/manual/discounts/discount-types/discounts-with-apps). + + Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts). + """ + codeDiscountNodeByCode("The case-insensitive code of the `DiscountCodeNode` to return." code: String!): DiscountCodeNode + + """ + Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). + """ + codeDiscountNodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CodeDiscountSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| combines_with | string | Filter by the [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) that you can use in combination with [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). | - `order_discounts`
- `product_discounts`
- `shipping_discounts` | | - `combines_with:product_discounts` |\n| created_at | time | Filter by the date and time when the discount was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| discount_type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). | - `app`
- `bogo`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `discount_type:fixed_amount` |\n| ends_at | time | Filter by the date and time when the discount expires and is no longer available for customer use. | | | - `ends_at:>'2020-10-21T23:39:20Z'`
- `ends_at: - `ends_at:<='2024'` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| starts_at | time | Filter by the date and time, in the shop's timezone, when the discount becomes active and is available for customer use. | | | - `starts_at:>'2020-10-21T23:39:20Z'`
- `starts_at: - `starts_at:<='2024'` |\n| status | string | Filter by the status of the discount. | - `active`
- `expired`
- `scheduled` | | - `status:scheduled` |\n| times_used | integer | Filter by the number of times the discount has been used. For example, if a \"Buy 3, Get 1 Free\" t-shirt discount is automatically applied in 200 transactions, then the discount has been used 200 times.

This value is updated asynchronously. As a result, it might be different than the actual usage count. | | | - `times_used:0`
- `times_used:>150`
- `times_used:>=200` |\n| title | string | Filter by the discount name that displays to customers. | | | - `title:Black Friday Sale` |\n| type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). | - `all`
- `all_with_app`
- `app`
- `bxgy`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `type:percentage` |\n| updated_at | time | Filter by the date and time when the discount was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountCodeNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") + + """ + List of the shop's code discount saved searches. + """ + codeDiscountSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Retrieves a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) by its ID. + A collection represents a grouping of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + that merchants can display and sell as a group in their [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + + Use the `collection` query when you need to: + + - Manage collection publishing across sales channels + - Access collection metadata and SEO information + - Work with collection rules and product relationships + + A collection can be either a custom ([manual](https://help.shopify.com/manual/products/collections/manual-shopify-collection)) + collection where products are manually added, or a smart ([automated](https://help.shopify.com/manual/products/collections/automated-collections)) + collection where products are automatically included based on defined rules. Each collection has associated metadata including + title, description, handle, image, and [metafields](https://shopify.dev/docs/apps/build/custom-data/metafields). + """ + collection("The ID of the `Collection` to return." id: ID!): Collection + + """ + Retrieves a collection by its unique handle identifier. Handles provide a URL-friendly way to reference collections and are commonly used in storefront URLs and navigation. + + For example, a collection with the title "Summer Sale" might have the handle `summer-sale`, allowing you to fetch it directly without knowing the internal ID. + + Use `CollectionByHandle` to: + - Fetch collections for storefront display and navigation + - Build collection-based URLs and routing systems + - Validate collection existence before displaying content + + Handles are automatically generated from collection titles but can be customized by merchants for SEO and branding purposes. + + Learn more about [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionByHandle("The handle of the collection." handle: String!): Collection @deprecated(reason: "Use `collectionByIdentifier` instead.") + + """ + Return a collection by an identifier. + """ + collectionByIdentifier("The identifier of the collection." identifier: CollectionIdentifierInput!): Collection + + """ + Lists all rules that can be used to create collections. + """ + collectionRulesConditions: [CollectionRuleConditions!]! + + """ + Returns a list of the shop's collection saved searches. + """ + collectionSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Retrieves a list of [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + in a store. Collections are groups of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + that merchants can organize for display in their [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + For example, an athletics store might create different collections for running attire, shoes, and accessories. + + Use the `collections` query when you need to: + + - Build a browsing interface for a store's product groupings. + - Create collection searching, sorting, and filtering experiences (for example, by title, type, or published status). + - Sync collection data with external systems. + + The `collections` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + for large catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/collections#arguments-savedSearchId) + for frequently used collection queries. + + The `collections` query returns collections with their associated metadata, including: + + - Basic collection information (title, description, handle, and type) + - Collection image and SEO metadata + - Product count and product relationships + - Collection rules or conditions + - Publishing status and publication details + - Metafields and custom attributes + + Learn more about [using metafields with collection conditions](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CollectionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| collection_type | string | | - `custom`
- `smart` |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| product_id | id | Filter by collections containing a product by its ID. |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the collection was published to the Online Store. |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): CollectionConnection! + + """ + Count of collections. Limited to a maximum of 10000 by default. + """ + collectionsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| collection_type | string | | - `custom`
- `smart` |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| product_id | id | Filter by collections containing a product by its ID. |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the collection was published to the Online Store. |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `Comment` resource by ID. + """ + comment("The ID of the `Comment` to return." id: ID!): Comment + + """ + List of the shop's comments. + """ + comments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CommentSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the comment was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| published_at | time | Filter by the date and time when the comment was published. | | | - `published_at:>'2020-10-21T23:39:20Z'`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter by published status | - `any`
- `published`
- `unpublished` | | - `published_status:any`
- `published_status:published`
- `published_status:unpublished` |\n| status | string |\n| updated_at | time | Filter by the date and time when the comment was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CommentConnection! + + """ + A paginated list of companies in the shop. [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) objects are business entities that purchase from the merchant. + + Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/companies#arguments-query) argument to filter companies by attributes like name or externalId. Sort and paginate results to handle large datasets efficiently. Learn more about [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). + """ + companies("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanySortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active_customers_count | integer |\n| created_at | time |\n| external_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string |\n| ordering_status | string |\n| since_date | time |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyConnection! + + """ + The number of companies for a shop. Limited to a maximum of 10000 by default. + """ + companiesCount("The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `Company` resource by ID. + """ + company("The ID of the `Company` to return." id: ID!): Company + + """ + Returns a `CompanyContact` resource by ID. + """ + companyContact("The ID of the `CompanyContact` to return." id: ID!): CompanyContact + + """ + Returns a `CompanyContactRole` resource by ID. + """ + companyContactRole("The ID of the `CompanyContactRole` to return." id: ID!): CompanyContactRole + + """ + Returns a `CompanyLocation` resource by ID. + """ + companyLocation("The ID of the `CompanyLocation` to return." id: ID!): CompanyLocation + + """ + A paginated list of [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) objects for B2B customers. Company locations represent individual branches or offices of a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) where B2B orders can be placed. + + Each location can have its own billing and shipping addresses, tax settings, [`PaymentTerms`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms), and [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) assignments with custom pricing. Use the query parameter to search locations by name or other attributes. + + Learn more about [managing company locations](https://shopify.dev/docs/apps/build/b2b/manage-client-company-locations). + """ + companyLocations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CompanyLocationSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| company_id | id |\n| created_at | time |\n| external_id | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| ids | string |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CompanyLocationConnection! + + """ + Returns the customer privacy consent policies of a shop. + """ + consentPolicy("Return the policy with the provided ID." id: ID, "Return policies with the provided country code." countryCode: PrivacyCountryCode, "Return policies with the provided region code." regionCode: String, "Return policies where consent is required or not." consentRequired: Boolean, "Return policies where data sale opt out is required or not." dataSaleOptOutRequired: Boolean): [ConsentPolicy!]! + + """ + List of countries and regions for which consent policies can be created or updated. + """ + consentPolicyRegions: [ConsentPolicyRegion!]! + + """ + Returns the [`AppInstallation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation) for the currently authenticated app. Provides access to granted access scopes, active [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) objects, and billing information for your app. + + Use this query to check which permissions your app has, monitor subscription status, or retrieve [`AppCredit`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppCredit) objects. Learn more about [managing access scopes](https://shopify.dev/docs/api/usage/access-scopes#checking-granted-access-scopes), [subscription billing](https://shopify.dev/docs/apps/launch/billing/subscription-billing), and [app credits](https://shopify.dev/docs/apps/launch/billing/award-app-credits). + """ + currentAppInstallation: AppInstallation! + + """ + Returns the current app's most recent [`BulkOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation). Bulk query and bulk mutation operations can run at the same time per shop. The number of concurrent operations that an app can run depends on the API version. For the applicable concurrency limits, refer to the [bulk operations guide](https://shopify.dev/docs/api/usage/bulk-operations/queries). + + The operation type parameter determines whether to retrieve the most recent query or mutation bulk operation. Use this query to check the operation's status, track its progress, and retrieve the result URL when it completes. + """ + currentBulkOperation("The current bulk operation's type." type: BulkOperationType = QUERY): BulkOperation @deprecated(reason: "Use `bulkOperations` with status filter instead.") + + """ + The staff member making the API request. + """ + currentStaffMember: StaffMember + + """ + Returns a `Customer` resource by ID. + """ + customer("The ID of the `Customer` to return." id: ID!): Customer + + """ + Returns a `CustomerAccountPage` resource by ID. + """ + customerAccountPage("The ID of the `CustomerAccountPage` to return." id: ID!): CustomerAccountPage + + """ + List of the shop's customer account pages. + """ + customerAccountPages("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CustomerAccountPageConnection + + """ + Return a customer by an identifier. + """ + customerByIdentifier("The identifier of the customer." identifier: CustomerIdentifierInput!): Customer + + """ + Returns the status of a customer merge request job. + """ + customerMergeJobStatus("The ID of the job performing the customer merge request." jobId: ID!): CustomerMergeRequest + + """ + Returns a preview of a customer merge request. + + The `customerOneId` and `customerTwoId` arguments don't guarantee which customer is kept. Shopify + selects the resulting customer in this order: + 1. If `overrideFields.customerIdOfEmailToKeep` is provided and valid, then the selected customer is kept. + 2. If exactly one customer has an email address, then that customer is kept. + 3. If both customers have email addresses, then account state and email marketing consent determine + the customer that's kept: an `enabled` account wins over other account states; otherwise, an + `invited` account can win when consent doesn't already prefer `subscribed` or `pending`; otherwise + the consent result is used. If those rules don't prefer either customer, then `customerTwoId` is kept. + 4. If neither customer has an email address, then `customerTwoId` is kept. + """ + customerMergePreview("The ID of one customer to merge. This customer isn't guaranteed to be kept." customerOneId: ID!, "The ID of another customer to merge. This customer is kept when neither customer has an email address." customerTwoId: ID!, "The field-specific overrides for default customer merge rules." overrideFields: CustomerMergeOverrideFields): CustomerMergePreview! + + """ + Returns a vaulted customer payment method by its ID, including the instrument type (credit card, PayPal, etc.), billing address, and current status. Optionally includes revoked payment methods. Use this to look up a specific saved payment method for a customer — for example, to check whether a subscription's payment method is still valid or to display stored payment details. + """ + customerPaymentMethod("The ID of the CustomerPaymentMethod to return." id: ID!, "Whether to show the customer's revoked payment method." showRevoked: Boolean = false): CustomerPaymentMethod + + """ + List of the shop's customer saved searches. + """ + customerSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CustomerSavedSearchSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| name | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SavedSearchConnection! @deprecated(reason: "Use `segments` instead.") + + """ + A paginated list of customers that belong to an individual [`Segment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment). Segments group customers based on criteria defined through [ShopifyQL queries](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference). Access segment members with their profile information and purchase summary data. The connection includes statistics for analyzing segment attributes (such as average and sum calculations) and a total count of all members. + The maximum page size is 1000. + """ + customerSegmentMembers("The ID of the segment." segmentId: ID, "The query that's used to filter the members. The query is composed of a combination of conditions on facts about customers such as `email_subscription_status = 'SUBSCRIBED'` with [this syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference)." query: String, "The ID of the segment members query." queryId: ID, "The timezone that's used to interpret relative date arguments. The timezone defaults to UTC if the timezone isn't provided." timezone: String, "Reverse the order of the list. The sorting behaviour defaults to ascending order." reverse: Boolean = false, "Sort the list by a given key. Valid values:\n• `created_at` - Sort by customer creation date\n• `first_order_date` - Sort by the date of the customer's first order\n• `last_abandoned_order_date` - Sort by the date of the customer's last abandoned checkout\n• `last_order_date` - Sort by the date of the customer's most recent order\n• `number_of_orders` - Sort by the total number of orders placed by the customer\n• `amount_spent` - Sort by the total amount the customer has spent across all orders\n\nUse with the `reverse` parameter to control sort direction (ascending by default, descending when reverse=true)." sortKey: String, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): CustomerSegmentMemberConnection! + + """ + Returns a `CustomerSegmentMembersQuery` resource by ID. + """ + customerSegmentMembersQuery("The ID of the `CustomerSegmentMembersQuery` to return." id: ID!): CustomerSegmentMembersQuery + + """ + Whether a member, which is a customer, belongs to a segment. + """ + customerSegmentMembership("The segments to evaluate for the given customer." segmentIds: [ID!]!, "The ID of the customer that has the membership." customerId: ID!): SegmentMembershipResponse! + + """ + Returns a list of [customers](https://shopify.dev/api/admin-graphql/latest/objects/Customer) in your Shopify store, including key information such as name, email, location, and purchase history. + Use this query to segment your audience, personalize marketing campaigns, or analyze customer behavior by applying filters based on location, order history, marketing preferences and tags. + The `customers` query supports [pagination](https://shopify.dev/api/usage/pagination-graphql) and [sorting](https://shopify.dev/api/admin-graphql/latest/enums/CustomerSortKeys). + """ + customers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CustomerSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| accepts_marketing | boolean | Filter by whether a customer has consented to receive marketing material. | | | - `accepts_marketing:true` |\n| country | string | Filter by the country associated with the customer's address. Use either the country name or the two-letter country code. | | | - `country:Canada`
- `country:JP` |\n| customer_date | time | Filter by the date and time when the customer record was created. This query parameter filters by the [`createdAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-createdAt) field. | | | - `customer_date:'2024-03-15T14:30:00Z'`
- `customer_date: >='2024-01-01'` |\n| email | string | The customer's email address, used to communicate information about orders and for the purposes of email marketing campaigns. You can use a wildcard value to filter the query by customers who have an email address specified. Please note that _email_ is a tokenized field: To retrieve exact matches, quote the email address (_phrase query_) as described in [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). | | | - `email:gmail.com`
- `email:\"bo.wang@example.com\"`
- `email:*` |\n| first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| last_abandoned_order_date | time | Filter by the date and time of the customer's most recent abandoned checkout. An abandoned checkout occurs when a customer adds items to their cart, begins the checkout process, but leaves the site without completing their purchase. | | | - `last_abandoned_order_date:'2024-04-01T10:00:00Z'`
- `last_abandoned_order_date: >='2024-01-01'` |\n| last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` |\n| order_date | time | Filter by the date and time that the order was placed by the customer. Use this query filter to check if a customer has placed at least one order within a specified date range. | | | - `order_date:'2024-02-20T00:00:00Z'`
- `order_date: >='2024-01-01'`
- `order_date:'2024-01-01..2024-03-31'` |\n| orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` |\n| phone | string | The phone number of the customer, used to communicate information about orders and for the purposes of SMS marketing campaigns. You can use a wildcard value to filter the query by customers who have a phone number specified. | | | - `phone:+18005550100`
- `phone:*` |\n| state | string | Filter by the [state](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-state) of the customer's account with the shop. This filter is only valid when [Classic Customer Accounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-customerAccountsVersion) is active. | | | - `state:ENABLED`
- `state:INVITED`
- `state:DISABLED`
- `state:DECLINED` |\n| tag | string | Filter by the tags that are associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag:'VIP'`
- `tag:'Wholesale,Repeat'` |\n| tag_not | string | Filter by the tags that aren't associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag_not:'Prospect'`
- `tag_not:'Test,Internal'` |\n| total_spent | float | Filter by the total amount of money a customer has spent across all orders. | | | - `total_spent:100.50`
- `total_spent:50.00`
- `total_spent:>100.50`
- `total_spent:>50.00` |\n| updated_at | time | The date and time, matching a whole day, when the customer's information was last updated. | | | - `updated_at:2024-01-01T00:00:00Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CustomerConnection! + + """ + The number of customers. Limited to a maximum of 10000 by default. + """ + customersCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The paginated list of deletion events. + """ + deletionEvents("List of subject types to filter by." subjectTypes: [DeletionEventSubjectType!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DeletionEventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| occurred_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DeletionEventConnection! @deprecated(reason: "Use `events` instead.") + + """ + The delivery customization. + """ + deliveryCustomization("The ID of the delivery customization." id: ID!): DeliveryCustomization + + """ + The delivery customizations. + """ + deliveryCustomizations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| enabled | boolean |\n| function_id | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): DeliveryCustomizationConnection! + + """ + Retrieves a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) by ID. Delivery profiles group shipping settings for specific [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects that ship from selected [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects to [delivery zones](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone with defined rates. + + Learn more about [delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment#whats-a-delivery-profile). + """ + deliveryProfile("The ID of the DeliveryProfile to return." id: ID!): DeliveryProfile + + """ + Returns a paginated list of [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) objects for the shop. Delivery profiles group [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects that share shipping rates and zones. + + Each profile contains [`DeliveryLocationGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryLocationGroup) objects that organize fulfillment [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects and their associated delivery zones. [`DeliveryZone`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone) objects define geographic regions with specific shipping methods and rates. Use the [`merchantOwnedOnly`](https://shopify.dev/docs/api/admin-graphql/latest/queries/deliveryProfiles#arguments-merchantOwnedOnly) filter to exclude profiles that third-party apps manage. + + Learn more about [delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment#whats-a-delivery-profile). + """ + deliveryProfiles("If `true`, returns only delivery profiles that were created by the merchant." merchantOwnedOnly: Boolean, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DeliveryProfileConnection! + + """ + Returns delivery promise participants. + """ + deliveryPromiseParticipants("The product variant ID to filter by." ownerIds: [ID!], "The branded promise handle to filter by." brandedPromiseHandle: String!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DeliveryPromiseParticipantConnection + + """ + Lookup a delivery promise provider. + """ + deliveryPromiseProvider("The ID of the location associated with the delivery promise provider." locationId: ID!): DeliveryPromiseProvider + + """ + Represents the delivery promise settings for a shop. + """ + deliveryPromiseSettings: DeliveryPromiseSetting! + + """ + Returns the shop-wide shipping settings. + """ + deliverySettings: DeliverySetting + + """ + The total number of discount codes for the shop. Limited to a maximum of 10000 by default. + """ + discountCodesCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `DiscountNode` resource by ID. + """ + discountNode("The ID of the `DiscountNode` to return." id: ID!): DiscountNode + + """ + Returns a list of discounts. + """ + discountNodes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` |\n| combines_with | string | Filter by the [Shopify Functions discount classes](https://shopify.dev/docs/apps/build/discounts#discount-classes) that the [discount type](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountnodes#argument-query-filter-discount_type) can combine with. Supports multiple values separated by commas (e.g., combines_with:product_discounts,order_discounts). | - `order_discounts`
- `product_discounts`
- `shipping_discounts` | | - `combines_with:product_discounts`
- `combines_with:product_discounts,order_discounts` |\n| created_at | time | Filter by the date and time, in the shop's timezone, when the discount was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| discount_class | string | Filter by the [discount class](https://shopify.dev/docs/apps/build/discounts#discount-classes). Supports multiple classes separated by commas (e.g., discount_class:product,order). | - `order`
- `product`
- `shipping` | | - `discount_class:product`
- `discount_class:product,order` |\n| discount_type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). Supports multiple types separated by commas (e.g., discount_type:percentage,fixed_amount). | - `app`
- `bogo`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `discount_type:fixed_amount`
- `discount_type:percentage,fixed_amount` |\n| ends_at | time | Filter by the date and time, in the shop's timezone, when the discount ends. | | | - `ends_at:>'2020-10-21T23:39:20Z'`
- `ends_at: - `ends_at:<='2024'` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| method | string | Filter by the [discount method](https://shopify.dev/docs/apps/build/discounts#discount-methods). Supports multiple methods separated by commas (e.g., method:code,automatic). | - `automatic`
- `code` | | - `method:code`
- `method:code,automatic` |\n| starts_at | time | Filter by the date and time, in the shop's timezone, when the discount becomes active and is available for customer use. | | | - `starts_at:>'2020-10-21T23:39:20Z'`
- `starts_at: - `starts_at:<='2024'` |\n| status | string | Filter by the status of the discount. Supports multiple statuses separated by commas (e.g., status:active,scheduled). | - `active`
- `expired`
- `scheduled` | | - `status:scheduled`
- `status:active,scheduled` |\n| times_used | integer | Filter by the number of times the discount has been used. For example, if a \"Buy 3, Get 1 Free\" t-shirt discount is automatically applied in 200 transactions, then the discount has been used 200 times.

This value is updated asynchronously. As a result, it might be different than the actual usage count. | | | - `times_used:0`
- `times_used:>150`
- `times_used:>=200` |\n| title | string | Filter by the discount name that displays to merchants in the Shopify admin and to customers. | | | - `title:Black Friday Sale` |\n| type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). Supports multiple types separated by commas (e.g., type:percentage,fixed_amount). | - `all`
- `all_with_app`
- `app`
- `bxgy`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `type:percentage`
- `type:percentage,fixed_amount` |\n| updated_at | time | Filter by the date and time, in the shop's timezone, when the discount was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DiscountNodeConnection! + + """ + The total number of discounts for the shop. Limited to a maximum of 10000 by default. + """ + discountNodesCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` |\n| combines_with | string | Filter by the [Shopify Functions discount classes](https://shopify.dev/docs/apps/build/discounts#discount-classes) that the [discount type](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountnodes#argument-query-filter-discount_type) can combine with. Supports multiple values separated by commas (e.g., combines_with:product_discounts,order_discounts). | - `order_discounts`
- `product_discounts`
- `shipping_discounts` | | - `combines_with:product_discounts`
- `combines_with:product_discounts,order_discounts` |\n| created_at | time | Filter by the date and time, in the shop's timezone, when the discount was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| discount_class | string | Filter by the [discount class](https://shopify.dev/docs/apps/build/discounts#discount-classes). Supports multiple classes separated by commas (e.g., discount_class:product,order). | - `order`
- `product`
- `shipping` | | - `discount_class:product`
- `discount_class:product,order` |\n| discount_type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). Supports multiple types separated by commas (e.g., discount_type:percentage,fixed_amount). | - `app`
- `bogo`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `discount_type:fixed_amount`
- `discount_type:percentage,fixed_amount` |\n| ends_at | time | Filter by the date and time, in the shop's timezone, when the discount ends. | | | - `ends_at:>'2020-10-21T23:39:20Z'`
- `ends_at: - `ends_at:<='2024'` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| method | string | Filter by the [discount method](https://shopify.dev/docs/apps/build/discounts#discount-methods). Supports multiple methods separated by commas (e.g., method:code,automatic). | - `automatic`
- `code` | | - `method:code`
- `method:code,automatic` |\n| starts_at | time | Filter by the date and time, in the shop's timezone, when the discount becomes active and is available for customer use. | | | - `starts_at:>'2020-10-21T23:39:20Z'`
- `starts_at: - `starts_at:<='2024'` |\n| status | string | Filter by the status of the discount. Supports multiple statuses separated by commas (e.g., status:active,scheduled). | - `active`
- `expired`
- `scheduled` | | - `status:scheduled`
- `status:active,scheduled` |\n| times_used | integer | Filter by the number of times the discount has been used. For example, if a \"Buy 3, Get 1 Free\" t-shirt discount is automatically applied in 200 transactions, then the discount has been used 200 times.

This value is updated asynchronously. As a result, it might be different than the actual usage count. | | | - `times_used:0`
- `times_used:>150`
- `times_used:>=200` |\n| title | string | Filter by the discount name that displays to merchants in the Shopify admin and to customers. | | | - `title:Black Friday Sale` |\n| type | string | Filter by the [discount type](https://help.shopify.com/manual/discounts/discount-types). Supports multiple types separated by commas (e.g., type:percentage,fixed_amount). | - `all`
- `all_with_app`
- `app`
- `bxgy`
- `fixed_amount`
- `free_shipping`
- `percentage` | | - `type:percentage`
- `type:percentage,fixed_amount` |\n| updated_at | time | Filter by the date and time, in the shop's timezone, when the discount was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `DiscountRedeemCodeBulkCreation` resource by ID. + """ + discountRedeemCodeBulkCreation("The ID of the `DiscountRedeemCodeBulkCreation` to return." id: ID!): DiscountRedeemCodeBulkCreation + + """ + List of the shop's redeemed discount code saved searches. + """ + discountRedeemCodeSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DiscountCodeSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| times_used | integer |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SavedSearchConnection! + + """ + Returns a `ShopifyPaymentsDispute` resource by ID. + """ + dispute("The ID of the `ShopifyPaymentsDispute` to return." id: ID!): ShopifyPaymentsDispute + + """ + Returns a `ShopifyPaymentsDisputeEvidence` resource by ID. + """ + disputeEvidence("The ID of the `ShopifyPaymentsDisputeEvidence` to return." id: ID!): ShopifyPaymentsDisputeEvidence + + """ + Returns a paginated list of all Shopify Payments disputes for the shop. Disputes occur when a buyer files a complaint with their payments provider, and the merchant must provide evidence to contest it. Each dispute includes the status, amount, reason, and associated order. Use this to monitor and manage open chargebacks and track dispute resolution outcomes. + """ + disputes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| initiated_at | time |\n| status | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ShopifyPaymentsDisputeConnection! + + """ + Returns a `Domain` resource by ID. + """ + domain("The ID of the `Domain` to return." id: ID!): Domain + + """ + Retrieves a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) by its ID. + A draft order is an order created by a merchant on behalf of their + customers. Draft orders contain all necessary order details (products, pricing, customer information) + but require payment to be accepted before they can be converted into + [completed orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete). + + Use the `draftOrder` query to retrieve information associated with the following workflows: + + - Creating orders for phone, in-person, or chat sales + - Sending invoices to customers with secure checkout links + - Managing custom items and additional costs + - Selling products at discount or wholesale rates + - Processing pre-orders and saving drafts for later completion + + A draft order is associated with a + [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + and contains multiple [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem). + Each draft order has a [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder#field-DraftOrder.fields.status), + which indicates its progress through the sales workflow. + """ + draftOrder("The ID of the `DraftOrder` to return." id: ID!): DraftOrder + + """ + Available delivery options for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) based on the provided input. The query returns shipping rates, local delivery rates, and pickup locations that merchants can choose from when creating draft orders. + + Accepts draft order details including [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects, [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) for shipping, and discounts to determine which delivery methods are available. Pagination parameters control the number of local pickup options returned. + """ + draftOrderAvailableDeliveryOptions("The fields for the draft order." input: DraftOrderAvailableDeliveryOptionsInput!, "The search term for the delivery options." search: String, "The offset for the local pickup options." localPickupFrom: Int, "The number of local pickup options required." localPickupCount: Int, "Unique token used to trace execution and help optimize the calculation." sessionToken: String): DraftOrderAvailableDeliveryOptions! + + """ + List of the shop's draft order saved searches. + """ + draftOrderSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Returns a `DraftOrderTag` resource by ID. + """ + draftOrderTag("The ID of the `DraftOrderTag` to return." id: ID!): DraftOrderTag + + """ + List of saved draft orders. + """ + draftOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: DraftOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| customer_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| source | string |\n| status | string |\n| tag | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): DraftOrderConnection! + + """ + Returns the number of draft orders that match the query. Limited to a maximum of 10000 by default. + """ + draftOrdersCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| customer_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| ids | string |\n| source | string |\n| status | string |\n| tag | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Retrieves a single event by ID. Events chronicle activities in your store such as resource creation, updates, or staff comments. The query returns an [`Event`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Event) interface of type [`BasicEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BasicEvent) or [`CommentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CommentEvent). + """ + event("The ID of the event." id: ID!): Event + + """ + A paginated list of events that chronicle activities in the store. [`Event`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Event) is an interface implemented by types such as [`BasicEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BasicEvent) and [`CommentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CommentEvent) that track actions such as creating [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) objects, fulfilling [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) objects, adding [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects, or staff comments on timelines. + + The query supports filtering and sorting to help you find specific events or audit store activity over time. + """ + events("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: EventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): EventConnection + + """ + Count of events. Limited to a maximum of 10000. + """ + eventsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`
- `true` |\n| created_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`
- `created_at: - `id:>=1234`
- `id:<=1234` |\n| subject_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`
- `PRODUCT`
- `COLLECTION` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): Count + + """ + A list of the shop's file saved searches. + """ + fileSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Retrieves a paginated list of files that have been uploaded to a Shopify store. Files represent digital assets + that merchants can upload to their store for various purposes including product images, marketing materials, + documents, and brand assets. + + Use the `files` query to retrieve information associated with the following workflows: + + - [Managing product media and images](https://shopify.dev/docs/apps/build/online-store/product-media) + - [Theme development and asset management](https://shopify.dev/docs/storefronts/themes/store/success/brand-assets) + - Brand asset management and [checkout branding](https://shopify.dev/docs/apps/build/checkout/styling/add-favicon) + + Files can include multiple [content types](https://shopify.dev/docs/api/admin-graphql/latest/enums/FileContentType), + such as images, videos, 3D models, and generic files. Each file has + properties like dimensions, file size, alt text for accessibility, and upload status. Files can be filtered + by [media type](https://shopify.dev/docs/api/admin-graphql/latest/enums/MediaContentType) and can be associated with + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + [themes](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme), + and other store resources. + """ + files("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FileSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| filename | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| ids | string |\n| media_type | string |\n| original_upload_size | string | Filter by the file's original upload size in bytes. This filter supports both exact values and ranges. It accepts an optional unit of measurement as a suffix (B, KB, MB, GB, TB). When no unit is provided, the value is interpreted as bytes. Units use binary (1024-based) multipliers. | | | - `original_upload_size:1024`
- `original_upload_size:1.5MB`
- `original_upload_size:>=10MB original_upload_size:<=100MB`
- `original_upload_size:512KB` |\n| product_id | string |\n| status | string |\n| updated_at | time |\n| used_in | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): FileConnection! + + """ + Returns the access policy for a finance app . + """ + financeAppAccessPolicy: FinanceAppAccessPolicy! + + """ + Returns Know Your Customer (KYC) information for the shop's Shopify Payments account. KYC data includes verified identity and business details collected during onboarding. This is primarily used by embedded finance apps (e.g., Shopify Balance, Bill Pay) that need to verify the merchant's identity without requiring a separate KYC process. + """ + financeKycInformation: FinanceKycInformation + + """ + Retrieves a [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment) by its ID. A fulfillment is a record that the merchant has completed their work required for one or more line items in an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). It includes tracking information, [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects, and the status of the fulfillment. + + Use this query to track the progress of shipped items, view tracking details, or check [fulfillment events](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) for example when a package is out for delivery or delivered. + """ + fulfillment("The ID of the Fulfillment to return." id: ID!): Fulfillment + + """ + The fulfillment constraint rules that belong to a shop. + """ + fulfillmentConstraintRules: [FulfillmentConstraintRule!]! + + """ + Returns a `FulfillmentOrder` resource by ID. + """ + fulfillmentOrder("The ID of the `FulfillmentOrder` to return." id: ID!): FulfillmentOrder + + """ + The paginated list of all fulfillment orders. + The returned fulfillment orders are filtered according to the + [fulfillment order access scopes](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder#api-access-scopes) + granted to the app. + + Use this query to retrieve fulfillment orders assigned to merchant-managed locations, + third-party fulfillment service locations, or all kinds of locations together. + + For fetching only the fulfillment orders assigned to the app's locations, use the + [assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) + connection. + """ + fulfillmentOrders("Whether to include closed fulfillment orders." includeClosed: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FulfillmentOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| assigned_location_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): FulfillmentOrderConnection! + + """ + Returns a [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) by its ID. The service can manage inventory, process fulfillment requests, and provide tracking details through callback endpoints or directly calling Shopify's APIs. + + When you register a fulfillment service, Shopify automatically creates an associated [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) where fulfillment order's can be assigned to be processed. + + Learn more about [building fulfillment service apps](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services). + """ + fulfillmentService("The ID of the FulfillmentService to return." id: ID!): FulfillmentService + + """ + Retrieves a [`GiftCard`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) by its ID. Returns the gift card's balance, transaction history, [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) information, and whether it's enabled. + + Additional fields include the initial value, expiration date, deactivation timestamp (if applicable), and the associated [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) if the gift card was purchased by a customer through checkout. Gift cards that merchants create manually won't have an associated order. + """ + giftCard("The ID of the GiftCard to return." id: ID!): GiftCard + + """ + The configuration for the shop's gift cards. + """ + giftCardConfiguration: GiftCardConfiguration! + + """ + Returns a paginated list of [`GiftCard`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) objects issued for the shop. + + You can filter gift cards by attributes such as status, last characters of the code, balance status, and other values using the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/giftCards#arguments-query) parameter. You can also apply [`SavedSearch`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SavedSearch) objects to filter results. + """ + giftCards("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: GiftCardSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document, including gift card codes. | | | - `query=a5bh6h64b329j4k7`
- `query=Bob Norman` |\n| balance_status | string | | - `full`
- `partial`
- `empty`
- `full_or_partial` | | - `balance_status:full` |\n| created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` |\n| customer_id | id |\n| expires_on | date | | | | - `expires_on:>=2020-01-01` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| initial_value | string | | | | - `initial_value:>=100` |\n| recipient_id | id |\n| source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` |\n| status | string | | - `disabled`
- `enabled`
- `expired`
- `expiring` | | - `status:disabled OR status:expired` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): GiftCardConnection! + + """ + Returns the total count of gift cards that have been issued by the shop. Use this for dashboard summaries or to understand the scale of a merchant's gift card program. The count includes all gift cards regardless of status (active, disabled, or fully redeemed). Limited to a maximum of 10000 by default. + """ + giftCardsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document, including gift card codes. | | | - `query=a5bh6h64b329j4k7`
- `query=Bob Norman` |\n| balance_status | string | | - `full`
- `partial`
- `empty`
- `full_or_partial` | | - `balance_status:full` |\n| created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` |\n| customer_id | id |\n| expires_on | date | | | | - `expires_on:>=2020-01-01` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| initial_value | string | | | | - `initial_value:>=100` |\n| recipient_id | id |\n| source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` |\n| status | string | | - `disabled`
- `enabled`
- `expired`
- `expiring` | | - `status:disabled OR status:expired` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns an + [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) + object by ID. + """ + inventoryItem("The ID of the `InventoryItem` to return." id: ID!): InventoryItem + + """ + Returns a list of inventory items. + """ + inventoryItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| sku | string | Filter by the inventory item [`sku`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryItemConnection! + + """ + Returns an + [InventoryLevel](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) + object by ID. + """ + inventoryLevel("The ID of the `InventoryLevel` to return." id: ID!): InventoryLevel + + """ + Returns the shop's inventory configuration, including all inventory quantity names. Quantity names represent different [inventory states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) that merchants use to track inventory. + """ + inventoryProperties: InventoryProperties! + + """ + Retrieves an [`InventoryShipment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipment) by ID. Returns tracking details, [`InventoryShipmentLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipmentLineItem) objects with quantities, and the shipment's current [`InventoryShipmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/InventoryShipmentStatus). + """ + inventoryShipment("The ID of the inventory shipment." id: ID!): InventoryShipment + + """ + Returns an [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer) by ID. Inventory transfers track the movement of inventory between locations, including origin and destination details, [`InventoryTransferLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) objects, quantities, and [`InventoryTransferStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/InventoryTransferStatus) values. + """ + inventoryTransfer("The ID of the inventory transfer." id: ID!): InventoryTransfer + + """ + Returns a paginated list of [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer) objects between locations. Transfers track the movement of [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) objects between [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects. + + Supports filtering transfers using query parameters and sorting by various criteria. Use the connection's edges to access transfer details including [`InventoryTransferLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) objects, quantities, and shipment status. + """ + inventoryTransfers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: TransferSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| destination_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| origin_id | id |\n| product_id | id |\n| product_variant_id | id |\n| source_id | id |\n| status | string |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): InventoryTransferConnection! + + """ + Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes. + """ + job("ID of the job to query." id: ID!): Job + + """ + Retrieves a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) by its ID. Locations are physical places where merchants store inventory, such as warehouses, retail stores, or fulfillment centers. + + Each location tracks inventory levels, fulfillment capabilities, and address information. Active locations can stock products and fulfill orders based on their configuration settings. + """ + location("The ID of the location to return. If no ID is provided, the primary location of the Shop is returned." id: ID): Location + + """ + Return a location by an identifier. + """ + locationByIdentifier("The identifier of the location." identifier: LocationIdentifierInput!): Location + + """ + A paginated list of inventory locations where merchants can stock [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) items and fulfill [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) items. + + Returns only active locations by default. Use the [`includeInactive`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-includeInactive) argument to retrieve deactivated locations that can no longer stock inventory or fulfill orders. Use the [`includeLegacy`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-includeLegacy) argument to include locations that [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) apps manage. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-query) argument to filter by location attributes like name, address, and whether local pickup is enabled. + """ + locations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: LocationSortKeys = NAME, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active | string |\n| address1 | string |\n| address2 | string |\n| city | string |\n| country | string |\n| created_at | time |\n| geolocated | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| legacy | boolean |\n| location_id | id |\n| name | string |\n| pickup_in_store | string | | - `enabled`
- `disabled` |\n| province | string |\n| zip | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "Whether to include the legacy locations of fulfillment services." includeLegacy: Boolean = false, "Whether to include the locations that are deactivated." includeInactive: Boolean = false): LocationConnection! + + """ + Returns a list of all origin locations available for a delivery profile. + """ + locationsAvailableForDeliveryProfiles: [Location!] @deprecated(reason: "Use `locationsAvailableForDeliveryProfilesConnection` instead.") + + """ + Returns a list of all origin locations available for a delivery profile. + """ + locationsAvailableForDeliveryProfilesConnection("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): LocationConnection! + + """ + Returns the count of locations for the given shop. Limited to a maximum of 10000 by default. + """ + locationsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active | string |\n| address1 | string |\n| address2 | string |\n| city | string |\n| country | string |\n| created_at | time |\n| geolocated | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| legacy | boolean |\n| location_id | id |\n| name | string |\n| pickup_in_store | string | | - `enabled`
- `disabled` |\n| province | string |\n| zip | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a list of fulfillment orders that are on hold. + """ + manualHoldsFulfillmentOrders("The query conditions used to filter fulfillment orders. Only fulfillment orders corresponding to orders matching the query will be counted.\nSupported filter parameters:\n - `order_financial_status`\n - `order_risk_level`\n - `shipping_address_coordinates_validated`\n\nSee the detailed [search syntax](https://shopify.dev/api/usage/search-syntax)\nfor more information about using filters." query: String, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentOrderConnection! + + """ + Returns a `Market` resource by ID. + """ + market("The ID of the `Market` to return." id: ID!): Market + + """ + Returns the applicable market for a customer based on where they are in the world. + """ + marketByGeography("The code for the country where the customer is." countryCode: CountryCode!): Market @deprecated(reason: "This `market_by_geography` field will be removed in a future version of the API.") + + """ + A resource that can have localized values for different markets. + """ + marketLocalizableResource("Find a market localizable resource by ID." resourceId: ID!): MarketLocalizableResource + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResources("Return only resources of a type." resourceType: MarketLocalizableResourceType!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketLocalizableResourceConnection! + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResourcesByIds("Return only resources for given IDs." resourceIds: [ID!]!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketLocalizableResourceConnection! + + """ + A list of marketing activities associated with the marketing app. + """ + marketingActivities("The list of marketing activity IDs to filter by." marketingActivityIds: [ID!] = [], "The list of remote IDs associated with marketing activities to filter by." remoteIds: [String!] = [], "The UTM parameters associated with marketing activities to filter by." utm: UTMInput, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MarketingActivitySortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| app_id | id |\n| app_name | string | A comma-separated list of app names. |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| marketing_campaign_id | id |\n| scheduled_to_end_at | time |\n| scheduled_to_start_at | time |\n| tactic | string |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): MarketingActivityConnection! + + """ + Returns a `MarketingActivity` resource by ID. + """ + marketingActivity("The ID of the `MarketingActivity` to return." id: ID!): MarketingActivity + + """ + Returns a `MarketingEvent` resource by ID. + """ + marketingEvent("The ID of the `MarketingEvent` to return." id: ID!): MarketingEvent + + """ + A list of marketing events associated with the marketing app. + """ + marketingEvents("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MarketingEventSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| app_id | id |\n| description | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| started_at | time |\n| type | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MarketingEventConnection! + + """ + Returns a paginated list of [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) objects configured for the shop. Markets match buyers based on defined conditions to deliver customized shopping experiences. + + Filter markets by [`MarketType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/MarketType) and [`MarketStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/MarketStatus), search by name, and control sort order. Retrieve market configurations including [`MarketCurrencySettings`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketCurrencySettings), [`MarketWebPresence`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketWebPresence) objects, and [`MarketConditions`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketConditions). + + Learn more about [Shopify Markets](https://shopify.dev/docs/apps/build/markets). + """ + markets("Filters markets by type." type: MarketType = null, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MarketsSortKeys = NAME, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| market_condition_types | string | A comma-separated list of condition types. |\n| market_type | string |\n| name | string |\n| status | string | | - `ACTIVE`
- `DRAFT` |\n| wildcard_company_location_with_country_code | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MarketConnection! + + """ + The resolved values for a buyer signal. + """ + marketsResolvedValues("The buyer signal." buyerSignal: BuyerSignalInput!): MarketsResolvedValues! + + """ + Returns a `Menu` resource by ID. + """ + menu("The ID of the `Menu` to return." id: ID!): Menu + + """ + Retrieves navigation menus. Menus organize content into hierarchical navigation structures that merchants can display in the online store (for example, in headers, footers, and sidebars) and customer accounts. + + Each [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) contains a handle for identification, a title for display, and a collection of [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) objects that can be nested up to 3 levels deep. Default menus have protected handles that can't be modified. + """ + menus("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MenuSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| title | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MenuConnection! + + """ + Retrieves a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) by its identifier. You can identify a definition using either its owner type, namespace, and key, or its global ID. + + Use this query to inspect a definition's configuration, including its data type, validations, access settings, and the count of [metafields](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) using it. + """ + metafieldDefinition("The ID of the MetafieldDefinition to return." id: ID @deprecated(reason: "This field will be removed in a future version. Use the identifier input instead."), "The identifier of the MetafieldDefinition to return." identifier: MetafieldDefinitionIdentifierInput): MetafieldDefinition + + """ + The available metafield types that you can use when creating [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) objects. Each type specifies what kind of data it stores (such as boolean, color, date, or references), its category, and which validations it supports. + + For a list of supported types and their capabilities, refer to the [metafield types documentation](https://shopify.dev/docs/apps/metafields/types). + """ + metafieldDefinitionTypes: [MetafieldDefinitionType!]! + + """ + Returns a list of metafield definitions. + """ + metafieldDefinitions("Filter metafield definition by key." key: String, "Filter metafield definition by namespace." namespace: String, "Filter the metafield definition by the specific owner type." ownerType: MetafieldOwnerType!, "Filter the metafield definition by the pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "Filter metafield definitions based on whether they apply to a given resource subtype." constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier, "Filter metafield definitions based on whether they are constrained." constraintStatus: MetafieldDefinitionConstraintStatus, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! + + """ + Retrieves a single [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) by its global ID. [Metaobjects](https://shopify.dev/docs/apps/build/custom-data#what-are-metaobjects) store custom structured data based on defined schemas. The returned metaobject includes its fields with values, display name, handle, and associated metadata like update timestamps and capabilities. + """ + metaobject("The ID of the metaobject to return." id: ID!): Metaobject + + """ + Retrieves a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) by its handle and type. Handles are unique identifiers within a metaobject type. + """ + metaobjectByHandle("The identifier of the metaobject to return." handle: MetaobjectHandleInput!): Metaobject + + """ + Retrieves a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) by its global ID. Metaobject definitions provide the structure and fields for metaobjects. + + The definition includes field configurations, access settings, display preferences, and capabilities that determine how [metaobjects](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) of this type behave across the Shopify platform. + """ + metaobjectDefinition("The ID of the metaobject to return." id: ID!): MetaobjectDefinition + + """ + Retrieves a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) by its type. The type serves as a unique identifier that distinguishes one metaobject definition from another. + """ + metaobjectDefinitionByType("The type of the metaobject definition to return." type: String!): MetaobjectDefinition + + """ + Returns a paginated list of all [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) objects configured for the store. Metaobject definitions provide the schema for creating custom data structures composed of individual fields. Each definition specifies the field types, access permissions, and capabilities for [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) entries of that type. Use this query to discover available metaobject types before creating or querying metaobject entries. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetaobjectDefinitionConnection! + + """ + Returns a paginated list of [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) entries for a specific type. Metaobjects are custom data structures that extend Shopify's data model with merchant or app-specific data types. + + Filter results using the query parameter with a search syntax for metaobject fields. Use `fields.{key}:{value}` to filter by field values, supporting any field previously marked as filterable. The `sortKey` parameter accepts `id`, `type`, `updated_at`, or `display_name` to control result ordering. + + Learn more about [querying metaobjects by field value](https://shopify.dev/docs/apps/build/custom-data/metafields/query-by-metafield-value). + """ + metaobjects("The type of the metaobjects to query." type: String!, "The key of a field to sort with. Supports \"id\", \"type\", \"updated_at\", and \"display_name\"." sortKey: String, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| display_name | string |\n| fields.{key} | mixed | Filters metaobject entries by field value. Format: `fields.{key}:{value}`. Only fields marked as filterable in the metaobject definition can be used. Learn more about [querying metaobjects by field value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `fields.color:blue`
- `fields.on_sale:true` |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetaobjectConnection! + + """ + Return a mobile platform application by its ID. + """ + mobilePlatformApplication("ID of the mobile platform app." id: ID!): MobilePlatformApplication + + """ + List the mobile platform applications. + """ + mobilePlatformApplications("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MobilePlatformApplicationConnection! + + """ + Returns a specific node (any object that implements the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) by ID, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + This field is commonly used for refetching an object. + """ + node("The ID of the `Node` to return." id: ID!): Node + + """ + Returns the list of nodes (any objects that implement the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) with the given IDs, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + """ + nodes("The IDs of the Nodes to return." ids: [ID!]!): [Node]! + + """ + The shop's online store channel. + """ + onlineStore: OnlineStore! + + """ + The `order` query retrieves an [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/order) by its ID. This query provides access to comprehensive order information such as customer details, line items, financial data, and fulfillment status. + + Use the `order` query to retrieve information associated with the following processes: + + - [Order management and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + - [Financial reporting](https://help.shopify.com/manual/finance) + - [Customer purchase history](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports) and [transaction analysis](https://shopify.dev/docs/apps/launch/billing/view-charges-earnings#transaction-data-through-the-graphql-admin-api) + - [Shipping](https://shopify.dev/docs/apps/build/checkout/delivery-shipping) and [inventory management](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps) + + You can only retrieve the last 60 days worth of orders from a store by default. If you want to access older orders, then you need to [request access to all orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). + + For large order datasets, consider using [bulk operations](https://shopify.dev/docs/api/usage/bulk-operations/queries). + Bulk operations handle pagination automatically and allow you to retrieve data asynchronously without being constrained by API rate limits. + Learn more about [creating orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate) and [building order management apps](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + order("The ID of the `Order` to return." id: ID!): Order + + """ + Return an order by an identifier. + """ + orderByIdentifier("The identifier of the order." identifier: OrderIdentifierInput!): Order + + """ + Returns a `OrderEditSession` resource by ID. + """ + orderEditSession("The ID of the `OrderEditSession` to return." id: ID!): OrderEditSession + + """ + Retrieves the status of a deferred payment by its payment reference ID. Use this query to monitor the processing status of payments that are initiated through payment mutations. Deferred payments are called [payment terms](https://shopify.dev/docs/apps/build/checkout/payments/payment-terms) in the API. + + The query returns an [`OrderPaymentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderPaymentStatus) object that includes the current payment status, any error messages, and associated transactions. Poll this query to track [asynchronous payment processing](https://shopify.dev/docs/apps/build/payments/processing) after initiating a deferred payment. + """ + orderPaymentStatus("Unique identifier returned by orderCreatePayment." paymentReferenceId: String!, "ID of the order for which the payment was initiated." orderId: ID!): OrderPaymentStatus + + """ + Returns [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/objects/SavedSearch) for orders in the shop. Saved searches store search queries with their filters and search terms. + """ + orderSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Returns a list of [orders](https://shopify.dev/api/admin-graphql/latest/objects/Order) placed in the store, including data such as order status, customer, and line item details. + Use the `orders` query to build reports, analyze sales performance, or automate fulfillment workflows. The `orders` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql), + [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-query). + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = PROCESSED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| cart_token | string | Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. | | | - `cart_token:abc123` |\n| channel | string | Filter by the order attribution [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/OrderAttribution#field-OrderAttribution.fields.handle) (`Order.attribution.handle`) field. The legacy channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) (`ChannelInformation.channelDefinition.handle`) field is deprecated but remains supported during the deprecation period. | | | - `channel:web`
- `channel:web,pos` |\n| channel_id | id | Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) field. | | | - `channel_id:123` |\n| chargeback_status | string | Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. | - `accepted`
- `charge_refunded`
- `lost`
- `needs_response`
- `under_review`
- `won` | | - `chargeback_status:accepted` |\n| checkout_token | string | Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. | | | - `checkout_token:abc123` |\n| confirmation_number | string | Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. | | | - `confirmation_number:ABC123` |\n| created_at | time | Filter by the date and time when the order was created in Shopify's system. | | | - `created_at:2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| credit_card_last4 | string | Filter by the last four digits of the payment card that was used to pay for the order. This filter matches only the last four digits of the card for heightened security. | | | - `credit_card_last4:1234` |\n| current_total_price | float | Filter by the current total price of the order in the shop currency, including any returns/refunds/removals. This filter supports both exact values and ranges. | | | - `current_total_price:10`
- `current_total_price:>=5.00 current_total_price:<=20.99` |\n| customer_id | id | Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. | | | - `customer_id:123` |\n| delivery_method | string | Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) field. | - `shipping`
- `pick-up`
- `retail`
- `local`
- `pickup-point`
- `none` | | - `delivery_method:shipping` |\n| discount_code | string | Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. | | | - `discount_code:ABC123` |\n| email | string | Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. | | | - `email:example@shopify.com` |\n| financial_status | string | Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) field. | - `paid`
- `pending`
- `authorized`
- `partially_paid`
- `partially_refunded`
- `refunded`
- `voided`
- `expired` | | - `financial_status:authorized` |\n| fraud_protection_level | string | Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. | - `fully_protected`
- `partially_protected`
- `not_protected`
- `pending`
- `not_eligible`
- `not_available` | | - `fraud_protection_level:fully_protected` |\n| fulfillment_location_id | id | Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) (`Fulfillment.location.id`) field. | | | - `fulfillment_location_id:123` |\n| fulfillment_status | string | Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) field to prioritize shipments or monitor order processing. | - `unshipped`
- `shipped`
- `fulfilled`
- `partial`
- `scheduled`
- `on_hold`
- `unfulfilled`
- `request_declined` | | - `fulfillment_status:fulfilled` |\n| gateway | string | Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. | | | - `gateway:shopify_payments` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_id | id | Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) that's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under **Settings** > **Locations**. If no ID is provided, then the primary location of the shop is returned. | | | - `location_id:123` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) field. | | | - `name:1001-A` |\n| payment_id | string | Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. | | | - `payment_id:abc123` |\n| payment_provider_id | id | Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. | | | - `payment_provider_id:123` |\n| po_number | string | Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) field. | | | - `po_number:P01001` |\n| processed_at | time | Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) field. | | | - `processed_at:2021-01-01T00:00:00Z` |\n| reference_location_id | id | Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. | | | - `reference_location_id:123` |\n| return_status | string | Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) to monitor returns processing and track which orders have active returns. | - `return_requested`
- `in_progress`
- `inspection_complete`
- `returned`
- `return_failed`
- `no_return` | | - `return_status:in_progress` |\n| risk_level | string | Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. | - `high`
- `medium`
- `low`
- `none`
- `pending` | | - `risk_level:high` |\n| sales_channel | string | Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. | | | - `sales_channel: some_sales_channel` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:ABC123` |\n| source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - `source_identifier:1234-12-1000` |\n| source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - `source_name:web`
- `source_name:shopify_draft_order` |\n| status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - `open`
- `closed`
- `cancelled`
- `not_closed` | | - `status:open` |\n| subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - `subtotal_line_items_quantity:10`
- `subtotal_line_items_quantity:5..20` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| test | boolean | Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. | | | - `test:true` |\n| total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - `total_weight:10.5kg`
- `total_weight:>=5g total_weight:<=20g`
- `total_weight:.5 lb` |\n| updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - `updated_at:2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): OrderConnection! + + """ + Returns the number of [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) in the shop. You can filter orders using [search syntax](https://shopify.dev/docs/api/usage/search-syntax) or a [`SavedSearch`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SavedSearch), and set a maximum count limit to control query performance. + + Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/ordersCount#arguments-query) argument to filter the count by criteria like order status, financial state, or fulfillment status. The response includes both the count value and its precision, indicating whether the count is exact or an estimate. + + > Note: + > The count is limited to 10,000 orders by default. Use the [`limit`](https://shopify.dev/docs/api/admin-graphql/latest/queries/ordersCount#arguments-limit) argument to adjust this value, or pass `null` for no limit. Limited to a maximum of 10000 by default. + """ + ordersCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| cart_token | string | Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. | | | - `cart_token:abc123` |\n| channel | string | Filter by the order attribution [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/OrderAttribution#field-OrderAttribution.fields.handle) (`Order.attribution.handle`) field. The legacy channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) (`ChannelInformation.channelDefinition.handle`) field is deprecated but remains supported during the deprecation period. | | | - `channel:web`
- `channel:web,pos` |\n| channel_id | id | Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) field. | | | - `channel_id:123` |\n| chargeback_status | string | Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. | - `accepted`
- `charge_refunded`
- `lost`
- `needs_response`
- `under_review`
- `won` | | - `chargeback_status:accepted` |\n| checkout_token | string | Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. | | | - `checkout_token:abc123` |\n| confirmation_number | string | Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. | | | - `confirmation_number:ABC123` |\n| created_at | time | Filter by the date and time when the order was created in Shopify's system. | | | - `created_at:2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| credit_card_last4 | string | Filter by the last four digits of the payment card that was used to pay for the order. This filter matches only the last four digits of the card for heightened security. | | | - `credit_card_last4:1234` |\n| current_total_price | float | Filter by the current total price of the order in the shop currency, including any returns/refunds/removals. This filter supports both exact values and ranges. | | | - `current_total_price:10`
- `current_total_price:>=5.00 current_total_price:<=20.99` |\n| customer_id | id | Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. | | | - `customer_id:123` |\n| delivery_method | string | Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) field. | - `shipping`
- `pick-up`
- `retail`
- `local`
- `pickup-point`
- `none` | | - `delivery_method:shipping` |\n| discount_code | string | Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. | | | - `discount_code:ABC123` |\n| email | string | Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. | | | - `email:example@shopify.com` |\n| financial_status | string | Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) field. | - `paid`
- `pending`
- `authorized`
- `partially_paid`
- `partially_refunded`
- `refunded`
- `voided`
- `expired` | | - `financial_status:authorized` |\n| fraud_protection_level | string | Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. | - `fully_protected`
- `partially_protected`
- `not_protected`
- `pending`
- `not_eligible`
- `not_available` | | - `fraud_protection_level:fully_protected` |\n| fulfillment_location_id | id | Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) (`Fulfillment.location.id`) field. | | | - `fulfillment_location_id:123` |\n| fulfillment_status | string | Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) field to prioritize shipments or monitor order processing. | - `unshipped`
- `shipped`
- `fulfilled`
- `partial`
- `scheduled`
- `on_hold`
- `unfulfilled`
- `request_declined` | | - `fulfillment_status:fulfilled` |\n| gateway | string | Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. | | | - `gateway:shopify_payments` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_id | id | Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) that's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under **Settings** > **Locations**. If no ID is provided, then the primary location of the shop is returned. | | | - `location_id:123` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) field. | | | - `name:1001-A` |\n| payment_id | string | Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. | | | - `payment_id:abc123` |\n| payment_provider_id | id | Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. | | | - `payment_provider_id:123` |\n| po_number | string | Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) field. | | | - `po_number:P01001` |\n| processed_at | time | Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) field. | | | - `processed_at:2021-01-01T00:00:00Z` |\n| reference_location_id | id | Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. | | | - `reference_location_id:123` |\n| return_status | string | Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) to monitor returns processing and track which orders have active returns. | - `return_requested`
- `in_progress`
- `inspection_complete`
- `returned`
- `return_failed`
- `no_return` | | - `return_status:in_progress` |\n| risk_level | string | Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. | - `high`
- `medium`
- `low`
- `none`
- `pending` | | - `risk_level:high` |\n| sales_channel | string | Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. | | | - `sales_channel: some_sales_channel` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:ABC123` |\n| source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - `source_identifier:1234-12-1000` |\n| source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - `source_name:web`
- `source_name:shopify_draft_order` |\n| status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - `open`
- `closed`
- `cancelled`
- `not_closed` | | - `status:open` |\n| subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - `subtotal_line_items_quantity:10`
- `subtotal_line_items_quantity:5..20` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| test | boolean | Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. | | | - `test:true` |\n| total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - `total_weight:10.5kg`
- `total_weight:>=5g total_weight:<=20g`
- `total_weight:.5 lb` |\n| updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - `updated_at:2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `Page` resource by ID. + """ + page("The ID of the `Page` to return." id: ID!): Page + + """ + A paginated list of pages from the online store. [`Page`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page) objects are content pages that merchants create to provide information to customers, such as "About Us", "Contact", or policy pages. + + The query supports filtering with a [search query](https://shopify.dev/docs/api/usage/search-syntax) and sorting by various criteria. Advanced filtering is available through saved searches using the [`savedSearchId`](https://shopify.dev/docs/api/admin-graphql/latest/queries/pages#arguments-savedSearchId) argument. + """ + pages("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: PageSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the page was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| handle | string | Filter by the handle of the page. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| published_at | time | Filter by the date and time when the page was published. | | | - `published_at:>'2020-10-21T23:39:20Z'`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter by published status |\n| title | string | Filter by the title of the page. |\n| updated_at | time | Filter by the date and time when the page was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): PageConnection! + + """ + Count of pages. Limited to a maximum of 10000 by default. + """ + pagesCount("The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The payment customization. + """ + paymentCustomization("The ID of the payment customization." id: ID!): PaymentCustomization + + """ + The payment customizations. + """ + paymentCustomizations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| enabled | boolean |\n| function_id | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): PaymentCustomizationConnection! + + """ + The list of payment terms templates eligible for all shops and users. + """ + paymentTermsTemplates("The payment terms type to filter the payment terms templates list." paymentTermsType: PaymentTermsType): [PaymentTermsTemplate!]! + + """ + The number of pendings orders. Limited to a maximum of 10000. + """ + pendingOrdersCount: Count + + """ + Returns a `PointOfSaleDevice` resource by ID. + """ + pointOfSaleDevice("The ID of the `PointOfSaleDevice` to return." id: ID!): PointOfSaleDevice + + """ + Returns a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) by ID. You can use price lists to specify either fixed prices or adjusted relative prices that override initial [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) prices. + + Price lists enable contextual pricing for the [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) they are associated to. Each price list can define fixed prices for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects or percentage-based adjustments relative to other prices. + """ + priceList("The ID of the `PriceList` to return." id: ID!): PriceList + + """ + All price lists for a shop. + """ + priceLists("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: PriceListSortKeys = ID): PriceListConnection! + + """ + The primary market of the shop. + """ + primaryMarket: Market! @deprecated(reason: "Use `backupRegion` instead.") + + """ + Privacy related settings for a shop. + """ + privacySettings: PrivacySettings! + + """ + Retrieves a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) by its ID. + A product is an item that a merchant can sell in their store. + + Use the `product` query when you need to: + + - Access essential product data (for example, title, description, price, images, SEO metadata, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants and product options. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + product("The ID of the `Product` to return." id: ID!): Product + + """ + Retrieves a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) using its handle. A handle is a unique, URL-friendly string that Shopify automatically generates from the product's title. + + Returns `null` if no product exists with the specified handle. + """ + productByHandle("A unique string that identifies the product. Handles are automatically generated based on the product's title, and are always lowercase. Whitespace and special characters are replaced with a hyphen: `-`. If there are multiple consecutive whitespace or special characters, then they're replaced with a single hyphen. Whitespace or special characters at the beginning are removed. If a duplicate product title is used, then the handle is auto-incremented by one. For example, if you had two products called `Potion`, then their handles would be `potion` and `potion-1`. After a product has been created, changing the product title doesn't update the handle." handle: String!): Product @deprecated(reason: "Use `productByIdentifier` instead.") + + """ + Return a product by an identifier. + """ + productByIdentifier("The identifier of the product." identifier: ProductIdentifierInput!): Product + + """ + Returns the product duplicate job. + """ + productDuplicateJob("An ID of a product duplicate job to fetch." id: ID!): ProductDuplicateJob! + + """ + Returns a ProductFeed resource by ID. + """ + productFeed("The ID of the ProductFeed to return." id: ID!): ProductFeed + + """ + The product feeds for the shop. + """ + productFeeds("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductFeedConnection! + + """ + Returns a ProductOperation resource by ID. + + This can be used to query the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), using + the ID that was returned + [when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously) + by the + [ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + + The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + + The `product` field provides the details of the created or updated product. + + For the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), the + `userErrors` field provides mutation errors that occurred during the operation. + """ + productOperation("The ID of the `ProductOperation` to return." id: ID!): ProductOperation + + """ + Retrieves product resource feedback for the currently authenticated app, providing insights into product data quality, completeness, and optimization opportunities. This feedback helps apps guide merchants toward better product listings and improved store performance. + + For example, an SEO app might receive feedback indicating that certain products lack meta descriptions or have suboptimal titles, enabling the app to provide specific recommendations for improving search visibility and conversion rates. + + Use `ProductResourceFeedback` to: + - Display product optimization recommendations to merchants + - Identify data quality issues across product catalogs + - Build product improvement workflows and guided experiences + - Track progress on product listing completeness and quality + - Implement automated product auditing and scoring systems + - Generate reports on catalog health and optimization opportunities + - Provide contextual suggestions within product editing interfaces + + The feedback system evaluates products against various criteria including SEO best practices, required fields, media quality, and sales channel requirements. Each feedback item includes specific details about the issue, suggested improvements, and priority levels. + + Feedback is app-specific and reflects the particular focus of your application - marketing apps receive different insights than inventory management apps. The system continuously updates as merchants make changes, providing real-time guidance for product optimization. + + This resource is particularly valuable for apps that help merchants improve their product listings, optimize for search engines, or enhance their overall catalog quality. The feedback enables proactive suggestions rather than reactive problem-solving. + + Learn more about [product optimization](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + """ + productResourceFeedback("The product associated with the resource feedback." id: ID!): ProductResourceFeedback + + """ + Returns a list of the shop's product saved searches. + """ + productSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + Returns tags added to [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects in the shop. Provides a paginated list of tag strings. + + The maximum page size is 5000 tags per request. Tags are returned as simple strings through a [`StringConnection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StringConnection). + The maximum page size is 5000. + """ + productTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StringConnection + + """ + Returns a paginated list of product types assigned to [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in the store. The maximum page size is 1000. + The maximum page size is 1000. + """ + productTypes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StringConnection + + """ + Retrieves a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) by its ID. + + A product variant is a specific version of a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariant` query when you need to: + + - Access essential product variant data (for example, title, price, image, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants that are part of a bundle or selling plan. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariant("The ID of the `ProductVariant` to return." id: ID!): ProductVariant + + """ + Return a product variant by an identifier. + """ + productVariantByIdentifier("The identifier of the product variant." identifier: ProductVariantIdentifierInput!): ProductVariant + + """ + Retrieves a list of [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + associated with a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + + A product variant is a specific version of a product that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariants` query when you need to: + + - Search for product variants by attributes such as SKU, barcode, or inventory quantity. + - Filter product variants by attributes, such as whether they're gift cards or have custom metafields. + - Fetch product variants for bulk operations, such as updating prices or inventory. + - Preload data for product variants, such as inventory items, selected options, or associated products. + + The `productVariants` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + to handle large product catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/productVariants#arguments-savedSearchId) + for frequently used product variant queries. + + The `productVariants` query returns product variants with their associated metadata, including: + + - Basic product variant information (for example, title, SKU, barcode, price, and inventory) + - Media attachments (for example, images and videos) + - Associated products, selling plans, bundles, and metafields + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductVariantSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-123` |\n| collection | string | Filter by the [ID of the collection](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) that the product variant belongs to. | | | - `collection:465903092033` |\n| delivery_profile_id | id | Filter by the product variant [delivery profile ID](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-deliveryprofile) (`ProductVariant.deliveryProfile.id`). | | | - `delivery_profile_id:108179161409` |\n| exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` |\n| exclude_variants_with_components | boolean | Filter by whether there are [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) that are associated with the product variants in a bundle. | | | - `exclude_variants_with_components:true` |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_quantity | integer | Filter by an aggregate of inventory across all locations where the product variant is stocked. | | | - `inventory_quantity:10` |\n| location_id | id | Filter by the [location ID](https://shopify.dev/api/admin-graphql/latest/objects/Location#field-id) for the product variant. | | | - `location_id:88511152449` |\n| managed | boolean | Filter by whether there is fulfillment service tracking associated with the product variants. | | | - `managed:true` |\n| managed_by | string | Filter by the fulfillment service that tracks the number of items in stock for the product variant. | | | - `managed_by:shopify` |\n| option1 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option1:small` |\n| option2 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option2:medium` |\n| option3 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option3:large` |\n| product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) field. | | | - `product_id:8474977763649` |\n| product_ids | string | Filter by a comma-separated list of product [IDs](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id). | | | - `product_ids:8474977763649,8474977796417` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_status | string | Filter by a comma-separated list of product [statuses](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-status). | | | - `product_status:ACTIVE,DRAFT` |\n| product_type | string | Filter by the product type that's associated with the product variants. | | | - `product_type:snowboard`
- `product_type:snowboard,skis`
- `product_type:snowboard OR product_type:skis` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| requires_components | boolean | Filter by whether the product variant can only be purchased with components. [Learn more](https://shopify.dev/apps/build/product-merchandising/bundles#store-eligibility). | | | - `requires_components:true` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) field. | | | - `taxable:false` |\n| title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `title:ice` |\n| updated_at | time | Filter by date and time when the product variant was updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\n| vendor | string | Filter by the origin or source of the product variant. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil,Icedevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ProductVariantConnection! + + """ + Count of product variants. Limited to a maximum of 10000 by default. + """ + productVariantsCount("No supported search fields." query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The list of vendors added to products. + The maximum page size is 1000. + """ + productVendors("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StringConnection + + """ + Retrieves a list of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + in a store. Products are the items that merchants can sell in their store. + + Use the `products` query when you need to: + + - Build a browsing interface for a product catalog. + - Create product [searching](https://shopify.dev/docs/api/usage/search-syntax), [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-query) experiences. + - Implement product recommendations. + - Sync product data with external systems. + + The `products` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + to handle large product catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-savedSearchId) + for frequently used product queries. + + The `products` query returns products with their associated metadata, including: + + - Basic product information (for example, title, description, vendor, and type) + - Product options and product variants, with their prices and inventory + - Media attachments (for example, images and videos) + - SEO metadata + - Product categories and tags + - Product availability and publishing statuses + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ProductConnection! + + """ + Count of products. Limited to a maximum of 10000 by default. + """ + productsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + The list of publicly-accessible Admin API versions, including supported versions, the release candidate, and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """ + Retrieves a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) by [`ID`](https://shopify.dev/docs/api/usage/gids). + + Returns `null` if the publication doesn't exist. + """ + publication("The ID of the Publication to return." id: ID!): Publication + + """ + Returns a paginated list of [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + Filter publications by [`CatalogType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/CatalogType). + """ + publications("Filter publications by catalog type." catalogType: CatalogType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): PublicationConnection! + + """ + Count of publications. Limited to a maximum of 10000 by default. + """ + publicationsCount("Filter publications by catalog type." catalogType: CatalogType, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. + """ + publishedProductsCount("The ID of the publication that the products are published to." publicationId: ID!, "The maximum number of products to count." limit: Int = 10000): Count + + """ + Retrieves a [refund](https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund) by its ID. + A refund represents a financial record of money returned to a customer from an order. + It provides a comprehensive view of all refunded amounts, transactions, and restocking + instructions associated with returning products or correcting order issues. + + Use the `refund` query to retrieve information associated with the following workflows: + + - Displaying refund details in order management interfaces + - Building customer service tools for reviewing refund history + - Creating reports on refunded amounts and reasons + - Auditing refund transactions and payment gateway records + - Tracking inventory impacts from refunded items + + A refund is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and includes [refund line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem) + that specify which items were refunded. Each refund processes through + [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) + that handle the actual money transfer back to the customer. + """ + refund("The ID of the Refund to return." id: ID!): Refund + + """ + Retrieves a return by its ID. A return represents the intent of a buyer to ship one or more items from an + order back to a merchant or a third-party fulfillment location. + + Use the `return` query to retrieve information associated with the following workflows: + + - [Managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + - [Processing exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges) + - [Tracking reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders) + + A return is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). + Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), + which indicates the state of the return. + """ + return("The [globally-unique ID](https://shopify.dev/docs/api/usage/gids)\nof the return to retrieve." id: ID!): Return + + """ + Calculates the financial outcome of a [`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) without creating it. Use this query to preview return costs before initiating the actual return process. + + The calculation provides detailed breakdowns of refund amounts, taxes, [`RestockingFee`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RestockingFee) charges, return shipping fees, and order-level discount adjustments based on the [`FulfillmentLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentLineItem) objects that customers select for return. + + Learn more about building for [return management](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnCalculate("The input fields for calculating a return." input: CalculateReturnInput!): CalculatedReturn + + """ + Returns the full library of available return reason definitions. + + Use this query to retrieve the standardized return reasons available for creating returns. + Filter by IDs or handles to get specific definitions. + + Only non-deleted reasons should be shown to customers when creating new returns. + Deleted reasons have been replaced with better alternatives and are no longer recommended. + However, they remain valid options and may still appear on existing returns. + """ + returnReasonDefinitions("A list of return reason definition IDs to filter by." ids: [ID!], "A list of return reason definition handles to filter by." handles: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ReturnReasonDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| deleted | boolean | Filter by whether the return reason has been removed from taxonomy. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| name | string | Filter by name. |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ReturnReasonDefinitionConnection! + + """ + Returns a `ReturnableFulfillment` resource by ID. + """ + returnableFulfillment("The ID of the `ReturnableFulfillment` to return." id: ID!): ReturnableFulfillment + + """ + List of returnable fulfillments. + """ + returnableFulfillments("Order ID that will scope all returnable fulfillments." orderId: ID!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReturnableFulfillmentConnection! + + """ + Lookup a reverse delivery by ID. + """ + reverseDelivery("The ID of the ReverseDelivery to return." id: ID!): ReverseDelivery + + """ + Lookup a reverse fulfillment order by ID. + """ + reverseFulfillmentOrder("The ID of the reverse fulfillment order to return." id: ID!): ReverseFulfillmentOrder + + """ +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + + Returns a `ScriptTag` resource by ID. + """ + scriptTag("The ID of the `ScriptTag` to return." id: ID!): ScriptTag + + """ +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + + A list of script tags. + """ + scriptTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| src | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The source URL of the script tag to filter by." src: URL): ScriptTagConnection! + + """ + Retrieves a customer [`Segment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment) by ID. Segments are dynamic groups of customers that meet specific criteria defined through [ShopifyQL queries](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference). + + Use segments for targeted marketing campaigns, analyzing customer behavior, or creating personalized experiences. Each segment includes its name, creation date, and the query that defines which [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) objects belong to it. + """ + segment("Find a segment by ID." id: ID!): Segment + + """ + A list of filter suggestions associated with a segment. A segment is a group of members (commonly customers) that meet specific criteria. + """ + segmentFilterSuggestions("Returns the elements of a list by keyword or term." search: String!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String): SegmentFilterConnection! + + """ + A list of filters. + """ + segmentFilters("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): SegmentFilterConnection! + + """ + A list of a shop's segment migrations. + """ + segmentMigrations("Search a segment migration by its saved search ID." savedSearchId: ID, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): SegmentMigrationConnection! @deprecated(reason: "Use the migrated segment ID and query `segment` directly.") + + """ + The list of suggested values corresponding to a particular filter for a segment. A segment is a group of members, such as customers, that meet specific criteria. + """ + segmentValueSuggestions("Returns the elements of a list by keyword or term." search: String!, "Returns the elements of a list by filter handle." filterQueryName: String, "Returns the elements of a list by filter parameter name." functionParameterQueryName: String, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): SegmentValueConnection! + + """ + Returns a paginated list of [`Segment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment) objects for the shop. Segments are dynamic groups of customers that meet specific criteria defined through [ShopifyQL queries](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference). You can filter segments by search query and sort them by creation date or other criteria. + + The query supports standard [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) arguments and returns a [`SegmentConnection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SegmentConnection) containing segment details including names, creation dates, and the query definitions that determine segment membership. + """ + segments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: SegmentSortKeys = CREATION_DATE, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| name | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SegmentConnection! + + """ + The number of segments for a shop. Limited to a maximum of 10000 by default. + """ + segmentsCount("The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Returns a `SellingPlanGroup` resource by ID. + """ + sellingPlanGroup("The ID of the `SellingPlanGroup` to return." id: ID!): SellingPlanGroup + + """ + Retrieves a paginated list of [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) objects that belong to the app making the API call. Selling plan groups are selling methods like subscriptions, preorders, or other purchase options that merchants offer to customers. + + Each group has one or more [`SellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan) objects that define specific billing and delivery schedules, pricing adjustments, and policies. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/sellingPlanGroups#arguments-query) argument to search by name or filter results by other criteria. + + Learn more about [building selling plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + """ + sellingPlanGroups("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SellingPlanGroupSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| app_id | id | | - `CURRENT`
- `ALL`
- `* (numeric app ID)` | `CURRENT` |\n| category | string | A comma-separated list of categories. | - `SUBSCRIPTION`
- `PRE_ORDER`
- `TRY_BEFORE_YOU_BUY`
- `OTHER` |\n| created_at | time |\n| delivery_frequency | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| name | string |\n| percentage_off | float |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SellingPlanGroupConnection! + + """ + The server pixel configured by the app. + """ + serverPixel: ServerPixel + + """ + Returns the Shop resource corresponding to the access token used in the request. The Shop resource contains + business and store management settings for the shop. + """ + shop: Shop! + + """ + The shop's billing preferences, including the currency for paying for apps and services. Use this to create [app charges in the merchant's local billing currency](https://shopify.dev/docs/apps/launch/billing#supported-currencies), helping them budget their app spend without exposure to exchange rate fluctuations. + """ + shopBillingPreferences: ShopBillingPreferences! + + """ + Returns the locales enabled on a shop. Each locale represents a language for translations and determines how content displays to customers in different markets. + + Use the optional `published` argument to filter for only the locales that are visible to customers. The response includes the ISO locale code, whether it's the shop's primary locale, and which [`MarketWebPresence`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketWebPresence) objects use each locale. + """ + shopLocales("Return only published locales." published: Boolean = false): [ShopLocale!]! + + """ + Returns a single Shop Pay payment request receipt by its ID. Payment request receipts document completed Shop Pay transactions, including the amount, customer details, and payment status. Use this to look up a specific Shop Pay transaction for order reconciliation or customer support. + """ + shopPayPaymentRequestReceipt("Unique identifier of the payment request receipt." token: String!): ShopPayPaymentRequestReceipt + + """ + Returns a paginated list of Shop Pay payment request receipts for the shop. Each receipt documents a completed Shop Pay transaction. Use this to review Shop Pay transaction history, generate reports, or audit Shop Pay payment activity. + """ + shopPayPaymentRequestReceipts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ShopPayPaymentRequestReceiptsSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time | Filter by the creation date of the payment request receipt. | | | - `created_at:2021-01-01`
- `created_at:2021-01-01..2021-01-02`
- `created_at: - `created_at:<2024-01-01` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| source_identifier | string | Filter by the source identifier of the payment request receipt. | | | - `source_identifier:1282823` |\n| state | string | Filter by the state of the payment request receipt. Options include: - COMPLETED - FAILED - PENDING - PROCESSING | | | - `state:COMPLETED` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ShopPayPaymentRequestReceiptConnection + + """ + Returns a Shopify Function by its ID. + [Functions](https://shopify.dev/apps/build/functions) + enable you to customize Shopify's backend logic at defined parts of the commerce loop. + """ + shopifyFunction("The ID of the Shopify Function." id: String!): ShopifyFunction + + """ + Returns Shopify Functions owned by the querying API client installed on the shop. [Functions](https://shopify.dev/docs/apps/build/functions) enable you to customize + Shopify's backend logic at specific points in the commerce loop, such as discounts, + checkout validation, and fulfillment. + + You can filter the results by API type to find specific function implementations, + or by whether they provide a merchant configuration interface in the Shopify Admin. + + The response includes details about each function's configuration, including its + title, description, API version, and the input query used to provide data to the function logic. + + Learn more about [building functions](https://shopify.dev/docs/api/functions). + """ + shopifyFunctions("Filter the functions by the API type." apiType: String, "Filter the functions by whether or not the function uses the creation UI in the Admin." useCreationUi: Boolean, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ShopifyFunctionConnection! + + """ + Returns the Shopify Payments account information for the shop. Includes current balances across all currencies, payout schedules, and bank account configurations. + + The account includes [`ShopifyPaymentsBalanceTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction) records showing charges, refunds, and adjustments that affect your balance. Also includes [`ShopifyPaymentsDispute`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsDispute) records and [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) history between the account and connected [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount) configurations. + """ + shopifyPaymentsAccount: ShopifyPaymentsAccount + + """ + Executes a [ShopifyQL query](https://shopify.dev/docs/apps/build/shopifyql) to analyze store data and returns results in a tabular format. + + The response includes column metadata with names, data types, and display names, along with the actual data rows. If the query contains syntax errors, then the response provides parse error messages instead of table data. + + Read the [ShopifyQL reference documentation](https://shopify.dev/docs/api/shopifyql) for more information on how to write ShopifyQL queries. + """ + shopifyqlQuery("A ShopifyQL query string following the [ShopifyQL syntax](https://shopify.dev/docs/api/shopifyql). Queries must include `FROM` to specify the data source (such as `sales`, `orders`, or `customers`) and `SHOW` to select metrics and dimensions. Example: `FROM sales SHOW total_sales TIMESERIES month SINCE -12m`." query: String!): ShopifyqlQueryResponse + + """ + Retrieves a [staff member](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) by ID. If no ID is provided, the query returns the staff member that's making the request. A staff member is a user who can access the Shopify admin to manage store operations. + + Provides staff member details such as email, name, and shop owner status. When querying the current user (with or without an ID), additional [private data](https://shopify.dev/docs/api/admin-graphql/latest/queries/staffMember#returns-StaffMember.fields.privateData) becomes available. + """ + staffMember("The ID of the staff member to return. If no ID is provided, then the staff member making the query (if any) is returned." id: ID): StaffMember + + """ + Returns a paginated list of [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) objects for the shop. Staff members are users who can access the Shopify admin to manage store operations. + + Supports filtering by account type, email, and name, with an option to sort results. The query returns a [`StaffMemberConnection`](https://shopify.dev/docs/api/admin-graphql/latest/connections/StaffMemberConnection) for [cursor-based pagination](https://shopify.dev/docs/api/usage/pagination-graphql). + """ + staffMembers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: StaffMembersSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| account_type | string | Filter by account type. | - `collaborator`
- `collaborator_team_member`
- `invited`
- `regular`
- `requested`
- `restricted`
- `saml` |\n| email | string | Filter by email. |\n| first_name | string | Filter by first name. |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| last_name | string | Filter by last name. |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): StaffMemberConnection + + """ + Retrieves preset metafield definition templates for common use cases. Each template provides a reserved namespace and key combination for specific purposes like product subtitles, care guides, or ISBN numbers. Use these templates to create standardized metafields across your store. Filter templates by constraint status or exclude those you've already activated. + + See the [list of standard metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/list-of-standard-definitions) for available templates. + """ + standardMetafieldDefinitionTemplates("Filter standard metafield definitions based on whether they apply to a given resource subtype." constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier, "Filter standard metafield definitions based on whether they are constrained." constraintStatus: MetafieldDefinitionConstraintStatus, "Filter standard metafield definitions that have already been activated." excludeActivated: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StandardMetafieldDefinitionTemplateConnection! + + """ + Retrieves a [`StoreCreditAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccount) by ID. Store credit accounts hold monetary balances that account owners can use at checkout. The owner is either a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) or a [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation). + """ + storeCreditAccount("The ID of the store credit account to return." id: ID!): StoreCreditAccount + + """ + Returns a `SubscriptionBillingAttempt` resource by ID. + """ + subscriptionBillingAttempt("The ID of the `SubscriptionBillingAttempt` to return." id: ID!): SubscriptionBillingAttempt + + """ + Returns subscription billing attempts on a store. + """ + subscriptionBillingAttempts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SubscriptionBillingAttemptsSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| error_code | string |\n| error_message | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SubscriptionBillingAttemptConnection! + + """ + Returns a subscription billing cycle found either by cycle index or date. + """ + subscriptionBillingCycle("Input object used to select and use billing cycles." billingCycleInput: SubscriptionBillingCycleInput!): SubscriptionBillingCycle + + """ + Retrieves the results of the asynchronous job for the subscription billing cycle bulk action based on the specified job ID. + This query can be used to obtain the billing cycles that match the criteria defined in the subscriptionBillingCycleBulkSearch and subscriptionBillingCycleBulkCharge mutations. + """ + subscriptionBillingCycleBulkResults("The ID of the billing cycle bulk operation job." jobId: ID!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionBillingCycleConnection! + + """ + Returns subscription billing cycles for a contract ID. + """ + subscriptionBillingCycles("The ID of the subscription contract to retrieve billing cycles for." contractId: ID!, "Select subscription billing cycles within a date range." billingCyclesDateRangeSelector: SubscriptionBillingCyclesDateRangeSelector, "Select subscription billing cycles within an index range." billingCyclesIndexRangeSelector: SubscriptionBillingCyclesIndexRangeSelector, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX): SubscriptionBillingCycleConnection! + + """ + Retrieves a [`SubscriptionContract`](https://shopify.dev/docs/api/customer/latest/objects/SubscriptionContract) by ID. + + The contract tracks the subscription's lifecycle through various [statuses](https://shopify.dev/docs/api/admin-graphql/latest/queries/subscriptionContract#returns-SubscriptionContract.fields.status), and links to related billing attempts, generated [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) objects, and the customer's [`CustomerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod). + """ + subscriptionContract("The ID of the Subscription Contract to return." id: ID!): SubscriptionContract + + """ + Returns a [`SubscriptionContractConnection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContractConnection) containing [subscription contracts](https://shopify.dev/docs/api/customer/latest/objects/SubscriptionContract). Subscription contracts are agreements between [customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) and merchants for recurring purchases with defined billing and delivery schedules. + + Filter results with the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/subscriptionContracts#arguments-query) argument. You can paginate results using standard [cursor-based pagination](https://shopify.dev/docs/api/usage/pagination-graphql). + """ + subscriptionContracts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SubscriptionContractsSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| customer_id | id | Filter subscription contracts by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. | | | - `customer_id:123` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| last_billing_attempt_error_type | string |\n| product_id | id | Filter subscription contracts by the [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.id) of any product on the contract's lines. | | | - `product_id:123` |\n| product_variant_id | id | Filter subscription contracts by the [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.id) of any product variant on the contract's lines. | | | - `product_variant_id:123` |\n| status | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): SubscriptionContractConnection! + + """ + Returns a Subscription Draft resource by ID. + """ + subscriptionDraft("The ID of the Subscription Draft to return." id: ID!): SubscriptionDraft + + """ + Access to Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) for categorizing products. The [`Taxonomy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Taxonomy) organizes products into a hierarchical tree structure with categories, attributes, and values. + + Query categories using search terms, or navigate the hierarchy by requesting children, siblings, or descendants of specific categories. Each [`TaxonomyCategory`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyCategory) includes its position in the tree, parent-child relationships, and associated attributes for that product category. + """ + taxonomy: Taxonomy + + """ + Transactions representing a movement of money between customers and the shop. Each transaction records the amount, payment method, processing details, and the associated [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + Positive amounts indicate customer payments to the merchant. Negative amounts represent refunds from the merchant to the customer. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/tenderTransactions#arguments-query) parameter to filter transactions by attributes such as transaction ID, processing date, and point-of-sale device ID. + """ + tenderTransactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| point_of_sale_device_id | id |\n| processed_at | time |\n| test | boolean |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): TenderTransactionConnection! + + """ + Returns an [`OnlineStoreTheme`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme) by its ID. Use this query to retrieve theme metadata and access the theme's [`files`](https://shopify.dev/docs/api/admin-graphql/latest/queries/theme#returns-OnlineStoreTheme.fields.files), which include templates, assets, [translations](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme#field-published_translations), and configuration files. + """ + theme("The ID of the theme." id: ID!): OnlineStoreTheme + + """ + Returns a paginated list of [`OnlineStoreTheme`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme) objects for the online store. Themes control the appearance and layout of the storefront. + + You can filter themes by [`role`](https://shopify.dev/docs/api/admin-graphql/latest/queries/themes#arguments-roles) to find specific theme types, such as `MAIN` for the published theme and `UNPUBLISHED` for draft themes. + """ + themes("The theme roles to filter by." roles: [ThemeRole!], "The theme names to filter by. Use '*' to match zero or more characters." names: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OnlineStoreThemeConnection + + """ + Retrieves a resource that has translatable fields. Returns the resource's [`Translation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Translation) objects for different locales and markets, along with the original [`TranslatableContent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableContent) and digest values needed to register new translations. Provides access to existing translations, translatable content with digest hashes for translation registration, and nested translatable resources like [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects or [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translatableResource("Find a translatable resource by ID." resourceId: ID!): TranslatableResource + + """ + Returns a paginated list of [`TranslatableResource`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableResource) objects for a specific resource type. Each resource provides translatable content and digest values needed for the [`translationsRegister`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/translationsRegister) mutation. + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translatableResources("Return only resources of a type." resourceType: TranslatableResourceType!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): TranslatableResourceConnection! + + """ + Returns a paginated list of [`TranslatableResource`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableResource) objects for the specified resource IDs. Each resource provides translatable content and digest values needed for the [`translationsRegister`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/translationsRegister) mutation. + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translatableResourcesByIds("Return only resources for given IDs." resourceIds: [ID!]!, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): TranslatableResourceConnection! + + """ + Returns a `UrlRedirect` resource by ID. + """ + urlRedirect("The ID of the `UrlRedirect` to return." id: ID!): UrlRedirect + + """ + Returns a `UrlRedirectImport` resource by ID. + """ + urlRedirectImport("The ID of the `UrlRedirectImport` to return." id: ID!): UrlRedirectImport + + """ + A list of the shop's URL redirect saved searches. + """ + urlRedirectSavedSearches("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SavedSearchConnection! + + """ + A list of redirects for a shop. + """ + urlRedirects("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: UrlRedirectSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| path | string |\n| target | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): UrlRedirectConnection! + + """ + Count of redirects. Limited to a maximum of 10000 by default. + """ + urlRedirectsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| path | string |\n| target | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of an existing saved search.\nThe search’s query string is used as the query argument.\nRefer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object." savedSearchId: ID, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count + + """ + Validation available on the shop. + """ + validation("The ID of the validation." id: ID!): Validation + + """ + Validations available on the shop. + """ + validations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ValidationSortKeys = ID): ValidationConnection! + + """ + Returns a + [web pixel](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by ID. + """ + webPixel("The ID of the `WebPixel` object to return." id: ID): WebPixel + + """ + The web presences for the shop. + """ + webPresences("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketWebPresenceConnection + + """ + Returns a webhook subscription by ID. + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscription("The ID of the `WebhookSubscription` to return." id: ID!): WebhookSubscription + + """ + Retrieves a paginated list of webhook subscriptions created using the API for the current app and shop. + + > Note: Returns only shop-scoped subscriptions, not app-scoped subscriptions configured in TOML files. + + Subscription details include event topics, endpoint URIs, filtering rules, field inclusion settings, and metafield namespace permissions. Results support cursor-based pagination that you can filter by topic, format, or custom search criteria. + + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: WebhookSubscriptionSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "Callback URL to filter by." callbackUrl: URL @deprecated(reason: "Use `uri` instead."), "URI to filter by. Supports an HTTPS URL, a Google Pub/Sub URI (pubsub://{project-id}:{topic-id}) or an Amazon EventBridge event source ARN." uri: String, "Response format to filter by." format: WebhookSubscriptionFormat, "List of webhook subscription topics to filter by." topics: [WebhookSubscriptionTopic!]): WebhookSubscriptionConnection! + + """ + The count of webhook subscriptions. + + Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your `shopify.app.toml` may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read [About managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). Limited to a maximum of 10000 by default. + """ + webhookSubscriptionsCount("A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| endpoint | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| topic | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The upper bound on count value before returning a result. Use `null` to have no limit." limit: Int = 10000): Count +} + +""" +The `Refund` object represents a financial record of money returned to a customer from an order. +It provides a comprehensive view of all refunded amounts, transactions, and restocking instructions +associated with returning products or correcting order issues. + +The `Refund` object provides information to: + +- Process customer returns and issue payments back to customers +- Handle partial or full refunds for line items with optional inventory restocking +- Refund shipping costs, duties, and additional fees +- Issue store credit refunds as an alternative to original payment method returns +- Track and reconcile all financial transactions related to refunds + +Each `Refund` object maintains detailed records of what was refunded, how much was refunded, +which payment transactions were involved, and any inventory restocking that occurred. The refund +can include multiple components such as product line items, shipping charges, taxes, duties, and +additional fees, all calculated with proper currency handling for international orders. + +Refunds are always associated with an [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +and can optionally be linked to a [return](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) +if the refund was initiated through the returns process. The refund tracks both the presentment currency +(what the customer sees) and the shop currency for accurate financial reporting. + +> Note: +> The existence of a `Refund` object doesn't guarantee that the money has been returned to the customer. +> The actual financial processing happens through associated +> [`OrderTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) +> objects, which can be in various states, such as pending, processing, success, or failure. +> To determine if money has actually been refunded, check the +> [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.status) +> of the associated transactions. + +Learn more about +[managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management), +[refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties), and +[processing refunds](https://shopify.dev/docs/api/admin-graphql/latest/mutations/refundCreate). +""" +type Refund implements LegacyInteroperability & Node { + """ + The date and time when the refund was created. + """ + createdAt: DateTime + + """ + A list of the refunded duties as part of this refund. + """ + duties: [RefundDuty!] + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The optional note associated with the refund. + """ + note: String + + """ + The order associated with the refund. + """ + order: Order! + + """ + The order adjustments that are attached with the refund. + """ + orderAdjustments("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderAdjustmentConnection! + + """ + The date and time when the refund was processed. + """ + processedAt: DateTime! + + """ + The `RefundLineItem` resources attached to the refund. + """ + refundLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): RefundLineItemConnection! + + """ + The `RefundShippingLine` resources attached to the refund. + """ + refundShippingLines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): RefundShippingLineConnection! + + """ + The return associated with the refund. + """ + return: Return + + """ + The staff member who created the refund. + """ + staffMember: StaffMember + + """ + The total amount across all transactions for the refund. + """ + totalRefunded: MoneyV2! @deprecated(reason: "Use `totalRefundedSet` instead.") + + """ + The total amount across all transactions for the refund, in shop and presentment currencies. + """ + totalRefundedSet: MoneyBag! + + """ + The transactions associated with the refund. + """ + transactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderTransactionConnection! + + """ + The date and time when the refund was updated. + """ + updatedAt: DateTime! +} + +""" +An agreement between the merchant and customer to refund all or a portion of the order. +""" +type RefundAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The refund associated with the agreement. + """ + refund: Refund! + + """ + The sales associated with the agreement. + """ + sales("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SaleConnection! + + """ + The staff member associated with the agreement. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple Refunds. +""" +type RefundConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundEdge!]! + + """ + A list of nodes that are contained in RefundEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Refund!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `refundCreate` mutation. +""" +type RefundCreatePayload { + """ + The order associated with the created refund. + """ + order: Order + + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a refunded duty. +""" +type RefundDuty { + """ + The amount of a refunded duty in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The duty associated with this refunded duty. + """ + originalDuty: Duty +} + +""" +The input fields required to reimburse duties on a refund. +""" +input RefundDutyInput { + """ + The ID of the duty in the refund. + """ + dutyId: ID! + + """ + The type of refund for this duty. + """ + refundType: RefundDutyRefundType +} + +""" +The type of refund to perform for a particular refund duty. +""" +enum RefundDutyRefundType { + """ + The duty is proportionally refunded based on the quantity of the refunded line item. + """ + PROPORTIONAL + + """ + The duty is fully refunded. + """ + FULL +} + +""" +An auto-generated type which holds one Refund and a cursor during pagination. +""" +type RefundEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundEdge. + """ + node: Refund! +} + +""" +The input fields to create a refund. +""" +input RefundInput { + """ + The currency that is used to refund the order. This must be the presentment currency, which is the currency used by the customer. This is a required field for orders where the currency and presentment currency differ. + """ + currency: CurrencyCode + + """ + The ID of the order that's being refunded. + """ + orderId: ID! + + """ + An optional note that's attached to the refund. + """ + note: String + + """ + Whether to send a refund notification to the customer. + """ + notify: Boolean + + """ + The input fields that are required to reimburse shipping costs. + """ + shipping: ShippingRefundInput + + """ + The date and time when the refund is being processed. If not provided, it will be set to the current time. + """ + processedAt: DateTime + + """ + A list of line items to refund. + """ + refundLineItems: [RefundLineItemInput!] + + """ + A list of duties to refund. + """ + refundDuties: [RefundDutyInput!] + + """ + A list of transactions involved in the refund. + """ + transactions: [OrderTransactionInput!] + + """ + A list of instructions to process the financial outcome of the refund. + """ + refundMethods: [RefundMethodInput!] = [] + + """ + An optional reason for a discrepancy between calculated and actual refund amounts. + """ + discrepancyReason: OrderAdjustmentInputDiscrepancyReason + + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false +} + +""" +A [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) being refunded from an order. Each refund line item tracks the quantity, pricing, and restocking details for items returned to the merchant. + +The refund line item links to the original [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) from the [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) and includes financial information such as the refunded price, subtotal, and taxes in both shop and presentment currencies. The [`restockType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem#field-RefundLineItem.fields.restockType) field indicates whether and how the merchant restocks the returned items to inventory, while the [`location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem#field-RefundLineItem.fields.location) field specifies where restocking occurs. +""" +type RefundLineItem { + """ + A globally-unique ID. + """ + id: ID + + """ + The `LineItem` resource associated to the refunded line item. + """ + lineItem: LineItem! + + """ + The inventory restock location. + """ + location: Location + + """ + The price of a refunded line item. + """ + price: Money! @deprecated(reason: "Use `priceSet` instead.") + + """ + The price of a refunded line item in shop and presentment currencies. + """ + priceSet: MoneyBag! + + """ + The quantity of a refunded line item. + """ + quantity: Int! + + """ + The type of restock for the refunded line item. + """ + restockType: RefundLineItemRestockType! + + """ + Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund. + """ + restocked: Boolean! + + """ + The subtotal price of a refunded line item. + """ + subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") + + """ + The subtotal price of a refunded line item in shop and presentment currencies. + """ + subtotalSet: MoneyBag! + + """ + The total tax charged on a refunded line item. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax charged on a refunded line item in shop and presentment currencies. + """ + totalTaxSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundLineItems. +""" +type RefundLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundLineItemEdge!]! + + """ + A list of nodes that are contained in RefundLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [RefundLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundLineItem and a cursor during pagination. +""" +type RefundLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundLineItemEdge. + """ + node: RefundLineItem! +} + +""" +The input fields required to reimburse line items on a refund. +""" +input RefundLineItemInput { + """ + The ID of the line item in the refund. + """ + lineItemId: ID! + + """ + The quantity of the associated line item to be refunded. + """ + quantity: Int! + + """ + The type of restock for this line item. + """ + restockType: RefundLineItemRestockType + + """ + The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. + """ + locationId: ID +} + +""" +The type of restock performed for a particular refund line item. +""" +enum RefundLineItemRestockType { + """ + The refund line item was returned. Use this when restocking line items that were fulfilled. + """ + RETURN + + """ + The refund line item was canceled. Use this when restocking unfulfilled line items. + """ + CANCEL + + """ + Deprecated. The refund line item was restocked, without specifically beingidentified as a return or cancelation. This value is not accepted when creating new refunds. + """ + LEGACY_RESTOCK + + """ + Refund line item was not restocked. + """ + NO_RESTOCK +} + +""" +The different methods that a refund amount can be allocated to. +""" +enum RefundMethodAllocation { + """ + The refund is to original payment methods. + """ + ORIGINAL_PAYMENT_METHODS + + """ + The refund is to store credit. + """ + STORE_CREDIT +} + +""" +The input fields for processing the financial outcome of a refund. +""" +input RefundMethodInput @oneOf { + """ + The details of the refund to store credit. + """ + storeCreditRefund: StoreCreditRefundInput +} + +""" +The financial transfer details for a return outcome that results in a refund. +""" +type RefundReturnOutcome { + """ + The total monetary value to be refunded in shop and presentment currencies. + """ + amount: MoneyBag! + + """ + A list of suggested refund methods. + """ + suggestedRefundMethods: [SuggestedRefundMethod!]! + + """ + A list of suggested order transactions. + """ + suggestedTransactions: [SuggestedOrderTransaction!]! +} + +""" +The input fields for the shipping cost to refund. +""" +input RefundShippingInput { + """ + The input fields required to refund shipping cost, in the presentment currency of the order. + This overrides the `fullRefund` argument. + This field defaults to 0.00 when not provided and when the `fullRefund` argument is false. + """ + shippingRefundAmount: MoneyInput + + """ + Whether to refund the full shipping amount. + """ + fullRefund: Boolean = false +} + +""" +A shipping line item that's included in a refund. +""" +type RefundShippingLine implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The `ShippingLine` resource associated to the refunded shipping line item. + """ + shippingLine: ShippingLine! + + """ + The subtotal amount of the refund shipping line in shop and presentment currencies. + """ + subtotalAmountSet: MoneyBag! + + """ + The tax amount of the refund shipping line in shop and presentment currencies. + """ + taxAmountSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundShippingLines. +""" +type RefundShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundShippingLineEdge!]! + + """ + A list of nodes that are contained in RefundShippingLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [RefundShippingLine!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundShippingLine and a cursor during pagination. +""" +type RefundShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundShippingLineEdge. + """ + node: RefundShippingLine! +} + +""" +A condition checking the visitor's region. +""" +type RegionsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The regions that comprise the market. + """ + regions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MarketRegionConnection! +} + +""" +The input fields for a remote Authorize.net customer payment profile. +""" +input RemoteAuthorizeNetCustomerPaymentProfileInput { + """ + The customerProfileId value from the Authorize.net API. + """ + customerProfileId: String! + + """ + The customerPaymentProfileId value from the Authorize.net API. Starting on 2025, + customer_payment_profile_id will become mandatory for all API versions. + """ + customerPaymentProfileId: String +} + +""" +The input fields for a remote Braintree customer payment profile. +""" +input RemoteBraintreePaymentMethodInput { + """ + The `customer_id` value from the Braintree API. + """ + customerId: String! + + """ + The `payment_method_token` value from the Braintree API. Starting on 2025, + payment_method_token will become mandatory for all API versions. + """ + paymentMethodToken: String +} + +""" +The input fields for a remote stripe payment method. +""" +input RemoteStripePaymentMethodInput { + """ + The customer_id value from the Stripe API. + """ + customerId: String! + + """ + The payment_method_id value from the Stripe API. Starting on 2025, + payment_method_id will become mandatory for all API versions. + """ + paymentMethodId: String +} + +""" +Return type for `removeFromReturn` mutation. +""" +type RemoveFromReturnPayload { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The resolved price inclusivity attributes. +""" +type ResolvedPriceInclusivity { + """ + Whether duties are included in the price. + """ + dutiesIncluded: Boolean! + + """ + Whether taxes are included in the price. + """ + taxesIncluded: Boolean! +} + +""" +An alert message that appears in the Shopify admin about a problem with a store resource, with 1 or more actions to take. For example, you could use an alert to indicate that you're not charging taxes on some product variants. +They can optionally have a specific icon and be dismissed by merchants. +""" +type ResourceAlert { + """ + Buttons in the alert that link to related information. + For example, _Edit variants_. + """ + actions: [ResourceAlertAction!]! + + """ + The secondary text in the alert that includes further information or instructions about how to solve a problem. + """ + content: HTML! + + """ + Unique identifier that appears when an alert is manually closed by the merchant. + Most alerts can't be manually closed. + """ + dismissibleHandle: String + + """ + An icon that's optionally displayed with the alert. + """ + icon: ResourceAlertIcon + + """ + Indication of how important the alert is. + """ + severity: ResourceAlertSeverity! + + """ + The primary text in the alert that includes information or describes the problem. + """ + title: String! +} + +""" +An action associated to a resource alert, such as editing variants. +""" +type ResourceAlertAction { + """ + Whether the action appears as a button or as a link. + """ + primary: Boolean! + + """ + Resource for the action to show. + """ + show: String + + """ + The text for the button in the alert. For example, _Edit variants_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +The available icons for resource alerts. +""" +enum ResourceAlertIcon { + """ + A checkmark inside a circle. + """ + CHECKMARK_CIRCLE + + """ + A lowercase `i` inside a circle. + """ + INFORMATION_CIRCLE +} + +""" +The possible severity levels for a resource alert. +""" +enum ResourceAlertSeverity { + """ + Indicates a neutral alert. For example, an accepted dispute. + """ + DEFAULT + + """ + Indicates an informative alert. For example, an escalated dispute. + """ + INFO + + """ + Indicates an informative alert. For example, a new dispute. + """ + WARNING + + """ + Indicates a success alert. For example, a winning a dispute. + """ + SUCCESS + + """ + Indicates a critical alert. For example, a blocked app. + """ + CRITICAL + + ERROR @deprecated(reason: "`ERROR` severity is being deprecated in favour of `WARNING` or `CRITICAL` instead.") +} + +""" +Represents feedback from apps about a resource, and the steps required to set up the apps on the shop. +""" +type ResourceFeedback { + """ + Feedback from an app about the steps a merchant needs to take to set up the app on their store. + """ + appFeedback: [AppFeedback!]! @deprecated(reason: "Use `details` instead.") + + """ + List of AppFeedback detailing issues regarding a resource. + """ + details: [AppFeedback!]! + + """ + Summary of resource feedback pertaining to the resource. + """ + summary: String! +} + +""" +The input fields for a resource feedback object. +""" +input ResourceFeedbackCreateInput { + """ + The date and time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + If the feedback state is `requires_action`, then you can send a string message that communicates the action to be taken by the merchant. + The string must be a single message up to 100 characters long and must end with a period. + You need to adhere to the message formatting rules or your requests will fail: + - `[Explanation of the problem]. [Suggested action].` + + **Examples:** + - `[Your app name]` isn't connected. Connect your account to use this sales channel. `[Learn more]` + - `[Your app name]` isn't configured. Agree to the terms and conditions to use this app. `[Learn more]` + Both `Your app name` and `Learn more` (a button which directs merchants to your app) are automatically populated in the Shopify admin. + """ + messages: [String!] + + """ + The state of the feedback and whether it requires merchant action. + """ + state: ResourceFeedbackState! +} + +""" +The state of the resource feedback. +""" +enum ResourceFeedbackState { + """ + No action required from merchant. + """ + ACCEPTED + + """ + The merchant needs to resolve an issue with the resource. + """ + REQUIRES_ACTION +} + +""" +Represents a merchandising background operation interface. +""" +interface ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Represents the state of this catalog operation. +""" +enum ResourceOperationStatus { + """ + Operation has been created. + """ + CREATED + + """ + Operation is currently running. + """ + ACTIVE + + """ + Operation is complete. + """ + COMPLETE +} + +""" +A resource publication represents information about the publication of a resource. +An instance of `ResourcePublication`, unlike `ResourcePublicationV2`, can be neither published or scheduled to be published. + +See [ResourcePublicationV2](/api/admin-graphql/latest/objects/ResourcePublicationV2) for more context. +""" +type ResourcePublication { + """ + The channel the resource publication is published to. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. + If false, then the resource publication is neither published nor scheduled to be published. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + If the product isn't published, then this field returns an epoch timestamp. + """ + publishDate: DateTime! + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublications. +""" +type ResourcePublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationEdge!]! + + """ + A list of nodes that are contained in ResourcePublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ResourcePublication!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublication and a cursor during pagination. +""" +type ResourcePublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationEdge. + """ + node: ResourcePublication! +} + +""" +A resource publication represents information about the publication of a resource. +Unlike `ResourcePublication`, an instance of `ResourcePublicationV2` can't be unpublished. It must either be published or scheduled to be published. + +See [ResourcePublication](/api/admin-graphql/latest/objects/ResourcePublication) for more context. +""" +type ResourcePublicationV2 { + """ + Whether the resource publication is published. If true, then the resource publication is published to the publication. + If false, then the resource publication is staged to be published to the publication. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + """ + publishDate: DateTime + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublicationV2s. +""" +type ResourcePublicationV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationV2Edge!]! + + """ + A list of nodes that are contained in ResourcePublicationV2Edge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ResourcePublicationV2!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination. +""" +type ResourcePublicationV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationV2Edge. + """ + node: ResourcePublicationV2! +} + +""" +A restocking fee is a fee captured as part of a return to cover the costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type RestockingFee implements Fee { + """ + The amount of the restocking fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +The input fields for a restocking fee. +""" +input RestockingFeeInput { + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +Information about product is restricted for a given resource. +""" +type RestrictedForResource { + """ + Returns true when the product is restricted for the given resource. + """ + restricted: Boolean! + + """ + Restriction reason for the given resource. + """ + restrictedReason: String! +} + +""" +The `Return` object represents the intent of a buyer to ship one or more items from an order back to a merchant +or a third-party fulfillment location. A return is associated with an [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). +Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), +which indicates the state of the return. + +Use the `Return` object to capture the financial, logistical, +and business intent of a return. For example, you can identify eligible items for a return and issue customers +a refund for returned items on behalf of the merchant. + +Learn more about providing a +[return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) +for merchants. You can also manage [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges), +[reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), +and [reverse deliveries](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) +on behalf of merchants. +""" +type Return implements Node { + """ + The date and time when the return was closed. + """ + closedAt: DateTime + + """ + The date and time when the return was created. + """ + createdAt: DateTime! + + """ + Additional information about the declined return. + """ + decline: ReturnDecline + + """ + The exchange line items attached to the return. + """ + exchangeLineItems("Include exchange line items that have been removed from the order by an order edit, return, etc. Items that have been removed have a zero ([LineItem.currentQuantity](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LineItem#field-lineitem-currentquantity))." includeRemovedItems: Boolean = false, "Filter exchange line items by processing status." processingStatus: ReturnProcessingStatusFilterInput, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ExchangeLineItemConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the return. + """ + name: String! + + """ + The order that the return belongs to. + """ + order: Order! + + """ + The list of refunds associated with the return. + """ + refunds("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): RefundConnection! + + """ + The date and time when the return was approved. + """ + requestApprovedAt: DateTime + + """ + The return line items attached to the return. + """ + returnLineItems("Filter return line items by processing status." processingStatus: ReturnProcessingStatusFilterInput, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReturnLineItemTypeConnection! + + """ + The return shipping fees for the return. + """ + returnShippingFees: [ReturnShippingFee!]! + + """ + The list of reverse fulfillment orders for the return. + """ + reverseFulfillmentOrders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReverseFulfillmentOrderConnection! + + """ + The staff member that created the return. + """ + staffMember: StaffMember + + """ + The status of the return. + """ + status: ReturnStatus! + + """ + A suggested financial outcome for the return. + """ + suggestedFinancialOutcome("The line items from the return to include in the outcome." returnLineItems: [SuggestedOutcomeReturnLineItemInput!]!, "The exchange line items from the return to include in the outcome." exchangeLineItems: [SuggestedOutcomeExchangeLineItemInput!]!, "The shipping amount from the associated order to include as a refund." refundShipping: RefundShippingInput, "ID of the tip line item." tipLineId: ID, "The duties from the associated order to include as a refund." refundDuties: [RefundDutyInput!], "Specifies which refund methods to allocate the suggested refund amount to." refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS): SuggestedReturnFinancialOutcome + + """ + A suggested refund for the return. + """ + suggestedRefund("The line items from the return to include in the refund." returnRefundLineItems: [ReturnRefundLineItemInput!]!, "The shipping amount from the associated order to include in the refund." refundShipping: RefundShippingInput, "The duties from to associated order to include in the refund." refundDuties: [RefundDutyInput!]): SuggestedReturnRefund @deprecated(reason: "Use `suggestedFinancialOutcome` instead.") + + """ + The sum of all return line item quantities for the return. + """ + totalQuantity: Int! + + """ + The order transactions created from the return. + """ + transactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderTransactionConnection! +} + +""" +An agreement between the merchant and customer for a return. +""" +type ReturnAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The return associated with the agreement. + """ + return: Return! + + """ + The sales associated with the agreement. + """ + sales("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SaleConnection! + + """ + The staff member associated with the agreement. + """ + user: StaffMember +} + +""" +The input fields for approving a customer's return request. +""" +input ReturnApproveRequestInput { + """ + The ID of the return that's being approved. + """ + id: ID! + + """ + Notify the customer when a return request is approved. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false + + """ + When `true` the return will be created in an unprocessed state; returns must subsequently be processed via Return Processing APIs in order to take further action on them. Creating returns in an unprocessed state will soon be the default behavior. After July 1st, 2025, this field is only available to merchants who have created exchanges or returns with fees using API up that date. It will be ignored otherwise. + """ + unprocessed: Boolean = false @deprecated(reason: "This field is temporary to support the transition to Returns Processing APIs.") +} + +""" +Return type for `returnApproveRequest` mutation. +""" +type ReturnApproveRequestPayload { + """ + The approved return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnCancel` mutation. +""" +type ReturnCancelPayload { + """ + The canceled return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnClose` mutation. +""" +type ReturnClosePayload { + """ + The closed return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type for paginating through multiple Returns. +""" +type ReturnConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnEdge!]! + + """ + A list of nodes that are contained in ReturnEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Return!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `returnCreate` mutation. +""" +type ReturnCreatePayload { + """ + The created return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Additional information about why a merchant declined the customer's return request. +""" +type ReturnDecline { + """ + The notification message sent to the customer about their declined return request. + Maximum length: 500 characters. + """ + note: String + + """ + The reason the customer's return request was declined. + """ + reason: ReturnDeclineReason! +} + +""" +The reason why the merchant declined a customer's return request. +""" +enum ReturnDeclineReason { + """ + The return period has ended. + """ + RETURN_PERIOD_ENDED + + """ + The return contains final sale items. + """ + FINAL_SALE + + """ + The return is declined for another reason. + """ + OTHER +} + +""" +The input fields for declining a customer's return request. +""" +input ReturnDeclineRequestInput { + """ + The ID of the return that's being declined. + """ + id: ID! + + """ + The reason why the merchant declined the customer's return request. + """ + declineReason: ReturnDeclineReason! + + """ + Notify the customer when a return request is declined. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false + + """ + The notification message that's sent to a customer about their declined return request. + Maximum length: 500 characters. + """ + declineNote: String +} + +""" +Return type for `returnDeclineRequest` mutation. +""" +type ReturnDeclineRequestPayload { + """ + The declined return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type which holds one Return and a cursor during pagination. +""" +type ReturnEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnEdge. + """ + node: Return! +} + +""" +Possible error codes that can be returned by `ReturnUserError`. +""" +enum ReturnErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Too many arguments provided. + """ + TOO_MANY_ARGUMENTS + + """ + The input value is blank. + """ + BLANK + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + The input value should be greater than the minimum allowed value. + """ + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + The input value should be less than the maximum value allowed. + """ + LESS_THAN + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The input value is not a number. + """ + NOT_A_NUMBER + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is the wrong length. + """ + WRONG_LENGTH + + """ + The requested resource already exists. + """ + ALREADY_EXISTS + + """ + A requested resource could not be created. + """ + CREATION_FAILED + + """ + A required feature is not enabled. + """ + FEATURE_NOT_ENABLED + + """ + The requested configuration cannot be applied to this standard return policy which is managed for you in compliance with relevant regulations. + """ + INCOMPATIBLE_WITH_STANDARD_POLICY + + """ + A resource was not in the correct state for the operation to succeed. + """ + INVALID_STATE + + """ + The user does not have permission to perform the operation. + """ + MISSING_PERMISSION + + """ + A requested notification could not be sent. + """ + NOTIFICATION_FAILED + + """ + A requested item is not editable. + """ + NOT_EDITABLE + + """ + A requested item could not be found. + """ + NOT_FOUND +} + +""" +The input fields for a return. +""" +input ReturnInput { + """ + The new line items to be added to the order. + """ + exchangeLineItems: [ExchangeLineItemInput!] + + """ + The UTC date and time when the return was first solicited by the customer. + """ + requestedAt: DateTime + + """ + The ID of the order to be returned. + """ + orderId: ID! + + """ + The return line items list to be handled. + """ + returnLineItems: [ReturnLineItemInput!]! + + """ + The return shipping fee to capture. + """ + returnShippingFee: ReturnShippingFeeInput + + """ + When `true` the customer will receive a notification if there's an `Order.email` present. + """ + notifyCustomer: Boolean = false @deprecated(reason: "This field is no longer supported and any value provided to it is currently ignored.") + + """ + When `true` the return will be created in an unprocessed state; returns must subsequently be processed via Return Processing APIs in order to take further action on them. Creating returns in an unprocessed state will soon be the default behavior. After July 1st, 2025, this field is only available to merchants who have created exchanges or returns with fees using API up that date. It will be ignored otherwise. + """ + unprocessed: Boolean = false @deprecated(reason: "This field is temporary to support the transition to Returns Processing APIs.") +} + +""" +An item that a customer returns from a fulfilled order. Links to the original [`FulfillmentLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentLineItem) and tracks quantities through the return process. + +The line item includes the customer's reason for returning the item and any additional notes. It also tracks processing status with separate quantities for items that are processable, processed, refundable, and refunded. You can apply optional restocking fees to cover handling costs. + +Learn more about [creating a return](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnCreate). +""" +type ReturnLineItem implements Node & ReturnLineItemType { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity that can be processed. + """ + processableQuantity: Int! + + """ + The quantity that has been processed. + """ + processedQuantity: Int! + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The quantity that can be refunded. + """ + refundableQuantity: Int! + + """ + The quantity that was refunded. + """ + refundedQuantity: Int! + + """ + The restocking fee for the return line item. + """ + restockingFee: RestockingFee + + """ + The reason for returning the item. + """ + returnReason: ReturnReason! @deprecated(reason: "Use `returnReasonDefinition` instead. This field will be removed in the future.") + + """ + The standardized reason for why the item is being returned. + """ + returnReasonDefinition: ReturnReasonDefinition + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The total weight of the item. + """ + totalWeight: Weight + + """ + The quantity that has't been processed. + """ + unprocessedQuantity: Int! + + """ + The total line price after all discounts on the line item, including both line item level discounts and code-based line item discounts, are applied. + """ + withCodeDiscountedTotalPriceSet: MoneyBag! +} + +""" +The input fields for a return line item. +""" +input ReturnLineItemInput { + """ + The quantity of the item to be returned. + """ + quantity: Int! + + """ + The reason for the item to be returned. + """ + returnReason: ReturnReason @deprecated(reason: "Use `returnReasonDefinitionId` instead. This field will be removed in the future.") + + """ + The ID of a [`ReturnReasonDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnReasonDefinition). Accepts any ID from the full library of reasons available via [`returnReasonDefinitions`](https://shopify.dev/docs/api/admin-graphql/latest/queries/returnReasonDefinitions), not limited to the suggested reasons for the line item. + """ + returnReasonDefinitionId: ID + + """ + A note about the reason that the item is being returned. + Maximum length: 255 characters. + """ + returnReasonNote: String = "" + + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """ + The restocking fee to capture. + """ + restockingFee: RestockingFeeInput +} + +""" +The input fields for a removing a return line item from a return. +""" +input ReturnLineItemRemoveFromReturnInput { + """ + The ID of the return line item to remove. + """ + returnLineItemId: ID! + + """ + The quantity of the associated return line item to be removed. + """ + quantity: Int! +} + +""" +Return type for `returnLineItemRemoveFromReturn` mutation. +""" +type ReturnLineItemRemoveFromReturnPayload { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return line item of any type. +""" +interface ReturnLineItemType implements Node { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity that can be processed. + """ + processableQuantity: Int! + + """ + The quantity that has been processed. + """ + processedQuantity: Int! + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The quantity that can be refunded. + """ + refundableQuantity: Int! + + """ + The quantity that was refunded. + """ + refundedQuantity: Int! + + """ + The reason for returning the item. + """ + returnReason: ReturnReason! @deprecated(reason: "Use `returnReasonDefinition` instead. This field will be removed in the future.") + + """ + The standardized reason for why the item is being returned. + """ + returnReasonDefinition: ReturnReasonDefinition + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The quantity that has't been processed. + """ + unprocessedQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnLineItemTypes. +""" +type ReturnLineItemTypeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnLineItemTypeEdge!]! + + """ + A list of nodes that are contained in ReturnLineItemTypeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReturnLineItemType!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnLineItemType and a cursor during pagination. +""" +type ReturnLineItemTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnLineItemTypeEdge. + """ + node: ReturnLineItemType! +} + +""" +The financial transfer details for the return outcome. +""" +union ReturnOutcomeFinancialTransfer = InvoiceReturnOutcome|RefundReturnOutcome + +""" +The input fields for an exchange line item. +""" +input ReturnProcessExchangeLineItemInput { + """ + The ID of the exchange line item. + """ + id: ID! + + """ + The quantity of the exchange line item. + """ + quantity: Int! +} + +""" +The input fields for the financial transfer for the return. +""" +input ReturnProcessFinancialTransferInput @oneOf { + """ + Issue a refund for the return. + """ + issueRefund: ReturnProcessRefundInput +} + +""" +The input fields for processing a return. +""" +input ReturnProcessInput { + """ + The ID of the return to be processed. + """ + returnId: ID! + + """ + The return line items list to be handled. + """ + returnLineItems: [ReturnProcessReturnLineItemInput!] = [] + + """ + The exchange line items list to be handled. + """ + exchangeLineItems: [ReturnProcessExchangeLineItemInput!] = [] + + """ + The refund duties list to be handled. + """ + refundDuties: [RefundDutyInput!] = [] + + """ + The shipping cost to refund. + """ + refundShipping: RefundShippingInput + + """ + ID of the tip line item. + """ + tipLineId: ID + + """ + The note for the return. + """ + note: String + + """ + Whether to notify the customer about the return. + """ + notifyCustomer: Boolean = false + + """ + The financial transfer for the return. + """ + financialTransfer: ReturnProcessFinancialTransferInput +} + +""" +Return type for `returnProcess` mutation. +""" +type ReturnProcessPayload { + """ + The processed return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for the refund for the return. +""" +input ReturnProcessRefundInput { + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false + + """ + The order transactions for the refund. + """ + orderTransactions: [ReturnRefundOrderTransactionInput!]! + + """ + A list of instructions to process the financial outcome of the refund. + """ + refundMethods: [RefundMethodInput!] = [] +} + +""" +The input fields for a return line item. +""" +input ReturnProcessReturnLineItemInput { + """ + The ID of the return line item. + """ + id: ID! + + """ + The quantity of the return line item. + """ + quantity: Int! + + """ + The dispositions for the return line item. + """ + dispositions: [ReverseFulfillmentOrderDisposeInput!] +} + +""" +Filter line items based on processing status. +""" +enum ReturnProcessingStatusFilterInput { + """ + Only include line items that have been processed. + """ + PROCESSED + + """ + Only include line items that have some processable quantity. + """ + PROCESSABLE +} + +""" +The reason for returning the return line item. +""" +enum ReturnReason { + """ + The item is returned because the size was too small. Displays as **Size was too small**. + """ + SIZE_TOO_SMALL + + """ + The item is returned because the size was too large. Displays as **Size was too large**. + """ + SIZE_TOO_LARGE + + """ + The item is returned because the customer changed their mind. Displays as **Customer changed their mind**. + """ + UNWANTED + + """ + The item is returned because it was not as described. Displays as **Item not as described**. + """ + NOT_AS_DESCRIBED + + """ + The item is returned because the customer received the wrong one. Displays as **Received the wrong item**. + """ + WRONG_ITEM + + """ + The item is returned because it is damaged or defective. Displays as **Damaged or defective**. + """ + DEFECTIVE + + """ + The item is returned because the buyer did not like the style. Displays as **Style**. + """ + STYLE + + """ + The item is returned because the buyer did not like the color. Displays as **Color**. + """ + COLOR + + """ + The item is returned for another reason. For this value, a return reason note is also provided. Displays as **Other**. + """ + OTHER + + """ + The item is returned because of an unknown reason. Displays as **Unknown**. + """ + UNKNOWN +} + +""" +A standardized reason for returning an item. + +- Shopify offers an expanded library of return reasons available to all merchants +- For each product, Shopify suggests a curated subset of reasons based on the product's category +- Suggested reasons aren't the only valid options. When creating a return via the API, you can use any reason from the [full library](https://shopify.dev/docs/api/admin-graphql/latest/queries/returnReasonDefinitions). +""" +type ReturnReasonDefinition implements Node { + """ + Whether the return reason has been removed from taxonomy. + + Deleted reasons should not be presented to customers when creating new returns, but may still + appear on existing returns that were created before the reason was deleted. This field enables + graceful deprecation of return reasons without breaking historical data. + """ + deleted: Boolean! + + """ + A unique, human-readable, stable identifier for the return reason. + + Example values include "arrived-late", "comfort", "too-tight", "color-too-bright", and "quality". + The handle remains consistent across API versions and localizations, making it suitable for programmatic use. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The localized, user-facing name of the return reason. + + This field returns the reason name in the requested locale, automatically falling back to + English if no translation is available. Use this field when displaying return reasons to + customers or merchants. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple ReturnReasonDefinitions. +""" +type ReturnReasonDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnReasonDefinitionEdge!]! + + """ + A list of nodes that are contained in ReturnReasonDefinitionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReturnReasonDefinition!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnReasonDefinition and a cursor during pagination. +""" +type ReturnReasonDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnReasonDefinitionEdge. + """ + node: ReturnReasonDefinition! +} + +""" +The set of valid sort keys for the ReturnReasonDefinition query. +""" +enum ReturnReasonDefinitionSortKeys { + """ + Sort by the `handle` value. + """ + HANDLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The input fields to refund a return. +""" +input ReturnRefundInput { + """ + The ID of the return. + """ + returnId: ID! + + """ + A list of return line items to refund. + """ + returnRefundLineItems: [ReturnRefundLineItemInput!]! + + """ + The shipping amount to refund. + """ + refundShipping: RefundShippingInput + + """ + A list of duties to refund. + """ + refundDuties: [RefundDutyInput!] + + """ + A list of transactions involved in refunding the return. + """ + orderTransactions: [ReturnRefundOrderTransactionInput!] = [] + + """ + Whether to send a refund notification to the customer. + """ + notifyCustomer: Boolean = false +} + +""" +The input fields for a return refund line item. +""" +input ReturnRefundLineItemInput { + """ + The ID of the return line item to be refunded. + """ + returnLineItemId: ID! + + """ + The quantity of the return line item to be refunded. + """ + quantity: Int! +} + +""" +The input fields to create order transactions when refunding a return. +""" +input ReturnRefundOrderTransactionInput { + """ + The amount of money for the transaction in the presentment currency of the order. + """ + transactionAmount: MoneyInput! + + """ + The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. + """ + parentId: ID! +} + +""" +Return type for `returnRefund` mutation. +""" +type ReturnRefundPayload { + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnReopen` mutation. +""" +type ReturnReopenPayload { + """ + The reopened return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for requesting a return. +""" +input ReturnRequestInput { + """ + The ID of the order that's being returned. + """ + orderId: ID! + + """ + The line items that are being handled in the return. + """ + returnLineItems: [ReturnRequestLineItemInput!]! + + """ + The return shipping fee to capture. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for a return line item. +""" +input ReturnRequestLineItemInput { + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """ + The quantity of the item that's being returned. + """ + quantity: Int! + + """ + The restocking fee to capture. + """ + restockingFee: RestockingFeeInput + + """ + The reason why the line item is being returned. + """ + returnReason: ReturnReason @deprecated(reason: "Use `returnReasonDefinitionId` instead. This field will be removed in the future.") + + """ + The ID of a [`ReturnReasonDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnReasonDefinition). Accepts any ID from the full library of reasons available via [`returnReasonDefinitions`](https://shopify.dev/docs/api/admin-graphql/latest/queries/returnReasonDefinitions), not limited to the suggested reasons for the line item. + """ + returnReasonDefinitionId: ID + + """ + A note from the customer that describes the item to be returned. + For example, the note can communicate issues with the item to the merchant. + Maximum length: 300 characters. + """ + customerNote: String +} + +""" +Return type for `returnRequest` mutation. +""" +type ReturnRequestPayload { + """ + The requested return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return shipping fee is a fee captured as part of a return to cover the costs of shipping the return. +""" +type ReturnShippingFee implements Fee { + """ + The amount of the return shipping fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +The input fields for a return shipping fee. +""" +input ReturnShippingFeeInput { + """ + The value of the fee as a fixed amount in the presentment currency of the order. + """ + amount: MoneyInput! +} + +""" +The status of a return. +""" +enum ReturnStatus { + """ + The return has been canceled. + """ + CANCELED + + """ + The return has been completed. + """ + CLOSED + + """ + The return is in progress. + """ + OPEN + + """ + The return was requested. + """ + REQUESTED + + """ + The return was declined. + """ + DECLINED +} + +""" +An error that occurs during the execution of a return mutation. +""" +type ReturnUserError implements DisplayableError { + """ + The error code. + """ + code: ReturnErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A delivered order that's eligible to be returned to the merchant. Provides the items from completed fulfillments that customers can select when initiating a return. + +Use returnable fulfillments to determine which items are eligible for return before creating a [`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) with the [`returnCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnCreate) mutation. The line items show quantities that are available for return. + +Learn more about [building return management workflows](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). +""" +type ReturnableFulfillment implements Node { + """ + The fulfillment that the returnable fulfillment refers to. + """ + fulfillment: Fulfillment! + + """ + The unique ID of the Returnable Fulfillment. + """ + id: ID! + + """ + The list of returnable fulfillment line items. + """ + returnableFulfillmentLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReturnableFulfillmentLineItemConnection! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillments. +""" +type ReturnableFulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReturnableFulfillment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillment and a cursor during pagination. +""" +type ReturnableFulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentEdge. + """ + node: ReturnableFulfillment! +} + +""" +A returnable fulfillment line item. +""" +type ReturnableFulfillmentLineItem { + """ + The fulfillment line item that can be returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + The quantity available to be returned. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillmentLineItems. +""" +type ReturnableFulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReturnableFulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillmentLineItem and a cursor during pagination. +""" +type ReturnableFulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentLineItemEdge. + """ + node: ReturnableFulfillmentLineItem! +} + +""" +A reverse delivery is a post-fulfillment object that represents a buyer sending a package to a merchant. +For example, a buyer requests a return, and a merchant sends the buyer a shipping label. +The reverse delivery contains the context of the items sent back, how they're being sent back +(for example, a shipping label), and the current state of the delivery (tracking information). +""" +type ReverseDelivery implements Node { + """ + The deliverable associated with the reverse delivery. + """ + deliverable: ReverseDeliveryDeliverable + + """ + The ID of the reverse delivery. + """ + id: ID! + + """ + The reverse delivery line items attached to the reverse delivery. + """ + reverseDeliveryLineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReverseDeliveryLineItemConnection! + + """ + The `ReverseFulfillmentOrder` associated with the reverse delivery. + """ + reverseFulfillmentOrder: ReverseFulfillmentOrder! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveries. +""" +type ReverseDeliveryConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReverseDelivery!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `reverseDeliveryCreateWithShipping` mutation. +""" +type ReverseDeliveryCreateWithShippingPayload { + """ + The created reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The delivery method and artifacts associated with a reverse delivery. +""" +union ReverseDeliveryDeliverable = ReverseDeliveryShippingDeliverable + +""" +An auto-generated type which holds one ReverseDelivery and a cursor during pagination. +""" +type ReverseDeliveryEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryEdge. + """ + node: ReverseDelivery! +} + +""" +The input fields for a reverse label. +""" +input ReverseDeliveryLabelInput { + """ + The URL of the label file. If a label file was uploaded to be attached to the delivery, then provide the temporary staged URL. + """ + fileUrl: URL! +} + +""" +The return label file information for a reverse delivery. +""" +type ReverseDeliveryLabelV2 { + """ + The date and time when the reverse delivery label was created. + """ + createdAt: DateTime! + + """ + A public link that can be used to download the label image. + """ + publicFileUrl: URL + + """ + The date and time when the reverse delivery label was updated. + """ + updatedAt: DateTime! +} + +""" +The details about a reverse delivery line item. +""" +type ReverseDeliveryLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The expected number of units. + """ + quantity: Int! + + """ + The corresponding reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItem: ReverseFulfillmentOrderLineItem! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveryLineItems. +""" +type ReverseDeliveryLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReverseDeliveryLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseDeliveryLineItem and a cursor during pagination. +""" +type ReverseDeliveryLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryLineItemEdge. + """ + node: ReverseDeliveryLineItem! +} + +""" +The input fields for a reverse delivery line item. +""" +input ReverseDeliveryLineItemInput { + """ + The ID of the related reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! + + """ + The quantity of the item to be included in the delivery. + """ + quantity: Int! +} + +""" +A reverse shipping deliverable that may include a label and tracking information. +""" +type ReverseDeliveryShippingDeliverable { + """ + The return label attached to the reverse delivery. + """ + label: ReverseDeliveryLabelV2 + + """ + The information to track the reverse delivery. + """ + tracking: ReverseDeliveryTrackingV2 +} + +""" +Return type for `reverseDeliveryShippingUpdate` mutation. +""" +type ReverseDeliveryShippingUpdatePayload { + """ + The updated reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for tracking information about a return delivery. +""" +input ReverseDeliveryTrackingInput { + """ + The tracking number for the label. + """ + number: String + + """ + The tracking URL for the carrier. If the carrier isn't supported by Shopify, then provide the tracking URL of the delivery. + """ + url: URL +} + +""" +Represents the information used to track a reverse delivery. +""" +type ReverseDeliveryTrackingV2 { + """ + The provider of the tracking information, in a human-readable format for display purposes. + """ + carrierName: String + + """ + The identifier used by the courier to identify the shipment. + """ + number: String + + """ + The URL to track a shipment. + """ + url: URL +} + +""" +A group of one or more items in a return that will be processed at a fulfillment service. +There can be more than one reverse fulfillment order for a return at a given location. +""" +type ReverseFulfillmentOrder implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of reverse fulfillment order line items for the reverse fulfillment order. + """ + lineItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReverseFulfillmentOrderLineItemConnection! + + """ + The order associated with the reverse fulfillment order. + """ + order: Order + + """ + The list of reverse deliveries for the reverse fulfillment order. + """ + reverseDeliveries("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ReverseDeliveryConnection! + + """ + The status of the reverse fulfillment order. + """ + status: ReverseFulfillmentOrderStatus! + + """ + The current confirmation for the reverse fulfillment order from a third-party logistics service. + If no third-party service is involved, then this value is `nil`. + """ + thirdPartyConfirmation: ReverseFulfillmentOrderThirdPartyConfirmation +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrders. +""" +type ReverseFulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReverseFulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to dispose a reverse fulfillment order line item. +""" +input ReverseFulfillmentOrderDisposeInput { + """ + The ID of the reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! + + """ + The quantity of the reverse fulfillment order line item to dispose. + """ + quantity: Int! + + """ + The ID of the location where the reverse fulfillment order line item is to be disposed. + This is required when the disposition type is RESTOCKED. + """ + locationId: ID + + """ + The final arrangement for the reverse fulfillment order line item. + """ + dispositionType: ReverseFulfillmentOrderDispositionType! +} + +""" +Return type for `reverseFulfillmentOrderDispose` mutation. +""" +type ReverseFulfillmentOrderDisposePayload { + """ + The disposed reverse fulfillment order line items. + """ + reverseFulfillmentOrderLineItems: [ReverseFulfillmentOrderLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The details of the arrangement of an item. +""" +type ReverseFulfillmentOrderDisposition implements Node { + """ + The date and time when the disposition was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the disposition occurred. + """ + location: Location + + """ + The number of disposed units. + """ + quantity: Int! + + """ + The final arrangement of an item. + """ + type: ReverseFulfillmentOrderDispositionType! +} + +""" +The final arrangement of an item from a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderDispositionType { + """ + An item that was restocked. + """ + RESTOCKED + + """ + An item that requires further processing before being restocked or discarded. + """ + PROCESSING_REQUIRED + + """ + An item that wasn't restocked. + """ + NOT_RESTOCKED + + """ + An item that was expected but absent. + """ + MISSING +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrder and a cursor during pagination. +""" +type ReverseFulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderEdge. + """ + node: ReverseFulfillmentOrder! +} + +""" +The details about a reverse fulfillment order line item. +""" +type ReverseFulfillmentOrderLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + The corresponding fulfillment line item for a reverse fulfillment order line item. + """ + fulfillmentLineItem: FulfillmentLineItem + + """ + A globally-unique ID. + """ + id: ID! + + """ + The total number of units to be processed. + """ + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrderLineItems. +""" +type ReverseFulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ReverseFulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrderLineItem and a cursor during pagination. +""" +type ReverseFulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderLineItemEdge. + """ + node: ReverseFulfillmentOrderLineItem! +} + +""" +The status of a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderStatus { + """ + The reverse fulfillment order has been canceled. + """ + CANCELED + + """ + The reverse fulfillment order has been completed. + """ + CLOSED + + """ + The reverse fulfillment order is in progress. + """ + OPEN +} + +""" +The third-party confirmation of a reverse fulfillment order. +""" +type ReverseFulfillmentOrderThirdPartyConfirmation { + """ + The status of the reverse fulfillment order third-party confirmation. + """ + status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! +} + +""" +The status of a reverse fulfillment order third-party confirmation. +""" +enum ReverseFulfillmentOrderThirdPartyConfirmationStatus { + """ + The reverse fulfillment order was accepted by the fulfillment service. + """ + ACCEPTED + + """ + The reverse fulfillment order cancelation was accepted by the fulfillment service. + """ + CANCEL_ACCEPTED + + """ + The reverse fulfillment order cancelation was rejected by the fulfillment service. + """ + CANCEL_REJECTED + + """ + The reverse fulfillment order is awaiting acceptance by the fulfillment service. + """ + PENDING_ACCEPTANCE + + """ + The reverse fulfillment order is awaiting cancelation by the fulfillment service. + """ + PENDING_CANCELATION + + """ + The reverse fulfillment order was rejected by the fulfillment service. + """ + REJECTED +} + +""" +List of possible values for a RiskAssessment result. +""" +enum RiskAssessmentResult { + """ + Indicates a high likelihood that the order is fraudulent. + """ + HIGH + + """ + Indicates a medium likelihood that the order is fraudulent. + """ + MEDIUM + + """ + Indicates a low likelihood that the order is fraudulent. + """ + LOW + + """ + Indicates that the risk assessment will not provide a recommendation for the order. + """ + NONE + + """ + Indicates that the risk assessment is still pending. + """ + PENDING +} + +""" +A risk fact belongs to a single risk assessment and serves to provide additional context for an assessment. Risk facts are not necessarily tied to the result of the recommendation. +""" +type RiskFact { + """ + A description of the fact. + """ + description: String! + + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! +} + +""" +List of possible values for a RiskFact sentiment. +""" +enum RiskFactSentiment { + """ + A positive contributor that lowers the risk. + """ + POSITIVE + + """ + A neutral contributor with regards to risk. + """ + NEUTRAL + + """ + A negative contributor that increases the risk. + """ + NEGATIVE +} + +""" +A row count represents rows on background operation. +""" +type RowCount { + """ + Estimated number of rows contained within this background operation. + """ + count: Int! + + """ + Whether the operation exceeds max number of reportable rows. + """ + exceedsMax: Boolean! +} + +""" +SEO information. +""" +type SEO { + """ + SEO Description. + """ + description: String + + """ + SEO Title. + """ + title: String +} + +""" +The input fields for SEO information. +""" +input SEOInput { + """ + SEO title of the product. + """ + title: String + + """ + SEO description of the product. + """ + description: String +} + +""" +An individual sale record associated with a sales agreement. Every money value in an order's sales data is represented in the currency's smallest unit. When amounts are divided across multiple line items, such as taxes or order discounts, the amounts might not divide evenly across all of the line items on the order. To address this, the remaining currency units that couldn't be divided evenly are allocated one at a time, starting with the first line item, until they are all accounted for. In aggregate, the values sum up correctly. In isolation, one line item might have a different tax or discount amount than another line item of the same price, before taxes and discounts. This is because the amount could not be divided evenly across the items. The allocation of currency units across line items is immutable. After they are allocated, currency units are never reallocated or redistributed among the line items. +""" +interface Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The possible order action types for a sale. +""" +enum SaleActionType { + """ + A purchase or charge. + """ + ORDER + + """ + A removal or return. + """ + RETURN + + """ + A change to the price, taxes, or discounts for a prior purchase. + """ + UPDATE + + """ + An unknown order action. Represents new actions that may be added in future versions. + """ + UNKNOWN +} + +""" +The additional fee details for a line item. +""" +type SaleAdditionalFee implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the additional fee. + """ + name: String! + + """ + The price of the additional fee. + """ + price: MoneyBag! + + """ + A list of taxes charged on the additional fee. + """ + taxLines: [TaxLine!]! +} + +""" +An auto-generated type for paginating through multiple Sales. +""" +type SaleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SaleEdge!]! + + """ + A list of nodes that are contained in SaleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Sale!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Sale and a cursor during pagination. +""" +type SaleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SaleEdge. + """ + node: Sale! +} + +""" +The possible line types for a sale record. One of the possible order line types for a sale is an adjustment. Sales adjustments occur when a refund is issued for a line item that is either more or less than the total value of the line item. Examples are restocking fees and goodwill payments. When this happens, Shopify produces a sales agreement with sale records for each line item that is returned or refunded and an additional sale record for the adjustment (for example, a restocking fee). The sales records for the returned or refunded items represent the reversal of the original line item sale value. The additional adjustment sale record represents the difference between the original total value of all line items that were refunded, and the actual amount refunded. +""" +enum SaleLineType { + """ + A product purchased, returned or exchanged. + """ + PRODUCT + + """ + A tip added by the customer. + """ + TIP + + """ + A gift card. + """ + GIFT_CARD + + """ + A shipping cost. + """ + SHIPPING + + """ + A duty charge. + """ + DUTY + + """ + An additional fee. + """ + ADDITIONAL_FEE + + """ + A fee charge. + """ + FEE + + """ + An unknown sale line. Represents new types that may be added in future versions. + """ + UNKNOWN + + """ + A sale adjustment. + """ + ADJUSTMENT +} + +""" +The tax allocated to a sale from a single tax line. +""" +type SaleTax { + """ + The portion of the total tax amount on the related sale that comes from the associated tax line. + """ + amount: MoneyBag! + + """ + The unique ID for the sale tax. + """ + id: ID! + + """ + The tax line associated with the sale. + """ + taxLine: TaxLine! +} + +""" +A contract between a merchant and a customer to do business. Shopify creates a sales agreement whenever an order is placed, edited, or refunded. A sales agreement has one or more sales records, which provide itemized details about the initial agreement or subsequent changes made to the order. For example, when a customer places an order, Shopify creates the order, generates a sales agreement, and records a sale for each line item purchased in the order. A sale record is specific to a type of order line. Order lines can represent different things such as a purchased product, a tip added by a customer, shipping costs collected at checkout, and more. +""" +interface SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SaleConnection! + + """ + The staff member associated with the agreement. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple SalesAgreements. +""" +type SalesAgreementConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SalesAgreementEdge!]! + + """ + A list of nodes that are contained in SalesAgreementEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SalesAgreement!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SalesAgreement and a cursor during pagination. +""" +type SalesAgreementEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SalesAgreementEdge. + """ + node: SalesAgreement! +} + +""" +A representation of a search query in the Shopify admin used on resource index views. Preserves complex queries with search terms and filters, enabling merchants to quickly access frequently used data views. For example, a saved search can be applied to the product index table to filter products. The query string combines free-text search terms with structured filters to narrow results based on resource attributes. + +The search applies to a specific resource type such as [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) objects. +""" +type SavedSearch implements LegacyInteroperability & Node { + """ + The filters of a saved search. + """ + filters: [SearchFilter!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The name of a saved search. + """ + name: String! + + """ + The query string of a saved search. This includes search terms and filters. + """ + query: String! + + """ + The type of resource this saved search is searching in. + """ + resourceType: SearchResultType! + + """ + The search terms of a saved search. + """ + searchTerms: String! +} + +""" +An auto-generated type for paginating through multiple SavedSearches. +""" +type SavedSearchConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SavedSearchEdge!]! + + """ + A list of nodes that are contained in SavedSearchEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SavedSearch!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a saved search. +""" +input SavedSearchCreateInput { + """ + The type of resource this saved search is searching in. + """ + resourceType: SearchResultType! + + """ + A descriptive name of the saved search. + """ + name: String! + + """ + The query string of a saved search. This includes search terms and filters. + """ + query: String! +} + +""" +Return type for `savedSearchCreate` mutation. +""" +type SavedSearchCreatePayload { + """ + The saved search that was created. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to delete a saved search. +""" +input SavedSearchDeleteInput { + """ + ID of the saved search to delete. + """ + id: ID! +} + +""" +Return type for `savedSearchDelete` mutation. +""" +type SavedSearchDeletePayload { + """ + The ID of the saved search that was deleted. + """ + deletedSavedSearchId: ID + + """ + The shop of the saved search that was deleted. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one SavedSearch and a cursor during pagination. +""" +type SavedSearchEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SavedSearchEdge. + """ + node: SavedSearch! +} + +""" +The input fields to update a saved search. +""" +input SavedSearchUpdateInput { + """ + ID of the saved search to update. + """ + id: ID! + + """ + A descriptive name of the saved search. + """ + name: String + + """ + The query string of a saved search. This included search terms and filters. + """ + query: String +} + +""" +Return type for `savedSearchUpdate` mutation. +""" +type SavedSearchUpdatePayload { + """ + The saved search that was updated. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The set of valid sort keys for the ScheduledChange query. +""" +enum ScheduledChangeSortKeys { + """ + Sort by the `expected_at` value. + """ + EXPECTED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Script discount applications capture the intentions of a discount that +was created by a Shopify Script for an order's line item or shipping line. + +Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the application as defined by the Script. + """ + description: String! @deprecated(reason: "Use `title` instead.") + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application as defined by the Script. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +

Theme app extensions

+

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

+ +

Script tag deprecation

+

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

+ + +A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the **Order status** page of checkout. +""" +type ScriptTag implements LegacyInteroperability & Node { + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script will be served as is. + """ + cache: Boolean! + + """ + The date and time when the script tag was created. + """ + createdAt: DateTime! + + """ + The page or pages on the online store that the script should be included. + """ + displayScope: ScriptTagDisplayScope! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL to the remote script. + """ + src: URL! + + """ + The date and time when the script tag was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple ScriptTags. +""" +type ScriptTagConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ScriptTagEdge!]! + + """ + A list of nodes that are contained in ScriptTagEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ScriptTag!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `scriptTagCreate` mutation. +""" +type ScriptTagCreatePayload { + """ + The script tag that was created. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `scriptTagDelete` mutation. +""" +type ScriptTagDeletePayload { + """ + The ID of the deleted script tag. + """ + deletedScriptTagId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The page or pages on the online store where the script should be included. +""" +enum ScriptTagDisplayScope { + """ + Include the script on both the web storefront and the Order status page. + """ + ALL @deprecated(reason: "`ALL` is deprecated. Use `ONLINE_STORE` instead.\n") + + """ + Include the script only on the Order status page. + """ + ORDER_STATUS @deprecated(reason: "`ORDER_STATUS` is deprecated and unavailable as a mutation input.\n") + + """ + Include the script only on the web storefront. + """ + ONLINE_STORE +} + +""" +An auto-generated type which holds one ScriptTag and a cursor during pagination. +""" +type ScriptTagEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ScriptTagEdge. + """ + node: ScriptTag! +} + +""" +The input fields for a script tag. This input object is used when creating or updating +a script tag to specify its URL, where it should be included, and how it will be cached. +""" +input ScriptTagInput { + """ + The URL of the remote script. For example: `https://example.com/path/to/script.js`. + """ + src: URL + + """ + The page or pages on the online store where the script should be included. + """ + displayScope: ScriptTagDisplayScope + + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script is served as is. + The default value is `false`. + """ + cache: Boolean = false +} + +""" +Return type for `scriptTagUpdate` mutation. +""" +type ScriptTagUpdatePayload { + """ + The script tag that was updated. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter in a search query represented by a key value pair. +""" +type SearchFilter { + """ + The key of the search filter. + """ + key: String! + + """ + The value of the search filter. + """ + value: String! +} + +""" +A list of search filters along with their specific options in value and label pair for filtering. +""" +type SearchFilterOptions { + """ + A list of options that can be use to filter product availability. + """ + productAvailability: [FilterOption!]! +} + +""" +Represents an individual result returned from a search. +""" +type SearchResult { + """ + Returns the search result description text. + """ + description: String + + """ + Returns the Image resource presented to accompany a search result. + """ + image: Image + + """ + Returns the resource represented by the search result. + """ + reference: Node! + + """ + Returns the resource title. + """ + title: String! + + """ + Returns the absolute URL to the resource in the search result. + """ + url: URL! +} + +""" +The connection type for SearchResult. +""" +type SearchResultConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SearchResultEdge!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + resultsAfterCount: Int! @deprecated(reason: "The provided information is not accurate.") +} + +""" +An auto-generated type which holds one SearchResult and a cursor during pagination. +""" +type SearchResultEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SearchResultEdge. + """ + node: SearchResult! +} + +""" +Specifies the type of resources to be returned from a search. +""" +enum SearchResultType { + CUSTOMER + + DRAFT_ORDER + + """ + An inventory transfer. + """ + INVENTORY_TRANSFER + + PRODUCT + + COLLECTION + + """ + A file. + """ + FILE + + """ + A page. + """ + PAGE + + """ + A blog. + """ + BLOG + + """ + An article. + """ + ARTICLE + + """ + A URL redirect. + """ + URL_REDIRECT + + PRICE_RULE + + """ + A code discount redeem code. + """ + DISCOUNT_REDEEM_CODE + + ORDER + + """ + A balance transaction. + """ + BALANCE_TRANSACTION +} + +""" +A group of [customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) that meet specific criteria defined through [ShopifyQL query](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference) conditions. Common use cases for segments include customer analytics, targeted marketing campaigns, and automated discount eligibility. + +The segment's [`query`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-query) field contains ShopifyQL conditions that determine membership, such as purchase history, location, or engagement patterns. Tracks when the segment was created with [`creationDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-creationDate) and when it was last modified with [`lastEditDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-lastEditDate). +""" +type Segment implements Node { + """ + The date and time when the segment was added to the store. + """ + creationDate: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date and time when the segment was last updated. + """ + lastEditDate: DateTime! + + """ + The name of the segment. + """ + name: String! + + """ + A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers. + """ + query: String! +} + +""" +A filter that takes a value that's associated with an object. For example, the `tags` field is associated with the [`Customer`](/api/admin-graphql/latest/objects/Customer) object. +""" +type SegmentAssociationFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The statistics of a given attribute. +""" +type SegmentAttributeStatistics { + """ + The average of a given attribute. + """ + average: Float! + + """ + The sum of a given attribute. + """ + sum: Float! +} + +""" +A filter with a Boolean value that's been added to a segment query. +""" +type SegmentBooleanFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple Segments. +""" +type SegmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentEdge!]! + + """ + A list of nodes that are contained in SegmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Segment!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `segmentCreate` mutation. +""" +type SegmentCreatePayload { + """ + The newly created segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter with a date value that's been added to a segment query. +""" +type SegmentDateFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentDelete` mutation. +""" +type SegmentDeletePayload { + """ + ID of the deleted segment. + """ + deletedSegmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Segment and a cursor during pagination. +""" +type SegmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentEdge. + """ + node: Segment! +} + +""" +Categorical filter options for building customer segments using predefined value sets like countries, subscription statuses, or order frequencies. + +For example, a "Customer Location" enum filter provides options like "United States," "Canada," and "United Kingdom." + +Use this object to: +- Access available categorical filter options +- Understand filter capabilities and constraints +- Build user interfaces for segment creation + +Includes localized display names, indicates whether multiple values can be selected, and provides technical query names for API operations. +""" +type SegmentEnumFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter that's used to segment customers based on the date that an event occured. For example, the `product_bought` event filter allows you to segment customers based on what products they've bought. +""" +type SegmentEventFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The parameters for an event segment filter. + """ + parameters: [SegmentEventFilterParameter!]! + + """ + The query name of the filter. + """ + queryName: String! + + """ + The return value type for an event segment filter. + """ + returnValueType: String! +} + +""" +The parameters for an event segment filter. +""" +type SegmentEventFilterParameter { + """ + Whether the parameter accepts a list of values. + """ + acceptsMultipleValues: Boolean! + + """ + The localized description of the parameter. + """ + localizedDescription: String! + + """ + The localized name of the parameter. + """ + localizedName: String! + + """ + The parameter maximum value range. + """ + maxRange: Float + + """ + The parameter minimum value range. + """ + minRange: Float + + """ + Whether the parameter is optional. + """ + optional: Boolean! + + """ + The type of the parameter. + """ + parameterType: String! + + """ + The query name of the parameter. + """ + queryName: String! +} + +""" +The filters used in segment queries associated with a shop. +""" +interface SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentFilters. +""" +type SegmentFilterConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentFilterEdge!]! + + """ + A list of nodes that are contained in SegmentFilterEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SegmentFilter!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentFilter and a cursor during pagination. +""" +type SegmentFilterEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentFilterEdge. + """ + node: SegmentFilter! +} + +""" +A filter with a double-precision, floating-point value that's been added to a segment query. +""" +type SegmentFloatFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + The maximum range a filter can have. + """ + maxRange: Float + + """ + The minimum range a filter can have. + """ + minRange: Float + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter with an integer that's been added to a segment query. +""" +type SegmentIntegerFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + The maximum range a filter can have. + """ + maxRange: Float + + """ + The minimum range a filter can have. + """ + minRange: Float + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The response type for the `segmentMembership` object. +""" +type SegmentMembership { + """ + A Boolean that indicates whether or not the customer in the query is a member of the segment, which is identified using the `segmentId`. + """ + isMember: Boolean! + + """ + A `segmentId` that's used for testing membership. + """ + segmentId: ID! +} + +""" +A list of maps that contain `segmentId` IDs and `isMember` Booleans. The maps represent segment memberships. +""" +type SegmentMembershipResponse { + """ + The membership status for the given list of segments. + """ + memberships: [SegmentMembership!]! +} + +""" +A segment and its corresponding saved search. +For example, you can use `SegmentMigration` to retrieve the segment ID that corresponds to a saved search ID. +""" +type SegmentMigration { + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the saved search. + """ + savedSearchId: ID! + + """ + The ID of the segment. + """ + segmentId: ID +} + +""" +An auto-generated type for paginating through multiple SegmentMigrations. +""" +type SegmentMigrationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentMigrationEdge!]! + + """ + A list of nodes that are contained in SegmentMigrationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SegmentMigration!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentMigration and a cursor during pagination. +""" +type SegmentMigrationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentMigrationEdge. + """ + node: SegmentMigration! +} + +""" +The set of valid sort keys for the Segment query. +""" +enum SegmentSortKeys { + """ + Sort by the `creation_date` value. + """ + CREATION_DATE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `last_edit_date` value. + """ + LAST_EDIT_DATE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The statistics of a given segment. +""" +type SegmentStatistics { + """ + The statistics of a given attribute. + """ + attributeStatistics("The attribute that statistics are retrieved for." attributeName: String!): SegmentAttributeStatistics! +} + +""" +A filter with a string that's been added to a segment query. +""" +type SegmentStringFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentUpdate` mutation. +""" +type SegmentUpdatePayload { + """ + The updated segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A list of suggested values associated with an individual segment. A +segment is a group of members, such as customers, that meet specific +criteria. +""" +type SegmentValue { + """ + The localized version of the value's name. This name is displayed to the merchant. + """ + localizedValue: String! + + """ + The name of the query associated with the suggestion. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentValues. +""" +type SegmentValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentValueEdge!]! + + """ + A list of nodes that are contained in SegmentValueEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SegmentValue!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentValue and a cursor during pagination. +""" +type SegmentValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentValueEdge. + """ + node: SegmentValue! +} + +""" +Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors. +""" +type SelectedOption { + """ + The product option’s name. + """ + name: String! + + """ + The product option’s value object. + """ + optionValue: ProductOptionValue! + + """ + The product option’s value. + """ + value: String! +} + +""" +The input fields for the selected variant option of the combined listing. +""" +input SelectedVariantOptionInput { + """ + The name of the parent product's option. + """ + name: String! + + """ + The selected option value of the parent product's option. + """ + value: String! + + """ + The metaobject value of the linked metafield. + """ + linkedMetafieldValue: String +} + +""" +How a product can be sold and purchased through recurring billing or deferred purchase options. Defines the specific terms for subscriptions, pre-orders, or try-before-you-buy offers, including when to bill customers, when to fulfill orders, and what pricing adjustments to apply. + +Each selling plan has billing, delivery, and pricing policies that control the purchase experience. The plan's [`options`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan#field-SellingPlan.fields.options) and [`category`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan#field-SellingPlan.fields.category) help merchants organize and report on different selling strategies. Plans are grouped within a [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) that associates them with [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. + +> Caution: +> Selling plans and associated records are automatically deleted 48 hours after a merchant uninstalls the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) that created them. Back up these records if you need to restore them later. + +Learn more about [selling plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan). +""" +type SellingPlan implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """ + A selling plan policy which describes the recurring billing details. + """ + billingPolicy: SellingPlanBillingPolicy! + + """ + The category used to classify the selling plan for reporting purposes. + """ + category: SellingPlanCategory + + """ + The date and time when the selling plan was created. + """ + createdAt: DateTime! + + """ + A selling plan policy which describes the delivery details. + """ + deliveryPolicy: SellingPlanDeliveryPolicy! + + """ + Buyer facing string which describes the selling plan commitment. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + When to reserve inventory for a selling plan. + """ + inventoryPolicy: SellingPlanInventoryPolicy + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + A customer-facing description of the selling plan. + + If your store supports multiple currencies, then don't include country-specific pricing content, such as "Buy monthly, get 10$ CAD off". This field won't be converted to reflect different currencies. + """ + name: String! + + """ + The values of all options available on the selling plan. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + Relative position of the selling plan for display. A lower position will be displayed before a higher position. + """ + position: Int + + """ + Selling plan pricing details. + """ + pricingPolicies: [SellingPlanPricingPolicy!]! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +Specifies the date when delivery or fulfillment is completed by a merchant for a given time cycle. You can also +define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who +start their subscription inside the cutoff period. + +Some example scenarios where anchors can be useful to implement advanced delivery behavior: +- A merchant starts fulfillment on a specific date every month. +- A merchant wants to bill the 1st of every quarter. +- A customer expects their delivery every Tuesday. + +For more details, see [About Selling Plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors). +""" +type SellingPlanAnchor { + """ + The cutoff day for the anchor. Specifies a buffer period before the anchor date for orders to be included in a + delivery or fulfillment cycle. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + """ + cutoffDay: Int + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int! + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType! +} + +""" +The input fields required to create or update a selling plan anchor. +""" +input SellingPlanAnchorInput { + """ + Represents the anchor type, must be one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + The cutoff day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + + This field should only be set if the cutoff field for the delivery policy is `null`. + """ + cutoffDay: Int +} + +""" +Represents the anchor type. +""" +enum SellingPlanAnchorType { + """ + Which day of the week, between 1-7. + """ + WEEKDAY + + """ + Which day of the month, between 1-31. + """ + MONTHDAY + + """ + Which days of the month and year, month between 1-12, and day between 1-31. + """ + YEARDAY +} + +""" +Represents the billing frequency associated to the selling plan (for example, bill every week, or bill every +three months). The selling plan billing policy and associated records (selling plan groups, selling plans, pricing +policies, and delivery policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanBillingPolicy = SellingPlanFixedBillingPolicy|SellingPlanRecurringBillingPolicy + +""" +The input fields that are required to create or update a billing policy type. +""" +input SellingPlanBillingPolicyInput { + """ + The fixed billing policy details. + """ + fixed: SellingPlanFixedBillingPolicyInput + + """ + The recurring billing policy details. + """ + recurring: SellingPlanRecurringBillingPolicyInput +} + +""" +The category of the selling plan. For the `OTHER` category, + you must fill out our [request form](https://docs.google.com/forms/d/e/1FAIpQLSeU18Xmw0Q61V8wdH-dfGafFqIBfRchQKUO8WAF3yJTvgyyZQ/viewform), + where we'll review your request for a new purchase option. +""" +enum SellingPlanCategory { + """ + The selling plan is for anything not in one of the other categories. + """ + OTHER + + """ + The selling plan is for pre-orders. + """ + PRE_ORDER + + """ + The selling plan is for subscriptions. + """ + SUBSCRIPTION + + """ + The selling plan is for try before you buy purchases. + """ + TRY_BEFORE_YOU_BUY +} + +""" +The amount charged at checkout when the full amount isn't charged at checkout. +""" +type SellingPlanCheckoutCharge { + """ + The charge type for the checkout charge. + """ + type: SellingPlanCheckoutChargeType! + + """ + The charge value for the checkout charge. + """ + value: SellingPlanCheckoutChargeValue! +} + +""" +The input fields that are required to create or update a checkout charge. +""" +input SellingPlanCheckoutChargeInput { + """ + The checkout charge type defined by the policy. + """ + type: SellingPlanCheckoutChargeType + + """ + The checkout charge value defined by the policy. + """ + value: SellingPlanCheckoutChargeValueInput +} + +""" +The percentage value of the price used for checkout charge. +""" +type SellingPlanCheckoutChargePercentageValue { + """ + The percentage value of the price used for checkout charge. + """ + percentage: Float! +} + +""" +The checkout charge when the full amount isn't charged at checkout. +""" +enum SellingPlanCheckoutChargeType { + """ + The checkout charge is a percentage of the product or variant price. + """ + PERCENTAGE + + """ + The checkout charge is a fixed price amount. + """ + PRICE +} + +""" +The portion of the price to be charged at checkout. +""" +union SellingPlanCheckoutChargeValue = MoneyV2|SellingPlanCheckoutChargePercentageValue + +""" +The input fields required to create or update an checkout charge value. +""" +input SellingPlanCheckoutChargeValueInput { + """ + The percentage value. + """ + percentage: Float + + """ + The fixed value for an checkout charge. + """ + fixedValue: Decimal +} + +""" +An auto-generated type for paginating through multiple SellingPlans. +""" +type SellingPlanConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanEdge!]! + + """ + A list of nodes that are contained in SellingPlanEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SellingPlan!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver +every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, +pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanDeliveryPolicy = SellingPlanFixedDeliveryPolicy|SellingPlanRecurringDeliveryPolicy + +""" +The input fields that are required to create or update a delivery policy. +""" +input SellingPlanDeliveryPolicyInput { + """ + The fixed delivery policy details. + """ + fixed: SellingPlanFixedDeliveryPolicyInput + + """ + The recurring delivery policy details. + """ + recurring: SellingPlanRecurringDeliveryPolicyInput +} + +""" +An auto-generated type which holds one SellingPlan and a cursor during pagination. +""" +type SellingPlanEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanEdge. + """ + node: SellingPlan! +} + +""" +The fixed selling plan billing policy defines how much of the price of the product will be billed to customer +at checkout. If there is an outstanding balance, it determines when it will be paid. +""" +type SellingPlanFixedBillingPolicy { + """ + The checkout charge when the full amount isn't charged at checkout. + """ + checkoutCharge: SellingPlanCheckoutCharge! + + """ + The exact time when to capture the full payment. + """ + remainingBalanceChargeExactTime: DateTime + + """ + The period after remaining_balance_charge_trigger, before capturing the full payment. Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """ + When to capture payment for amount due. + """ + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger! +} + +""" +The input fields required to create or update a fixed billing policy. +""" +input SellingPlanFixedBillingPolicyInput { + """ + When to capture the payment for the amount due. + """ + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger + + """ + The date and time to capture the full payment. + """ + remainingBalanceChargeExactTime: DateTime + + """ + The period after capturing the payment for the amount due (`remainingBalanceChargeTrigger`), and before capturing the full payment. Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """ + The checkout charge policy for the selling plan. + """ + checkoutCharge: SellingPlanCheckoutChargeInput +} + +""" +Represents a fixed selling plan delivery policy. +""" +type SellingPlanFixedDeliveryPolicy { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + A buffer period for orders to be included in next fulfillment anchor. + """ + cutoff: Int + + """ + The date and time when the fulfillment should trigger. + """ + fulfillmentExactTime: DateTime + + """ + What triggers the fulfillment. The value must be one of ANCHOR, ASAP, EXACT_TIME, or UNKNOWN. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger! + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanFixedDeliveryPolicyIntent! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields required to create or update a fixed delivery policy. +""" +input SellingPlanFixedDeliveryPolicyInput { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + What triggers the fulfillment. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger + + """ + The date and time when the fulfillment should trigger. + """ + fulfillmentExactTime: DateTime + + """ + A buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Whether the delivery policy is merchant or buyer-centric. + """ + intent: SellingPlanFixedDeliveryPolicyIntent + + """ + The pre-anchor behavior. + """ + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior +} + +""" +Possible intentions of a Delivery Policy. +""" +enum SellingPlanFixedDeliveryPolicyIntent { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behavior of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanFixedDeliveryPolicyPreAnchorBehavior { + """ + Orders placed can be fulfilled / delivered immediately. Orders placed inside a cutoff can be fulfilled / delivered at the next anchor. + """ + ASAP + + """ + Orders placed can be fulfilled / delivered at the next anchor date. + Orders placed inside a cutoff will skip the next anchor and can be fulfilled / + delivered at the following anchor. + """ + NEXT +} + +""" +Represents the pricing policy of a subscription or deferred purchase option selling plan. +The selling plan fixed pricing policy works with the billing and delivery policy +to determine the final price. Discounts are divided among fulfillments. +For example, a subscription with a $10 discount and two deliveries will have a $5 +discount applied to each delivery. +""" +type SellingPlanFixedPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + The date and time when the fixed selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a fixed selling plan pricing policy. +""" +input SellingPlanFixedPricingPolicyInput { + """ + ID of the pricing policy. + """ + id: ID + + """ + Price adjustment type defined by the policy. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType + + """ + Price adjustment value defined by the policy. + """ + adjustmentValue: SellingPlanPricingPolicyValueInput +} + +""" +Describes what triggers fulfillment. +""" +enum SellingPlanFulfillmentTrigger { + """ + Use the anchor values to calculate fulfillment date. + """ + ANCHOR + + """ + As soon as possible. + """ + ASAP + + """ + At an exact time defined by the fulfillment_exact_time field. + """ + EXACT_TIME + + """ + Unknown. Usually to be determined in the future. + """ + UNKNOWN +} + +""" +A selling method that defines how products can be sold through purchase options like subscriptions, pre-orders, or try-before-you-buy. Groups one or more [`SellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan) objects that share the same selling method and options. + +The group provides buyer-facing labels and merchant-facing descriptions for the selling method. Associates [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects with selling plan groups to offer them through these purchase options. + +> Caution: +> Selling plan groups and their associated records are automatically deleted 48 hours after a merchant uninstalls the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) that created them. Back up these records if you need to restore them later. +""" +type SellingPlanGroup implements HasPublishedTranslations & Node { + """ + The ID for app, exposed in Liquid and product JSON. + """ + appId: String + + """ + Whether the given product is directly associated to the selling plan group. + """ + appliesToProduct("The ID of the product." productId: ID!): Boolean! + + """ + Whether the given product variant is directly associated to the selling plan group. + """ + appliesToProductVariant("The ID of the product." productVariantId: ID!): Boolean! + + """ + Whether any of the product variants of the given product are associated to the selling plan group. + """ + appliesToProductVariants("The ID of the product." productId: ID!): Boolean! + + """ + The date and time when the selling plan group was created. + """ + createdAt: DateTime! + + """ + The merchant-facing description of the selling plan group. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The merchant-facing label of the selling plan group. + """ + merchantCode: String! + + """ + The buyer-facing label of the selling plan group. + """ + name: String! + + """ + The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + The relative position of the selling plan group for display. + """ + position: Int + + """ + Product variants associated to the selling plan group. + """ + productVariants("Filters the product variants by a product ID." productId: ID, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! + + """ + A count of product variants associated to the selling plan group. + """ + productVariantsCount("The ID of the product to scope the count to." productId: ID): Count + + """ + Products associated to the selling plan group. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductConnection! + + """ + A count of products associated to the selling plan group. + """ + productsCount: Count + + """ + Selling plans associated to the selling plan group. + """ + sellingPlans("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanConnection! + + """ + A summary of the policies associated to the selling plan group. + """ + summary: String + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! +} + +""" +Return type for `sellingPlanGroupAddProductVariants` mutation. +""" +type SellingPlanGroupAddProductVariantsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupAddProducts` mutation. +""" +type SellingPlanGroupAddProductsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type for paginating through multiple SellingPlanGroups. +""" +type SellingPlanGroupConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanGroupEdge!]! + + """ + A list of nodes that are contained in SellingPlanGroupEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [SellingPlanGroup!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `sellingPlanGroupCreate` mutation. +""" +type SellingPlanGroupCreatePayload { + """ + The created selling plan group object. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupDelete` mutation. +""" +type SellingPlanGroupDeletePayload { + """ + The ID of the deleted selling plan group object. + """ + deletedSellingPlanGroupId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. +""" +type SellingPlanGroupEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanGroupEdge. + """ + node: SellingPlanGroup! +} + +""" +The input fields required to create or update a selling plan group. +""" +input SellingPlanGroupInput { + """ + Buyer facing label of the selling plan group. + """ + name: String + + """ + ID for app, exposed in Liquid and product JSON. + """ + appId: String + + """ + Merchant facing label of the selling plan group. + """ + merchantCode: String + + """ + Merchant facing description of the selling plan group. + """ + description: String + + """ + List of selling plans to create. + """ + sellingPlansToCreate: [SellingPlanInput!] + + """ + List of selling plans to update. + """ + sellingPlansToUpdate: [SellingPlanInput!] + + """ + List of selling plans ids to delete. + """ + sellingPlansToDelete: [ID!] + + """ + The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!] + + """ + Relative value for display purposes of the selling plan group. A lower position will be displayed before a higher one. + """ + position: Int +} + +""" +Return type for `sellingPlanGroupRemoveProductVariants` mutation. +""" +type SellingPlanGroupRemoveProductVariantsPayload { + """ + The removed product variant ids. + """ + removedProductVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupRemoveProducts` mutation. +""" +type SellingPlanGroupRemoveProductsPayload { + """ + The removed product ids. + """ + removedProductIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields for resource association with a Selling Plan Group. +""" +input SellingPlanGroupResourceInput { + """ + The IDs of the Variants to add to the Selling Plan Group. + """ + productVariantIds: [ID!] + + """ + The IDs of the Products to add to the Selling Plan Group. + """ + productIds: [ID!] +} + +""" +The set of valid sort keys for the SellingPlanGroup query. +""" +enum SellingPlanGroupSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `sellingPlanGroupUpdate` mutation. +""" +type SellingPlanGroupUpdatePayload { + """ + The IDs of the deleted Subscription Plans. + """ + deletedSellingPlanIds: [ID!] + + """ + The updated Selling Plan Group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Represents a selling plan group custom error. +""" +type SellingPlanGroupUserError implements DisplayableError { + """ + The error code. + """ + code: SellingPlanGroupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `SellingPlanGroupUserError`. +""" +enum SellingPlanGroupUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + The input value should be greater than the minimum allowed value. + """ + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + The input value should be less than the maximum value allowed. + """ + LESS_THAN + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The input value is not a number. + """ + NOT_A_NUMBER + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is the wrong length. + """ + WRONG_LENGTH + + """ + Exceeded the selling plan limit (31). + """ + SELLING_PLAN_COUNT_UPPER_BOUND + + """ + Must include at least one selling plan. + """ + SELLING_PLAN_COUNT_LOWER_BOUND + + """ + Selling plan's billing policy max cycles must be greater than min cycles. + """ + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES + + """ + Selling plan's billing and delivery policies anchors must be equal. + """ + SELLING_PLAN_BILLING_AND_DELIVERY_POLICY_ANCHORS_MUST_BE_EQUAL + + """ + Selling plan's billing cycle must be a multiple of delivery cycle. + """ + SELLING_PLAN_BILLING_CYCLE_MUST_BE_A_MULTIPLE_OF_DELIVERY_CYCLE + + """ + Selling plan's pricing policies must contain one fixed pricing policy. + """ + SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY + + """ + Cannot define option2 on this selling plan as there's no label on the parent selling plan group. + """ + SELLING_PLAN_MISSING_OPTION2_LABEL_ON_PARENT_GROUP + + """ + Cannot define option3 on this selling plan as there's no label on the parent selling plan group. + """ + SELLING_PLAN_MISSING_OPTION3_LABEL_ON_PARENT_GROUP + + """ + Selling plan's option2 is required because option2 exists. + """ + SELLING_PLAN_OPTION2_REQUIRED_AS_DEFINED_ON_PARENT_GROUP + + """ + Selling plan's option3 is required because option3 exists. + """ + SELLING_PLAN_OPTION3_REQUIRED_AS_DEFINED_ON_PARENT_GROUP + + """ + Selling plans can't have more than 2 pricing policies. + """ + SELLING_PLAN_PRICING_POLICIES_LIMIT + + """ + The selling plan list provided contains 1 or more invalid IDs. + """ + RESOURCE_LIST_CONTAINS_INVALID_IDS + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Selling plan group does not exist. + """ + GROUP_DOES_NOT_EXIST + + """ + Selling plan group could not be deleted. + """ + GROUP_COULD_NOT_BE_DELETED + + """ + Could not add the resource to the selling plan group. + """ + ERROR_ADDING_RESOURCE_TO_GROUP + + """ + Missing delivery policy. + """ + SELLING_PLAN_DELIVERY_POLICY_MISSING + + """ + Missing billing policy. + """ + SELLING_PLAN_BILLING_POLICY_MISSING + + """ + Selling plan does not exist. + """ + PLAN_DOES_NOT_EXIST + + """ + Selling plan ID must be specified to update. + """ + PLAN_ID_MUST_BE_SPECIFIED_TO_UPDATE + + """ + Only one billing policy type can be defined. + """ + ONLY_NEED_ONE_BILLING_POLICY_TYPE + + """ + Only one delivery policy type can be defined. + """ + ONLY_NEED_ONE_DELIVERY_POLICY_TYPE + + """ + Only one pricing policy type can be defined. + """ + ONLY_NEED_ONE_PRICING_POLICY_TYPE + + """ + Billing and delivery policy types must be the same. + """ + BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME + + """ + Only one pricing policy adjustment value type can be defined. + """ + ONLY_NEED_ONE_PRICING_POLICY_VALUE + + """ + Pricing policy's adjustment value and adjustment type must match. + """ + PRICING_POLICY_ADJUSTMENT_VALUE_AND_TYPE_MUST_MATCH + + """ + Cannot have multiple selling plans with the same name. + """ + SELLING_PLAN_DUPLICATE_NAME + + """ + Cannot have multiple selling plans with the same options. + """ + SELLING_PLAN_DUPLICATE_OPTIONS + + """ + A fixed selling plan can have at most one pricing policy. + """ + SELLING_PLAN_FIXED_PRICING_POLICIES_LIMIT + + """ + A fixed billing policy's remaining_balance_charge_exact_time can't be blank when the remaining_balance_charge_trigger is EXACT_TIME. + """ + REMAINING_BALANCE_CHARGE_EXACT_TIME_REQUIRED + + """ + A fixed billing policy's checkout charge value and type must match. + """ + CHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH + + """ + A fixed billing policy's checkout charge can have at most one value. + """ + ONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE + + """ + A fixed billing policy's remaining_balance_charge_exact_time must not be present when the remaining_balance_charge_trigger isn't EXACT_TIME. + """ + REMAINING_BALANCE_CHARGE_EXACT_TIME_NOT_ALLOWED + + """ + A fixed billing policy's remaining_balance_charge_time_after_checkout must be present and greater than zero when the remaining_balance_charge_trigger is TIME_AFTER_CHECKOUT. + """ + REMAINING_BALANCE_CHARGE_TIME_AFTER_CHECKOUT_MUST_BE_GREATER_THAN_ZERO + + """ + A fixed billing policy's remaining_balance_charge_trigger must be NO_REMAINING_BALANCE when the checkout_charge_type is PERCENTAGE and checkout_charge_value is 100. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_ON_FULL_CHECKOUT + + """ + A fixed billing policy's remaining_balance_charge_trigger can't be NO_REMAINING_BALANCE when the checkout_charge_type is PERCENTAGE and checkout_charge_value is less than 100. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PARTIAL_PERCENTAGE_CHECKOUT_CHARGE + + """ + A fixed billing policy's remaining_balance_charge_trigger can't be NO_REMAINING_BALANCE when the checkout_charge_type is PRICE. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PRICE_CHECKOUT_CHARGE + + """ + A fixed billing policy's fulfillment_exact_time can't be blank when the fulfillment_trigger is EXACT_TIME. + """ + FULFILLMENT_EXACT_TIME_REQUIRED + + """ + A fixed billing policy's fulfillment_exact_time must not be present when the fulfillment_trigger isn't EXACT_TIME. + """ + FULFILLMENT_EXACT_TIME_NOT_ALLOWED + + """ + A fixed delivery policy's anchors must not be present when the fulfillment_trigger isn't ANCHOR. + """ + SELLING_PLAN_ANCHORS_NOT_ALLOWED + + """ + A fixed delivery policy's anchors must be present when the fulfillment_trigger is ANCHOR. + """ + SELLING_PLAN_ANCHORS_REQUIRED + + """ + A selling plan can't have both fixed and recurring billing policies. + """ + ONLY_ONE_OF_FIXED_OR_RECURRING_BILLING + + """ + A selling plan can't have both fixed and recurring delivery policies. + """ + ONLY_ONE_OF_FIXED_OR_RECURRING_DELIVERY + + """ + Billing policy's interval is too large. + """ + BILLING_POLICY_INTERVAL_TOO_LARGE + + """ + Delivery policy's interval is too large. + """ + DELIVERY_POLICY_INTERVAL_TOO_LARGE + + """ + The input submitted is invalid. + """ + INVALID_INPUT +} + +""" +The input fields to create or update a selling plan. +""" +input SellingPlanInput { + """ + ID of the selling plan. + """ + id: ID + + """ + Buyer facing string which describes the selling plan content. + """ + name: String + + """ + Buyer facing string which describes the selling plan commitment. + """ + description: String + + """ + Selling plan policy which describes the billing details. + """ + billingPolicy: SellingPlanBillingPolicyInput + + """ + A selling plan policy which describes the delivery details. + """ + deliveryPolicy: SellingPlanDeliveryPolicyInput + + """ + A selling plan policy which describes the inventory details. + """ + inventoryPolicy: SellingPlanInventoryPolicyInput + + """ + Additional customizable information to associate with the SellingPlan. + """ + metafields: [MetafieldInput!] + + """ + The pricing policies which describe the pricing details. Each selling plan + can only contain a maximum of 2 pricing policies. + """ + pricingPolicies: [SellingPlanPricingPolicyInput!] + + """ + The values of all options available on the selling plan. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!] + + """ + Relative value for display purposes of this plan. A lower position will be displayed before a higher one. + """ + position: Int + + """ + The category used to classify this selling plan for reporting purposes. + """ + category: SellingPlanCategory +} + +""" +Represents valid selling plan interval. +""" +enum SellingPlanInterval { + """ + Day interval. + """ + DAY + + """ + Week interval. + """ + WEEK + + """ + Month interval. + """ + MONTH + + """ + Year interval. + """ + YEAR +} + +""" +The selling plan inventory policy. +""" +type SellingPlanInventoryPolicy { + """ + When to reserve inventory for the order. + """ + reserve: SellingPlanReserve! +} + +""" +The input fields required to create or update an inventory policy. +""" +input SellingPlanInventoryPolicyInput { + """ + When to reserve inventory for the order. The value must be ON_FULFILLMENT or ON_SALE. + """ + reserve: SellingPlanReserve +} + +""" +Represents the type of pricing associated to the selling plan (for example, a $10 or 20% discount that is set +for a limited period or that is fixed for the duration of the subscription). Selling plan pricing policies and +associated records (selling plan groups, selling plans, billing policy, and delivery policy) are deleted 48 +hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need +to restore them later. +""" +union SellingPlanPricingPolicy = SellingPlanFixedPricingPolicy|SellingPlanRecurringPricingPolicy + +""" +Represents a selling plan pricing policy adjustment type. +""" +enum SellingPlanPricingPolicyAdjustmentType { + """ + Percentage off adjustment. + """ + PERCENTAGE + + """ + Fixed amount off adjustment. + """ + FIXED_AMOUNT + + """ + Price of the policy. + """ + PRICE +} + +""" +Represents a selling plan pricing policy adjustment value type. +""" +union SellingPlanPricingPolicyAdjustmentValue = MoneyV2|SellingPlanPricingPolicyPercentageValue + +""" +Represents selling plan pricing policy common fields. +""" +interface SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! +} + +""" +The input fields required to create or update a selling plan pricing policy. +""" +input SellingPlanPricingPolicyInput { + """ + Recurring pricing policy details. + """ + recurring: SellingPlanRecurringPricingPolicyInput + + """ + Fixed pricing policy details. + """ + fixed: SellingPlanFixedPricingPolicyInput +} + +""" +The percentage value of a selling plan pricing policy percentage type. +""" +type SellingPlanPricingPolicyPercentageValue { + """ + The percentage value. + """ + percentage: Float! +} + +""" +The input fields required to create or update a pricing policy adjustment value. +""" +input SellingPlanPricingPolicyValueInput { + """ + The percentage value. + """ + percentage: Float + + """ + The fixed value for an fixed amount off or a new policy price. + """ + fixedValue: Decimal +} + +""" +Represents a recurring selling plan billing policy. +""" +type SellingPlanRecurringBillingPolicy { + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The date and time when the selling plan billing policy was created. + """ + createdAt: DateTime! + + """ + The billing frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between billings. + """ + intervalCount: Int! + + """ + Maximum number of billing iterations. + """ + maxCycles: Int + + """ + Minimum number of billing iterations. + """ + minCycles: Int +} + +""" +The input fields required to create or update a recurring billing policy. +""" +input SellingPlanRecurringBillingPolicyInput { + """ + The billing frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval + + """ + The number of intervals between billings. + """ + intervalCount: Int + + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + Minimum number of billing iterations. + """ + minCycles: Int + + """ + Maximum number of billing iterations. + """ + maxCycles: Int +} + +""" +Represents a recurring selling plan delivery policy. +""" +type SellingPlanRecurringDeliveryPolicy { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The date and time when the selling plan delivery policy was created. + """ + createdAt: DateTime! + + """ + Number of days which represent a buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent! + + """ + The delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between deliveries. + """ + intervalCount: Int! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields to create or update a recurring delivery policy. +""" +input SellingPlanRecurringDeliveryPolicyInput { + """ + The delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval + + """ + The number of intervals between deliveries. + """ + intervalCount: Int + + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + A buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Intention of this delivery policy, it can be either: delivery or fulfillment. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent + + """ + The pre-anchor behavior. It can be either: asap or next. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior +} + +""" +Whether the delivery policy is merchant or buyer-centric. +""" +enum SellingPlanRecurringDeliveryPolicyIntent { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanRecurringDeliveryPolicyPreAnchorBehavior { + """ + The orders placed can be fulfilled or delivered immediately. The orders placed inside a cutoff can be fulfilled or delivered at the next anchor. + """ + ASAP + + """ + The orders placed can be fulfilled or delivered at the next anchor date. + The orders placed inside a cutoff will skip the next anchor and can be fulfilled or + delivered at the following anchor. + """ + NEXT +} + +""" +Represents a recurring selling plan pricing policy. It applies after the fixed pricing policy. By using the afterCycle parameter, you can specify the cycle when the recurring pricing policy comes into effect. Recurring pricing policies are not available for deferred purchase options. +""" +type SellingPlanRecurringPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + Cycle after which this pricing policy applies. + """ + afterCycle: Int + + """ + The date and time when the recurring selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a recurring selling plan pricing policy. +""" +input SellingPlanRecurringPricingPolicyInput { + """ + ID of the pricing policy. + """ + id: ID + + """ + Price adjustment type defined by the policy. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType + + """ + Price adjustment value defined by the policy. + """ + adjustmentValue: SellingPlanPricingPolicyValueInput + + """ + Cycle after which the pricing policy applies. + """ + afterCycle: Int! +} + +""" +When to capture the payment for the remaining amount due. +""" +enum SellingPlanRemainingBalanceChargeTrigger { + """ + When there's no remaining balance to be charged after checkout. + """ + NO_REMAINING_BALANCE + + """ + At an exact time defined by the remaining_balance_charge_exact_time field. + """ + EXACT_TIME + + """ + After the duration defined by the remaining_balance_charge_time_after_checkout field. + """ + TIME_AFTER_CHECKOUT + + """ + When the order is fulfilled. + """ + ON_FULFILLMENT +} + +""" +When to reserve inventory for a selling plan. +""" +enum SellingPlanReserve { + """ + Reserve inventory when order is fulfilled. + """ + ON_FULFILLMENT + + """ + Reserve inventory at time of sale. + """ + ON_SALE +} + +""" +A server pixel stores configuration for streaming customer interactions to an EventBridge or PubSub endpoint. +""" +type ServerPixel implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The current state of this server pixel. + """ + status: ServerPixelStatus + + """ + Address of the EventBridge or PubSub endpoint. + """ + webhookEndpointAddress: String +} + +""" +Return type for `serverPixelCreate` mutation. +""" +type ServerPixelCreatePayload { + """ + The new server pixel. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `serverPixelDelete` mutation. +""" +type ServerPixelDeletePayload { + """ + The ID of the server pixel that was deleted, if one was deleted. + """ + deletedServerPixelId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +The current state of a server pixel. +""" +enum ServerPixelStatus { + """ + This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. + """ + CONNECTED + + """ + This server pixel is disconnected and unconfigured: it does not stream events to the endpoint and no endpoint address had been added to the server pixel. + """ + DISCONNECTED_UNCONFIGURED + + """ + This server pixel is disconnected: it does not stream events to the endpoint and an endpoint address has been added to the server pixel. + """ + DISCONNECTED_CONFIGURED +} + +""" +The set of valid sort keys for the ShipmentLineItem query. +""" +enum ShipmentLineItemSortKeys { + """ + Sort by the `id` value. + """ + ID +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum ShippingDiscountClass { + """ + Combined as a shipping discount. + """ + SHIPPING +} + +""" +The shipping method that customers select for an order. Includes pricing details, carrier information, and any applied discounts or taxes. +""" +type ShippingLine { + """ + A reference to the carrier service that provided the rate. + Present when the rate was computed by a third-party carrier service. + """ + carrierIdentifier: String + + """ + A reference to the shipping method. + """ + code: String + + """ + The current shipping price after applying refunds, after applying discounts. If the parent `order.taxesIncluded`` field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. + """ + currentDiscountedPriceSet: MoneyBag! + + """ + Whether the shipping line is custom or not. + """ + custom: Boolean! + + """ + The general classification of the delivery method. + """ + deliveryCategory: String + + """ + The discounts that have been allocated to the shipping line. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The pre-tax shipping price with discounts applied. + As of API version 2024-07, this will be calculated including cart level discounts, such as the free shipping discount. + """ + discountedPrice: MoneyV2! @deprecated(reason: "Use `discountedPriceSet` instead.") + + """ + The shipping price after applying discounts. If the parent order.taxesIncluded field is true, then this price includes taxes. If not, it's the pre-tax price. + As of API version 2024-07, this will be calculated including cart level discounts, such as the free shipping discount. + """ + discountedPriceSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID + + """ + Whether the shipping line has been removed. + """ + isRemoved: Boolean! + + """ + The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. + """ + originalPrice: MoneyV2! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. + """ + originalPriceSet: MoneyBag! + + """ + The phone number at the shipping address. + """ + phone: String + + """ + Returns the price of the shipping line. + """ + price: Money! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The fulfillment service requested for the shipping method. + Present if the shipping method requires processing by a third party fulfillment service. + """ + requestedFulfillmentService: FulfillmentService @deprecated(reason: "requestedFulfillmentService is no longer in use. Order routing does not use the requestedFulfillmentService during order and fulfillment order creation.") + + """ + A unique identifier for the shipping rate. The format can change without notice and isn't meant to be shown to users. + """ + shippingRateHandle: String + + """ + Returns the rate source for the shipping line. + """ + source: String + + """ + The TaxLine objects connected to this shipping line. + """ + taxLines: [TaxLine!]! + + """ + Returns the title of the shipping line. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple ShippingLines. +""" +type ShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShippingLineEdge!]! + + """ + A list of nodes that are contained in ShippingLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShippingLine!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShippingLine and a cursor during pagination. +""" +type ShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShippingLineEdge. + """ + node: ShippingLine! +} + +""" +The input fields for specifying the shipping details for the draft order. + +> Note: +> A custom shipping line includes a title and price with `shippingRateHandle` set to `nil`. A shipping line with a carrier-provided shipping rate (currently set via the Shopify admin) includes the shipping rate handle. +""" +input ShippingLineInput { + """ + Price of the shipping rate in shop currency. + """ + price: Money @deprecated(reason: "`priceWithCurrency` should be used instead, where currencies can be specified.") + + """ + Price of the shipping rate with currency. If provided, `price` will be ignored. + """ + priceWithCurrency: MoneyInput + + """ + A unique identifier for the shipping rate. + """ + shippingRateHandle: String + + """ + Title of the shipping rate. + """ + title: String +} + +""" +A sale associated with a shipping charge. +""" +type ShippingLineSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + The shipping line item for the associated sale. `shippingLine` is not available if the `SaleActionType` is a return. + """ + shippingLine: ShippingLine + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +Return type for `shippingPackageDelete` mutation. +""" +type ShippingPackageDeletePayload { + """ + The ID of the deleted shipping package. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shippingPackageMakeDefault` mutation. +""" +type ShippingPackageMakeDefaultPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Type of a shipping package. +""" +enum ShippingPackageType { + """ + A shipping box. + """ + BOX + + """ + A flat rate packaging supplied by a carrier. + """ + FLAT_RATE + + """ + An envelope. + """ + ENVELOPE + + """ + A soft-pack, bubble-wrap or vinyl envelope. + """ + SOFT_PACK +} + +""" +Return type for `shippingPackageUpdate` mutation. +""" +type ShippingPackageUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A shipping option associated with order delivery that includes pricing and service information. +""" +type ShippingRate { + """ + Human-readable unique identifier for this shipping rate. + """ + handle: String! + + """ + The cost associated with the shipping rate. + """ + price: MoneyV2! + + """ + The name of the shipping rate. + """ + title: String! +} + +""" +Represents the shipping costs refunded on the Refund. +""" +type ShippingRefund { + """ + The monetary value of the shipping fees to be refunded. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The monetary value of the shipping fees to be refunded in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The maximum amount of shipping fees currently refundable. + """ + maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") + + """ + The maximum amount of shipping fees currently refundable in shop and presentment currencies. + """ + maximumRefundableSet: MoneyBag! + + """ + The monetary value of the tax allocated to shipping fees to be refunded. + """ + tax: Money! @deprecated(reason: "Use `taxSet` instead.") + + """ + The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies. + """ + taxSet: MoneyBag! +} + +""" +The input fields that are required to reimburse shipping costs. +""" +input ShippingRefundInput { + """ + The monetary value of the shipping fees to be reimbursed. + """ + amount: Money + + """ + Whether a full refund is provided. + """ + fullRefund: Boolean +} + +""" +The central configuration and settings hub for a Shopify store. Access business information, operational preferences, feature availability, and store-wide settings that control how the shop operates. + +Includes core business details like the shop name, contact emails, billing address, and currency settings. The shop configuration determines customer account requirements, available sales channels, enabled features, payment settings, and policy documents. Also provides access to shop-level resources such as staff members, fulfillment services, navigation settings, and storefront access tokens. +""" +type Shop implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """ + Account owner information. + """ + accountOwner: StaffMember! + + """ + A list of the shop's active alert messages that appear in the Shopify admin. + """ + alerts: [ShopAlert!]! + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategories: [ProductCategory!]! @deprecated(reason: "Use `allProductCategoriesList` instead.") + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategoriesList: [TaxonomyCategory!]! + + """ + The token required to query the shop's reports or dashboards. + """ + analyticsToken: String! @deprecated(reason: "Not supported anymore.") + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders("The assigment status of the fulfillment orders that should be returned.\nIf `assignmentStatus` argument is not provided, then\nthe query will return all assigned fulfillment orders,\nexcept those that have the `CLOSED` status." assignmentStatus: FulfillmentOrderAssignmentStatus, "Returns fulfillment orders only for certain locations, specified by a list of location IDs." locationIds: [ID!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FulfillmentOrderSortKeys = ID): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.assignedFulfillmentOrders` instead. Details: https://shopify.dev/changelog/moving-the-shop-assignedfulfillmentorders-connection-to-queryroot") + + """ + The list of sales channels not currently installed on the shop. + """ + availableChannelApps("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): AppConnection! + + """ + The shop's billing address information. + """ + billingAddress: ShopAddress! @deprecated(reason: "Use `shopAddress` instead.") + + """ + List of all channel definitions associated with a shop. + """ + channelDefinitionsForInstalledChannels: [AvailableChannelDefinitionsByChannel!]! + + """ + List of the shop's active sales channels. + """ + channels("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ChannelConnection! @deprecated(reason: "Use `QueryRoot.channels` instead.") + + """ + Specifies whether the shop supports checkouts via Checkout API. + """ + checkoutApiSupported: Boolean! + + """ + List of the shop's collections. + """ + collections("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CollectionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| collection_type | string | | - `custom`
- `smart` |\n| handle | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| product_id | id | Filter by collections containing a product by its ID. |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the collection was published to the Online Store. |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| title | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): CollectionConnection! @deprecated(reason: "Use `QueryRoot.collections` instead.") + + """ + The public-facing contact email address for the shop. + Customers will use this email to communicate with the shop owner. + """ + contactEmail: String! + + """ + Countries that have been defined in shipping zones for the shop. + """ + countriesInShippingZones: CountriesInShippingZones! + + """ + The date and time when the shop was created. + """ + createdAt: DateTime! + + """ + The three letter code for the currency that the shop sells in. + """ + currencyCode: CurrencyCode! + + """ + How currencies are displayed on your store. + """ + currencyFormats: CurrencyFormats! + + """ + The presentment currency settings for the shop excluding the shop's own currency. + """ + currencySettings("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CurrencySettingConnection! + + """ + Whether customer accounts are required, optional, or disabled for the shop. + """ + customerAccounts: ShopCustomerAccountsSetting! + + """ + Information about the shop's customer accounts. + """ + customerAccountsV2: CustomerAccountsV2! + + """ + A list of tags that have been added to customer accounts. + """ + customerTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!): StringConnection! + + """ + Customer accounts associated to the shop. + """ + customers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: CustomerSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| accepts_marketing | boolean | Filter by whether a customer has consented to receive marketing material. | | | - `accepts_marketing:true` |\n| country | string | Filter by the country associated with the customer's address. Use either the country name or the two-letter country code. | | | - `country:Canada`
- `country:JP` |\n| customer_date | time | Filter by the date and time when the customer record was created. This query parameter filters by the [`createdAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-createdAt) field. | | | - `customer_date:'2024-03-15T14:30:00Z'`
- `customer_date: >='2024-01-01'` |\n| email | string | The customer's email address, used to communicate information about orders and for the purposes of email marketing campaigns. You can use a wildcard value to filter the query by customers who have an email address specified. Please note that _email_ is a tokenized field: To retrieve exact matches, quote the email address (_phrase query_) as described in [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). | | | - `email:gmail.com`
- `email:\"bo.wang@example.com\"`
- `email:*` |\n| first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| last_abandoned_order_date | time | Filter by the date and time of the customer's most recent abandoned checkout. An abandoned checkout occurs when a customer adds items to their cart, begins the checkout process, but leaves the site without completing their purchase. | | | - `last_abandoned_order_date:'2024-04-01T10:00:00Z'`
- `last_abandoned_order_date: >='2024-01-01'` |\n| last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` |\n| order_date | time | Filter by the date and time that the order was placed by the customer. Use this query filter to check if a customer has placed at least one order within a specified date range. | | | - `order_date:'2024-02-20T00:00:00Z'`
- `order_date: >='2024-01-01'`
- `order_date:'2024-01-01..2024-03-31'` |\n| orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` |\n| phone | string | The phone number of the customer, used to communicate information about orders and for the purposes of SMS marketing campaigns. You can use a wildcard value to filter the query by customers who have a phone number specified. | | | - `phone:+18005550100`
- `phone:*` |\n| state | string | Filter by the [state](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-state) of the customer's account with the shop. This filter is only valid when [Classic Customer Accounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-customerAccountsVersion) is active. | | | - `state:ENABLED`
- `state:INVITED`
- `state:DISABLED`
- `state:DECLINED` |\n| tag | string | Filter by the tags that are associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag:'VIP'`
- `tag:'Wholesale,Repeat'` |\n| tag_not | string | Filter by the tags that aren't associated with the customer. This query parameter accepts multiple tags separated by commas. | | | - `tag_not:'Prospect'`
- `tag_not:'Test,Internal'` |\n| total_spent | float | Filter by the total amount of money a customer has spent across all orders. | | | - `total_spent:100.50`
- `total_spent:50.00`
- `total_spent:>100.50`
- `total_spent:>50.00` |\n| updated_at | time | The date and time, matching a whole day, when the customer's information was last updated. | | | - `updated_at:2024-01-01T00:00:00Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): CustomerConnection! @deprecated(reason: "Use `QueryRoot.customers` instead.") + + """ + The shop's meta description used in search engine results. + """ + description: String + + """ + The domains configured for the shop. + """ + domains: [Domain!]! @deprecated(reason: "Use `domainsPaginated` instead.") + + """ + A list of tags that have been added to draft orders. + """ + draftOrderTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!): StringConnection! + + """ + The shop owner's email address. + Shopify will use this email address to communicate with the shop owner. + """ + email: String! + + """ + The presentment currencies enabled for the shop. + """ + enabledPresentmentCurrencies: [CurrencyCode!]! + + """ + The entitlements for a shop. + """ + entitlements: EntitlementsType! + + """ + The set of features enabled for the shop. + """ + features: ShopFeatures! + + """ + The paginated list of merchant-managed and third-party fulfillment orders. + """ + fulfillmentOrders("Whether to include closed fulfillment orders." includeClosed: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: FulfillmentOrderSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| assigned_location_id | id |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| status | string |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.fulfillmentOrders` instead.") + + """ + List of the shop's installed fulfillment services. + """ + fulfillmentServices: [FulfillmentService!]! + + """ + The shop's time zone as defined by the IANA. + """ + ianaTimezone: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + List of the shop's inventory items. + """ + inventoryItems("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| created_at | time |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| sku | string | Filter by the inventory item [`sku`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| updated_at | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): InventoryItemConnection! @deprecated(reason: "Use `QueryRoot.inventoryItems` instead.") + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + limitedPendingOrderCount: LimitedPendingOrderCount! @deprecated(reason: "Use `QueryRoot.pendingOrdersCount` instead.") + + """ + List of active locations of the shop. + """ + locations("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: LocationSortKeys = NAME, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| active | string |\n| address1 | string |\n| address2 | string |\n| city | string |\n| country | string |\n| created_at | time |\n| geolocated | boolean |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| legacy | boolean |\n| location_id | id |\n| name | string |\n| pickup_in_store | string | | - `enabled`
- `disabled` |\n| province | string |\n| zip | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "Whether to include the legacy locations of fulfillment services." includeLegacy: Boolean = false, "Whether to include the locations that are deactivated." includeInactive: Boolean = false): LocationConnection! @deprecated(reason: "Use `QueryRoot.locations` instead.") + + """ + Whether SMS marketing has been enabled on the shop's checkout configuration settings. + """ + marketingSmsConsentEnabledAtCheckout: Boolean! + + """ + The approval signals for a shop to support onboarding to channel apps. + """ + merchantApprovalSignals: MerchantApprovalSignals + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! + + """ + The shop's .myshopify.com domain name. + """ + myshopifyDomain: String! + + """ + The shop's name. + """ + name: String! + + """ + The shop's settings related to navigation. + """ + navigationSettings: [NavigationItem!]! + + """ + The prefix that appears before order numbers. + """ + orderNumberFormatPrefix: String! + + """ + The suffix that appears after order numbers. + """ + orderNumberFormatSuffix: String! + + """ + A list of tags that have been added to orders. + """ + orderTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!, "Sort type." sort: ShopTagSort = ALPHABETICAL): StringConnection! + + """ + A list of the shop's orders. + """ + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: OrderSortKeys = PROCESSED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| cart_token | string | Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. | | | - `cart_token:abc123` |\n| channel | string | Filter by the order attribution [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/OrderAttribution#field-OrderAttribution.fields.handle) (`Order.attribution.handle`) field. The legacy channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) (`ChannelInformation.channelDefinition.handle`) field is deprecated but remains supported during the deprecation period. | | | - `channel:web`
- `channel:web,pos` |\n| channel_id | id | Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) field. | | | - `channel_id:123` |\n| chargeback_status | string | Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. | - `accepted`
- `charge_refunded`
- `lost`
- `needs_response`
- `under_review`
- `won` | | - `chargeback_status:accepted` |\n| checkout_token | string | Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. | | | - `checkout_token:abc123` |\n| confirmation_number | string | Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. | | | - `confirmation_number:ABC123` |\n| created_at | time | Filter by the date and time when the order was created in Shopify's system. | | | - `created_at:2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| credit_card_last4 | string | Filter by the last four digits of the payment card that was used to pay for the order. This filter matches only the last four digits of the card for heightened security. | | | - `credit_card_last4:1234` |\n| current_total_price | float | Filter by the current total price of the order in the shop currency, including any returns/refunds/removals. This filter supports both exact values and ranges. | | | - `current_total_price:10`
- `current_total_price:>=5.00 current_total_price:<=20.99` |\n| customer_id | id | Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. | | | - `customer_id:123` |\n| delivery_method | string | Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) field. | - `shipping`
- `pick-up`
- `retail`
- `local`
- `pickup-point`
- `none` | | - `delivery_method:shipping` |\n| discount_code | string | Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. | | | - `discount_code:ABC123` |\n| email | string | Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. | | | - `email:example@shopify.com` |\n| financial_status | string | Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) field. | - `paid`
- `pending`
- `authorized`
- `partially_paid`
- `partially_refunded`
- `refunded`
- `voided`
- `expired` | | - `financial_status:authorized` |\n| fraud_protection_level | string | Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. | - `fully_protected`
- `partially_protected`
- `not_protected`
- `pending`
- `not_eligible`
- `not_available` | | - `fraud_protection_level:fully_protected` |\n| fulfillment_location_id | id | Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) (`Fulfillment.location.id`) field. | | | - `fulfillment_location_id:123` |\n| fulfillment_status | string | Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) field to prioritize shipments or monitor order processing. | - `unshipped`
- `shipped`
- `fulfilled`
- `partial`
- `scheduled`
- `on_hold`
- `unfulfilled`
- `request_declined` | | - `fulfillment_status:fulfilled` |\n| gateway | string | Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. | | | - `gateway:shopify_payments` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| location_id | id | Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) that's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under **Settings** > **Locations**. If no ID is provided, then the primary location of the shop is returned. | | | - `location_id:123` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) field. | | | - `name:1001-A` |\n| payment_id | string | Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. | | | - `payment_id:abc123` |\n| payment_provider_id | id | Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. | | | - `payment_provider_id:123` |\n| po_number | string | Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) field. | | | - `po_number:P01001` |\n| processed_at | time | Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) field. | | | - `processed_at:2021-01-01T00:00:00Z` |\n| reference_location_id | id | Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. | | | - `reference_location_id:123` |\n| return_status | string | Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) to monitor returns processing and track which orders have active returns. | - `return_requested`
- `in_progress`
- `inspection_complete`
- `returned`
- `return_failed`
- `no_return` | | - `return_status:in_progress` |\n| risk_level | string | Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. | - `high`
- `medium`
- `low`
- `none`
- `pending` | | - `risk_level:high` |\n| sales_channel | string | Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. | | | - `sales_channel: some_sales_channel` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:ABC123` |\n| source_identifier | string | Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. | | | - `source_identifier:1234-12-1000` |\n| source_name | string | Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. | | | - `source_name:web`
- `source_name:shopify_draft_order` |\n| status | string | Filter by the order's status to manage workflows or analyze the order lifecycle. | - `open`
- `closed`
- `cancelled`
- `not_closed` | | - `status:open` |\n| subtotal_line_items_quantity | string | Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. | | | - `subtotal_line_items_quantity:10`
- `subtotal_line_items_quantity:5..20` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| test | boolean | Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. | | | - `test:true` |\n| total_weight | string | Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. | | | - `total_weight:10.5kg`
- `total_weight:>=5g total_weight:<=20g`
- `total_weight:.5 lb` |\n| updated_at | time | Filter by the date and time when the order was last updated in Shopify's system. | | | - `updated_at:2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): OrderConnection! @deprecated(reason: "Use `QueryRoot.orders` instead.") + + """ + The shop's settings related to payments. + """ + paymentSettings: PaymentSettings! + + """ + The shop's billing plan. + """ + plan: ShopPlan! + + """ + The primary domain of the shop's online store. + """ + primaryDomain: Domain! + + """ + The list of all images of all products for the shop. + """ + productImages("Image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead."), "Image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead."), "Crops the image according to the specified region." crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead."), "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1 @deprecated(reason: "Use `Image.url(transform: { scale:})` instead."), "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductImageSortKeys = CREATED_AT): ImageConnection! @deprecated(reason: "Use `files` instead. See [filesQuery](https://shopify.dev/docs/api/admin-graphql/latest/queries/files) and its [query](https://shopify.dev/docs/api/admin-graphql/latest/queries/files#argument-query) argument for more information.") + + """ + A list of tags that have been added to products. + """ + productTags("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!): StringConnection! @deprecated(reason: "Use `QueryRoot.productTags` instead.") + + """ + The list of types added to products. + """ + productTypes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!): StringConnection! @deprecated(reason: "Use `QueryRoot.productTypes` instead.") + + """ + List of the shop's product variants. + """ + productVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductVariantSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-123` |\n| collection | string | Filter by the [ID of the collection](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) that the product variant belongs to. | | | - `collection:465903092033` |\n| delivery_profile_id | id | Filter by the product variant [delivery profile ID](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-deliveryprofile) (`ProductVariant.deliveryProfile.id`). | | | - `delivery_profile_id:108179161409` |\n| exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` |\n| exclude_variants_with_components | boolean | Filter by whether there are [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) that are associated with the product variants in a bundle. | | | - `exclude_variants_with_components:true` |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_quantity | integer | Filter by an aggregate of inventory across all locations where the product variant is stocked. | | | - `inventory_quantity:10` |\n| location_id | id | Filter by the [location ID](https://shopify.dev/api/admin-graphql/latest/objects/Location#field-id) for the product variant. | | | - `location_id:88511152449` |\n| managed | boolean | Filter by whether there is fulfillment service tracking associated with the product variants. | | | - `managed:true` |\n| managed_by | string | Filter by the fulfillment service that tracks the number of items in stock for the product variant. | | | - `managed_by:shopify` |\n| option1 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option1:small` |\n| option2 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option2:medium` |\n| option3 | string | Filter by a custom property that a shop owner uses to define product variants. | | | - `option3:large` |\n| product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) field. | | | - `product_id:8474977763649` |\n| product_ids | string | Filter by a comma-separated list of product [IDs](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id). | | | - `product_ids:8474977763649,8474977796417` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_status | string | Filter by a comma-separated list of product [statuses](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-status). | | | - `product_status:ACTIVE,DRAFT` |\n| product_type | string | Filter by the product type that's associated with the product variants. | | | - `product_type:snowboard`
- `product_type:snowboard,skis`
- `product_type:snowboard OR product_type:skis` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| requires_components | boolean | Filter by whether the product variant can only be purchased with components. [Learn more](https://shopify.dev/apps/build/product-merchandising/bundles#store-eligibility). | | | - `requires_components:true` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) field. | | | - `taxable:false` |\n| title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `title:ice` |\n| updated_at | time | Filter by date and time when the product variant was updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\n| vendor | string | Filter by the origin or source of the product variant. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil,Icedevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ProductVariantConnection! @deprecated(reason: "Use `QueryRoot.productVariants` instead.") + + """ + The list of vendors added to products. + """ + productVendors("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!): StringConnection! @deprecated(reason: "Use `QueryRoot.productVendors` instead.") + + """ + List of the shop's products. + """ + products("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: ProductSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` |\n| bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` |\n| category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` |\n| collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` |\n| combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` |\n| created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` |\n| delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` |\n| error_feedback | string | Filter by products with publishing errors. |\n| gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` |\n| handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` |\n| has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` |\n| has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` |\n| has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` |\n| is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` |\n| metafields.{namespace}.{key} | mixed | Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | - `metafields.custom.on_sale:true`
- `metafields.product.material:\"gid://shopify/Metaobject/43458085\"` |\n| out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` |\n| price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` |\n| product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` |\n| product_publication_status | string | Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead. | - `* {channel_app_id}-approved`
- `* {channel_app_id}-rejected`
- `* {channel_app_id}-needs_action`
- `* {channel_app_id}-awaiting_review`
- `* {channel_app_id}-published`
- `* {channel_app_id}-demoted`
- `* {channel_app_id}-scheduled`
- `* {channel_app_id}-provisionally_published` | | - `product_publication_status:189769876-approved` |\n| product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` |\n| publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` |\n| publishable_status | string | **Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values. | - `* {channel_app_id}-unset`
- `* {channel_app_id}-pending`
- `* {channel_app_id}-approved`
- `* {channel_app_id}-not_approved` | | - `publishable_status:580111-unset`
- `publishable_status:580111-pending` |\n| published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` |\n| published_status | string | Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using a channel ID, channel handle, [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`), or app handle with suffixes: - `{id_or_handle}-published`: Returns resources published to the specified channel. - `{id_or_handle}-visible`: Same as `{id_or_handle}-published` (kept for backwards compatibility). - `{id_or_handle}-intended`: Returns resources added to the channel but not yet published. - `{id_or_handle}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel. | - `online_store_channel`
- `published`
- `visible`
- `unpublished`
- `* {channel_id_or_handle}-published`
- `* {channel_id_or_handle}-visible`
- `* {channel_id_or_handle}-intended`
- `* {channel_id_or_handle}-hidden`
- `* {channel_app_id_or_handle}-published`
- `* {channel_app_id_or_handle}-visible`
- `* {channel_app_id_or_handle}-intended`
- `* {channel_app_id_or_handle}-hidden`
- `unavailable` | | - `published_status:online_store_channel`
- `published_status:published`
- `published_status:580111-published`
- `published_status:580111-hidden`
- `published_status:my-channel-handle-published`
- `published_status:unavailable` |\n| sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` |\n| status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `active`
- `archived`
- `draft`
- `unlisted` | `active` | - `status:active,draft` |\n| tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` |\n| tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` |\n| title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` |\n| updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` |\n| variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` |\n| variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` |\n| vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ProductConnection! @deprecated(reason: "Use `QueryRoot.products`.") + + """ + The number of publications for the shop. + """ + publicationCount: Int! @deprecated(reason: "Use `QueryRoot.publicationsCount` instead.") + + """ + The shop's limits for specific resources. For example, the maximum number ofvariants allowed per product, or the maximum number of locations allowed. + """ + resourceLimits: ShopResourceLimits! + + """ + The URL of the rich text editor that can be used for mobile devices. + """ + richTextEditorUrl: URL! + + """ + Fetches a list of admin search results by a specified query. + """ + search("The search query to filter by." query: String!, "The search result types to filter by." types: [SearchResultType!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int!, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String): SearchResultConnection! + + """ + The list of search filter options for the shop. These can be used to filter productvisibility for the shop. + """ + searchFilters: SearchFilterOptions! + + """ + Whether the shop has outstanding setup steps. + """ + setupRequired: Boolean! + + """ + The list of countries that the shop ships to. + """ + shipsToCountries: [CountryCode!]! + + """ + The shop's address information as it will appear to buyers. + """ + shopAddress: ShopAddress! + + """ + The name of the shop owner. + """ + shopOwnerName: String! + + """ + The list of all legal policies associated with a shop. + """ + shopPolicies: [ShopPolicy!]! + + """ + The paginated list of the shop's staff members. + """ + staffMembers("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StaffMemberConnection! @deprecated(reason: "Use `QueryRoot.staffMembers` instead.") + + """ + The storefront access token of a private application. These are scoped per-application. + """ + storefrontAccessTokens("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StorefrontAccessTokenConnection! + + """ + The URL of the shop's storefront. + """ + storefrontUrl: URL! @deprecated(reason: "Use `url` instead.") + + """ + Whether the shop charges taxes for shipping. + """ + taxShipping: Boolean! + + """ + Whether applicable taxes are included in the shop's product prices. + """ + taxesIncluded: Boolean! + + """ + The shop's time zone abbreviation. + """ + timezoneAbbreviation: String! + + """ + The shop's time zone offset. + """ + timezoneOffset: String! + + """ + The shop's time zone offset expressed as a number of minutes. + """ + timezoneOffsetMinutes: Int! + + """ + Whether transactional SMS sent by Shopify have been disabled for a shop. + """ + transactionalSmsDisabled: Boolean! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The shop's unit system for weights and measures. + """ + unitSystem: UnitSystem! + + """ + The date and time when the shop was last updated. + """ + updatedAt: DateTime! + + """ + The URL of the shop's online store. + """ + url: URL! + + """ + The shop's primary unit of weight for products and shipping. + """ + weightUnit: WeightUnit! +} + +""" +An address for a shop. +""" +type ShopAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company or organization. + """ + company: String + + """ + Whether the address coordinates are valid. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name. + """ + firstName: String @deprecated(reason: "Always null in this context.") + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted("Whether to include the company in the formatted address." withCompany: Boolean = true): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name. + """ + lastName: String @deprecated(reason: "Always null in this context.") + + """ + The latitude coordinate of the address. + """ + latitude: Float + + """ + The longitude coordinate of the address. + """ + longitude: Float + + """ + The full name, based on firstName and lastName. + """ + name: String @deprecated(reason: "Always null in this context.") + + """ + A phone number associated with the address. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +An alert message that appears in the Shopify admin about a problem with a store setting, with an action to take. For example, you could show an alert to ask the merchant to enter their billing information to activate Shopify Plus. +""" +type ShopAlert { + """ + The text for the button in the alert that links to related information. For example, _Add credit card_. + """ + action: ShopAlertAction! + + """ + A description of the alert and further information, such as whether the merchant will be charged. + """ + description: String! +} + +""" +An action associated to a shop alert, such as adding a credit card. +""" +type ShopAlertAction { + """ + The text for the button in the alert. For example, _Add credit card_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +Billing preferences for the shop. +""" +type ShopBillingPreferences { + """ + The currency the shop uses to pay for apps and services. + """ + currency: CurrencyCode! +} + +""" +Possible branding of a shop. +Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin. +""" +enum ShopBranding { + """ + Shop has Shopify Gold branding. + """ + SHOPIFY_GOLD + + """ + Shop has Shopify Plus branding. + """ + SHOPIFY_PLUS + + """ + Shop has Rogers branding. + """ + ROGERS + + """ + Shop has Shopify branding. + """ + SHOPIFY +} + +""" +Represents the shop's customer account requirement preference. +""" +enum ShopCustomerAccountsSetting { + REQUIRED + + OPTIONAL + + DISABLED +} + +""" +Represents the feature set available to the shop. +Most fields specify whether a feature is enabled for a shop, and some fields return information +related to specific features. +""" +type ShopFeatures { + """ + Whether a shop has access to Avalara AvaTax. + """ + avalaraAvatax: Boolean! + + """ + The branding of the shop, which influences its look and feel in the Shopify admin. + """ + branding: ShopBranding! + + """ + Represents the Bundles feature configuration for the shop. + """ + bundles: BundlesFeature! + + """ + Whether a shop's online store can have CAPTCHA protection. + """ + captcha: Boolean! + + """ + Whether a shop's online store can have CAPTCHA protection for domains not managed by Shopify. + """ + captchaExternalDomains: Boolean! @deprecated(reason: "No longer required for external domains") + + """ + Represents the cart transform feature configuration for the shop. + """ + cartTransform: CartTransformFeature! + + """ + Whether the delivery profiles functionality is enabled for this shop. + """ + deliveryProfiles: Boolean! @deprecated(reason: "Delivery profiles are now 100% enabled across Shopify.") + + """ + Whether a shop has access to the Google Analytics dynamic remarketing feature. + """ + dynamicRemarketing: Boolean! + + """ + Whether a shop can be migrated to use Shopify subscriptions. + """ + eligibleForSubscriptionMigration: Boolean! + + """ + Whether a shop is configured properly to sell subscriptions. + """ + eligibleForSubscriptions: Boolean! + + """ + Whether a shop can create gift cards. + """ + giftCards: Boolean! + + """ + Whether a shop displays Harmonized System codes on products. This is used for customs when shipping + internationally. + """ + harmonizedSystemCode: Boolean! + + """ + Whether a shop can enable international domains. + """ + internationalDomains: Boolean! @deprecated(reason: "All shops have international domains through Shopify Markets.") + + """ + Whether a shop can enable international price overrides. + """ + internationalPriceOverrides: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop can enable international price rules. + """ + internationalPriceRules: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop has enabled a legacy subscription gateway to handle older subscriptions. + """ + legacySubscriptionGatewayEnabled: Boolean! + + """ + Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial + or don't have a storefront. + """ + liveView: Boolean! + + """ + Whether a shop has access to the onboarding visual. + """ + onboardingVisual: Boolean! @deprecated(reason: "No longer supported.") + + """ + Whether a shop is configured to sell subscriptions with PayPal Express. + """ + paypalExpressSubscriptionGatewayStatus: PaypalExpressSubscriptionsGatewayStatus! + + """ + Whether a shop has access to all reporting features. + """ + reports: Boolean! + + """ + Whether a shop has ever had subscription products. + """ + sellsSubscriptions: Boolean! + + """ + Whether the shop has a Shopify Plus subscription. + """ + shopifyPlus: Boolean! @deprecated(reason: "Use Shop.plan.shopifyPlus instead.") + + """ + Whether to show metrics in the Shopify admin. Metrics are hidden for new merchants until they become meaningful. + """ + showMetrics: Boolean! + + """ + Whether a shop has an online store. + """ + storefront: Boolean! + + """ + Whether a shop is eligible for Unified Markets. + """ + unifiedMarkets: Boolean! + + """ + Whether a shop is using Shopify Balance. + """ + usingShopifyBalance: Boolean! +} + +""" +A locale that's been enabled on a shop. +""" +type ShopLocale { + """ + The locale ISO code. + """ + locale: String! + + """ + The market web presences that use the locale. + """ + marketWebPresences: [MarketWebPresence!]! + + """ + The human-readable locale name. + """ + name: String! + + """ + Whether the locale is the default locale for the shop. + """ + primary: Boolean! + + """ + Whether the locale is visible to buyers. + """ + published: Boolean! +} + +""" +Return type for `shopLocaleDisable` mutation. +""" +type ShopLocaleDisablePayload { + """ + ISO code of the locale that was deleted. + """ + locale: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shopLocaleEnable` mutation. +""" +type ShopLocaleEnablePayload { + """ + ISO code of the locale that was enabled. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a shop locale. +""" +input ShopLocaleInput { + """ + Whether the locale is published. Only published locales are visible to the buyer. + """ + published: Boolean + + """ + The market web presences on which the locale should be enabled. Pass in an empty array to remove the locale across all market web presences. + """ + marketWebPresenceIds: [ID!] +} + +""" +Return type for `shopLocaleUpdate` mutation. +""" +type ShopLocaleUpdatePayload { + """ + The locale that was updated. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Shop Pay Installments payment details related to a transaction. +""" +type ShopPayInstallmentsPaymentDetails implements BasePaymentDetails { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +Represents a Shop Pay payment request. +""" +type ShopPayPaymentRequest { + """ + The discounts for the payment request order. + """ + discounts: [ShopPayPaymentRequestDiscount!] + + """ + The line items for the payment request. + """ + lineItems: [ShopPayPaymentRequestLineItem!]! + + """ + The presentment currency for the payment request. + """ + presentmentCurrency: CurrencyCode! + + """ + The delivery method type for the payment request. + """ + selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType! + + """ + The shipping address for the payment request. + """ + shippingAddress: ShopPayPaymentRequestContactField + + """ + The shipping lines for the payment request. + """ + shippingLines: [ShopPayPaymentRequestShippingLine!]! + + """ + The subtotal amount for the payment request. + """ + subtotal: MoneyV2! + + """ + The total amount for the payment request. + """ + total: MoneyV2! + + """ + The total shipping price for the payment request. + """ + totalShippingPrice: ShopPayPaymentRequestTotalShippingPrice + + """ + The total tax for the payment request. + """ + totalTax: MoneyV2 +} + +""" +Represents a contact field for a Shop Pay payment request. +""" +type ShopPayPaymentRequestContactField { + """ + The first address line of the contact field. + """ + address1: String! + + """ + The second address line of the contact field. + """ + address2: String + + """ + The city of the contact field. + """ + city: String! + + """ + The company name of the contact field. + """ + companyName: String + + """ + The country of the contact field. + """ + countryCode: String! + + """ + The email of the contact field. + """ + email: String + + """ + The first name of the contact field. + """ + firstName: String! + + """ + The last name of the contact field. + """ + lastName: String! + + """ + The phone number of the contact field. + """ + phone: String + + """ + The postal code of the contact field. + """ + postalCode: String + + """ + The province of the contact field. + """ + provinceCode: String +} + +""" +Represents the delivery method type for a Shop Pay payment request. +""" +enum ShopPayPaymentRequestDeliveryMethodType { + """ + The delivery method type is shipping. + """ + SHIPPING + + """ + The delivery method type is pickup. + """ + PICKUP +} + +""" +Represents a discount for a Shop Pay payment request. +""" +type ShopPayPaymentRequestDiscount { + """ + The amount of the discount. + """ + amount: MoneyV2! + + """ + The label of the discount. + """ + label: String! +} + +""" +Represents an image for a Shop Pay payment request line item. +""" +type ShopPayPaymentRequestImage { + """ + The alt text of the image. + """ + alt: String + + """ + The source URL of the image. + """ + url: String! +} + +""" +Represents a line item for a Shop Pay payment request. +""" +type ShopPayPaymentRequestLineItem { + """ + The final item price for the line item. + """ + finalItemPrice: MoneyV2! + + """ + The final line price for the line item. + """ + finalLinePrice: MoneyV2! + + """ + The image of the line item. + """ + image: ShopPayPaymentRequestImage + + """ + The item discounts for the line item. + """ + itemDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The label of the line item. + """ + label: String! + + """ + The line discounts for the line item. + """ + lineDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The original item price for the line item. + """ + originalItemPrice: MoneyV2 + + """ + The original line price for the line item. + """ + originalLinePrice: MoneyV2 + + """ + The quantity of the line item. + """ + quantity: Int! + + """ + Whether the line item requires shipping. + """ + requiresShipping: Boolean + + """ + The SKU of the line item. + """ + sku: String +} + +""" +The receipt of Shop Pay payment request session submission. +""" +type ShopPayPaymentRequestReceipt { + """ + The date and time when the payment request receipt was created. + """ + createdAt: DateTime! + + """ + The order that's associated with the payment request receipt. + """ + order: Order + + """ + The shop pay payment request object. + """ + paymentRequest: ShopPayPaymentRequest! + + """ + The status of the payment request session submission. + """ + processingStatus: ShopPayPaymentRequestReceiptProcessingStatus! + + """ + The source identifier provided in the `ShopPayPaymentRequestSessionCreate` mutation. + """ + sourceIdentifier: String! + + """ + The token of the receipt, initially returned by an `ShopPayPaymentRequestSessionSubmit` mutation. + """ + token: String! +} + +""" +An auto-generated type for paginating through multiple ShopPayPaymentRequestReceipts. +""" +type ShopPayPaymentRequestReceiptConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopPayPaymentRequestReceiptEdge!]! + + """ + A list of nodes that are contained in ShopPayPaymentRequestReceiptEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopPayPaymentRequestReceipt!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopPayPaymentRequestReceipt and a cursor during pagination. +""" +type ShopPayPaymentRequestReceiptEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopPayPaymentRequestReceiptEdge. + """ + node: ShopPayPaymentRequestReceipt! +} + +""" +The processing status of a Shop Pay payment request. +Represents the different states a payment request can be in during its lifecycle, +from initial creation through to completion or failure. +""" +type ShopPayPaymentRequestReceiptProcessingStatus { + """ + A standardized error code, independent of the payment provider. + """ + errorCode: ShopPayPaymentRequestReceiptProcessingStatusErrorCode + + """ + The message of the payment request receipt. + """ + message: String + + """ + The state of the payment request receipt. + """ + state: ShopPayPaymentRequestReceiptProcessingStatusState! +} + +""" +A standardized error code, independent of the payment provider. +""" +enum ShopPayPaymentRequestReceiptProcessingStatusErrorCode { + """ + The card number is incorrect. + """ + INCORRECT_NUMBER + + """ + The format of the card number is incorrect. + """ + INVALID_NUMBER + + """ + The format of the expiry date is incorrect. + """ + INVALID_EXPIRY_DATE + + """ + The format of the CVC is incorrect. + """ + INVALID_CVC + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + The CVC does not match the card number. + """ + INCORRECT_CVC + + """ + The ZIP or postal code does not match the card number. + """ + INCORRECT_ZIP + + """ + The address does not match the card number. + """ + INCORRECT_ADDRESS + + """ + The entered PIN is incorrect. + """ + INCORRECT_PIN + + """ + The amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + The card was declined. + """ + CARD_DECLINED + + """ + There was an error while processing the payment. + """ + PROCESSING_ERROR + + """ + Call the card issuer. + """ + CALL_ISSUER + + """ + The 3D Secure check failed. + """ + THREE_D_SECURE_FAILED + + """ + The card issuer has flagged the transaction as potentially fraudulent. + """ + FRAUD_SUSPECTED + + """ + The card has been reported as lost or stolen, and the card issuer has requested that the merchant keep the card and call the number on the back. + """ + PICK_UP_CARD + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + A real card was used but the gateway was in test mode. + """ + TEST_MODE_LIVE_CARD + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE + + """ + Too many failed CVV verification attempts. + """ + CVV_ATTEMPTS_EXCEEDED + + """ + There was an unknown error with processing the payment. + """ + GENERIC_ERROR + + """ + The payment method is not available in the customer's country. + """ + INVALID_COUNTRY + + """ + The amount is either too high or too low for the provider. + """ + INVALID_AMOUNT + + """ + The payment method is momentarily unavailable. + """ + PAYMENT_METHOD_UNAVAILABLE +} + +""" +The state of the payment request receipt. +""" +enum ShopPayPaymentRequestReceiptProcessingStatusState { + """ + The payment request is ready and queued to be processed. + """ + READY + + """ + The payment request currently being processed. + """ + PROCESSING + + """ + The payment request processing failed. + """ + FAILED + + """ + The payment request processing completed successfully. + """ + COMPLETED + + """ + The payment request requires action from the buyer. + """ + ACTION_REQUIRED +} + +""" +The set of valid sort keys for the ShopPayPaymentRequestReceipts query. +""" +enum ShopPayPaymentRequestReceiptsSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents a shipping line for a Shop Pay payment request. +""" +type ShopPayPaymentRequestShippingLine { + """ + The amount for the shipping line. + """ + amount: MoneyV2! + + """ + The code of the shipping line. + """ + code: String! + + """ + The label of the shipping line. + """ + label: String! +} + +""" +Represents a shipping total for a Shop Pay payment request. +""" +type ShopPayPaymentRequestTotalShippingPrice { + """ + The discounts for the shipping total. + """ + discounts: [ShopPayPaymentRequestDiscount!]! + + """ + The final total for the shipping line. + """ + finalTotal: MoneyV2! + + """ + The original total for the shipping line. + """ + originalTotal: MoneyV2 +} + +""" +The shop's billing plan and subscription details. Indicates the plan tier (such as Basic, Advanced, or Plus), whether the shop has a Shopify Plus subscription, and if it's a dev store for testing. +""" +type ShopPlan { + """ + The name of the shop's billing plan. + """ + displayName: String! @deprecated(reason: "Use `publicDisplayName` instead.") + + """ + Whether the shop is a partner development shop for testing purposes. + """ + partnerDevelopment: Boolean! + + """ + The public display name of the shop's billing plan. Possible values are: Advanced, Agentic, Agentic Enterprise, Basic, Development, Grow, Inactive, Lite, Other, Paused, Plus, Plus Trial, Retail, Shop Component, Staff Business, Starter, and Trial. + """ + publicDisplayName: String! + + """ + Whether the shop has a Shopify Plus subscription. + """ + shopifyPlus: Boolean! +} + +""" +Policy that a merchant has configured for their store, such as their refund or privacy policy. +""" +type ShopPolicy implements HasPublishedTranslations & Node { + """ + The text of the policy. The maximum size is 512kb. + """ + body: HTML! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was created. + """ + createdAt: Date! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The translated title of the policy. For example, Refund Policy or Politique de remboursement. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations("Filters translations locale." locale: String!, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! + + """ + The shop policy type. + """ + type: ShopPolicyType! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was last modified. + """ + updatedAt: Date! + + """ + The public URL of the policy. + """ + url: URL! +} + +""" +Possible error codes that can be returned by `ShopPolicyUserError`. +""" +enum ShopPolicyErrorCode { + """ + The input value is too big. + """ + TOO_BIG +} + +""" +The input fields required to update a policy. +""" +input ShopPolicyInput { + """ + The shop policy type. + """ + type: ShopPolicyType! + + """ + Policy text, maximum size of 512kb. + """ + body: String! +} + +""" +Available shop policy types. +""" +enum ShopPolicyType { + """ + The refund policy. + """ + REFUND_POLICY + + """ + The shipping policy. + """ + SHIPPING_POLICY + + """ + The privacy policy. + """ + PRIVACY_POLICY + + """ + The terms of service. + """ + TERMS_OF_SERVICE + + """ + The terms of sale. + """ + TERMS_OF_SALE + + """ + The legal notice. + """ + LEGAL_NOTICE + + """ + The cancellation policy. + """ + SUBSCRIPTION_POLICY + + """ + The contact information. + """ + CONTACT_INFORMATION +} + +""" +Return type for `shopPolicyUpdate` mutation. +""" +type ShopPolicyUpdatePayload { + """ + The shop policy that has been updated. + """ + shopPolicy: ShopPolicy + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopPolicyUserError!]! +} + +""" +An error that occurs during the execution of a shop policy mutation. +""" +type ShopPolicyUserError implements DisplayableError { + """ + The error code. + """ + code: ShopPolicyErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `shopResourceFeedbackCreate` mutation. +""" +type ShopResourceFeedbackCreatePayload { + """ + The shop feedback that's created. Returns `null` when `state: ACCEPTED` is used, because setting state to `ACCEPTED` clears the active feedback signal. A `null` value here indicates success, not an error. + """ + feedback: AppFeedback + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopResourceFeedbackCreate`. +""" +type ShopResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopResourceFeedbackCreateUserError`. +""" +enum ShopResourceFeedbackCreateUserErrorCode { + """ + The feedback for a later version of the resource was already accepted. + """ + OUTDATED_FEEDBACK + + """ + The feedback date cannot be set in the future. + """ + FEEDBACK_DATE_IN_FUTURE + + """ + The input value is invalid. + """ + INVALID + + """ + The input value is blank. + """ + BLANK + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Resource limits of a shop. +""" +type ShopResourceLimits { + """ + Maximum number of locations allowed. + """ + locationLimit: Int! + + """ + Maximum number of product options allowed. + """ + maxProductOptions: Int! + + """ + The maximum number of variants allowed per product. + """ + maxProductVariants: Int! + + """ + Whether the shop has reached the limit of the number of URL redirects it can make for resources. + """ + redirectLimitReached: Boolean! +} + +""" +Possible sort of tags. +""" +enum ShopTagSort { + """ + Alphabetical sort. + """ + ALPHABETICAL + + """ + Popularity sort. + """ + POPULAR +} + +""" +A Shopify Function. +""" +type ShopifyFunction { + """ + The API type of the Shopify Function. + """ + apiType: String! + + """ + The API version of the Shopify Function. + """ + apiVersion: String! + + """ + The app that owns the Shopify Function. + """ + app: App! + + """ + The App Bridge information for the Shopify Function. + """ + appBridge: FunctionsAppBridge! + + """ + The client ID of the app that owns the Shopify Function. + """ + appKey: String! + + """ + The description of the Shopify Function. + """ + description: String + + """ + The handle of the Shopify Function. + """ + handle: String! + + """ + The ID of the Shopify Function. + """ + id: String! + + """ + The input query of the Shopify Function. + """ + inputQuery: String + + """ + The title of the Shopify Function. + """ + title: String! + + """ + If the Shopify Function uses the creation UI in the Admin. + """ + useCreationUi: Boolean! +} + +""" +An auto-generated type for paginating through multiple ShopifyFunctions. +""" +type ShopifyFunctionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyFunctionEdge!]! + + """ + A list of nodes that are contained in ShopifyFunctionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopifyFunction!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyFunction and a cursor during pagination. +""" +type ShopifyFunctionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyFunctionEdge. + """ + node: ShopifyFunction! +} + +""" +Financial account information for merchants using Shopify Payments. Tracks current balances across all supported currencies, payout schedules, and [`ShopifyPaymentsBalanceTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction) records. + +The account includes configuration details such as [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount) objects for receiving [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) transfers, statement descriptors that appear on customer credit card statements, and the [`ShopifyPaymentsPayoutSchedule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSchedule) that determines when funds transfer to your bank. Access balance transactions to review individual charges, refunds, and adjustments that affect your account balance. Query payouts to track money movement between your Shopify Payments balance and bank accounts. +""" +type ShopifyPaymentsAccount implements Node { + """ + The name of the account opener. + """ + accountOpenerName: String + + """ + Whether the Shopify Payments setup is completed. + """ + activated: Boolean! + + """ + Current balances in all currencies for the account. + """ + balance: [MoneyV2!]! + + """ + A list of balance transactions associated with the shop. + """ + balanceTransactions("Determines if returned transactions contain transaction type transfer." hideTransfers: Boolean = false, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: BalanceTransactionSortKeys = PROCESSED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| available_on | time |\n| credit_card_last4 | string |\n| currency | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| payment_method_name | string |\n| payments_transfer_id | id |\n| payout_date | time |\n| payout_status | string |\n| processed_at | time |\n| tax_reporting_exempt | boolean |\n| transaction_type | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ShopifyPaymentsBalanceTransactionConnection! + + """ + All bank accounts configured for the Shopify Payments account. + """ + bankAccounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ShopifyPaymentsBankAccountConnection! + + """ + The statement descriptor used for charges. + + The statement descriptor appears on a customer's credit card or bank statement when they make a purchase. + """ + chargeStatementDescriptor: String @deprecated(reason: "Use `chargeStatementDescriptors` instead.") + + """ + The statement descriptors used for charges. + + These descriptors appear on a customer's credit card or bank statement when they make a purchase. + """ + chargeStatementDescriptors: ShopifyPaymentsChargeStatementDescriptor + + """ + The Shopify Payments account country. + """ + country: String! + + """ + The default payout currency for the Shopify Payments account. + """ + defaultCurrency: CurrencyCode! + + """ + All disputes that originated from a transaction made with the Shopify Payments account. + """ + disputes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| initiated_at | time |\n| status | string |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ShopifyPaymentsDisputeConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the Shopify Payments account can be onboarded. + """ + onboardable: Boolean! + + """ + The payout schedule for the account. + """ + payoutSchedule: ShopifyPaymentsPayoutSchedule! + + """ + The descriptor used for payouts. + + The descriptor appears on a merchant's bank statement when they receive a payout. + """ + payoutStatementDescriptor: String + + """ + All current and previous payouts made between the account and the bank account. + """ + payouts("Filter the direction of the payout." transactionType: ShopifyPaymentsPayoutTransactionType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: PayoutSortKeys = ISSUED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| amount | float |\n| bank_account | string |\n| currency | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| issued_at | time |\n| ledger_type | string |\n| status | string |\n| transaction_dates | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ShopifyPaymentsPayoutConnection! +} + +""" +A Shopify Payments address. +""" +type ShopifyPaymentsAddressBasic { + """ + Line 1 of the address. + """ + addressLine1: String + + """ + Line 2 of the address. + """ + addressLine2: String + + """ + The address city. + """ + city: String + + """ + The address country. + """ + country: String + + """ + The address postal code. + """ + postalCode: String + + """ + The address state/province/zone. + """ + zone: String +} + +""" +The adjustment order object. +""" +type ShopifyPaymentsAdjustmentOrder { + """ + The amount of the adjustment order. + """ + amount: MoneyV2! + + """ + The fee of the adjustment order. + """ + fees: MoneyV2! + + """ + The link to the adjustment order. + """ + link: URL! + + """ + The name of the adjustment order. + """ + name: String! + + """ + The net of the adjustment order. + """ + net: MoneyV2! + + """ + The ID of the order transaction. + """ + orderTransactionId: BigInt! +} + +""" +The order associated to the balance transaction. +""" +type ShopifyPaymentsAssociatedOrder { + """ + The ID of the associated order. + """ + id: ID! + + """ + The name of the associated order. + """ + name: String! +} + +""" +A transaction that contributes to a Shopify Payments account balance. Records money movement from charges, refunds, payouts, adjustments, or other payment activities. Includes the gross amount, processing fees, and resulting net amount that affects the account balance. Links to the source of the transaction and associated [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) details, with optional references to [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) objects or adjustment reasons when applicable. +""" +type ShopifyPaymentsBalanceTransaction implements Node { + """ + The reason for the adjustment that's associated with the transaction. + If the source_type isn't an adjustment, the value will be null. + """ + adjustmentReason: String + + """ + The adjustment orders associated to the transaction. + """ + adjustmentsOrders: [ShopifyPaymentsAdjustmentOrder!]! + + """ + The amount contributing to the balance transaction. + """ + amount: MoneyV2! + + """ + The associated order for the balance transaction. + """ + associatedOrder: ShopifyPaymentsAssociatedOrder + + """ + Payout assoicated with the transaction. + """ + associatedPayout: ShopifyPaymentsBalanceTransactionAssociatedPayout! + + """ + The fee amount contributing to the balance transaction. + """ + fee: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The net amount contributing to the merchant's balance. + """ + net: MoneyV2! + + """ + The ID of the resource leading to the transaction. + """ + sourceId: BigInt + + """ + The id of the + [Order Transaction](https://shopify.dev/docs/admin-api/rest/reference/orders/transaction) + + that resulted in this balance transaction. + """ + sourceOrderTransactionId: BigInt + + """ + The source type of the balance transaction. + """ + sourceType: ShopifyPaymentsSourceType + + """ + Wether the tranaction was created in test mode. + """ + test: Boolean! + + """ + The date and time when the balance transaction was processed. + """ + transactionDate: DateTime! + + """ + The type of transaction. + """ + type: ShopifyPaymentsTransactionType! +} + +""" +The payout associated with a balance transaction. +""" +type ShopifyPaymentsBalanceTransactionAssociatedPayout { + """ + The ID of the payout associated with the balance transaction. + """ + id: ID + + """ + The status of the payout associated with the balance transaction. + """ + status: ShopifyPaymentsBalanceTransactionPayoutStatus +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBalanceTransactions. +""" +type ShopifyPaymentsBalanceTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBalanceTransactionEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBalanceTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsBalanceTransaction!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBalanceTransaction and a cursor during pagination. +""" +type ShopifyPaymentsBalanceTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBalanceTransactionEdge. + """ + node: ShopifyPaymentsBalanceTransaction! +} + +""" +The payout status of the balance transaction. +""" +enum ShopifyPaymentsBalanceTransactionPayoutStatus { + """ + The payout has been created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED + + """ + The payout has been submitted to the bank. + """ + IN_TRANSIT @deprecated(reason: "Use `SCHEDULED` instead.") + + """ + The payout has been successfully deposited into the bank. + """ + PAID + + """ + The payout has been declined by the bank. + """ + FAILED + + """ + The payout has been canceled by Shopify. + """ + CANCELED + + """ + The transaction has not been assigned a payout yet. + """ + PENDING + + """ + The transaction requires action before it can be paid out. + """ + ACTION_REQUIRED +} + +""" +A bank account that can receive payouts. +""" +type ShopifyPaymentsBankAccount implements Node { + """ + The last digits of the account number (the rest is redacted). + """ + accountNumberLastDigits: String! + + """ + The name of the bank. + """ + bankName: String + + """ + The country of the bank. + """ + country: CountryCode! + + """ + The date that the bank account was created. + """ + createdAt: DateTime! + + """ + The currency of the bank account. + """ + currency: CurrencyCode! + + """ + A globally-unique ID. + """ + id: ID! + + """ + All current and previous payouts made between the account and the bank account. + """ + payouts("Filter the direction of the payout." transactionType: ShopifyPaymentsPayoutTransactionType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: PayoutSortKeys = ISSUED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| amount | float |\n| bank_account | string |\n| currency | string |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| issued_at | time |\n| ledger_type | string |\n| status | string |\n| transaction_dates | time |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String, "The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id).\nThe search’s query string is used as the query argument." savedSearchId: ID): ShopifyPaymentsPayoutConnection! + + """ + The status of the bank account. + """ + status: ShopifyPaymentsBankAccountStatus! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. +""" +type ShopifyPaymentsBankAccountConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBankAccountEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBankAccountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsBankAccount!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination. +""" +type ShopifyPaymentsBankAccountEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBankAccountEdge. + """ + node: ShopifyPaymentsBankAccount! +} + +""" +The bank account status. +""" +enum ShopifyPaymentsBankAccountStatus { + """ + A bank account that hasn't had any activity and that's not validated. + """ + NEW + + """ + It was determined that the bank account exists. + """ + VALIDATED + + """ + Bank account validation was successful. + """ + VERIFIED + + """ + A payout to the bank account failed. + """ + ERRORED +} + +""" +The business type of a Shopify Payments account. +""" +enum ShopifyPaymentsBusinessType { + """ + The business type is a corporation. + """ + CORPORATION + + """ + The business type is a government. + """ + GOVERNMENT + + """ + The business type is an incorporated partnership. + """ + INCORPORATED_PARTNERSHIP + + """ + The business is an individual. + """ + INDIVIDUAL + + """ + The business type is a Limited Liability Company. + """ + LLC + + """ + The business type is a non profit. + """ + NON_PROFIT + + """ + The business type is a non profit (incorporated). + """ + NON_PROFIT_INCORPORATED + + """ + The business type is a non profit (unincorporated). + """ + NON_PROFIT_UNINCORPORATED + + """ + The business type is a non profit (unincorporated_association). + """ + NON_PROFIT_UNINCORPORATED_ASSOCIATION + + """ + The business type is a non profit (registered charity). + """ + NON_PROFIT_REGISTERED_CHARITY + + """ + The business type is a partnership. + """ + PARTNERSHIP + + """ + The business type is a private corporation. + """ + PRIVATE_CORPORATION + + """ + The business type is a public company. + """ + PUBLIC_COMPANY + + """ + The business type is a public corporation. + """ + PUBLIC_CORPORATION + + """ + The business type is a sole proprietorship. + """ + SOLE_PROP + + """ + The business type is an unincorporated partnership. + """ + UNINCORPORATED_PARTNERSHIP + + """ + The business type is a private multi member LLC. + """ + PRIVATE_MULTI_MEMBER_LLC + + """ + The business type is a private single member LLC. + """ + PRIVATE_SINGLE_MEMBER_LLC + + """ + The business type is a private unincorporated association. + """ + PRIVATE_UNINCORPORATED_ASSOCIATION + + """ + The business type is a private partnership. + """ + PRIVATE_PARTNERSHIP + + """ + The business type is a public partnership. + """ + PUBLIC_PARTNERSHIP + + """ + The business type is a free zone establishment. + """ + FREE_ZONE_ESTABLISHMENT + + """ + The business type is a free zone LLC. + """ + FREE_ZONE_LLC + + """ + The business type is a sole establishment. + """ + SOLE_ESTABLISHMENT + + """ + The business type is not set. This is usually because onboarding is incomplete. + """ + NOT_SET +} + +""" +The charge descriptors for a payments account. +""" +interface ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +The charge descriptors for a payments account. +""" +type ShopifyPaymentsDefaultChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. +""" +type ShopifyPaymentsDispute implements LegacyInteroperability & Node { + """ + The total amount disputed by the cardholder. + """ + amount: MoneyV2! + + """ + The evidence associated with the dispute. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence! + + """ + The deadline for evidence submission. + """ + evidenceDueBy: Date + + """ + The date when evidence was sent. Returns null if evidence hasn't yet been sent. + """ + evidenceSentOn: Date + + """ + The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. + """ + finalizedOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date when this dispute was initiated. + """ + initiatedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The order that contains the charge that's under dispute. + """ + order: Order + + """ + The reason of the dispute. + """ + reasonDetails: ShopifyPaymentsDisputeReasonDetails! + + """ + The current state of the dispute. + """ + status: DisputeStatus! + + """ + Indicates if this dispute is still in the inquiry phase or has turned into a chargeback. + """ + type: DisputeType! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsDisputes. +""" +type ShopifyPaymentsDisputeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsDisputeEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsDisputeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsDispute!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination. +""" +type ShopifyPaymentsDisputeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsDisputeEdge. + """ + node: ShopifyPaymentsDispute! +} + +""" +The evidence associated with the dispute. +""" +type ShopifyPaymentsDisputeEvidence implements Node { + """ + The activity logs associated with the dispute evidence. + """ + accessActivityLog: String + + """ + The billing address that's provided by the customer. + """ + billingAddress: MailingAddress + + """ + The cancellation policy disclosure associated with the dispute evidence. + """ + cancellationPolicyDisclosure: String + + """ + The cancellation policy file associated with the dispute evidence. + """ + cancellationPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The cancellation rebuttal associated with the dispute evidence. + """ + cancellationRebuttal: String + + """ + The customer communication file associated with the dispute evidence. + """ + customerCommunicationFile: ShopifyPaymentsDisputeFileUpload + + """ + The customer's email address. + """ + customerEmailAddress: String + + """ + The customer's first name. + """ + customerFirstName: String + + """ + The customer's last name. + """ + customerLastName: String + + """ + The customer purchase ip for this dispute evidence. + """ + customerPurchaseIp: String + + """ + The dispute associated with the evidence. + """ + dispute: ShopifyPaymentsDispute! + + """ + The file uploads associated with the dispute evidence. + """ + disputeFileUploads: [ShopifyPaymentsDisputeFileUpload!]! + + """ + The fulfillments associated with the dispute evidence. + """ + fulfillments: [ShopifyPaymentsDisputeFulfillment!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The product description for this dispute evidence. + """ + productDescription: String + + """ + The refund policy disclosure associated with the dispute evidence. + """ + refundPolicyDisclosure: String + + """ + The refund policy file associated with the dispute evidence. + """ + refundPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The refund refusal explanation associated with dispute evidence. + """ + refundRefusalExplanation: String + + """ + The service documentation file associated with the dispute evidence. + """ + serviceDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + The mailing address for shipping that's provided by the customer. + """ + shippingAddress: MailingAddress + + """ + The shipping documentation file associated with the dispute evidence. + """ + shippingDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + Whether the dispute evidence is submitted. + """ + submitted: Boolean! + + """ + The uncategorized file associated with the dispute evidence. + """ + uncategorizedFile: ShopifyPaymentsDisputeFileUpload + + """ + The uncategorized text for the dispute evidence. + """ + uncategorizedText: String +} + +""" +The possible dispute evidence file types. +""" +enum ShopifyPaymentsDisputeEvidenceFileType { + """ + Customer Communication File. + """ + CUSTOMER_COMMUNICATION_FILE + + """ + Refund Policy File. + """ + REFUND_POLICY_FILE + + """ + Cancellation Policy File. + """ + CANCELLATION_POLICY_FILE + + """ + Uncategorized File. + """ + UNCATEGORIZED_FILE + + """ + Shipping Documentation File. + """ + SHIPPING_DOCUMENTATION_FILE + + """ + Service Documentation File. + """ + SERVICE_DOCUMENTATION_FILE + + """ + Response Summary File. + """ + RESPONSE_SUMMARY_FILE +} + +""" +The input fields required to update a dispute evidence object. +""" +input ShopifyPaymentsDisputeEvidenceUpdateInput { + """ + Customer email address. + """ + customerEmailAddress: String + + """ + Customer last name. + """ + customerLastName: String + + """ + Customer first name. + """ + customerFirstName: String + + """ + The shipping address associated with the dispute evidence. + """ + shippingAddress: MailingAddressInput + + """ + Uncategorized text. + """ + uncategorizedText: String + + """ + Activity logs. + """ + accessActivityLog: String + + """ + Cancellation policy disclosure. + """ + cancellationPolicyDisclosure: String + + """ + Cancellation rebuttal. + """ + cancellationRebuttal: String + + """ + Refund policy disclosure. + """ + refundPolicyDisclosure: String + + """ + Refund refusal explanation. + """ + refundRefusalExplanation: String + + """ + Cancellation policy file. + """ + cancellationPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Customer communication file. + """ + customerCommunicationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Refund policy file. + """ + refundPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Shipping documentation file. + """ + shippingDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Uncategorized file. + """ + uncategorizedFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Service documentation file. + """ + serviceDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Whether to submit the evidence. + """ + submitEvidence: Boolean = false +} + +""" +The file upload associated with the dispute evidence. +""" +type ShopifyPaymentsDisputeFileUpload implements Node { + """ + The type of the file for the dispute evidence. + """ + disputeEvidenceType: ShopifyPaymentsDisputeEvidenceFileType + + """ + The file size. + """ + fileSize: Int! + + """ + The file type. + """ + fileType: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The original file name. + """ + originalFileName: String + + """ + The URL for accessing the file. + """ + url: URL! +} + +""" +The input fields required to update a dispute file upload object. +""" +input ShopifyPaymentsDisputeFileUploadUpdateInput { + """ + The ID of the file upload to be updated. + """ + id: ID! + + """ + Whether to delete this file upload. + """ + destroy: Boolean = false +} + +""" +The fulfillment associated with dispute evidence. +""" +type ShopifyPaymentsDisputeFulfillment implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The shipping carrier for this fulfillment. + """ + shippingCarrier: String + + """ + The shipping date for this fulfillment. + """ + shippingDate: Date + + """ + The shipping tracking number for this fulfillment. + """ + shippingTrackingNumber: String +} + +""" +The reason for the dispute provided by the cardholder's bank. +""" +enum ShopifyPaymentsDisputeReason { + """ + The cardholder claims that they didn’t authorize the payment. + """ + FRAUDULENT + + """ + The dispute is uncategorized, so you should contact the customer for additional details to find out why the payment was disputed. + """ + GENERAL + + """ + The customer doesn’t recognize the payment appearing on their card statement. + """ + UNRECOGNIZED + + """ + The customer claims they were charged multiple times for the same product or service. + """ + DUPLICATE + + """ + The customer claims that you continued to charge them after a subscription was canceled. + """ + SUBSCRIPTION_CANCELLED + + """ + The product or service was received but was defective, damaged, or not as described. + """ + PRODUCT_UNACCEPTABLE + + """ + The customer claims they did not receive the products or services purchased. + """ + PRODUCT_NOT_RECEIVED + + """ + The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you haven't yet provided a refund or credit. + """ + CREDIT_NOT_PROCESSED + + """ + The customer account associated with the purchase is incorrect. + """ + INCORRECT_ACCOUNT_DETAILS + + """ + The customer's bank account has insufficient funds. + """ + INSUFFICIENT_FUNDS + + """ + The customer's bank can't process the charge. + """ + BANK_CANNOT_PROCESS + + """ + The customer's bank can't proceed with the debit since it hasn't been authorized. + """ + DEBIT_NOT_AUTHORIZED + + """ + The customer initiated the dispute. Contact the customer for additional details on why the payment was disputed. + """ + CUSTOMER_INITIATED + + """ + The card issuer believes the disputed transaction doesn't conform to the network rules. These disputes occur when transactions don't meet card network requirements and may incur additional network fees if escalated for resolution. + """ + NONCOMPLIANT +} + +""" +Details regarding a dispute reason. +""" +type ShopifyPaymentsDisputeReasonDetails { + """ + The raw code provided by the payment network. + """ + networkReasonCode: String + + """ + The reason for the dispute provided by the cardholder's banks. + """ + reason: ShopifyPaymentsDisputeReason! +} + +""" +Presents all Shopify Payments information related to an extended authorization. +""" +type ShopifyPaymentsExtendedAuthorization { + """ + The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment. + """ + extendedAuthorizationExpiresAt: DateTime! + + """ + The time after which capture will incur an additional fee. + """ + standardAuthorizationExpiresAt: DateTime! +} + +""" +The charge descriptors for a Japanese payments account. +""" +type ShopifyPaymentsJpChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The charge statement descriptor in kana. + """ + kana: String @deprecated(reason: "This field is deprecated and will be removed in a future release.") + + """ + The charge statement descriptor in kanji. + """ + kanji: String @deprecated(reason: "This field is deprecated and will be removed in a future release.") + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A MerchantCategoryCode (MCC) is a four-digit number listed in ISO 18245 for retail financial services and used to classify the business by the type of goods or services it provides. +""" +type ShopifyPaymentsMerchantCategoryCode { + """ + The category of the MCC. + """ + category: String! + + """ + The category label of the MCC. + """ + categoryLabel: String! + + """ + A four-digit number listed in ISO 18245. + """ + code: Int! + + """ + The ID of the MCC. + """ + id: Int! + + """ + The subcategory label of the MCC. + """ + subcategoryLabel: String! +} + +""" +A transfer of funds between a merchant's Shopify Payments balance and their [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount). Provides the [net amount](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout#field-ShopifyPaymentsPayout.fields.net), [issue date](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout#field-ShopifyPaymentsPayout.fields.issuedAt), and current [`ShopifyPaymentsPayoutStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutStatus). + +The payout includes a [`ShopifyPaymentsPayoutSummary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSummary) that breaks down fees and gross amounts by transaction type, such as charges, refunds, and adjustments. The [`ShopifyPaymentsPayoutTransactionType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutTransactionType) indicates whether funds move into the bank account (deposit) or back to Shopify Payments (withdrawal). +""" +type ShopifyPaymentsPayout implements LegacyInteroperability & Node { + """ + The bank account for the payout. + """ + bankAccount: ShopifyPaymentsBankAccount @deprecated(reason: "Use `destinationAccount` instead.") + + """ + The business entity associated with the payout. + """ + businessEntity: BusinessEntity! + + """ + A unique trace ID from the financial institution. Use this reference number to track the payout with your provider. + """ + externalTraceId: String + + """ + The total amount and currency of the payout. + """ + gross: MoneyV2! @deprecated(reason: "Use `net` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The exact time when the payout was issued. The payout only contains + balance transactions that were available at this time. + """ + issuedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The total amount and currency of the payout. + """ + net: MoneyV2! + + """ + The transfer status of the payout. + """ + status: ShopifyPaymentsPayoutStatus! + + """ + The summary of the payout. + """ + summary: ShopifyPaymentsPayoutSummary! + + """ + The direction of the payout. + """ + transactionType: ShopifyPaymentsPayoutTransactionType! +} + +""" +Return type for `shopifyPaymentsPayoutAlternateCurrencyCreate` mutation. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreatePayload { + """ + The resulting alternate currency payout created. + """ + payout: ShopifyPaymentsToolingProviderPayout + + """ + Whether the alternate currency payout was created successfully. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopifyPaymentsPayoutAlternateCurrencyCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopifyPaymentsPayoutAlternateCurrencyCreate`. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopifyPaymentsPayoutAlternateCurrencyCreateUserError`. +""" +enum ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode { + """ + No Stripe provider account was found. + """ + MISSING_PROVIDER_ACCOUNT + + """ + Failed to create payout due to an error from Stripe. + """ + ALTERNATE_CURRENCY_PAYOUT_FAILED_STRIPE_ERROR + + """ + Failed to create payout due to an error from Shopify Core. + """ + UNKNOWN_CORE_ERROR + + """ + Failed to create payout, there is no eligible balance in this currency. + """ + ALTERNATE_CURRENCY_PAYOUT_FAILED_NO_ELIGIBLE_BALANCE +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsPayouts. +""" +type ShopifyPaymentsPayoutConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsPayoutEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsPayoutEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsPayout!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination. +""" +type ShopifyPaymentsPayoutEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsPayoutEdge. + """ + node: ShopifyPaymentsPayout! +} + +""" +The interval at which payouts are sent to the connected bank account. +""" +enum ShopifyPaymentsPayoutInterval { + """ + Each business day. + """ + DAILY + + """ + Each week, on the day of week specified by weeklyAnchor. + """ + WEEKLY + + """ + Each month, on the day of month specified by monthlyAnchor. + """ + MONTHLY + + """ + Payouts will not be automatically made. + """ + MANUAL +} + +""" +The payment schedule for a payments account. +""" +type ShopifyPaymentsPayoutSchedule { + """ + The interval at which payouts are sent to the connected bank account. + """ + interval: ShopifyPaymentsPayoutInterval! + + """ + The day of the month funds will be paid out. + + The value can be any day of the month from the 1st to the 31st. + If the payment interval is set to monthly, this value will be used. + Payouts scheduled between 29-31st of the month are sent on the last day of shorter months. + """ + monthlyAnchor: Int + + """ + The day of the week funds will be paid out. + + The value can be any weekday from Monday to Friday. + If the payment interval is set to weekly, this value will be used. + """ + weeklyAnchor: DayOfTheWeek +} + +""" +The transfer status of the payout. +""" +enum ShopifyPaymentsPayoutStatus { + """ + The payout has been created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED + + """ + The payout has been submitted to the bank. + """ + IN_TRANSIT @deprecated(reason: "Use `SCHEDULED` instead.") + + """ + The payout has been successfully deposited into the bank. + """ + PAID + + """ + The payout has been declined by the bank. + """ + FAILED + + """ + The payout has been canceled by Shopify. + """ + CANCELED +} + +""" +Breakdown of the total fees and gross of each of the different types of transactions associated +with the payout. +""" +type ShopifyPaymentsPayoutSummary { + """ + Total fees for all adjustments including disputes. + """ + adjustmentsFee: MoneyV2! + + """ + Total gross amount for all adjustments including disputes. + """ + adjustmentsGross: MoneyV2! + + """ + Total fees for all advances. + """ + advanceFees: MoneyV2! + + """ + Total gross amount for all advances. + """ + advanceGross: MoneyV2! + + """ + Total fees for all charges. + """ + chargesFee: MoneyV2! + + """ + Total gross amount for all charges. + """ + chargesGross: MoneyV2! + + """ + Total fees for all refunds. + """ + refundsFee: MoneyV2! + + """ + Total gross amount for all refunds. + """ + refundsFeeGross: MoneyV2! + + """ + Total fees for all reserved funds. + """ + reservedFundsFee: MoneyV2! + + """ + Total gross amount for all reserved funds. + """ + reservedFundsGross: MoneyV2! + + """ + Total fees for all retried payouts. + """ + retriedPayoutsFee: MoneyV2! + + """ + Total gross amount for all retried payouts. + """ + retriedPayoutsGross: MoneyV2! + + """ + Total amount for all usdc rebate credit balance adjustments. + """ + usdcRebateCreditAmount: MoneyV2! +} + +""" +The possible transaction types for a payout. +""" +enum ShopifyPaymentsPayoutTransactionType { + """ + The payout is a deposit. + """ + DEPOSIT + + """ + The payout is a withdrawal. + """ + WITHDRAWAL +} + +""" +Presents all Shopify Payments specific information related to an order refund. +""" +type ShopifyPaymentsRefundSet { + """ + The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. + """ + acquirerReferenceNumber: String +} + +""" +The possible source types for a balance transaction. +""" +enum ShopifyPaymentsSourceType { + """ + The adjustment_reversal source type. + """ + ADJUSTMENT_REVERSAL + + """ + The charge source type. + """ + CHARGE + + """ + The refund source type. + """ + REFUND + + """ + The system_adjustment source type. + """ + SYSTEM_ADJUSTMENT + + """ + The dispute source type. + """ + DISPUTE + + """ + The adjustment source type. + """ + ADJUSTMENT + + """ + The transfer source type. + """ + TRANSFER +} + +""" +A typed identifier that represents an individual within a tax jurisdiction. +""" +type ShopifyPaymentsTaxIdentification { + """ + The type of the identification. + """ + taxIdentificationType: ShopifyPaymentsTaxIdentificationType! + + """ + The value of the identification. + """ + value: String! +} + +""" +The type of tax identification field. +""" +enum ShopifyPaymentsTaxIdentificationType { + """ + The last 4 digits of the SSN. + """ + SSN_LAST4_DIGITS + + """ + Full SSN. + """ + FULL_SSN + + """ + Business EIN. + """ + EIN +} + +""" +Relevant reference information for an alternate currency payout. +""" +type ShopifyPaymentsToolingProviderPayout { + """ + The balance amount the alternate currency payout was created for. + """ + amount: MoneyV2! + + """ + A timestamp for the arrival of the alternate currency payout. + """ + arrivalDate: DateTime + + """ + A timestamp for the creation of the alternate currency payout. + """ + createdAt: DateTime + + """ + The currency alternate currency payout was created in. + """ + currency: String! + + """ + The remote ID for the alternate currency payout. + """ + remoteId: String! +} + +""" +Presents all Shopify Payments specific information related to an order transaction. +""" +type ShopifyPaymentsTransactionSet { + """ + Contains all fields related to an extended authorization. + """ + extendedAuthorizationSet: ShopifyPaymentsExtendedAuthorization + + """ + Contains all fields related to a refund. + """ + refundSet: ShopifyPaymentsRefundSet +} + +""" +The possible types of transactions. +""" +enum ShopifyPaymentsTransactionType { + """ + The ach_bank_failure_debit_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_FEE + + """ + The ach_bank_failure_debit_reversal_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_REVERSAL_FEE + + """ + The ads_publisher_credit transaction type. + """ + ADS_PUBLISHER_CREDIT + + """ + The ads_publisher_credit_reversal transaction type. + """ + ADS_PUBLISHER_CREDIT_REVERSAL + + """ + The chargeback_protection_credit transaction type. + """ + CHARGEBACK_PROTECTION_CREDIT + + """ + The chargeback_protection_credit_reversal transaction type. + """ + CHARGEBACK_PROTECTION_CREDIT_REVERSAL + + """ + The chargeback_protection_debit transaction type. + """ + CHARGEBACK_PROTECTION_DEBIT + + """ + The chargeback_protection_debit_reversal transaction type. + """ + CHARGEBACK_PROTECTION_DEBIT_REVERSAL + + """ + The collections_credit transaction type. + """ + COLLECTIONS_CREDIT + + """ + The collections_credit_reversal transaction type. + """ + COLLECTIONS_CREDIT_REVERSAL + + """ + The promotion_credit transaction type. + """ + PROMOTION_CREDIT + + """ + The promotion_credit_reversal transaction type. + """ + PROMOTION_CREDIT_REVERSAL + + """ + The anomaly_credit transaction type. + """ + ANOMALY_CREDIT + + """ + The anomaly_credit_reversal transaction type. + """ + ANOMALY_CREDIT_REVERSAL + + """ + The anomaly_debit transaction type. + """ + ANOMALY_DEBIT + + """ + The anomaly_debit_reversal transaction type. + """ + ANOMALY_DEBIT_REVERSAL + + """ + The vat_refund_credit transaction type. + """ + VAT_REFUND_CREDIT + + """ + The vat_refund_credit_reversal transaction type. + """ + VAT_REFUND_CREDIT_REVERSAL + + """ + The channel_credit transaction type. + """ + CHANNEL_CREDIT + + """ + The channel_credit_reversal transaction type. + """ + CHANNEL_CREDIT_REVERSAL + + """ + The channel_transfer_credit transaction type. + """ + CHANNEL_TRANSFER_CREDIT + + """ + The channel_transfer_credit_reversal transaction type. + """ + CHANNEL_TRANSFER_CREDIT_REVERSAL + + """ + The channel_transfer_debit transaction type. + """ + CHANNEL_TRANSFER_DEBIT + + """ + The channel_transfer_debit_reversal transaction type. + """ + CHANNEL_TRANSFER_DEBIT_REVERSAL + + """ + The channel_promotion_credit transaction type. + """ + CHANNEL_PROMOTION_CREDIT + + """ + The channel_promotion_credit_reversal transaction type. + """ + CHANNEL_PROMOTION_CREDIT_REVERSAL + + """ + The marketplace_fee_credit transaction type. + """ + MARKETPLACE_FEE_CREDIT + + """ + The marketplace_fee_credit_reversal transaction type. + """ + MARKETPLACE_FEE_CREDIT_REVERSAL + + """ + The merchant_goodwill_credit transaction type. + """ + MERCHANT_GOODWILL_CREDIT + + """ + The merchant_goodwill_credit_reversal transaction type. + """ + MERCHANT_GOODWILL_CREDIT_REVERSAL + + """ + The tax_adjustment_debit transaction type. + """ + TAX_ADJUSTMENT_DEBIT + + """ + The tax_adjustment_debit_reversal transaction type. + """ + TAX_ADJUSTMENT_DEBIT_REVERSAL + + """ + The tax_adjustment_credit transaction type. + """ + TAX_ADJUSTMENT_CREDIT + + """ + The tax_adjustment_credit_reversal transaction type. + """ + TAX_ADJUSTMENT_CREDIT_REVERSAL + + """ + The billing_debit transaction type. + """ + BILLING_DEBIT + + """ + The billing_debit_reversal transaction type. + """ + BILLING_DEBIT_REVERSAL + + """ + The shop_cash_credit transaction type. + """ + SHOP_CASH_CREDIT + + """ + The shop_cash_credit_reversal transaction type. + """ + SHOP_CASH_CREDIT_REVERSAL + + """ + The shop_cash_billing_debit transaction type. + """ + SHOP_CASH_BILLING_DEBIT + + """ + The shop_cash_billing_debit_reversal transaction type. + """ + SHOP_CASH_BILLING_DEBIT_REVERSAL + + """ + The shop_cash_refund_debit transaction type. + """ + SHOP_CASH_REFUND_DEBIT + + """ + The shop_cash_refund_debit_reversal transaction type. + """ + SHOP_CASH_REFUND_DEBIT_REVERSAL + + """ + The shop_cash_campaign_billing_debit transaction type. + """ + SHOP_CASH_CAMPAIGN_BILLING_DEBIT + + """ + The shop_cash_campaign_billing_debit_reversal transaction type. + """ + SHOP_CASH_CAMPAIGN_BILLING_DEBIT_REVERSAL + + """ + The shop_cash_campaign_billing_credit transaction type. + """ + SHOP_CASH_CAMPAIGN_BILLING_CREDIT + + """ + The shop_cash_campaign_billing_credit_reversal transaction type. + """ + SHOP_CASH_CAMPAIGN_BILLING_CREDIT_REVERSAL + + """ + The seller_protection_credit transaction type. + """ + SELLER_PROTECTION_CREDIT + + """ + The seller_protection_credit_reversal transaction type. + """ + SELLER_PROTECTION_CREDIT_REVERSAL + + """ + The shopify_collective_debit transaction type. + """ + SHOPIFY_COLLECTIVE_DEBIT + + """ + The shopify_collective_debit_reversal transaction type. + """ + SHOPIFY_COLLECTIVE_DEBIT_REVERSAL + + """ + The shopify_collective_credit transaction type. + """ + SHOPIFY_COLLECTIVE_CREDIT + + """ + The shopify_collective_credit_reversal transaction type. + """ + SHOPIFY_COLLECTIVE_CREDIT_REVERSAL + + """ + The lending_debit transaction type. + """ + LENDING_DEBIT + + """ + The lending_debit_reversal transaction type. + """ + LENDING_DEBIT_REVERSAL + + """ + The lending_credit transaction type. + """ + LENDING_CREDIT + + """ + The lending_credit_reversal transaction type. + """ + LENDING_CREDIT_REVERSAL + + """ + The lending_capital_remittance transaction type. + """ + LENDING_CAPITAL_REMITTANCE + + """ + The lending_capital_remittance_reversal transaction type. + """ + LENDING_CAPITAL_REMITTANCE_REVERSAL + + """ + The lending_credit_remittance transaction type. + """ + LENDING_CREDIT_REMITTANCE + + """ + The lending_credit_remittance_reversal transaction type. + """ + LENDING_CREDIT_REMITTANCE_REVERSAL + + """ + The lending_capital_refund transaction type. + """ + LENDING_CAPITAL_REFUND + + """ + The lending_capital_refund_reversal transaction type. + """ + LENDING_CAPITAL_REFUND_REVERSAL + + """ + The lending_credit_refund transaction type. + """ + LENDING_CREDIT_REFUND + + """ + The lending_credit_refund_reversal transaction type. + """ + LENDING_CREDIT_REFUND_REVERSAL + + """ + The balance_transfer_inbound transaction type. + """ + BALANCE_TRANSFER_INBOUND + + """ + The balance_transfer_outbound transaction type. + """ + BALANCE_TRANSFER_OUTBOUND + + """ + The markets_pro_credit transaction type. + """ + MARKETS_PRO_CREDIT + + """ + The customs_duty_adjustment transaction type. + """ + CUSTOMS_DUTY_ADJUSTMENT + + """ + The import_tax_adjustment transaction type. + """ + IMPORT_TAX_ADJUSTMENT + + """ + The shipping_label_adjustment transaction type. + """ + SHIPPING_LABEL_ADJUSTMENT + + """ + The shipping_label_adjustment_base transaction type. + """ + SHIPPING_LABEL_ADJUSTMENT_BASE + + """ + The shipping_label_adjustment_surcharge transaction type. + """ + SHIPPING_LABEL_ADJUSTMENT_SURCHARGE + + """ + The shipping_return_to_origin_adjustment transaction type. + """ + SHIPPING_RETURN_TO_ORIGIN_ADJUSTMENT + + """ + The shipping_other_carrier_charge_adjustment transaction type. + """ + SHIPPING_OTHER_CARRIER_CHARGE_ADJUSTMENT + + """ + The charge_adjustment transaction type. + """ + CHARGE_ADJUSTMENT + + """ + The refund_adjustment transaction type. + """ + REFUND_ADJUSTMENT + + """ + The chargeback_fee transaction type. + """ + CHARGEBACK_FEE + + """ + The chargeback_fee_refund transaction type. + """ + CHARGEBACK_FEE_REFUND + + """ + The transfer transaction type. + """ + TRANSFER + + """ + The transfer_failure transaction type. + """ + TRANSFER_FAILURE + + """ + The transfer_cancel transaction type. + """ + TRANSFER_CANCEL + + """ + The reserved_funds_withdrawal transaction type. + """ + RESERVED_FUNDS_WITHDRAWAL + + """ + The reserved_funds_reversal transaction type. + """ + RESERVED_FUNDS_REVERSAL + + """ + The risk_reversal transaction type. + """ + RISK_REVERSAL + + """ + The risk_withdrawal transaction type. + """ + RISK_WITHDRAWAL + + """ + The referral_fee transaction type. + """ + REFERRAL_FEE + + """ + The referral_fee_tax transaction type. + """ + REFERRAL_FEE_TAX + + """ + The merchant_to_merchant_debit transaction type. + """ + MERCHANT_TO_MERCHANT_DEBIT + + """ + The merchant_to_merchant_debit_reversal transaction type. + """ + MERCHANT_TO_MERCHANT_DEBIT_REVERSAL + + """ + The merchant_to_merchant_credit transaction type. + """ + MERCHANT_TO_MERCHANT_CREDIT + + """ + The merchant_to_merchant_credit_reversal transaction type. + """ + MERCHANT_TO_MERCHANT_CREDIT_REVERSAL + + """ + The shopify_source_debit transaction type. + """ + SHOPIFY_SOURCE_DEBIT + + """ + The shopify_source_debit_reversal transaction type. + """ + SHOPIFY_SOURCE_DEBIT_REVERSAL + + """ + The shopify_source_credit transaction type. + """ + SHOPIFY_SOURCE_CREDIT + + """ + The shopify_source_credit_reversal transaction type. + """ + SHOPIFY_SOURCE_CREDIT_REVERSAL + + """ + The charge transaction type. + """ + CHARGE + + """ + The refund transaction type. + """ + REFUND + + """ + The refund_failure transaction type. + """ + REFUND_FAILURE + + """ + The application_fee_refund transaction type. + """ + APPLICATION_FEE_REFUND + + """ + The adjustment transaction type. + """ + ADJUSTMENT + + """ + The dispute_withdrawal transaction type. + """ + DISPUTE_WITHDRAWAL + + """ + The dispute_reversal transaction type. + """ + DISPUTE_REVERSAL + + """ + The shipping_label transaction type. + """ + SHIPPING_LABEL + + """ + The customs_duty transaction type. + """ + CUSTOMS_DUTY + + """ + The import_tax transaction type. + """ + IMPORT_TAX + + """ + The chargeback_hold transaction type. + """ + CHARGEBACK_HOLD + + """ + The chargeback_hold_release transaction type. + """ + CHARGEBACK_HOLD_RELEASE + + """ + The reserved_funds transaction type. + """ + RESERVED_FUNDS + + """ + The stripe_fee transaction type. + """ + STRIPE_FEE + + """ + The transfer_refund transaction type. + """ + TRANSFER_REFUND + + """ + The advance transaction type. + """ + ADVANCE + + """ + The advance funding transaction type. + """ + ADVANCE_FUNDING + + """ + The tax refund transaction type. + """ + IMPORT_TAX_REFUND +} + +""" +The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect. +""" +enum ShopifyProtectEligibilityStatus { + """ + The eligibility of the order is pending and has not yet been determined. + """ + PENDING """ - Gambia. + The order is eligible for protection against fraudulent chargebacks. + If an order is updated, the order's eligibility may change and protection could be removed. """ - GM + ELIGIBLE """ - Georgia. + The order isn't eligible for protection against fraudulent chargebacks. """ - GE + NOT_ELIGIBLE +} +""" +The eligibility details of an order's protection against fraudulent chargebacks by Shopify Protect. +""" +type ShopifyProtectOrderEligibility { """ - Germany. + The status of whether an order is eligible for protection against fraudulent chargebacks. """ - DE + status: ShopifyProtectEligibilityStatus! +} +""" +A summary of Shopify Protect details for an order. +""" +type ShopifyProtectOrderSummary { """ - Ghana. + The eligibility details of an order's protection against fraudulent chargebacks. """ - GH + eligibility: ShopifyProtectOrderEligibility! """ - Gibraltar. + The status of the order's protection against fraudulent chargebacks. """ - GI + status: ShopifyProtectStatus! +} +""" +The status of an order's protection with Shopify Protect. +""" +enum ShopifyProtectStatus { """ - Greece. + The protection for the order is pending and has not yet been determined. """ - GR + PENDING """ - Greenland. + The protection for the order is active and eligible for reimbursement against fraudulent chargebacks. + If an order is updated, the order's eligibility may change and protection could become inactive. """ - GL + ACTIVE """ - Grenada. + The protection for an order isn't active because the order didn't meet eligibility requirements. """ - GD + INACTIVE """ - Guadeloupe. + The order received a fraudulent chargeback and it was protected. """ - GP + PROTECTED """ - Guatemala. + The order received a chargeback but the order wasn't protected because it didn't meet coverage requirements. """ - GT + NOT_PROTECTED +} +""" +A response to a ShopifyQL query. +""" +type ShopifyqlQueryResponse { """ - Guernsey. + A list of parse errors, if parsing fails. """ - GG + parseErrors: [String!]! """ - Guinea. + The result in a tabular format with column and row data. """ - GN + tableData: ShopifyqlTableData +} +""" +The result of a ShopifyQL query. +""" +type ShopifyqlTableData { """ - Guinea-Bissau. + The columns of the table. """ - GW + columns: [ShopifyqlTableDataColumn!]! """ - Guyana. + The rows of the table. """ - GY + rows: JSON! +} +""" +Represents a column in a ShopifyQL query response. +""" +type ShopifyqlTableDataColumn { """ - Haiti. + The data type of the column. """ - HT + dataType: ColumnDataType! """ - Heard & McDonald Islands. + The human-readable display name of the column. """ - HM + displayName: String! """ - Vatican City. + The name of the column. """ - VA + name: String! """ - Honduras. + The sub type of an array column. """ - HN + subType: ColumnDataType +} + +""" +A user account that can access the Shopify admin to manage store operations. Includes personal information and account status. +You can assign staff members to [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) objects for [B2B operations](https://shopify.dev/docs/apps/build/b2b), limiting their actions to those locations. +""" +type StaffMember implements Node { """ - Hong Kong SAR. + The type of account the staff member has. """ - HK + accountType: AccountType """ - Hungary. + Whether the staff member is active. """ - HU + active: Boolean! """ - Iceland. + The image used as the staff member's avatar in the Shopify admin. """ - IS + avatar("The image width in pixels between 1 and 2048." maxWidth: Int @deprecated(reason: "Use `maxWidth` on argument `image` instead."), "The image height in pixels between 1 and 2048." maxHeight: Int @deprecated(reason: "Use `maxHeight` argument on `image` instead."), "The default image returned if the staff member has no avatar." fallback: StaffMemberDefaultImage = DEFAULT): Image! """ - India. + The staff member's email address. """ - IN + email: String! """ - Indonesia. + Whether the staff member's account exists. + """ + exists: Boolean! + + """ + The staff member's first name. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The staff member's initials, if available. + """ + initials: [String!] + + """ + Whether the staff member is the shop owner. + """ + isShopOwner: Boolean! + + """ + The staff member's last name. + """ + lastName: String + + """ + The staff member's preferred locale. Locale values use the format `language` or `language-COUNTRY`, where `language` is a two-letter language code, and `COUNTRY` is a two-letter country code. For example: `en` or `en-US` + """ + locale: String! + + """ + The staff member's full name. + """ + name: String! + + """ + The staff member's phone number. + """ + phone: String + + """ + The data used to customize the Shopify admin experience for the staff member. + """ + privateData: StaffMemberPrivateData! +} + +""" +An auto-generated type for paginating through multiple StaffMembers. +""" +type StaffMemberConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StaffMemberEdge!]! + + """ + A list of nodes that are contained in StaffMemberEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [StaffMember!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the fallback avatar image for a staff member. This is used only if the staff member has no avatar image. +""" +enum StaffMemberDefaultImage { + """ + Returns a default avatar image for the staff member. + """ + DEFAULT + + """ + Returns a transparent avatar image for the staff member. + """ + TRANSPARENT + + """ + Returns a URL that returns a 404 error if the image is not present. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one StaffMember and a cursor during pagination. +""" +type StaffMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of StaffMemberEdge. + """ + node: StaffMember! +} + +""" +Represents access permissions for a staff member. +""" +enum StaffMemberPermission { + """ + The staff member can manage and install apps and channels. + """ + APPLICATIONS + + """ + The staff member can manage and install sales channels. + """ + CHANNELS + + """ + The staff member can create and edit customers. + """ + CREATE_AND_EDIT_CUSTOMERS + + """ + The staff member can create and edit gift cards. + """ + CREATE_AND_EDIT_GIFT_CARDS + + """ + The staff member can view customers. + """ + CUSTOMERS + + """ + The staff member can view the Shopify Home page, which includes sales information and other shop data. + """ + DASHBOARD + + """ + The staff member can deactivate gift cards. + """ + DEACTIVATE_GIFT_CARDS + + """ + The staff member can delete customers. + """ + DELETE_CUSTOMERS + + """ + The staff member can view, buy, and manage domains. + """ + DOMAINS + + """ + The staff member can create, update, and delete draft orders. + """ + DRAFT_ORDERS + + """ + The staff member can update orders. + """ + EDIT_ORDERS + + """ + The staff member can erase customer private data. + """ + ERASE_CUSTOMER_DATA + + """ + The staff member can export customers. + """ + EXPORT_CUSTOMERS + + """ + The staff member can export gift cards. + """ + EXPORT_GIFT_CARDS + + """ + The staff has the same permissions as the [store owner](https://shopify.dev/en/manual/your-account/staff-accounts/staff-permissions#store-owner-permissions) with some exceptions, such as modifying the account billing or deleting staff accounts. + """ + FULL @deprecated(reason: "Use the list of the staff member's explicit permissions returned in the `StaffMember.permissions.userPermissions` field instead of `full` permission.") + + """ + The staff member can view, create, issue, and export gift cards to a CSV file. + """ + GIFT_CARDS + + """ + The staff member can view and modify links and navigation menus. + """ + LINKS + + """ + The staff member can create, update, and delete locations where inventory is stocked or managed. + """ + LOCATIONS + + """ + The staff member can view markets. + """ + VIEW_MARKETS + + """ + The staff member can create and edit markets. + """ + CREATE_AND_EDIT_MARKETS + + """ + The staff member can delete markets. + """ + DELETE_MARKETS + + """ + The staff member can view and create discount codes and automatic discounts, and export discounts to a CSV file. + """ + MARKETING + + """ + The staff member can view, create, and automate marketing campaigns. + """ + MARKETING_SECTION + + """ + The staff member can merge customers. + """ + MERGE_CUSTOMERS + + """ + The staff member can view, create, update, delete, and cancel orders, and receive order notifications. The staff member can still create draft orders without this permission. + """ + ORDERS + + """ + The staff member can view the Overview and Live view pages, which include sales information, and other shop and sales channels data. + """ + OVERVIEWS + + """ + The staff member can view, create, update, publish, and delete blog posts and pages. + """ + PAGES + + """ + The staff member can pay for an order by using a vaulted card. + """ + PAY_ORDERS_BY_VAULTED_CARD + + """ + The staff member can view the preferences and configuration of a shop. + """ + PREFERENCES + + """ + The staff member can view, create, import, and update products, collections, and inventory. + """ + PRODUCTS + + """ + The staff member can view and create all reports, which includes sales information and other shop data. + """ + REPORTS + + """ + The staff member can request customer private data. + """ + REQUEST_CUSTOMER_DATA + + """ + The staff member can view, update, and publish themes. + """ + THEMES + + """ + The staff member can view and create translations. + """ + TRANSLATIONS @deprecated(reason: "Unused.") +} + +""" +Represents the data used to customize the Shopify admin experience for a logged-in staff member. +""" +type StaffMemberPrivateData { + """ + The URL to the staff member's account settings page. + """ + accountSettingsUrl: URL! + + """ + The date and time when the staff member was created. + """ + createdAt: DateTime! + + """ + Access permissions for the staff member. + """ + permissions: [StaffMemberPermission!]! @deprecated(reason: "There's no alternative field to use instead.") +} + +""" +The set of valid sort keys for the StaffMembers query. +""" +enum StaffMembersSortKeys { + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `first_name` value. + """ + FIRST_NAME + + """ + Sort by the `id` value. """ ID """ - Iran. + Sort by the `last_name` value. """ - IR + LAST_NAME +} +""" +An image to be uploaded. + +Deprecated in favor of +[StagedUploadInput](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadInput), +which is used by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +input StageImageInput { """ - Iraq. + The image resource. """ - IQ + resource: StagedUploadTargetGenerateUploadResource! """ - Ireland. + The image filename. """ - IE + filename: String! """ - Isle of Man. + The image MIME type. """ - IM + mimeType: String! """ - Israel. + HTTP method to be used by the staged upload. """ - IL + httpMethod: StagedUploadHttpMethodType = PUT +} + +""" +Information about a staged upload target, which should be used to send a request to upload +the file. +For more information on the upload process, refer to +[Upload media to Shopify](https://shopify.dev/apps/online-store/media/products#step-1-upload-media-to-shopify). +""" +type StagedMediaUploadTarget { """ - Italy. + Parameters needed to authenticate a request to upload the file. """ - IT + parameters: [StagedUploadParameter!]! """ - Jamaica. + The URL to be passed as `originalSource` in + [CreateMediaInput](https://shopify.dev/api/admin-graphql/latest/input-objects/CreateMediaInput) + and [FileCreateInput](https://shopify.dev/api/admin-graphql/2022-04/input-objects/FileCreateInput) + for the [productCreateMedia](https://shopify.dev/api/admin-graphql/2022-04/mutations/productCreateMedia) + and [fileCreate](https://shopify.dev/api/admin-graphql/2022-04/mutations/fileCreate) + mutations. """ - JM + resourceUrl: URL """ - Japan. + The URL to use when sending an request to upload the file. Should be used in conjunction with + the parameters field. """ - JP + url: URL +} +""" +The possible HTTP methods that can be used when sending a request to upload a file using information from a +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget). +""" +enum StagedUploadHttpMethodType { """ - Jersey. + The POST HTTP method. """ - JE + POST """ - Jordan. + The PUT HTTP method. """ - JO + PUT +} +""" +The input fields for generating staged upload targets. +""" +input StagedUploadInput { """ - Kazakhstan. + The file's intended Shopify resource type. """ - KZ + resource: StagedUploadTargetGenerateUploadResource! """ - Kenya. + The file's name and extension. """ - KE + filename: String! """ - Kiribati. + The file's MIME type. """ - KI + mimeType: String! """ - North Korea. + The HTTP method to be used when sending a request to upload the file using the returned staged + upload target. """ - KP + httpMethod: StagedUploadHttpMethodType = PUT """ - Kosovo. + The size of the file to upload, in bytes. This is required when the request's resource property is set to + [VIDEO](https://shopify.dev/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#value-video) + or [MODEL_3D](https://shopify.dev/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#value-model3d). """ - XK + fileSize: UnsignedInt64 +} + +""" +The parameters required to authenticate a file upload request using a +[StagedMediaUploadTarget's url field](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-stagedmediauploadtarget-url). +For more information on the upload process, refer to +[Upload media to Shopify](https://shopify.dev/apps/online-store/media/products#step-1-upload-media-to-shopify). +""" +type StagedUploadParameter { """ - Kuwait. + The parameter's name. """ - KW + name: String! """ - Kyrgyzstan. + The parameter's value. """ - KG + value: String! +} + +""" +Information about the staged target. +Deprecated in favor of +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget), +which is returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type StagedUploadTarget { """ - Laos. + The parameters of an image to be uploaded. """ - LA + parameters: [ImageUploadParameter!]! """ - Latvia. + The image URL. """ - LV + url: String! +} +""" +The required fields and parameters to generate the URL upload an" +asset to Shopify. + +Deprecated in favor of +[StagedUploadInput](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadInput), +which is used by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +input StagedUploadTargetGenerateInput { """ - Lebanon. + The resource type being uploaded. """ - LB + resource: StagedUploadTargetGenerateUploadResource! """ - Lesotho. + The filename of the asset being uploaded. """ - LS + filename: String! """ - Liberia. + The MIME type of the asset being uploaded. """ - LR + mimeType: String! """ - Libya. + The HTTP method to be used by the staged upload. """ - LY + httpMethod: StagedUploadHttpMethodType = PUT """ - Liechtenstein. + The size of the file to upload, in bytes. """ - LI + fileSize: UnsignedInt64 +} +""" +Return type for `stagedUploadTargetGenerate` mutation. +""" +type StagedUploadTargetGeneratePayload { """ - Lithuania. + The signed parameters that can be used to upload the asset. """ - LT + parameters: [MutationsStagedUploadTargetGenerateUploadParameter!]! """ - Luxembourg. + The signed URL where the asset can be uploaded. """ - LU + url: String! """ - Macao SAR. + The list of errors that occurred from executing the mutation. """ - MO + userErrors: [UserError!]! +} +""" +The resource type to receive. +""" +enum StagedUploadTargetGenerateUploadResource { """ - Madagascar. + An image associated with a collection. + + For example, after uploading an image, you can use the + [collectionUpdate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/collectionUpdate) + to add the image to a collection. """ - MG + COLLECTION_IMAGE """ - Malawi. + Represents any file other than HTML. + + For example, after uploading the file, you can add the file to the + [Files page](https://shopify.com/admin/settings/files) in Shopify admin using the + [fileCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/fileCreate). """ - MW + FILE """ - Malaysia. + An image. + + For example, after uploading an image, you can add the image to a product using the + [productCreateMedia mutation](https://shopify.dev/api/admin-graphql/latest/mutations/productCreateMedia) + or to the [Files page](https://shopify.com/admin/settings/files) in Shopify admin using the + [fileCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/fileCreate). """ - MY + IMAGE """ - Maldives. + A Shopify hosted 3d model. + + For example, after uploading the 3d model, you can add the 3d model to a product using the + [productCreateMedia mutation](https://shopify.dev/api/admin-graphql/latest/mutations/productCreateMedia). """ - MV + MODEL_3D """ - Mali. + An image that's associated with a product. + + For example, after uploading the image, you can add the image to a product using the + [productCreateMedia mutation](https://shopify.dev/api/admin-graphql/latest/mutations/productCreateMedia). """ - ML + PRODUCT_IMAGE @deprecated(reason: "Use IMAGE instead. This resource type will be removed in a future version.") """ - Malta. + An image. + + For example, after uploading the image, you can add the image to the + [Files page](https://shopify.com/admin/settings/files) in Shopify admin using the + [fileCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/fileCreate). """ - MT + SHOP_IMAGE """ - Martinique. + A Shopify-hosted video. + + For example, after uploading the video, you can add the video to a product using the + [productCreateMedia mutation](https://shopify.dev/api/admin-graphql/latest/mutations/productCreateMedia) + or to the [Files page](https://shopify.com/admin/settings/files) in Shopify admin using the + [fileCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/fileCreate). """ - MQ + VIDEO """ - Mauritania. + Represents bulk mutation variables. + + For example, bulk mutation variables can be used for bulk operations using the + [bulkOperationRunMutation mutation](https://shopify.dev/api/admin-graphql/latest/mutations/bulkOperationRunMutation). """ - MR + BULK_MUTATION_VARIABLES """ - Mauritius. + Represents a label associated with a return. + + For example, once uploaded, this resource can be used to [create a + ReverseDelivery](https://shopify.dev/api/admin-graphql/unstable/mutations/reverseDeliveryCreateWithShipping). """ - MU + RETURN_LABEL """ - Mayotte. + Represents a redirect CSV file. + + Example usage: This resource can be used for creating a + [UrlRedirectImport](https://shopify.dev/api/admin-graphql/2022-04/objects/UrlRedirectImport) + object for use in the + [urlRedirectImportCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportCreate). """ - YT + URL_REDIRECT_IMPORT """ - Mexico. + Represents a file associated with a dispute. + + For example, after uploading the file, you can add the file to a dispute using the + [disputeEvidenceUpdate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/disputeEvidenceUpdate). """ - MX + DISPUTE_FILE_UPLOAD +} +""" +Return type for `stagedUploadTargetsGenerate` mutation. +""" +type StagedUploadTargetsGeneratePayload { """ - Moldova. + The staged upload targets that were generated. """ - MD + urls: [StagedUploadTarget!] """ - Monaco. + The list of errors that occurred from executing the mutation. """ - MC + userErrors: [UserError!]! +} +""" +Return type for `stagedUploadsCreate` mutation. +""" +type StagedUploadsCreatePayload { """ - Mongolia. + The staged upload targets that were generated. """ - MN + stagedTargets: [StagedMediaUploadTarget!] """ - Montenegro. + The list of errors that occurred from executing the mutation. """ - ME + userErrors: [UserError!]! +} +""" +The input fields for the access settings for the metafields under the standard definition. +""" +input StandardMetafieldDefinitionAccessInput { """ - Montserrat. + The Admin API access setting to use for the metafields under this definition. """ - MS + admin: MetafieldAdminAccessInput """ - Morocco. + The Storefront API access setting to use for the metafields under this definition. """ - MA + storefront: MetafieldStorefrontAccessInput """ - Mozambique. + The Customer Account API access setting to use for the metafields under this definition. """ - MZ + customerAccount: MetafieldCustomerAccountAccessInput +} +""" +Return type for `standardMetafieldDefinitionEnable` mutation. +""" +type StandardMetafieldDefinitionEnablePayload { """ - Myanmar (Burma). + The metafield definition that was created. """ - MM + createdDefinition: MetafieldDefinition """ - Namibia. + The list of errors that occurred from executing the mutation. """ - NA + userErrors: [StandardMetafieldDefinitionEnableUserError!]! +} +""" +An error that occurs during the execution of `StandardMetafieldDefinitionEnable`. +""" +type StandardMetafieldDefinitionEnableUserError implements DisplayableError { """ - Nauru. + The error code. """ - NR + code: StandardMetafieldDefinitionEnableUserErrorCode """ - Nepal. + The path to the input field that caused the error. """ - NP + field: [String!] """ - Netherlands. + The error message. """ - NL + message: String! +} +""" +Possible error codes that can be returned by `StandardMetafieldDefinitionEnableUserError`. +""" +enum StandardMetafieldDefinitionEnableUserErrorCode { """ - Netherlands Antilles. + The input value is invalid. """ - AN + INVALID """ - New Caledonia. + The input value is already taken. """ - NC + TAKEN """ - New Zealand. + The standard metafield definition template was not found. """ - NZ + TEMPLATE_NOT_FOUND """ - Nicaragua. + The maximum number of definitions per owner type has been exceeded. """ - NI + LIMIT_EXCEEDED """ - Niger. + The namespace and key is already in use for a set of your metafields. """ - NE + UNSTRUCTURED_ALREADY_EXISTS """ - Nigeria. + The definition type is not eligible to be used as collection condition. """ - NG + TYPE_NOT_ALLOWED_FOR_CONDITIONS """ - Niue. + The metafield definition capability is invalid. """ - NU + INVALID_CAPABILITY """ - Norfolk Island. + The metafield definition capability cannot be disabled. + """ + CAPABILITY_CANNOT_BE_DISABLED + + """ + You have reached the maximum allowed definitions to be used as admin filters. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_USE_AS_ADMIN_FILTERS + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION +} + +""" +Standard metafield definition templates provide preset configurations to create metafield definitions. +Each template has a specific namespace and key that we've reserved to have specific meanings for common use cases. + +Refer to the [list of standard metafield definitions](https://shopify.dev/apps/metafields/definitions/standard-definitions). +""" +type StandardMetafieldDefinitionTemplate implements Node { + """ + The description of the standard metafield definition. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The key owned by the definition after the definition has been activated. + """ + key: String! + + """ + The human-readable name for the standard metafield definition. """ - NF + name: String! """ - North Macedonia. + The namespace owned by the definition after the definition has been activated. """ - MK + namespace: String! """ - Norway. + The list of resource types that the standard metafield definition can be applied to. """ - NO + ownerTypes: [MetafieldOwnerType!]! """ - Oman. + The associated [metafield definition type](https://shopify.dev/apps/metafields/definitions/types) that the metafield stores. """ - OM + type: MetafieldDefinitionType! """ - Pakistan. + The configured validations for the standard metafield definition. """ - PK + validations: [MetafieldDefinitionValidation!]! """ - Palestinian Territories. + Whether metafields for the definition are by default visible using the Storefront API. """ - PS + visibleToStorefrontApi: Boolean! +} +""" +An auto-generated type for paginating through multiple StandardMetafieldDefinitionTemplates. +""" +type StandardMetafieldDefinitionTemplateConnection { """ - Panama. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - PA + edges: [StandardMetafieldDefinitionTemplateEdge!]! """ - Papua New Guinea. + A list of nodes that are contained in StandardMetafieldDefinitionTemplateEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - PG + nodes: [StandardMetafieldDefinitionTemplate!]! """ - Paraguay. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - PY + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one StandardMetafieldDefinitionTemplate and a cursor during pagination. +""" +type StandardMetafieldDefinitionTemplateEdge { """ - Peru. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - PE + cursor: String! """ - Philippines. + The item at the end of StandardMetafieldDefinitionTemplateEdge. """ - PH + node: StandardMetafieldDefinitionTemplate! +} +""" +Describes a capability that is enabled on a Metaobject Definition. +""" +type StandardMetaobjectCapabilityTemplate { """ - Pitcairn Islands. + The type of capability that's enabled for the metaobject definition. """ - PN + capabilityType: MetaobjectCapabilityType! +} +""" +Return type for `standardMetaobjectDefinitionEnable` mutation. +""" +type StandardMetaobjectDefinitionEnablePayload { """ - Poland. + The metaobject definition that was enabled using the standard template. """ - PL + metaobjectDefinition: MetaobjectDefinition """ - Portugal. + The list of errors that occurred from executing the mutation. """ - PT + userErrors: [MetaobjectUserError!]! +} +""" +A preset field definition on a standard metaobject definition template. +""" +type StandardMetaobjectDefinitionFieldTemplate { """ - Qatar. + The administrative description. """ - QA + description: String """ - Cameroon. + The key owned by the definition after the definition has been enabled. """ - CM + key: String! """ - Réunion. + The human-readable name. """ - RE + name: String! """ - Romania. + The required status of the field within the object composition. """ - RO + required: Boolean! """ - Russia. + The associated [metafield definition type](https://shopify.dev/apps/metafields/definitions/types) that the metafield stores. """ - RU + type: MetafieldDefinitionType! """ - Rwanda. + The configured validations for the standard metafield definition. """ - RW + validations: [MetafieldDefinitionValidation!]! """ - St. Barthélemy. + Whether metafields for the definition are by default visible using the Storefront API. """ - BL + visibleToStorefrontApi: Boolean! +} +""" +Standard metaobject definition templates provide preset configurations to create metaobject definitions. +""" +type StandardMetaobjectDefinitionTemplate { """ - St. Helena. + The administrative description. """ - SH + description: String """ - St. Kitts & Nevis. + The key of a field to reference as the display name for each object. """ - KN + displayNameKey: String """ - St. Lucia. + The capabilities of the metaobject definition. """ - LC + enabledCapabilities: [StandardMetaobjectCapabilityTemplate!]! """ - St. Martin. + Templates for the associated field definitions. """ - MF + fieldDefinitions: [StandardMetaobjectDefinitionFieldTemplate!]! """ - St. Pierre & Miquelon. + The human-readable name. """ - PM + name: String! """ - Samoa. + The namespace owned by the definition after the definition has been enabled. """ - WS + type: String! +} +""" +Represents the details of a specific type of product within the [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). +""" +type StandardizedProductType { """ - San Marino. + The product taxonomy node associated with the standardized product type. """ - SM + productTaxonomyNode: ProductTaxonomyNode +} +""" +A store credit account contains a monetary balance that can be redeemed at checkout for purchases in the shop. +The account is held in the specified currency and has an owner that cannot be transferred. + +The account balance is redeemable at checkout only when the owner is authenticated via [new customer accounts authentication](https://shopify.dev/docs/api/customer). +""" +type StoreCreditAccount implements Node { """ - São Tomé & Príncipe. + The current balance of the store credit account. """ - ST + balance: MoneyV2! """ - Saudi Arabia. + A globally-unique ID. """ - SA + id: ID! """ - Senegal. + The owner of the store credit account. """ - SN + owner: HasStoreCreditAccounts! """ - Serbia. + The transaction history of the store credit account. """ - RS + transactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: TransactionSortKeys = CREATED_AT, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| expires_at | time | Filter transactions by expiry date. Only applicable to StoreCreditAccountCreditTransaction objects. All other objects are handled as if they have a null expiry date. | | | - `expires_at:<='2025-01-01T00:00:00+01:00'`
- `expires_at:<='2025-12-31T23:00:00Z'` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| type | string | Filter transactions by type. Any value other than the accepted values will be ignored. | - `credit`
- `debit`
- `debit_revert`
- `expiration` | | - `type:expiration`
- `type:credit OR type:debit_revert` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): StoreCreditAccountTransactionConnection! +} +""" +An auto-generated type for paginating through multiple StoreCreditAccounts. +""" +type StoreCreditAccountConnection { """ - Seychelles. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - SC + edges: [StoreCreditAccountEdge!]! """ - Sierra Leone. + A list of nodes that are contained in StoreCreditAccountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - SL + nodes: [StoreCreditAccount!]! """ - Singapore. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - SG + pageInfo: PageInfo! +} +""" +The input fields for a store credit account credit transaction. +""" +input StoreCreditAccountCreditInput { """ - Sint Maarten. + The amount to credit the store credit account. """ - SX + creditAmount: MoneyInput! """ - Slovakia. + The date and time when the credit expires. """ - SK + expiresAt: DateTime """ - Slovenia. + Whether to send a notification to the account owner when the store credit is issued. + Defaults to `false`. """ - SI + notify: Boolean = false +} +""" +Return type for `storeCreditAccountCredit` mutation. +""" +type StoreCreditAccountCreditPayload { """ - Solomon Islands. + The store credit account transaction that was created. """ - SB + storeCreditAccountTransaction: StoreCreditAccountCreditTransaction """ - Somalia. + The list of errors that occurred from executing the mutation. """ - SO + userErrors: [StoreCreditAccountCreditUserError!]! +} +""" +A credit transaction which increases the store credit account balance. +""" +type StoreCreditAccountCreditTransaction implements Node & StoreCreditAccountTransaction { """ - South Africa. + The store credit account that the transaction belongs to. """ - ZA + account: StoreCreditAccount! """ - South Georgia & South Sandwich Islands. + The amount of the transaction. """ - GS + amount: MoneyV2! """ - South Korea. + The balance of the account after the transaction. """ - KR + balanceAfterTransaction: MoneyV2! """ - South Sudan. + The date and time when the transaction was created. """ - SS + createdAt: DateTime! """ - Spain. + The event that caused the store credit account transaction. """ - ES + event: StoreCreditSystemEvent! """ - Sri Lanka. + The time at which the transaction expires. + Debit transactions will always spend the soonest expiring credit first. """ - LK + expiresAt: DateTime """ - St. Vincent & Grenadines. + A globally-unique ID. """ - VC + id: ID! """ - Sudan. + The origin of the store credit account transaction. """ - SD + origin: StoreCreditAccountTransactionOrigin """ - Suriname. + The remaining amount of the credit. + The remaining amount will decrease when a debit spends this credit. It may also increase if that debit is subsequently reverted. + In the event that the credit expires, the remaining amount will represent the amount that remained as the expiry ocurred. """ - SR + remainingAmount: MoneyV2! +} +""" +An error that occurs during the execution of `StoreCreditAccountCredit`. +""" +type StoreCreditAccountCreditUserError implements DisplayableError { """ - Svalbard & Jan Mayen. + The error code. """ - SJ + code: StoreCreditAccountCreditUserErrorCode """ - Sweden. + The path to the input field that caused the error. """ - SE + field: [String!] """ - Switzerland. + The error message. """ - CH + message: String! +} +""" +Possible error codes that can be returned by `StoreCreditAccountCreditUserError`. +""" +enum StoreCreditAccountCreditUserErrorCode { """ - Syria. + The store credit account could not be found. """ - SY + ACCOUNT_NOT_FOUND """ - Taiwan. + Owner does not exist. """ - TW + OWNER_NOT_FOUND """ - Tajikistan. + A positive amount must be used to credit a store credit account. """ - TJ + NEGATIVE_OR_ZERO_AMOUNT """ - Tanzania. + The currency provided does not match the currency of the store credit account. """ - TZ + MISMATCHING_CURRENCY """ - Thailand. + The expiry date must be in the future. """ - TH + EXPIRES_AT_IN_PAST """ - Timor-Leste. + The operation would cause the account's credit limit to be exceeded. """ - TL + CREDIT_LIMIT_EXCEEDED """ - Togo. + The currency provided is not currently supported. """ - TG + UNSUPPORTED_CURRENCY +} +""" +The input fields for a store credit account debit transaction. +""" +input StoreCreditAccountDebitInput { """ - Tokelau. + The amount to debit the store credit account. """ - TK + debitAmount: MoneyInput! +} +""" +Return type for `storeCreditAccountDebit` mutation. +""" +type StoreCreditAccountDebitPayload { """ - Tonga. + The store credit account transaction that was created. """ - TO + storeCreditAccountTransaction: StoreCreditAccountDebitTransaction """ - Trinidad & Tobago. + The list of errors that occurred from executing the mutation. """ - TT + userErrors: [StoreCreditAccountDebitUserError!]! +} + +""" +A debit revert transaction which increases the store credit account balance. +Debit revert transactions are created automatically when a [store credit account debit transaction](https://shopify.dev/api/admin-graphql/latest/objects/StoreCreditAccountDebitTransaction) is reverted. +Store credit account debit transactions are reverted when an order is cancelled, refunded or in the event of a payment failure at checkout. +The amount added to the balance is equal to the amount reverted on the original credit. +""" +type StoreCreditAccountDebitRevertTransaction implements Node & StoreCreditAccountTransaction { """ - Tristan da Cunha. + The store credit account that the transaction belongs to. """ - TA + account: StoreCreditAccount! """ - Tunisia. + The amount of the transaction. """ - TN + amount: MoneyV2! """ - Türkiye. + The balance of the account after the transaction. """ - TR + balanceAfterTransaction: MoneyV2! """ - Turkmenistan. + The date and time when the transaction was created. """ - TM + createdAt: DateTime! """ - Turks & Caicos Islands. + The reverted debit transaction. """ - TC + debitTransaction: StoreCreditAccountDebitTransaction! """ - Tuvalu. + The event that caused the store credit account transaction. """ - TV + event: StoreCreditSystemEvent! """ - Uganda. + A globally-unique ID. """ - UG + id: ID! """ - Ukraine. + The origin of the store credit account transaction. """ - UA + origin: StoreCreditAccountTransactionOrigin +} +""" +A debit transaction which decreases the store credit account balance. +""" +type StoreCreditAccountDebitTransaction implements Node & StoreCreditAccountTransaction { """ - United Arab Emirates. + The store credit account that the transaction belongs to. """ - AE + account: StoreCreditAccount! """ - United Kingdom. + The amount of the transaction. """ - GB + amount: MoneyV2! """ - United States. + The balance of the account after the transaction. """ - US + balanceAfterTransaction: MoneyV2! """ - U.S. Outlying Islands. + The date and time when the transaction was created. """ - UM + createdAt: DateTime! """ - Uruguay. + The event that caused the store credit account transaction. """ - UY + event: StoreCreditSystemEvent! """ - Uzbekistan. + A globally-unique ID. """ - UZ + id: ID! """ - Vanuatu. + The origin of the store credit account transaction. """ - VU + origin: StoreCreditAccountTransactionOrigin +} +""" +An error that occurs during the execution of `StoreCreditAccountDebit`. +""" +type StoreCreditAccountDebitUserError implements DisplayableError { """ - Venezuela. + The error code. """ - VE + code: StoreCreditAccountDebitUserErrorCode """ - Vietnam. + The path to the input field that caused the error. """ - VN + field: [String!] """ - British Virgin Islands. + The error message. """ - VG + message: String! +} +""" +Possible error codes that can be returned by `StoreCreditAccountDebitUserError`. +""" +enum StoreCreditAccountDebitUserErrorCode { """ - Wallis & Futuna. + The store credit account could not be found. """ - WF + ACCOUNT_NOT_FOUND """ - Western Sahara. + A positive amount must be used to debit a store credit account. """ - EH + NEGATIVE_OR_ZERO_AMOUNT """ - Yemen. + The store credit account does not have sufficient funds to satisfy the request. """ - YE + INSUFFICIENT_FUNDS """ - Zambia. + The currency provided does not match the currency of the store credit account. """ - ZM + MISMATCHING_CURRENCY +} +""" +An auto-generated type which holds one StoreCreditAccount and a cursor during pagination. +""" +type StoreCreditAccountEdge { """ - Zimbabwe. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - ZW + cursor: String! """ - Unknown Region. + The item at the end of StoreCreditAccountEdge. """ - ZZ + node: StoreCreditAccount! } """ -The part of the image that should remain after cropping. +An expiration transaction which decreases the store credit account balance. +Expiration transactions are created automatically when a [store credit account credit transaction](https://shopify.dev/api/admin-graphql/latest/objects/StoreCreditAccountCreditTransaction) expires. + +The amount subtracted from the balance is equal to the remaining amount of the credit transaction. """ -enum CropRegion { +type StoreCreditAccountExpirationTransaction implements StoreCreditAccountTransaction { """ - Keep the center of the image. + The store credit account that the transaction belongs to. """ - CENTER + account: StoreCreditAccount! """ - Keep the top of the image. + The amount of the transaction. """ - TOP + amount: MoneyV2! """ - Keep the bottom of the image. + The balance of the account after the transaction. """ - BOTTOM + balanceAfterTransaction: MoneyV2! """ - Keep the left of the image. + The date and time when the transaction was created. """ - LEFT + createdAt: DateTime! """ - Keep the right of the image. + The credit transaction which expired. """ - RIGHT + creditTransaction: StoreCreditAccountCreditTransaction! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin } """ -A currency. +Interface for a store credit account transaction. """ -type Currency { +interface StoreCreditAccountTransaction { """ - The ISO code of the currency. + The store credit account that the transaction belongs to. """ - isoCode: CurrencyCode! + account: StoreCreditAccount! """ - The name of the currency. + The amount of the transaction. """ - name: String! + amount: MoneyV2! """ - The symbol of the currency. + The balance of the account after the transaction. """ - symbol: String! -} + balanceAfterTransaction: MoneyV2! -""" -The three-letter currency codes that represent the world currencies used in -stores. These include standard ISO 4217 codes, legacy codes, -and non-standard codes. -""" -enum CurrencyCode { """ - United States Dollars (USD). + The date and time when the transaction was created. """ - USD + createdAt: DateTime! """ - Euro (EUR). + The event that caused the store credit account transaction. """ - EUR + event: StoreCreditSystemEvent! """ - United Kingdom Pounds (GBP). + The origin of the store credit account transaction. """ - GBP + origin: StoreCreditAccountTransactionOrigin +} +""" +An auto-generated type for paginating through multiple StoreCreditAccountTransactions. +""" +type StoreCreditAccountTransactionConnection { """ - Canadian Dollars (CAD). + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - CAD + edges: [StoreCreditAccountTransactionEdge!]! """ - Afghan Afghani (AFN). + A list of nodes that are contained in StoreCreditAccountTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - AFN + nodes: [StoreCreditAccountTransaction!]! """ - Albanian Lek (ALL). + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - ALL + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one StoreCreditAccountTransaction and a cursor during pagination. +""" +type StoreCreditAccountTransactionEdge { """ - Algerian Dinar (DZD). + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - DZD + cursor: String! """ - Angolan Kwanza (AOA). + The item at the end of StoreCreditAccountTransactionEdge. """ - AOA + node: StoreCreditAccountTransaction! +} + +""" +The origin of a store credit account transaction. +""" +union StoreCreditAccountTransactionOrigin = OrderTransaction +""" +The input fields to process a refund to store credit. +""" +input StoreCreditRefundInput { """ - Argentine Pesos (ARS). + The amount to be issued as store credit. """ - ARS + amount: MoneyInput! """ - Armenian Dram (AMD). + An optional expiration date for the store credit being issued. """ - AMD + expiresAt: DateTime +} +""" +The event that caused the store credit account transaction. +""" +enum StoreCreditSystemEvent { """ - Aruban Florin (AWG). + An adjustment was made to the store credit account. """ - AWG + ADJUSTMENT """ - Australian Dollars (AUD). + Store credit was used as payment for an order. """ - AUD + ORDER_PAYMENT """ - Barbadian Dollar (BBD). + Store credit was refunded from an order. """ - BBD + ORDER_REFUND """ - Azerbaijani Manat (AZN). + A store credit payment was reverted due to another payment method failing. """ - AZN + PAYMENT_FAILURE """ - Bangladesh Taka (BDT). + A smaller amount of store credit was captured than was originally authorized. """ - BDT + PAYMENT_RETURNED """ - Bahamian Dollar (BSD). + Store credit was returned when an authorized payment was voided. """ - BSD + ORDER_CANCELLATION """ - Bahraini Dinar (BHD). + Tax finalization affected the store credit payment. """ - BHD + TAX_FINALIZATION +} + +""" +A token that delegates unauthenticated access scopes to clients that need to access the [Storefront API](https://shopify.dev/docs/api/storefront). Storefront access tokens enable headless storefronts and custom applications to interact with a store on behalf of customers without requiring authentication. + +The token provides specific permissions, such as reading [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) data, managing carts, or creating [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) accounts. An app can have a maximum of 100 active storefront access tokens for each [`Shop`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop). +Learn more about [building with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started). +""" +type StorefrontAccessToken implements Node { """ - Burundian Franc (BIF). + List of permissions associated with the token. """ - BIF + accessScopes: [AccessScope!]! """ - Belize Dollar (BZD). + The issued public access token. """ - BZD + accessToken: String! """ - Bermudian Dollar (BMD). + The date and time when the public access token was created. """ - BMD + createdAt: DateTime! """ - Bhutanese Ngultrum (BTN). + A globally-unique ID. """ - BTN + id: ID! """ - Bosnia and Herzegovina Convertible Mark (BAM). + An arbitrary title for each token determined by the developer, used for reference purposes. """ - BAM + title: String! """ - Brazilian Real (BRL). + The date and time when the storefront access token was updated. """ - BRL + updatedAt: DateTime! +} +""" +An auto-generated type for paginating through multiple StorefrontAccessTokens. +""" +type StorefrontAccessTokenConnection { """ - Bolivian Boliviano (BOB). + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - BOB + edges: [StorefrontAccessTokenEdge!]! """ - Botswana Pula (BWP). + A list of nodes that are contained in StorefrontAccessTokenEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - BWP + nodes: [StorefrontAccessToken!]! """ - Brunei Dollar (BND). + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - BND + pageInfo: PageInfo! +} +""" +Return type for `storefrontAccessTokenCreate` mutation. +""" +type StorefrontAccessTokenCreatePayload { """ - Bulgarian Lev (BGN). + The user's shop. """ - BGN + shop: Shop! """ - Burmese Kyat (MMK). + The storefront access token. """ - MMK + storefrontAccessToken: StorefrontAccessToken """ - Cambodian Riel. + The list of errors that occurred from executing the mutation. """ - KHR + userErrors: [UserError!]! +} +""" +The input fields to delete a storefront access token. +""" +input StorefrontAccessTokenDeleteInput { """ - Cape Verdean escudo (CVE). + The ID of the storefront access token to delete. """ - CVE + id: ID! +} +""" +Return type for `storefrontAccessTokenDelete` mutation. +""" +type StorefrontAccessTokenDeletePayload { """ - Cayman Dollars (KYD). + The ID of the deleted storefront access token. """ - KYD + deletedStorefrontAccessTokenId: ID """ - Central African CFA Franc (XAF). + The list of errors that occurred from executing the mutation. """ - XAF + userErrors: [UserError!]! +} +""" +An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination. +""" +type StorefrontAccessTokenEdge { """ - Chilean Peso (CLP). + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - CLP + cursor: String! """ - Chinese Yuan Renminbi (CNY). + The item at the end of StorefrontAccessTokenEdge. """ - CNY + node: StorefrontAccessToken! +} +""" +The input fields for a storefront access token. +""" +input StorefrontAccessTokenInput { """ - Colombian Peso (COP). + A title for the storefront access token. """ - COP + title: String! +} + +""" +Represents a unique identifier in the Storefront API. A `StorefrontID` value can be used wherever an ID is expected in the Storefront API. + +Example value: `"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzEwMDc5Nzg1MTAw"`. +""" +scalar StorefrontID + +""" +Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text. +""" +scalar String +""" +An auto-generated type for paginating through multiple Strings. +""" +type StringConnection { """ - Comorian Franc (KMF). + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - KMF + edges: [StringEdge!]! """ - Congolese franc (CDF). + A list of nodes that are contained in StringEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - CDF + nodes: [String!]! """ - Costa Rican Colones (CRC). + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - CRC + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one String and a cursor during pagination. +""" +type StringEdge { """ - Croatian Kuna (HRK). + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - HRK + cursor: String! """ - Czech Koruny (CZK). + The item at the end of StringEdge. """ - CZK + node: String! +} +""" +Represents an applied code discount. +""" +type SubscriptionAppliedCodeDiscount { """ - Danish Kroner (DKK). + The unique ID. """ - DKK + id: ID! """ - Dominican Peso (DOP). + The redeem code of the discount that applies on the subscription. """ - DOP + redeemCode: String! """ - East Caribbean Dollar (XCD). + The reason that the discount on the subscription draft is rejected. """ - XCD + rejectionReason: SubscriptionDiscountRejectionReason +} +""" +The input fields for mapping a subscription line to a discount. +""" +input SubscriptionAtomicLineInput { """ - Egyptian Pound (EGP). + The new subscription line. """ - EGP + line: SubscriptionLineInput! """ - Eritrean Nakfa (ERN). + The discount to be added to the subscription line. """ - ERN + discounts: [SubscriptionAtomicManualDiscountInput!] +} +""" +The input fields for mapping a subscription line to a discount. +""" +input SubscriptionAtomicManualDiscountInput { """ - Ethiopian Birr (ETB). + The title associated with the subscription discount. """ - ETB + title: String """ - Falkland Islands Pounds (FKP). + Percentage or fixed amount value of the discount. """ - FKP + value: SubscriptionManualDiscountValueInput """ - CFP Franc (XPF). + The maximum number of times the subscription discount will be applied on orders. """ - XPF + recurringCycleLimit: Int +} + +""" +A record of an execution of the subscription billing process. Billing attempts use idempotency keys to avoid duplicate order creation. +When a billing attempt completes successfully, it creates an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). The attempt includes associated payment transactions and any errors that occur during billing. If 3D Secure authentication is required, the `nextActionUrl` field provides the redirect URL for customer verification. +""" +type SubscriptionBillingAttempt implements Node { """ - Fijian Dollars (FJD). + The date and time when the billing attempt was completed. """ - FJD + completedAt: DateTime """ - Gibraltar Pounds (GIP). + The date and time when the billing attempt was created. """ - GIP + createdAt: DateTime! """ - Gambian Dalasi (GMD). + A code corresponding to a payment error during processing. """ - GMD + errorCode: SubscriptionBillingAttemptErrorCode @deprecated(reason: "Use `state` instead.") """ - Ghanaian Cedi (GHS). + A message describing a payment error during processing. """ - GHS + errorMessage: String @deprecated(reason: "Use `state` instead.") """ - Guatemalan Quetzal (GTQ). + A globally-unique ID. """ - GTQ + id: ID! """ - Guyanese Dollar (GYD). + A unique key generated by the client to avoid duplicate payments. """ - GYD + idempotencyKey: String! """ - Georgian Lari (GEL). + The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. """ - GEL + nextActionUrl: URL @deprecated(reason: "Use `state` instead.") """ - Haitian Gourde (HTG). + The result of this billing attempt if completed successfully. """ - HTG + order: Order @deprecated(reason: "Use `state` instead.") """ - Honduran Lempira (HNL). + The date and time used to calculate fulfillment intervals for a billing attempt that + successfully completed after the current anchor date. To prevent fulfillment from being + pushed to the next anchor date, this field can override the billing attempt date. """ - HNL + originTime: DateTime """ - Hong Kong Dollars (HKD). + The reference shared between retried payment attempts. """ - HKD + paymentGroupId: String """ - Hungarian Forint (HUF). + The reference shared between payment attempts with similar payment details. """ - HUF + paymentSessionId: String """ - Icelandic Kronur (ISK). + Error information from processing the billing attempt. """ - ISK + processingError: SubscriptionBillingAttemptProcessingError @deprecated(reason: "Use `state` instead.") """ - Indian Rupees (INR). + Whether the billing attempt is still processing. """ - INR + ready: Boolean! @deprecated(reason: "Use `state` instead.") """ - Indonesian Rupiah (IDR). + Whether the billing attempt respects the merchant's inventory policy. """ - IDR + respectInventoryPolicy: Boolean! """ - Israeli New Shekel (NIS). + The subscription contract. """ - ILS + subscriptionContract: SubscriptionContract! """ - Iraqi Dinar (IQD). + The transactions created by the billing attempt. """ - IQD + transactions("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderTransactionConnection! +} +""" +An auto-generated type for paginating through multiple SubscriptionBillingAttempts. +""" +type SubscriptionBillingAttemptConnection { """ - Jamaican Dollars (JMD). + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - JMD + edges: [SubscriptionBillingAttemptEdge!]! """ - Japanese Yen (JPY). + A list of nodes that are contained in SubscriptionBillingAttemptEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - JPY + nodes: [SubscriptionBillingAttempt!]! """ - Jersey Pound. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - JEP + pageInfo: PageInfo! +} +""" +Return type for `subscriptionBillingAttemptCreate` mutation. +""" +type SubscriptionBillingAttemptCreatePayload { """ - Jordanian Dinar (JOD). + The subscription billing attempt. """ - JOD + subscriptionBillingAttempt: SubscriptionBillingAttempt """ - Kazakhstani Tenge (KZT). + The list of errors that occurred from executing the mutation. """ - KZT + userErrors: [BillingAttemptUserError!]! +} +""" +An auto-generated type which holds one SubscriptionBillingAttempt and a cursor during pagination. +""" +type SubscriptionBillingAttemptEdge { """ - Kenyan Shilling (KES). + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - KES + cursor: String! """ - Kiribati Dollar (KID). + The item at the end of SubscriptionBillingAttemptEdge. """ - KID + node: SubscriptionBillingAttempt! +} +""" +The possible error codes associated with making billing attempts. The error codes supplement the +`error_message` to provide consistent results and help with dunning management. +""" +enum SubscriptionBillingAttemptErrorCode { """ - Kuwaiti Dinar (KWD). + Payment method was not found. """ - KWD + PAYMENT_METHOD_NOT_FOUND """ - Kyrgyzstani Som (KGS). + Payment provider is not enabled. """ - KGS + PAYMENT_PROVIDER_IS_NOT_ENABLED """ - Laotian Kip (LAK). + Payment method is invalid. Please update or create a new payment method. """ - LAK + INVALID_PAYMENT_METHOD """ - Latvian Lati (LVL). + There was an unexpected error during the billing attempt. """ - LVL + UNEXPECTED_ERROR """ - Lebanese Pounds (LBP). + Payment method is expired. """ - LBP + EXPIRED_PAYMENT_METHOD """ - Lesotho Loti (LSL). + Payment method was declined by processor. """ - LSL + PAYMENT_METHOD_DECLINED """ - Liberian Dollar (LRD). + There was an error during the payment authentication. """ - LRD + AUTHENTICATION_ERROR """ - Lithuanian Litai (LTL). + Gateway is in test mode and attempted to bill a live payment method. """ - LTL + TEST_MODE """ - Malagasy Ariary (MGA). + Payment method was canceled by buyer. """ - MGA + BUYER_CANCELED_PAYMENT_METHOD """ - Macedonia Denar (MKD). + Customer was not found. """ - MKD + CUSTOMER_NOT_FOUND """ - Macanese Pataca (MOP). + Customer is invalid. """ - MOP + CUSTOMER_INVALID """ - Malawian Kwacha (MWK). + The shipping address is either missing or invalid. """ - MWK + INVALID_SHIPPING_ADDRESS """ - Maldivian Rufiyaa (MVR). + The billing agreement ID or the transaction ID for the customer's payment method is invalid. """ - MVR + INVALID_CUSTOMER_BILLING_AGREEMENT """ - Mauritanian Ouguiya (MRU). + A payment has already been made for this invoice. """ - MRU + INVOICE_ALREADY_PAID """ - Mexican Pesos (MXN). + Payment method cannot be used with the current payment gateway test mode configuration. """ - MXN + PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG """ - Malaysian Ringgits (MYR). + The amount is too small. """ - MYR + AMOUNT_TOO_SMALL """ - Mauritian Rupee (MUR). + No inventory location found or enabled. """ - MUR + INVENTORY_ALLOCATIONS_NOT_FOUND """ - Moldovan Leu (MDL). + Not enough inventory found. """ - MDL + INSUFFICIENT_INVENTORY """ - Moroccan Dirham. + Transient error, try again later. """ - MAD + TRANSIENT_ERROR """ - Mongolian Tugrik. + Insufficient funds. """ - MNT + INSUFFICIENT_FUNDS """ - Mozambican Metical. + Purchase Type is not supported. """ - MZN + PURCHASE_TYPE_NOT_SUPPORTED """ - Namibian Dollar. + Paypal Error General. """ - NAD + PAYPAL_ERROR_GENERAL """ - Nepalese Rupee (NPR). + Card number was incorrect. """ - NPR + CARD_NUMBER_INCORRECT """ - Netherlands Antillean Guilder. + Fraud was suspected. """ - ANG + FRAUD_SUSPECTED """ - New Zealand Dollars (NZD). + Non-test order limit reached. Use a test payment gateway to place another order. """ - NZD + NON_TEST_ORDER_LIMIT_REACHED """ - Nicaraguan Córdoba (NIO). + Gift cards must have a price greater than zero. """ - NIO + FREE_GIFT_CARD_NOT_ALLOWED """ - Nigerian Naira (NGN). + The billing address is invalid. """ - NGN + INVALID_BILLING_ADDRESS +} +""" +A base error type that applies to all uncategorized error classes. +""" +type SubscriptionBillingAttemptGenericError implements SubscriptionBillingAttemptProcessingError { """ - Norwegian Kroner (NOK). + The code for the error. """ - NOK + code: SubscriptionBillingAttemptErrorCode! """ - Omani Rial (OMR). + An explanation of the error. """ - OMR + message: String! +} +""" +The input fields required to complete a subscription billing attempt. +""" +input SubscriptionBillingAttemptInput { """ - Panamian Balboa (PAB). + A unique key generated by the client to avoid duplicate payments. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). """ - PAB + idempotencyKey: String! """ - Pakistani Rupee (PKR). + The date and time used to calculate fulfillment intervals for a billing attempt that + successfully completed after the current anchor date. To prevent fulfillment from being + pushed to the next anchor date, this field can override the billing attempt date. """ - PKR + originTime: DateTime """ - Papua New Guinean Kina (PGK). + Select the specific billing cycle to be billed. + Default to bill the current billing cycle if not specified. """ - PGK + billingCycleSelector: SubscriptionBillingCycleSelector """ - Paraguayan Guarani (PYG). + The behaviour to follow when creating an order for a product variant + when it's out of stock. """ - PYG + inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY +} +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptInsufficientStockProductVariantsError implements SubscriptionBillingAttemptProcessingError { """ - Peruvian Nuevo Sol (PEN). + The code for the error. """ - PEN + code: SubscriptionBillingAttemptErrorCode! """ - Philippine Peso (PHP). + A list of product variants that caused the insufficient inventory error. """ - PHP + insufficientStockProductVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! """ - Polish Zlotych (PLN). + An explanation of the error. """ - PLN + message: String! +} +""" +The inventory policy for a billing attempt. +""" +enum SubscriptionBillingAttemptInventoryPolicy { """ - Qatari Rial (QAR). + Respect the merchant's product variant + inventory policy for this billing attempt. """ - QAR + PRODUCT_VARIANT_INVENTORY_POLICY """ - Romanian Lei (RON). + Override the merchant's product variant + inventory policy and allow overselling for this billing attempt. """ - RON + ALLOW_OVERSELLING +} +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptOutOfStockProductVariantsError implements SubscriptionBillingAttemptProcessingError { """ - Russian Rubles (RUB). + The code for the error. """ - RUB + code: SubscriptionBillingAttemptErrorCode! """ - Rwandan Franc (RWF). + An explanation of the error. """ - RWF + message: String! """ - Samoan Tala (WST). + A list of responsible product variants. """ - WST + outOfStockProductVariants("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): ProductVariantConnection! @deprecated(reason: "Use `subscriptionBillingAttemptInsufficientStockProductVariantsError` type instead.") +} +""" +An error that prevented a billing attempt. +""" +interface SubscriptionBillingAttemptProcessingError { """ - Saint Helena Pounds (SHP). + The code for the error. """ - SHP + code: SubscriptionBillingAttemptErrorCode! """ - Saudi Riyal (SAR). + An explanation of the error. """ - SAR + message: String! +} +""" +The set of valid sort keys for the SubscriptionBillingAttempts query. +""" +enum SubscriptionBillingAttemptsSortKeys { """ - Serbian dinar (RSD). + Sort by the `created_at` value. """ - RSD + CREATED_AT """ - Seychellois Rupee (SCR). + Sort by the `id` value. """ - SCR + ID +} +""" +A subscription billing cycle. +""" +type SubscriptionBillingCycle { """ - Singapore Dollars (SGD). + The date on which the billing attempt is expected to be made. """ - SGD + billingAttemptExpectedDate: DateTime! """ - Sudanese Pound (SDG). + The list of billing attempts associated with the billing cycle. """ - SDG + billingAttempts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionBillingAttemptConnection! """ - Somali Shilling (SOS). + The end date of the billing cycle. """ - SOS + cycleEndAt: DateTime! """ - Syrian Pound (SYP). + The index of the billing cycle. """ - SYP + cycleIndex: Int! """ - South African Rand (ZAR). + The start date of the billing cycle. """ - ZAR + cycleStartAt: DateTime! """ - South Korean Won (KRW). + Whether this billing cycle was edited. """ - KRW + edited: Boolean! """ - South Sudanese Pound (SSP). + The active edited contract for the billing cycle. """ - SSP + editedContract: SubscriptionBillingCycleEditedContract """ - Solomon Islands Dollar (SBD). + Whether this billing cycle was skipped. """ - SBD + skipped: Boolean! """ - Sri Lankan Rupees (LKR). + The subscription contract that the billing cycle belongs to. """ - LKR + sourceContract: SubscriptionContract! """ - Surinamese Dollar (SRD). + The status of the billing cycle. """ - SRD + status: SubscriptionBillingCycleBillingCycleStatus! +} +""" +The presence of billing attempts on Billing Cycles. +""" +enum SubscriptionBillingCycleBillingAttemptStatus { """ - Swazi Lilangeni (SZL). + Billing cycle has at least one billing attempt. """ - SZL + HAS_ATTEMPT """ - Swedish Kronor (SEK). + Billing cycle has no billing attempts. """ - SEK + NO_ATTEMPT """ - Swiss Francs (CHF). + Billing cycle has any number of billing attempts. """ - CHF + ANY +} +""" +The possible status values of a subscription billing cycle. +""" +enum SubscriptionBillingCycleBillingCycleStatus { """ - Taiwan Dollars (TWD). + The billing cycle is billed. """ - TWD + BILLED """ - Thai baht (THB). + The billing cycle hasn't been billed. """ - THB + UNBILLED +} +""" +Return type for `subscriptionBillingCycleBulkCharge` mutation. +""" +type SubscriptionBillingCycleBulkChargePayload { """ - Tanzanian Shilling (TZS). + The asynchronous job that performs the action on the targeted billing cycles. """ - TZS + job: Job """ - Trinidad and Tobago Dollars (TTD). + The list of errors that occurred from executing the mutation. """ - TTD + userErrors: [SubscriptionBillingCycleBulkUserError!]! +} +""" +The input fields for filtering subscription billing cycles in bulk actions. +""" +input SubscriptionBillingCycleBulkFilters { """ - Tunisian Dinar (TND). + Filters the billing cycles based on their status. """ - TND + billingCycleStatus: [SubscriptionBillingCycleBillingCycleStatus!] """ - Turkish Lira (TRY). + Filters the billing cycles based on the status of their associated subscription contracts. """ - TRY + contractStatus: [SubscriptionContractSubscriptionStatus!] """ - Turkmenistani Manat (TMT). + Filters the billing cycles based on the presence of billing attempts. """ - TMT + billingAttemptStatus: SubscriptionBillingCycleBillingAttemptStatus = ANY +} +""" +Return type for `subscriptionBillingCycleBulkSearch` mutation. +""" +type SubscriptionBillingCycleBulkSearchPayload { """ - Ugandan Shilling (UGX). + The asynchronous job that performs the action on the targeted billing cycles. """ - UGX + job: Job """ - Ukrainian Hryvnia (UAH). + The list of errors that occurred from executing the mutation. """ - UAH + userErrors: [SubscriptionBillingCycleBulkUserError!]! +} +""" +Represents an error that happens during the execution of subscriptionBillingCycles mutations. +""" +type SubscriptionBillingCycleBulkUserError implements DisplayableError { """ - United Arab Emirates Dirham (AED). + The error code. """ - AED + code: SubscriptionBillingCycleBulkUserErrorCode """ - Uruguayan Pesos (UYU). + The path to the input field that caused the error. """ - UYU + field: [String!] """ - Uzbekistan som (UZS). + The error message. """ - UZS + message: String! +} +""" +Possible error codes that can be returned by `SubscriptionBillingCycleBulkUserError`. +""" +enum SubscriptionBillingCycleBulkUserErrorCode { """ - Vanuatu Vatu (VUV). + The input value is invalid. """ - VUV + INVALID """ - Venezuelan Bolivares Soberanos (VES). + The input value is blank. """ - VES + BLANK """ - Vietnamese đồng (VND). + End date can't be more than 24 hours in the future. """ - VND + END_DATE_IN_THE_FUTURE """ - West African CFA franc (XOF). + The range between start date and end date shouldn't be more than 1 week. """ - XOF + INVALID_DATE_RANGE """ - Yemeni Rial (YER). + Start date should be before end date. """ - YER + START_DATE_BEFORE_END_DATE +} +""" +Return type for `subscriptionBillingCycleCharge` mutation. +""" +type SubscriptionBillingCycleChargePayload { """ - Zambian Kwacha (ZMW). + The subscription billing attempt. """ - ZMW + subscriptionBillingAttempt: SubscriptionBillingAttempt """ - Belarusian Ruble (BYN). + The list of errors that occurred from executing the mutation. """ - BYN + userErrors: [BillingAttemptUserError!]! +} +""" +An auto-generated type for paginating through multiple SubscriptionBillingCycles. +""" +type SubscriptionBillingCycleConnection { """ - Belarusian Ruble (BYR). + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - BYR @deprecated(reason: "`BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead.") + edges: [SubscriptionBillingCycleEdge!]! """ - Djiboutian Franc (DJF). + A list of nodes that are contained in SubscriptionBillingCycleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - DJF + nodes: [SubscriptionBillingCycle!]! """ - Guinean Franc (GNF). + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - GNF + pageInfo: PageInfo! +} +""" +Return type for `subscriptionBillingCycleContractDraftCommit` mutation. +""" +type SubscriptionBillingCycleContractDraftCommitPayload { """ - Iranian Rial (IRR). + The committed Subscription Billing Cycle Edited Contract object. """ - IRR + contract: SubscriptionBillingCycleEditedContract """ - Libyan Dinar (LYD). + The list of errors that occurred from executing the mutation. """ - LYD + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionBillingCycleContractDraftConcatenate` mutation. +""" +type SubscriptionBillingCycleContractDraftConcatenatePayload { """ - Sierra Leonean Leone (SLL). + The Subscription Draft object. """ - SLL + draft: SubscriptionDraft """ - Sao Tome And Principe Dobra (STD). + The list of errors that occurred from executing the mutation. """ - STD @deprecated(reason: "`STD` is deprecated. Use `STN` available from version `2022-07` onwards instead.") + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionBillingCycleContractEdit` mutation. +""" +type SubscriptionBillingCycleContractEditPayload { """ - Sao Tome And Principe Dobra (STN). + The draft subscription contract object. """ - STN + draft: SubscriptionDraft """ - Tajikistani Somoni (TJS). + The list of errors that occurred from executing the mutation. """ - TJS + userErrors: [SubscriptionDraftUserError!]! +} +""" +An auto-generated type which holds one SubscriptionBillingCycle and a cursor during pagination. +""" +type SubscriptionBillingCycleEdge { """ - Tongan Pa'anga (TOP). + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - TOP + cursor: String! """ - Venezuelan Bolivares (VED). + The item at the end of SubscriptionBillingCycleEdge. """ - VED + node: SubscriptionBillingCycle! +} +""" +Return type for `subscriptionBillingCycleEditDelete` mutation. +""" +type SubscriptionBillingCycleEditDeletePayload { """ - Venezuelan Bolivares (VEF). + The list of updated billing cycles. """ - VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.") + billingCycles: [SubscriptionBillingCycle!] """ - Unrecognized currency. + The list of errors that occurred from executing the mutation. """ - XXX + userErrors: [SubscriptionBillingCycleUserError!]! } """ -A customer account with the shop. Includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) and marketing preferences for logged-in customers, so they don't have to provide these details at every checkout. - -Access the customer through the [`customer`](https://shopify.dev/docs/api/storefront/current/queries/customer) query using a customer access token obtained from the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation. - -The object implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface, enabling retrieval of [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. +Represents a subscription contract with billing cycles. """ -type Customer implements HasMetafields { +type SubscriptionBillingCycleEditedContract implements SubscriptionContractBase { """ - Indicates whether the customer has consented to be sent marketing material via email. + The subscription app that the subscription contract is registered to. """ - acceptsMarketing: Boolean! + app: App """ - A list of addresses for the customer. + The URL of the subscription contract page on the subscription app. """ - addresses("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MailingAddressConnection! + appAdminUrl: URL """ - The URL of the customer's avatar image. + The billing cycles that the edited contract belongs to. """ - avatarUrl: String + billingCycles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX): SubscriptionBillingCycleConnection! """ - The date and time when the customer was created. + The date and time when the subscription contract was created. """ createdAt: DateTime! """ - The customer’s default address. - """ - defaultAddress: MailingAddress - - """ - The customer’s name, email or phone number. + The currency that's used for the subscription contract. """ - displayName: String! + currencyCode: CurrencyCode! """ - The customer’s email address. + A list of the custom attributes to be added to the generated orders. """ - email: String + customAttributes: [Attribute!]! """ - The customer’s first name. + The customer to whom the subscription contract belongs. """ - firstName: String + customer: Customer """ - A unique ID for the customer. + The customer payment method that's used for the subscription contract. """ - id: ID! + customerPaymentMethod("Whether to show the customer's revoked payment method." showRevoked: Boolean = false): CustomerPaymentMethod """ - The customer’s last name. + The delivery method for each billing of the subscription contract. """ - lastName: String + deliveryMethod: SubscriptionDeliveryMethod """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The delivery price for each billing of the subscription contract. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + deliveryPrice: MoneyV2! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The list of subscription discounts associated with the subscription contract. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + discounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionManualDiscountConnection! """ - The number of orders that the customer has made at the store in their lifetime. + The number of lines associated with the subscription contract. """ - numberOfOrders: UnsignedInt64! + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") """ - The orders associated with the customer. + The list of subscription lines associated with the subscription contract. """ - orders("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: OrderSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| processed_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): OrderConnection! + lines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - The customer’s phone number. + The number of lines associated with the subscription contract. """ - phone: String + linesCount: Count """ - The social login provider associated with the customer. + The note field that will be applied to the generated orders. """ - socialLoginProvider: SocialLoginProvider + note: String """ - A comma separated list of tags that have been added to the customer. - Additional access scope required: unauthenticated_read_customer_tags. + A list of the subscription contract's orders. """ - tags: [String!]! + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderConnection! """ - The date and time when the customer information was updated. + The date and time when the subscription contract was updated. """ updatedAt: DateTime! } """ -A unique authentication token that identifies a logged-in customer and authorizes modifications to the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) object. The token is required for customer-specific operations like updating profile information or managing addresses. - -Tokens have an expiration date and must be renewed using [`customerAccessTokenRenew`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenRenew) before they expire. Create tokens with [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) using legacy customer account authentication (email and password), or with [`customerAccessTokenCreateWithMultipass`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreateWithMultipass) for single sign-on flows. +Return type for `subscriptionBillingCycleEditsDelete` mutation. """ -type CustomerAccessToken { +type SubscriptionBillingCycleEditsDeletePayload { """ - The customer’s access token. + The list of updated billing cycles. """ - accessToken: String! + billingCycles: [SubscriptionBillingCycle!] """ - The date and time when the customer access token expires. + The list of errors that occurred from executing the mutation. """ - expiresAt: DateTime! + userErrors: [SubscriptionBillingCycleUserError!]! } """ -The input fields for authenticating a customer with email and password. Used by the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation to generate a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken), which is required to read or modify customer data. +Possible error codes that can be returned by `SubscriptionBillingCycleUserError`. """ -input CustomerAccessTokenCreateInput { +enum SubscriptionBillingCycleErrorCode { """ - The email associated to the customer. + The input value is invalid. """ - email: String! + INVALID """ - The login password to be used by the customer. + Can't find the billing cycle. """ - password: String! -} + CYCLE_NOT_FOUND -""" -Return type for `customerAccessTokenCreate` mutation. -""" -type CustomerAccessTokenCreatePayload { """ - The newly created customer access token object. + There's no contract or schedule edit associated with the targeted billing cycle(s). """ - customerAccessToken: CustomerAccessToken + NO_CYCLE_EDITS """ - The list of errors that occurred from executing the mutation. + The index selector is invalid. """ - customerUserErrors: [CustomerUserError!]! + INVALID_CYCLE_INDEX """ - The list of errors that occurred from executing the mutation. + The date selector is invalid. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") -} + INVALID_DATE -""" -Return type for `customerAccessTokenCreateWithMultipass` mutation. -""" -type CustomerAccessTokenCreateWithMultipassPayload { """ - An access token object associated with the customer. + Billing cycle schedule edit input provided is empty. Must take in parameters to modify schedule. """ - customerAccessToken: CustomerAccessToken + EMPTY_BILLING_CYCLE_EDIT_SCHEDULE_INPUT """ - The list of errors that occurred from executing the mutation. + Billing date cannot be set on skipped billing cycle. """ - customerUserErrors: [CustomerUserError!]! -} + BILLING_DATE_SET_ON_SKIPPED -""" -Return type for `customerAccessTokenDelete` mutation. -""" -type CustomerAccessTokenDeletePayload { """ - The destroyed access token. + Billing date of a cycle cannot be set to a value outside of its billing date range. """ - deletedAccessToken: String + OUT_OF_BOUNDS """ - ID of the destroyed customer access token. + Billing cycle selector cannot select upcoming billing cycle past limit. """ - deletedCustomerAccessTokenId: String + UPCOMING_CYCLE_LIMIT_EXCEEDED """ - The list of errors that occurred from executing the mutation. + Billing cycle selector cannot select billing cycle outside of index range. """ - userErrors: [UserError!]! + CYCLE_INDEX_OUT_OF_RANGE + + """ + Billing cycle selector cannot select billing cycle outside of start date range. + """ + CYCLE_START_DATE_OUT_OF_RANGE + + """ + Billing cycle has incomplete billing attempts in progress. + """ + INCOMPLETE_BILLING_ATTEMPTS } """ -Return type for `customerAccessTokenRenew` mutation. +The input fields for specifying the subscription contract and selecting the associated billing cycle. """ -type CustomerAccessTokenRenewPayload { +input SubscriptionBillingCycleInput { """ - The renewed customer access token object. + The ID of the subscription contract associated with the billing cycle. """ - customerAccessToken: CustomerAccessToken + contractId: ID! """ - The list of errors that occurred from executing the mutation. + Selects the billing cycle by date or index. """ - userErrors: [UserError!]! + selector: SubscriptionBillingCycleSelector! } """ -Return type for `customerActivateByUrl` mutation. +The input fields for parameters to modify the schedule of a specific billing cycle. """ -type CustomerActivateByUrlPayload { +input SubscriptionBillingCycleScheduleEditInput { """ - The customer that was activated. + Sets the skip status for the billing cycle. """ - customer: Customer + skip: Boolean """ - A new customer access token for the customer. + Sets the expected billing date for the billing cycle. """ - customerAccessToken: CustomerAccessToken + billingDate: DateTime """ - The list of errors that occurred from executing the mutation. + The reason for editing. """ - customerUserErrors: [CustomerUserError!]! + reason: SubscriptionBillingCycleScheduleEditInputScheduleEditReason! } """ -The input fields to activate a customer. +The input fields for possible reasons for editing the billing cycle's schedule. """ -input CustomerActivateInput { +enum SubscriptionBillingCycleScheduleEditInputScheduleEditReason { + """ + Buyer initiated the schedule edit. + """ + BUYER_INITIATED + """ - The activation token required to activate the customer. + Merchant initiated the schedule edit. """ - activationToken: String! + MERCHANT_INITIATED """ - New password that will be set during activation. + Developer initiated the schedule edit. """ - password: String! + DEV_INITIATED } """ -Return type for `customerActivate` mutation. +Return type for `subscriptionBillingCycleScheduleEdit` mutation. """ -type CustomerActivatePayload { +type SubscriptionBillingCycleScheduleEditPayload { """ - The customer object. + The updated billing cycle. """ - customer: Customer + billingCycle: SubscriptionBillingCycle """ - A newly created customer access token object for the customer. + The list of errors that occurred from executing the mutation. """ - customerAccessToken: CustomerAccessToken + userErrors: [SubscriptionBillingCycleUserError!]! +} +""" +The input fields to select SubscriptionBillingCycle by either date or index. Both past and future billing cycles can be selected. +""" +input SubscriptionBillingCycleSelector { """ - The list of errors that occurred from executing the mutation. + Returns a billing cycle by index. """ - customerUserErrors: [CustomerUserError!]! + index: Int """ - The list of errors that occurred from executing the mutation. + Returns a billing cycle by date. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + date: DateTime } """ -Return type for `customerAddressCreate` mutation. +Return type for `subscriptionBillingCycleSkip` mutation. """ -type CustomerAddressCreatePayload { - """ - The new customer address object. - """ - customerAddress: MailingAddress - +type SubscriptionBillingCycleSkipPayload { """ - The list of errors that occurred from executing the mutation. + The updated billing cycle. """ - customerUserErrors: [CustomerUserError!]! + billingCycle: SubscriptionBillingCycle """ The list of errors that occurred from executing the mutation. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + userErrors: [SubscriptionBillingCycleSkipUserError!]! } """ -Return type for `customerAddressDelete` mutation. +An error that occurs during the execution of `SubscriptionBillingCycleSkip`. """ -type CustomerAddressDeletePayload { +type SubscriptionBillingCycleSkipUserError implements DisplayableError { """ - The list of errors that occurred from executing the mutation. + The error code. """ - customerUserErrors: [CustomerUserError!]! + code: SubscriptionBillingCycleSkipUserErrorCode """ - ID of the deleted customer address. + The path to the input field that caused the error. """ - deletedCustomerAddressId: String + field: [String!] """ - The list of errors that occurred from executing the mutation. + The error message. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + message: String! } """ -Return type for `customerAddressUpdate` mutation. +Possible error codes that can be returned by `SubscriptionBillingCycleSkipUserError`. """ -type CustomerAddressUpdatePayload { +enum SubscriptionBillingCycleSkipUserErrorCode { """ - The customer’s updated mailing address. + The input value is invalid. """ - customerAddress: MailingAddress + INVALID +} +""" +Return type for `subscriptionBillingCycleUnskip` mutation. +""" +type SubscriptionBillingCycleUnskipPayload { """ - The list of errors that occurred from executing the mutation. + The updated billing cycle. """ - customerUserErrors: [CustomerUserError!]! + billingCycle: SubscriptionBillingCycle """ The list of errors that occurred from executing the mutation. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + userErrors: [SubscriptionBillingCycleUnskipUserError!]! } """ -The input fields for creating a new [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) account. Used by the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. - -For legacy customer accounts only and requires an email address and password. Optionally accepts the customer's name, phone number, and email marketing consent. - -> Caution: -> The password is used for customer authentication. Ensure it's transmitted securely and never logged or stored in plain text. +An error that occurs during the execution of `SubscriptionBillingCycleUnskip`. """ -input CustomerCreateInput { +type SubscriptionBillingCycleUnskipUserError implements DisplayableError { """ - The customer’s first name. + The error code. """ - firstName: String + code: SubscriptionBillingCycleUnskipUserErrorCode """ - The customer’s last name. + The path to the input field that caused the error. """ - lastName: String + field: [String!] """ - The customer’s email. + The error message. """ - email: String! + message: String! +} +""" +Possible error codes that can be returned by `SubscriptionBillingCycleUnskipUserError`. +""" +enum SubscriptionBillingCycleUnskipUserErrorCode { """ - A unique phone number for the customer. + The input value is invalid. + """ + INVALID +} - Formatted using E.164 standard. For example, _+16135551111_. +""" +The possible errors for a subscription billing cycle. +""" +type SubscriptionBillingCycleUserError implements DisplayableError { """ - phone: String + The error code. + """ + code: SubscriptionBillingCycleErrorCode """ - The login password used by the customer. + The path to the input field that caused the error. """ - password: String! + field: [String!] """ - Indicates whether the customer has consented to be sent marketing material via email. + The error message. """ - acceptsMarketing: Boolean + message: String! } """ -Return type for `customerCreate` mutation. +The input fields to select a subset of subscription billing cycles within a date range. """ -type CustomerCreatePayload { +input SubscriptionBillingCyclesDateRangeSelector { """ - The created customer object. + The start date and time for the range. """ - customer: Customer + startDate: DateTime! """ - The list of errors that occurred from executing the mutation. + The end date and time for the range. """ - customerUserErrors: [CustomerUserError!]! + endDate: DateTime! +} +""" +The input fields to select a subset of subscription billing cycles within an index range. +""" +input SubscriptionBillingCyclesIndexRangeSelector { """ - The list of errors that occurred from executing the mutation. + The start index for the range. + """ + startIndex: Int! + + """ + The end index for the range. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + endIndex: Int! } """ -Return type for `customerDefaultAddressUpdate` mutation. +The set of valid sort keys for the SubscriptionBillingCycles query. """ -type CustomerDefaultAddressUpdatePayload { +enum SubscriptionBillingCyclesSortKeys { """ - The updated customer object. + Sort by the `cycle_index` value. """ - customer: Customer + CYCLE_INDEX """ - The list of errors that occurred from executing the mutation. + Sort by the `id` value. """ - customerUserErrors: [CustomerUserError!]! + ID +} +""" +Select subscription billing cycles to be targeted. +""" +enum SubscriptionBillingCyclesTargetSelection { """ - The list of errors that occurred from executing the mutation. + Target all current and upcoming subscription billing cycles. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + ALL } """ -Error codes returned by the [`CustomerUserError`](https://shopify.dev/docs/api/storefront/current/objects/CustomerUserError) object. These codes identify specific validation and processing failures for customer-related mutations, including account creation, updates, password resets, and address management. +Represents a Subscription Billing Policy. """ -enum CustomerErrorCode { +type SubscriptionBillingPolicy { """ - The input value is blank. + Specific anchor dates upon which the billing interval calculations should be made. """ - BLANK + anchors: [SellingPlanAnchor!]! """ - The input value is invalid. + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). """ - INVALID + interval: SellingPlanInterval! """ - The input value is already taken. + The number of billing intervals between invoices. """ - TAKEN + intervalCount: Int! """ - The input value is too long. + Maximum amount of cycles after which the subscription ends. """ - TOO_LONG + maxCycles: Int """ - The input value is too short. + Minimum amount of cycles required in the subscription. """ - TOO_SHORT + minCycles: Int +} +""" +The input fields for a Subscription Billing Policy. +""" +input SubscriptionBillingPolicyInput { """ - Unidentified customer. + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). """ - UNIDENTIFIED_CUSTOMER + interval: SellingPlanInterval! """ - Customer is disabled. + The number of billing intervals between invoices. """ - CUSTOMER_DISABLED + intervalCount: Int! """ - Input password starts or ends with whitespace. + Minimum amount of cycles required in the subscription. """ - PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE + minCycles: Int """ - Input contains HTML tags. + Maximum amount of cycles required in the subscription. """ - CONTAINS_HTML_TAGS + maxCycles: Int """ - Input contains URL. + Specific anchor dates upon which the billing interval calculations should be made. """ - CONTAINS_URL + anchors: [SellingPlanAnchorInput!] = [] +} - """ - Invalid activation token. - """ - TOKEN_INVALID +""" +A subscription contract that defines recurring purchases for a customer. Each contract specifies what products to deliver, when to bill and ship them, and at what price. - """ - Customer already enabled. - """ - ALREADY_ENABLED +The contract includes [`SubscriptionBillingPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingPolicy) and [`SubscriptionDeliveryPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDeliveryPolicy) that control the frequency of charges and fulfillments. [`SubscriptionLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionLine) items define the products, quantities, and pricing for each recurring [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). The contract tracks [`SubscriptionBillingAttempt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingAttempt) records, payment status, and generated orders throughout its lifecycle. [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) instances manage contracts through various status transitions including active, paused, failed, cancelled, or expired states. +Learn more about [building subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract) and [updating subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract). +""" +type SubscriptionContract implements Node & SubscriptionContractBase { """ - Address does not exist. + The subscription app that the subscription contract is registered to. """ - NOT_FOUND + app: App """ - Input email contains an invalid domain name. + The URL of the subscription contract page on the subscription app. """ - BAD_DOMAIN + appAdminUrl: URL """ - Multipass token is not valid. + The list of billing attempts associated with the subscription contract. """ - INVALID_MULTIPASS_REQUEST -} + billingAttempts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionBillingAttemptConnection! -""" -Return type for `customerRecover` mutation. -""" -type CustomerRecoverPayload { """ - The list of errors that occurred from executing the mutation. + The billing policy associated with the subscription contract. """ - customerUserErrors: [CustomerUserError!]! + billingPolicy: SubscriptionBillingPolicy! """ - The list of errors that occurred from executing the mutation. + The date and time when the subscription contract was created. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") -} + createdAt: DateTime! -""" -Return type for `customerResetByUrl` mutation. -""" -type CustomerResetByUrlPayload { """ - The customer object which was reset. + The currency that's used for the subscription contract. """ - customer: Customer + currencyCode: CurrencyCode! """ - A newly created customer access token object for the customer. + A list of the custom attributes to be added to the generated orders. """ - customerAccessToken: CustomerAccessToken + customAttributes: [Attribute!]! """ - The list of errors that occurred from executing the mutation. + The customer to whom the subscription contract belongs. """ - customerUserErrors: [CustomerUserError!]! + customer: Customer """ - The list of errors that occurred from executing the mutation. + The customer payment method that's used for the subscription contract. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") -} + customerPaymentMethod("Whether to show the customer's revoked payment method." showRevoked: Boolean = false): CustomerPaymentMethod -""" -The input fields to reset a customer's password. -""" -input CustomerResetInput { """ - The reset token required to reset the customer’s password. + The delivery method for each billing of the subscription contract. """ - resetToken: String! + deliveryMethod: SubscriptionDeliveryMethod """ - New password that will be set as part of the reset password process. + The delivery policy associated with the subscription contract. """ - password: String! -} + deliveryPolicy: SubscriptionDeliveryPolicy! -""" -Return type for `customerReset` mutation. -""" -type CustomerResetPayload { """ - The customer object which was reset. + The delivery price for each billing of the subscription contract. """ - customer: Customer + deliveryPrice: MoneyV2! """ - A newly created customer access token object for the customer. + The list of subscription discounts associated with the subscription contract. """ - customerAccessToken: CustomerAccessToken + discounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionManualDiscountConnection! """ - The list of errors that occurred from executing the mutation. + A globally-unique ID. """ - customerUserErrors: [CustomerUserError!]! + id: ID! """ - The list of errors that occurred from executing the mutation. + The last billing error type of the contract. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") -} - -""" -The input fields for updating a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Used by the [`customerUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/customerUpdate) mutation. + lastBillingAttemptErrorType: SubscriptionContractLastBillingErrorType -> Caution: -> Updating the password invalidates all existing access tokens, including the one used to perform the mutation. The response returns a new access token. Ensure your app handles the new token returned in the response to avoid logging the customer out. -""" -input CustomerUpdateInput { """ - The customer’s first name. + The current status of the last payment. """ - firstName: String + lastPaymentStatus: SubscriptionContractLastPaymentStatus """ - The customer’s last name. + The number of lines associated with the subscription contract. """ - lastName: String + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") """ - The customer’s email. + The list of subscription lines associated with the subscription contract. """ - email: String + lines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - A unique phone number for the customer. + The number of lines associated with the subscription contract. + """ + linesCount: Count - Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. """ - phone: String + The next billing date for the subscription contract. This field is managed by the apps. + Alternatively you can utilize our + [Billing Cycles APIs](https://shopify.dev/docs/apps/selling-strategies/subscriptions/billing-cycles), + which provide auto-computed billing dates and additional functionalities. + """ + nextBillingDate: DateTime """ - The login password used by the customer. + The note field that will be applied to the generated orders. """ - password: String + note: String """ - Indicates whether the customer has consented to be sent marketing material via email. + A list of the subscription contract's orders. """ - acceptsMarketing: Boolean -} + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderConnection! -""" -Return type for `customerUpdate` mutation. -""" -type CustomerUpdatePayload { """ - The updated customer object. + The order from which this contract originated. """ - customer: Customer + originOrder: Order """ - The newly created customer access token. If the customer's password is updated, all previous access tokens - (including the one used to perform this mutation) become invalid, and a new token is generated. + The revision id of the contract. """ - customerAccessToken: CustomerAccessToken + revisionId: UnsignedInt64! """ - The list of errors that occurred from executing the mutation. + The current status of the subscription contract. """ - customerUserErrors: [CustomerUserError!]! + status: SubscriptionContractSubscriptionStatus! """ - The list of errors that occurred from executing the mutation. + The date and time when the subscription contract was updated. """ - userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead.") + updatedAt: DateTime! } """ -Represents an error that happens during execution of a customer mutation. +Return type for `subscriptionContractActivate` mutation. """ -type CustomerUserError implements DisplayableError { - """ - The error code. - """ - code: CustomerErrorCode - +type SubscriptionContractActivatePayload { """ - The path to the input field that caused the error. + The new Subscription Contract object. """ - field: [String!] + contract: SubscriptionContract """ - The error message. + The list of errors that occurred from executing the mutation. """ - message: String! + userErrors: [SubscriptionContractStatusUpdateUserError!]! } """ -Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. -For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is -represented as `"2019-09-07T15:50:00Z`". -""" -scalar DateTime - -""" -A signed decimal number, which supports arbitrary precision and is serialized as a string. - -Example values: `"29.99"`, `"29.999"`. +The input fields required to create a Subscription Contract. """ -scalar Decimal +input SubscriptionContractAtomicCreateInput { + """ + The ID of the customer to associate with the subscription contract. + """ + customerId: ID! -""" -A delivery address of the buyer that is interacting with the cart. -""" -union DeliveryAddress = MailingAddress + """ + The next billing date for the subscription contract.This field is independent of billing cycles.It stores metadata set by the apps, and thus not managed by Shopify.It can be queried from subscriptionContract.nextBillingDate. + """ + nextBillingDate: DateTime! -""" -The input fields for delivery address preferences. -""" -input DeliveryAddressInput { """ - A delivery address preference of a buyer that is interacting with the cart. + The currency used for the subscription contract. """ - deliveryAddress: MailingAddressInput + currencyCode: CurrencyCode! """ - Whether the given delivery address is considered to be a one-time use address. One-time use addresses do not - get persisted to the buyer's personal addresses when checking out. + The attributes used as input for the Subscription Draft. """ - oneTimeUse: Boolean = false + contract: SubscriptionDraftInput! """ - Defines what kind of address validation is requested. + A list of new Subscription Lines. """ - deliveryAddressValidationStrategy: DeliveryAddressValidationStrategy = COUNTRY_CODE_ONLY + lines: [SubscriptionAtomicLineInput!]! """ - The ID of a customer address that is associated with the buyer that is interacting with the cart. + A list of discount redeem codes to apply to the subscription contract. """ - customerAddressId: ID + discountCodes: [String!] = [] } """ -Controls how delivery addresses are validated during cart operations. The default validation checks only the country code, while strict validation verifies all address fields against Shopify's checkout rules and rejects invalid addresses. - -Used by [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) when setting buyer identity preferences, and by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput) when managing cart delivery addresses. +Return type for `subscriptionContractAtomicCreate` mutation. """ -enum DeliveryAddressValidationStrategy { +type SubscriptionContractAtomicCreatePayload { """ - Only the country code is validated. + The new Subscription Contract object. """ - COUNTRY_CODE_ONLY + contract: SubscriptionContract """ - Strict validation is performed, i.e. all fields in the address are validated - according to Shopify's checkout rules. If the address fails validation, the cart will not be updated. + The list of errors that occurred from executing the mutation. """ - STRICT + userErrors: [SubscriptionDraftUserError!]! } """ -List of different delivery method types. +Represents subscription contract common fields. """ -enum DeliveryMethodType { +interface SubscriptionContractBase { """ - Shipping. + The subscription app that the subscription contract is registered to. """ - SHIPPING + app: App """ - Local Pickup. + The URL of the subscription contract page on the subscription app. """ - PICK_UP + appAdminUrl: URL """ - Retail. + The currency that's used for the subscription contract. """ - RETAIL + currencyCode: CurrencyCode! """ - Local Delivery. + A list of the custom attributes to be added to the generated orders. """ - LOCAL + customAttributes: [Attribute!]! """ - Shipping to a Pickup Point. + The customer to whom the subscription contract belongs. """ - PICKUP_POINT + customer: Customer """ - None. + The customer payment method that's used for the subscription contract. """ - NONE -} + customerPaymentMethod("Whether to show the customer's revoked payment method." showRevoked: Boolean = false): CustomerPaymentMethod -""" -Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. -""" -enum DigitalWallet { """ - Apple Pay. + The delivery method for each billing of the subscription contract. """ - APPLE_PAY + deliveryMethod: SubscriptionDeliveryMethod """ - Android Pay. + The delivery price for each billing of the subscription contract. """ - ANDROID_PAY + deliveryPrice: MoneyV2! """ - Google Pay. + The list of subscription discounts associated with the subscription contract. """ - GOOGLE_PAY + discounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionManualDiscountConnection! """ - Shopify Pay. + The number of lines associated with the subscription contract. """ - SHOPIFY_PAY -} - -""" -The calculated discount amount applied to a line item or shipping line. While a [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) captures the discount's rules and intentions, the allocation shows how much was actually deducted. + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") -Each allocation includes the discounted amount and a reference to the originating discount application. -""" -type DiscountAllocation { """ - Amount of discount allocated. + The list of subscription lines associated with the subscription contract. """ - allocatedAmount: MoneyV2! + lines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - The discount this allocated amount originated from. + The number of lines associated with the subscription contract. """ - discountApplication: DiscountApplication! -} + linesCount: Count -""" -Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), and manual discounts. + """ + The note field that will be applied to the generated orders. + """ + note: String -The actual discounted amount on a line item or shipping line is represented by the [`DiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/DiscountAllocation) object, which references the discount application it originated from. -""" -interface DiscountApplication { """ - The method by which the discount's value is allocated to its entitled items. + A list of the subscription contract's orders. """ - allocationMethod: DiscountApplicationAllocationMethod! + orders("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderConnection! """ - Which lines of targetType that the discount is allocated over. + The date and time when the subscription contract was updated. """ - targetSelection: DiscountApplicationTargetSelection! + updatedAt: DateTime! +} +""" +Return type for `subscriptionContractCancel` mutation. +""" +type SubscriptionContractCancelPayload { """ - The type of line that the discount is applicable towards. + The new Subscription Contract object. """ - targetType: DiscountApplicationTargetType! + contract: SubscriptionContract """ - The value of the discount application. + The list of errors that occurred from executing the mutation. """ - value: PricingValue! + userErrors: [SubscriptionContractStatusUpdateUserError!]! } """ -Controls how a discount's value is distributed across entitled lines. A discount can either spread its value across all entitled lines or apply the full value to each line individually. - -Used by the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and its implementations to capture the intentions of a discount source at the time of application. +An auto-generated type for paginating through multiple SubscriptionContracts. """ -enum DiscountApplicationAllocationMethod { +type SubscriptionContractConnection { """ - The value is spread across all entitled lines. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - ACROSS + edges: [SubscriptionContractEdge!]! """ - The value is applied onto every entitled line. + A list of nodes that are contained in SubscriptionContractEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - EACH + nodes: [SubscriptionContract!]! """ - The value is specifically applied onto a particular line. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - ONE @deprecated(reason: "Use ACROSS instead.") + pageInfo: PageInfo! } """ -An auto-generated type for paginating through multiple DiscountApplications. +The input fields required to create a Subscription Contract. """ -type DiscountApplicationConnection { +input SubscriptionContractCreateInput { """ - A list of edges. + The ID of the customer to associate with the subscription contract. """ - edges: [DiscountApplicationEdge!]! + customerId: ID! """ - A list of the nodes contained in DiscountApplicationEdge. + The next billing date for the subscription contract. """ - nodes: [DiscountApplication!]! + nextBillingDate: DateTime! """ - Information to aid in pagination. + The currency used for the subscription contract. """ - pageInfo: PageInfo! + currencyCode: CurrencyCode! + + """ + The attributes used as input for the Subscription Draft. + """ + contract: SubscriptionDraftInput! } """ -An auto-generated type which holds one DiscountApplication and a cursor during pagination. +Return type for `subscriptionContractCreate` mutation. """ -type DiscountApplicationEdge { +type SubscriptionContractCreatePayload { """ - A cursor for use in pagination. + The Subscription Contract object. """ - cursor: String! + draft: SubscriptionDraft """ - The item at the end of DiscountApplicationEdge. + The list of errors that occurred from executing the mutation. """ - node: DiscountApplication! + userErrors: [SubscriptionDraftUserError!]! } """ -The lines on the order to which the discount is applied, of the type defined by -the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of -`LINE_ITEM`, applies the discount on all line items that are entitled to the discount. -The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines. +An auto-generated type which holds one SubscriptionContract and a cursor during pagination. """ -enum DiscountApplicationTargetSelection { +type SubscriptionContractEdge { """ - The discount is allocated onto all the lines. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - ALL + cursor: String! """ - The discount is allocated onto only the lines that it's entitled for. + The item at the end of SubscriptionContractEdge. """ - ENTITLED + node: SubscriptionContract! +} +""" +Possible error codes that can be returned by `SubscriptionContractUserError`. +""" +enum SubscriptionContractErrorCode { """ - The discount is allocated onto explicitly chosen lines. + The input value is invalid. """ - EXPLICIT + INVALID } """ -The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +Return type for `subscriptionContractExpire` mutation. """ -enum DiscountApplicationTargetType { +type SubscriptionContractExpirePayload { """ - The discount applies onto line items. + The new Subscription Contract object. """ - LINE_ITEM + contract: SubscriptionContract """ - The discount applies onto shipping lines. + The list of errors that occurred from executing the mutation. """ - SHIPPING_LINE + userErrors: [SubscriptionContractStatusUpdateUserError!]! } """ -Records the configuration and intent of a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes) when a customer applies it. This includes the code string, allocation method, target type, and discount value at the time of application. The [`applicable`](https://shopify.dev/docs/api/storefront/latest/objects/DiscountCodeApplication#field-DiscountCodeApplication.fields.applicable) field indicates whether the code was successfully applied. - -> Note: -> To see the actual amounts discounted on specific line items or shipping lines, use the [`DiscountAllocation`](https://shopify.dev/docs/api/storefront/current/objects/DiscountAllocation) object instead. +Return type for `subscriptionContractFail` mutation. """ -type DiscountCodeApplication implements DiscountApplication { +type SubscriptionContractFailPayload { """ - The method by which the discount's value is allocated to its entitled items. + The new Subscription Contract object. """ - allocationMethod: DiscountApplicationAllocationMethod! + contract: SubscriptionContract """ - Specifies whether the discount code was applied successfully. + The list of errors that occurred from executing the mutation. """ - applicable: Boolean! + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} +""" +The possible values of the last billing error on a subscription contract. +""" +enum SubscriptionContractLastBillingErrorType { """ - The string identifying the discount code that was used at the time of application. + Subscription billing attempt error due to payment error. """ - code: String! + PAYMENT_ERROR """ - Which lines of targetType that the discount is allocated over. + Subscription billing attempt error due to customer error. """ - targetSelection: DiscountApplicationTargetSelection! + CUSTOMER_ERROR """ - The type of line that the discount is applicable towards. + Subscription billing attempt error due to inventory error. """ - targetType: DiscountApplicationTargetType! + INVENTORY_ERROR """ - The value of the discount application. + All other billing attempt errors. """ - value: PricingValue! + OTHER } """ -Represents an error in the input of a mutation. +The possible status values of the last payment on a subscription contract. """ -interface DisplayableError { +enum SubscriptionContractLastPaymentStatus { """ - The path to the input field that caused the error. + Successful subscription billing attempt. """ - field: [String!] + SUCCEEDED """ - The error message. + Failed subscription billing attempt. """ - message: String! + FAILED } """ -A web address associated with a shop. The [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop) object's [`primaryDomain`](https://shopify.dev/docs/api/storefront/current/objects/Shop#field-Shop.fields.primaryDomain) field returns this to identify the shop's online store URL. +Return type for `subscriptionContractPause` mutation. """ -type Domain { - """ - The host name of the domain (eg: `example.com`). - """ - host: String! - +type SubscriptionContractPausePayload { """ - Whether SSL is enabled or not. + The new Subscription Contract object. """ - sslEnabled: Boolean! + contract: SubscriptionContract """ - The URL of the domain (eg: `https://example.com`). + The list of errors that occurred from executing the mutation. """ - url: URL! + userErrors: [SubscriptionContractStatusUpdateUserError!]! } """ -Represents a video hosted outside of Shopify. +The input fields required to create a Subscription Contract. """ -type ExternalVideo implements Media & Node { +input SubscriptionContractProductChangeInput { """ - A word or phrase to share the nature or contents of a media. + The ID of the product variant the subscription line refers to. """ - alt: String + productVariantId: ID """ - The embed URL of the video for the respective host. + The price of the product. """ - embedUrl: URL! + currentPrice: Decimal +} +""" +Return type for `subscriptionContractProductChange` mutation. +""" +type SubscriptionContractProductChangePayload { """ - The URL. + The new Subscription Contract object. """ - embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + contract: SubscriptionContract """ - The host of the external video. + The updated Subscription Line. """ - host: MediaHost! + lineUpdated: SubscriptionLine """ - A globally-unique ID. + The list of errors that occurred from executing the mutation. """ - id: ID! + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionContractSetNextBillingDate` mutation. +""" +type SubscriptionContractSetNextBillingDatePayload { """ - The media content type. + The updated Subscription Contract object. """ - mediaContentType: MediaContentType! + contract: SubscriptionContract """ - The origin URL of the video on the respective host. + The list of errors that occurred from executing the mutation. """ - originUrl: URL! + userErrors: [SubscriptionContractUserError!]! +} +""" +Possible error codes that can be returned by `SubscriptionContractStatusUpdateUserError`. +""" +enum SubscriptionContractStatusUpdateErrorCode { """ - The presentation for a media. + The input value is invalid. """ - presentation: MediaPresentation + INVALID """ - The preview image for the media. + Subscription contract status cannot be changed once terminated. """ - previewImage: Image + CONTRACT_TERMINATED } """ -A filter option available on collection and search results pages. Each filter includes a type, display label, and selectable values that customers can use to narrow down products. - -The [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) objects contain an [`input`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.input) field that you can combine to [build dynamic filtering queries](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products). Merchants [configure available filters](https://help.shopify.com/manual/online-store/search-and-discovery/filters) using the Shopify Search & Discovery app. +Represents a subscription contract status update error. """ -type Filter { +type SubscriptionContractStatusUpdateUserError implements DisplayableError { """ - A unique identifier. + The error code. """ - id: String! + code: SubscriptionContractStatusUpdateErrorCode """ - A human-friendly string for this filter. + The path to the input field that caused the error. """ - label: String! + field: [String!] """ - Describes how to present the filter values. - Returns a value only for filters of type `LIST`. Returns null for other types. + The error message. """ - presentation: FilterPresentation + message: String! +} +""" +The possible status values of a subscription. +""" +enum SubscriptionContractSubscriptionStatus { """ - An enumeration that denotes the type of data this filter represents. + The contract is active and continuing per its policies. """ - type: FilterType! + ACTIVE """ - The list of values for this filter. + The contract is temporarily paused and is expected to resume in the future. """ - values: [FilterValue!]! -} + PAUSED -""" -Defines how to present the filter values, specifies the presentation of the filter. -""" -enum FilterPresentation { """ - Image presentation, filter values display an image. + The contract was ended by an unplanned customer action. """ - IMAGE + CANCELLED """ - Swatch presentation, filter values display color or image patterns. + The contract has ended per the expected circumstances. All billing and deliverycycles of the subscriptions were executed. """ - SWATCH + EXPIRED """ - Text presentation, no additional visual display for filter values. + The contract ended because billing failed and no further billing attempts are expected. """ - TEXT + FAILED } """ -The type of data that the filter group represents. - -For more information, refer to [Filter products in a collection with the Storefront API] -(https://shopify.dev/custom-storefronts/products-collections/filter-products). +Return type for `subscriptionContractUpdate` mutation. """ -enum FilterType { - """ - A list of selectable values. +type SubscriptionContractUpdatePayload { """ - LIST - + The Subscription Contract object. """ - A range of prices. - """ - PRICE_RANGE + draft: SubscriptionDraft """ - A boolean value. + The list of errors that occurred from executing the mutation. """ - BOOLEAN + userErrors: [SubscriptionDraftUserError!]! } """ -A selectable option within a [`Filter`](https://shopify.dev/docs/api/storefront/current/objects/Filter), such as a specific color, size, or product type. Each value includes a count of matching results and a human-readable label for display. - -The [`input`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.input) field provides ready-to-use JSON for building dynamic filtering interfaces. You can combine the `input` values from multiple selected [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) objects to construct filter queries. Visual representations are available through the [`image`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.image) or [`swatch`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.swatch) fields when the parent filter's presentation type supports them. +Represents a Subscription Contract error. """ -type FilterValue { +type SubscriptionContractUserError implements DisplayableError { """ - The number of results that match this filter value. + The error code. """ - count: Int! + code: SubscriptionContractErrorCode """ - A unique identifier. + The path to the input field that caused the error. """ - id: String! + field: [String!] """ - The visual representation when the filter's presentation is `IMAGE`. + The error message. """ - image: MediaImage + message: String! +} +""" +The set of valid sort keys for the SubscriptionContracts query. +""" +enum SubscriptionContractsSortKeys { + """ + Sort by the `created_at` value. """ - An input object that can be used to filter by this value on the parent field. + CREATED_AT - The value is provided as a helper for building dynamic filtering UI. For - example, if you have a list of selected `FilterValue` objects, you can combine - their respective `input` values to use in a subsequent query. """ - input: JSON! + Sort by the `id` value. + """ + ID """ - A human-friendly string for this filter value. + Sort by the `status` value. """ - label: String! + STATUS """ - The visual representation when the filter's presentation is `SWATCH`. + Sort by the `updated_at` value. """ - swatch: Swatch + UPDATED_AT } """ -Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). -""" -scalar Float - +Represents a Subscription Line Pricing Cycle Adjustment. """ -A shipment of one or more items in an order. Accessed through the [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order) object's [`successfulFulfillments`](https://shopify.dev/docs/api/storefront/current/objects/Order#field-Order.fields.successfulFulfillments) field. +type SubscriptionCyclePriceAdjustment { + """ + Price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! -Each fulfillment includes the line items that shipped, the tracking company name, and tracking details like numbers and URLs. An order can have multiple fulfillments when items ship separately or from different locations. -""" -type Fulfillment { """ - List of the fulfillment's line items. + Price adjustment value. """ - fulfillmentLineItems("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): FulfillmentLineItemConnection! + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! """ - The name of the tracking company. + The number of cycles required before this pricing policy applies. """ - trackingCompany: String + afterCycle: Int! """ - Tracking information associated with the fulfillment, - such as the tracking number and tracking URL. + The computed price after the adjustments applied. """ - trackingInfo("Truncate the array result to this size." first: Int): [FulfillmentTrackingInfo!]! + computedPrice: MoneyV2! } """ -Records how many units of an [`OrderLineItem`](https://shopify.dev/docs/api/storefront/current/objects/OrderLineItem) were included in a [`Fulfillment`](https://shopify.dev/docs/api/storefront/current/objects/Fulfillment). Each order line item has at most one fulfillment line item per fulfillment. +Describes the delivery method to use to get the physical goods to the customer. """ -type FulfillmentLineItem { - """ - The associated order's line item. - """ - lineItem: OrderLineItem! - - """ - The amount fulfilled in this fulfillment. - """ - quantity: Int! -} +union SubscriptionDeliveryMethod = SubscriptionDeliveryMethodLocalDelivery|SubscriptionDeliveryMethodPickup|SubscriptionDeliveryMethodShipping """ -An auto-generated type for paginating through multiple FulfillmentLineItems. +Specifies delivery method fields for a subscription draft. +This is an input union: one, and only one, field can be provided. +The field provided will determine which delivery method is to be used. """ -type FulfillmentLineItemConnection { +input SubscriptionDeliveryMethodInput { """ - A list of edges. + The input fields for the shipping delivery method. """ - edges: [FulfillmentLineItemEdge!]! + shipping: SubscriptionDeliveryMethodShippingInput """ - A list of the nodes contained in FulfillmentLineItemEdge. + The input fields for the local delivery method. """ - nodes: [FulfillmentLineItem!]! + localDelivery: SubscriptionDeliveryMethodLocalDeliveryInput """ - Information to aid in pagination. + The input fields for the pickup delivery method. """ - pageInfo: PageInfo! + pickup: SubscriptionDeliveryMethodPickupInput } """ -An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. +A subscription delivery method for local delivery. +The other subscription delivery methods can be found in the `SubscriptionDeliveryMethod` union type. """ -type FulfillmentLineItemEdge { +type SubscriptionDeliveryMethodLocalDelivery { """ - A cursor for use in pagination. + The address to deliver to. """ - cursor: String! + address: MailingAddress! """ - The item at the end of FulfillmentLineItemEdge. + The details of the local delivery method to use. """ - node: FulfillmentLineItem! + localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption! } """ -Tracking information associated with the fulfillment. +The input fields for a local delivery method. + +This input accepts partial input. When a field is not provided, +its prior value is left unchanged. """ -type FulfillmentTrackingInfo { +input SubscriptionDeliveryMethodLocalDeliveryInput { """ - The tracking number of the fulfillment. + The address to deliver to. """ - number: String + address: MailingAddressInput """ - The URL to track the fulfillment. + The details of the local delivery method to use. """ - url: URL + localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOptionInput } """ -Any file that doesn't fit into a designated type like image or video. For example, a PDF or JSON document. Use this object to manage files in a merchant's store. - -Generic files are commonly referenced through [file reference metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types) and returned as part of the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/current/unions/MetafieldReference) union. - -Includes the file's URL, MIME type, size in bytes, and an optional preview image. +The selected delivery option on a subscription contract. """ -type GenericFile implements Node { +type SubscriptionDeliveryMethodLocalDeliveryOption { """ - A word or phrase to indicate the contents of a file. + A custom reference to the delivery method for use with automations. """ - alt: String + code: String """ - A globally-unique ID. + The details displayed to the customer to describe the local delivery option. """ - id: ID! + description: String """ - The MIME type of the file. + The delivery instructions that the customer can provide to the merchant. """ - mimeType: String + instructions: String """ - The size of the original file in bytes. + The phone number that the customer provided to the merchant. + Formatted using E.164 standard. For example, `+16135551111`. """ - originalFileSize: Int + phone: String! """ - The preview image for the file. + The presentment title of the local delivery option. """ - previewImage: Image + presentmentTitle: String """ - The URL of the file. + The title of the local delivery option. """ - url: URL + title: String } """ -The input fields used to specify a geographical location. +The input fields for local delivery option. """ -input GeoCoordinateInput { +input SubscriptionDeliveryMethodLocalDeliveryOptionInput { """ - The coordinate's latitude value. + The title of the local delivery option. """ - latitude: Float! + title: String """ - The coordinate's longitude value. + The presentment title of the local delivery option. """ - longitude: Float! -} - -""" -A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a -complete list of HTML elements. - -Example value: `"

Grey cotton knit sweater.

"` -""" -scalar HTML - -""" -Implemented by resources that support custom metadata through [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. Types like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) implement this interface to provide consistent access to metafields. + presentmentTitle: String -You can retrieve a [single metafield](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafield) by namespace and key, or fetch [multiple metafields](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) in a single request. If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. -""" -interface HasMetafields { """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The details displayed to the customer to describe the local delivery option. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + description: String """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + A custom reference to the delivery method for use with automations. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! -} - -""" -The input fields to identify a [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) on an owner resource by namespace and key. Used as an argument to the [`metafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) field of the `HasMetafields` interface to retrieve multiple metafields in a single request. + code: String -If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. -""" -input HasMetafieldsIdentifier { """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + The phone number that the customer must provide to the merchant. + Formatted using E.164 standard. For example, `+16135551111`. """ - namespace: String + phone: String! """ - The identifier for the metafield. + The delivery instructions that the customer can provide to the merchant. """ - key: String! + instructions: String } """ -Represents a unique identifier, often used to refetch an object. -The ID type appears in a JSON response as a String, but it is not intended to be human-readable. - -Example value: `"gid://shopify/Product/10079785100"` +A delivery method with a pickup option. """ -scalar ID +type SubscriptionDeliveryMethodPickup { + """ + The details of the pickup delivery method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOption! +} """ -An ISO 8601-encoded datetime -""" -scalar ISO8601DateTime +The input fields for a pickup delivery method. +This input accepts partial input. When a field is not provided, +its prior value is left unchanged. """ -An image resource with URL, dimensions, and transformation options. Used for product images, collection images, media previews, and other visual content throughout the storefront. +input SubscriptionDeliveryMethodPickupInput { + """ + The details of the pickup method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOptionInput +} -The [`url`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.url) field accepts an [`ImageTransformInput`](https://shopify.dev/docs/api/storefront/current/input-objects/ImageTransformInput) argument for resizing, cropping, scaling for retina displays, and converting between image formats. Use the [`thumbhash`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.thumbhash) field to display lightweight placeholders while images load. """ -type Image { +Represents the selected pickup option on a subscription contract. +""" +type SubscriptionDeliveryMethodPickupOption { """ - A word or phrase to share the nature or contents of an image. + A custom reference to the delivery method for use with automations. """ - altText: String + code: String """ - The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + The details displayed to the customer to describe the pickup option. """ - height: Int + description: String """ - A unique ID for the image. + The location where the customer will pick up the merchandise. """ - id: ID + location: Location! """ - The location of the original image as a URL. - - If there are any existing transformations in the original source URL, they will remain and not be stripped. + The presentment title of the pickup option. """ - originalSrc: URL! @deprecated(reason: "Use `url` instead.") + presentmentTitle: String """ - The location of the image as a URL. + The title of the pickup option. """ - src: URL! @deprecated(reason: "Use `url` instead.") + title: String +} +""" +The input fields for pickup option. +""" +input SubscriptionDeliveryMethodPickupOptionInput { """ - The ThumbHash of the image. - - Useful to display placeholder images while the original image is loading. - - See https://evanw.github.io/thumbhash/ for details on how to use it. + The title of the pickup option. """ - thumbhash: String + title: String """ - The location of the transformed image as a URL. - - All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. - Otherwise any transformations which an image type doesn't support will be ignored. + The presentment title of the pickup option. """ - transformedSrc("Image width in pixels between 1 and 5760." maxWidth: Int, "Image height in pixels between 1 and 5760." maxHeight: Int, "Crops the image according to the specified region." crop: CropRegion, "Image size multiplier for high-resolution retina displays. Must be between 1 and 3." scale: Int = 1, "Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported)." preferredContentType: ImageContentType): URL! @deprecated(reason: "Use `url(transform:)` instead") + presentmentTitle: String """ - The location of the image as a URL. - - If no transform options are specified, then the original image will be preserved including any pre-applied transforms. - - All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + The details displayed to the customer to describe the pickup option. + """ + description: String - If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). """ - url("A set of options to transform the original image." transform: ImageTransformInput): URL! + A custom reference to the delivery method for use with automations. + """ + code: String """ - The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + The ID of the pickup location. """ - width: Int + locationId: ID! } """ -An auto-generated type for paginating through multiple Images. +Represents a shipping delivery method: a mailing address and a shipping option. """ -type ImageConnection { +type SubscriptionDeliveryMethodShipping { """ - A list of edges. + The address to ship to. """ - edges: [ImageEdge!]! + address: MailingAddress! """ - A list of the nodes contained in ImageEdge. + The details of the shipping method to use. """ - nodes: [Image!]! + shippingOption: SubscriptionDeliveryMethodShippingOption! +} +""" +Specifies shipping delivery method fields. + +This input accepts partial input. When a field is not provided, +its prior value is left unchanged. +""" +input SubscriptionDeliveryMethodShippingInput { """ - Information to aid in pagination. + The address to ship to. """ - pageInfo: PageInfo! + address: MailingAddressInput + + """ + The details of the shipping method to use. + """ + shippingOption: SubscriptionDeliveryMethodShippingOptionInput } """ -List of supported image content types. +Represents the selected shipping option on a subscription contract. """ -enum ImageContentType { +type SubscriptionDeliveryMethodShippingOption { """ - A PNG image. + The carrier service that's providing this shipping option. + This field isn't currently supported and returns null. """ - PNG + carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") """ - A JPG image. + The code of the shipping option. """ - JPG + code: String """ - A WEBP image. + The description of the shipping option. """ - WEBP -} + description: String -""" -An auto-generated type which holds one Image and a cursor during pagination. -""" -type ImageEdge { """ - A cursor for use in pagination. + The presentment title of the shipping option. """ - cursor: String! + presentmentTitle: String """ - The item at the end of ImageEdge. + The title of the shipping option. """ - node: Image! + title: String } """ -The available options for transforming an image. - -All transformation options are considered best effort. Any transformation that -the original image type doesn't support will be ignored. +The input fields for shipping option. """ -input ImageTransformInput { +input SubscriptionDeliveryMethodShippingOptionInput { """ - The region of the image to remain after cropping. - Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, - where the `maxWidth` and `maxHeight` aren't equal. - The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while - a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ - maxWidth: 5, maxHeight: 10, crop: LEFT }` will result - in an image with a width of 5 and height of 10, where the right side of the image is removed. + The title of the shipping option. """ - crop: CropRegion + title: String """ - Image width in pixels between 1 and 5760. + The presentment title of the shipping option. """ - maxWidth: Int + presentmentTitle: String """ - Image height in pixels between 1 and 5760. + The description of the shipping option. """ - maxHeight: Int + description: String """ - Image size multiplier for high-resolution retina displays. Must be within 1..3. + The code of the shipping option. """ - scale: Int = 1 + code: String """ - Convert the source image into the preferred content type. - Supported conversions: `.svg` to `.png`, any file type to `.jpg`, and any file type to `.webp`. + The carrier service ID of the shipping option. """ - preferredContentType: ImageContentType -} - -""" -Provide details about the contexts influenced by the @inContext directive on a field. -""" -type InContextAnnotation { - description: String! - - type: InContextAnnotationType! -} - -""" -This gives information about the type of context that impacts a field. For example, for a query with @inContext(language: "EN"), the type would point to the name: LanguageCode and kind: ENUM. -""" -type InContextAnnotationType { - kind: String! - - name: String! + carrierServiceId: ID } """ -Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +The delivery option for a subscription contract. """ -scalar Int +union SubscriptionDeliveryOption = SubscriptionLocalDeliveryOption|SubscriptionPickupOption|SubscriptionShippingOption """ -A [JSON](https://www.json.org/json-en.html) object. - -Example value: -`{ - "product": { - "id": "gid://shopify/Product/1346443542550", - "title": "White T-shirt", - "options": [{ - "name": "Size", - "values": ["M", "L"] - }] - } -}` +The result of the query to fetch delivery options for the subscription contract. """ -scalar JSON +union SubscriptionDeliveryOptionResult = SubscriptionDeliveryOptionResultFailure|SubscriptionDeliveryOptionResultSuccess """ -A language available for a localized storefront experience. Provides the language name in both its native form (endonym) and translated into the current language, along with its [`LanguageCode`](https://shopify.dev/docs/api/storefront/current/enums/LanguageCode). - -Returned by the [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) and [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) objects to indicate available and active languages. Pass the `isoCode` to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to retrieve translated content in that language. +A failure to find the available delivery options for a subscription contract. """ -type Language { - """ - The name of the language in the language itself. If the language uses capitalization, it is capitalized for a mid-sentence position. - """ - endonymName: String! - - """ - The ISO code. - """ - isoCode: LanguageCode! - +type SubscriptionDeliveryOptionResultFailure { """ - The name of the language in the current language. + The reason for the failure. """ - name: String! + message: String } """ -Supported languages for retrieving translated storefront content. Pass a language code to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to return product titles, descriptions, and other translatable fields in that language. - -The [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) object provides the list of available languages for the active country, and each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) in [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) includes its own available languages. +The delivery option for a subscription contract. """ -enum LanguageCode { - """ - Afrikaans. - """ - AF - - """ - Akan. - """ - AK - - """ - Amharic. +type SubscriptionDeliveryOptionResultSuccess { """ - AM - - """ - Arabic. + The available delivery options. """ - AR + deliveryOptions: [SubscriptionDeliveryOption!]! +} +""" +Represents a Subscription Delivery Policy. +""" +type SubscriptionDeliveryPolicy { """ - Assamese. + The specific anchor dates upon which the delivery interval calculations should be made. """ - AS + anchors: [SellingPlanAnchor!]! """ - Azerbaijani. + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). """ - AZ + interval: SellingPlanInterval! """ - Belarusian. + The number of delivery intervals between deliveries. """ - BE + intervalCount: Int! +} +""" +The input fields for a Subscription Delivery Policy. +""" +input SubscriptionDeliveryPolicyInput { """ - Bulgarian. + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). """ - BG + interval: SellingPlanInterval! """ - Bambara. + The number of billing intervals between invoices. """ - BM + intervalCount: Int! """ - Bangla. + The specific anchor dates upon which the delivery interval calculations should be made. """ - BN + anchors: [SellingPlanAnchorInput!] = [] +} - """ - Tibetan. - """ - BO +""" +Subscription draft discount types. +""" +union SubscriptionDiscount = SubscriptionAppliedCodeDiscount|SubscriptionManualDiscount +""" +Represents what a particular discount reduces from a line price. +""" +type SubscriptionDiscountAllocation { """ - Breton. + Allocation amount. """ - BR + amount: MoneyV2! """ - Bosnian. + Discount that created the allocation. """ - BS + discount: SubscriptionDiscount! +} +""" +An auto-generated type for paginating through multiple SubscriptionDiscounts. +""" +type SubscriptionDiscountConnection { """ - Catalan. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - CA + edges: [SubscriptionDiscountEdge!]! """ - Chechen. + A list of nodes that are contained in SubscriptionDiscountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - CE + nodes: [SubscriptionDiscount!]! """ - Central Kurdish. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - CKB + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one SubscriptionDiscount and a cursor during pagination. +""" +type SubscriptionDiscountEdge { """ - Czech. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - CS + cursor: String! """ - Welsh. + The item at the end of SubscriptionDiscountEdge. """ - CY + node: SubscriptionDiscount! +} +""" +Represents the subscription lines the discount applies on. +""" +type SubscriptionDiscountEntitledLines { """ - Danish. + Specify whether the subscription discount will apply on all subscription lines. """ - DA + all: Boolean! """ - German. + The list of subscription lines associated with the subscription discount. """ - DE + lines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! +} +""" +The value of the discount and how it will be applied. +""" +type SubscriptionDiscountFixedAmountValue { """ - Dzongkha. + The fixed amount value of the discount. """ - DZ + amount: MoneyV2! """ - Ewe. + Whether the amount is applied per item. """ - EE + appliesOnEachItem: Boolean! +} +""" +The percentage value of the discount. +""" +type SubscriptionDiscountPercentageValue { """ - Greek. + The percentage value of the discount. """ - EL + percentage: Int! +} +""" +The reason a discount on a subscription draft was rejected. +""" +enum SubscriptionDiscountRejectionReason { """ - English. + Discount code is not found. """ - EN + NOT_FOUND """ - Esperanto. + Discount does not apply to any of the given line items. """ - EO + NO_ENTITLED_LINE_ITEMS """ - Spanish. + Quantity of items does not qualify for the discount. """ - ES + QUANTITY_NOT_IN_RANGE """ - Estonian. + Purchase amount of items does not qualify for the discount. """ - ET + PURCHASE_NOT_IN_RANGE """ - Basque. + Given customer does not qualify for the discount. """ - EU + CUSTOMER_NOT_ELIGIBLE """ - Persian. + Discount usage limit has been reached. """ - FA + USAGE_LIMIT_REACHED """ - Fulah. + Customer usage limit has been reached. """ - FF + CUSTOMER_USAGE_LIMIT_REACHED """ - Finnish. + Discount is inactive. """ - FI + CURRENTLY_INACTIVE """ - Filipino. + No applicable shipping lines. """ - FIL + NO_ENTITLED_SHIPPING_LINES """ - Faroese. + Purchase type does not qualify for the discount. """ - FO + INCOMPATIBLE_PURCHASE_TYPE """ - French. + Internal error during discount code validation. """ - FR + INTERNAL_ERROR +} + +""" +The value of the discount and how it will be applied. +""" +union SubscriptionDiscountValue = SubscriptionDiscountFixedAmountValue|SubscriptionDiscountPercentageValue + +""" +The `SubscriptionDraft` object represents a draft version of a +[subscription contract](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract) +before it's committed. It serves as a staging area for making changes to an existing subscription or creating +a new one. The draft allows you to preview and modify various aspects of a subscription before applying the changes. + +Use the `SubscriptionDraft` object to: +- Add, remove, or modify subscription lines and their quantities +- Manage discounts (add, remove, or update manual and code-based discounts) +- Configure delivery options and shipping methods +- Set up billing and delivery policies +- Manage customer payment methods +- Add custom attributes and notes to generated orders +- Configure billing cycles and next billing dates +- Preview the projected state of the subscription + +Each `SubscriptionDraft` object maintains a projected state that shows how the subscription will look after the changes +are committed. This allows you to preview the impact of your modifications before applying them. The draft can be +associated with an existing subscription contract (for modifications) or used to create a new subscription. + +The draft remains in a draft state until it's committed, at which point the changes are applied to the subscription +contract and the draft is no longer accessible. + +Learn more about +[how subscription contracts work](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts) +and how to [build](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract), +[update](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract), and +[combine](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/combine-subscription-contracts) subscription contracts. +""" +type SubscriptionDraft implements Node { """ - Western Frisian. + The billing cycle that the subscription contract will be associated with. """ - FY + billingCycle: SubscriptionBillingCycle """ - Irish. + The billing policy for the subscription contract. """ - GA + billingPolicy: SubscriptionBillingPolicy! """ - Scottish Gaelic. + The billing cycles of the contracts that will be concatenated to the subscription contract. """ - GD + concatenatedBillingCycles("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX): SubscriptionBillingCycleConnection! """ - Galician. + The currency used for the subscription contract. """ - GL + currencyCode: CurrencyCode! """ - Gujarati. + A list of the custom attributes to be added to the generated orders. """ - GU + customAttributes: [Attribute!]! """ - Manx. + The customer to whom the subscription contract belongs. """ - GV + customer: Customer! """ - Hausa. + The customer payment method used for the subscription contract. """ - HA + customerPaymentMethod("Whether to show the customer's revoked payment method." showRevoked: Boolean = false): CustomerPaymentMethod """ - Hebrew. + The delivery method for each billing of the subscription contract. """ - HE + deliveryMethod: SubscriptionDeliveryMethod """ - Hindi. + The available delivery options for a given delivery address. Returns `null` for pending requests. """ - HI + deliveryOptions("The address to deliver the subscription contract to." deliveryAddress: MailingAddressInput): SubscriptionDeliveryOptionResult """ - Croatian. + The delivery policy for the subscription contract. """ - HR + deliveryPolicy: SubscriptionDeliveryPolicy! """ - Hungarian. + The delivery price for each billing the subscription contract. """ - HU + deliveryPrice: MoneyV2 """ - Armenian. + The list of subscription discounts which will be associated with the subscription contract. """ - HY + discounts("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionDiscountConnection! """ - Interlingua. + The list of subscription discounts to be added to the subscription contract. """ - IA + discountsAdded("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionDiscountConnection! """ - Indonesian. + The list of subscription discounts to be removed from the subscription contract. """ - ID + discountsRemoved("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionDiscountConnection! """ - Igbo. + The list of subscription discounts to be updated on the subscription contract. """ - IG + discountsUpdated("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionDiscountConnection! """ - Sichuan Yi. + A globally-unique ID. """ - II + id: ID! """ - Icelandic. + The list of subscription lines which will be associated with the subscription contract. """ - IS + lines("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - Italian. + The list of subscription lines to be added to the subscription contract. """ - IT + linesAdded("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - Japanese. + The list of subscription lines to be removed from the subscription contract. """ - JA + linesRemoved("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SubscriptionLineConnection! """ - Javanese. + The next billing date for the subscription contract. """ - JV + nextBillingDate: DateTime """ - Georgian. + The note field that will be applied to the generated orders. """ - KA + note: String """ - Kikuyu. + The original subscription contract. """ - KI + originalContract: SubscriptionContract """ - Kazakh. + Available Shipping Options for a given delivery address. Returns NULL for pending requests. """ - KK + shippingOptions("The address to delivery the subscription contract to." deliveryAddress: MailingAddressInput): SubscriptionShippingOptionResult @deprecated(reason: "Use `deliveryOptions` instead.") """ - Kalaallisut. + The current status of the subscription contract. """ - KL + status: SubscriptionContractSubscriptionStatus +} +""" +Return type for `subscriptionDraftCommit` mutation. +""" +type SubscriptionDraftCommitPayload { """ - Khmer. + The updated Subscription Contract object. """ - KM + contract: SubscriptionContract """ - Kannada. + The list of errors that occurred from executing the mutation. """ - KN + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftDiscountAdd` mutation. +""" +type SubscriptionDraftDiscountAddPayload { """ - Korean. + The added Subscription Discount. """ - KO + discountAdded: SubscriptionManualDiscount """ - Kashmiri. + The Subscription Contract draft object. """ - KS + draft: SubscriptionDraft """ - Kurdish. + The list of errors that occurred from executing the mutation. """ - KU + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftDiscountCodeApply` mutation. +""" +type SubscriptionDraftDiscountCodeApplyPayload { """ - Cornish. + The added subscription discount. """ - KW + appliedDiscount: SubscriptionAppliedCodeDiscount """ - Kyrgyz. + The subscription contract draft object. """ - KY + draft: SubscriptionDraft """ - Luxembourgish. + The list of errors that occurred from executing the mutation. """ - LB + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftDiscountRemove` mutation. +""" +type SubscriptionDraftDiscountRemovePayload { """ - Ganda. + The removed subscription draft discount. """ - LG + discountRemoved: SubscriptionDiscount """ - Lingala. + The subscription contract draft object. """ - LN + draft: SubscriptionDraft """ - Lao. + The list of errors that occurred from executing the mutation. """ - LO + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftDiscountUpdate` mutation. +""" +type SubscriptionDraftDiscountUpdatePayload { """ - Lithuanian. + The updated Subscription Discount. """ - LT + discountUpdated: SubscriptionManualDiscount """ - Luba-Katanga. + The Subscription Contract draft object. """ - LU + draft: SubscriptionDraft """ - Latvian. + The list of errors that occurred from executing the mutation. """ - LV + userErrors: [SubscriptionDraftUserError!]! +} +""" +Possible error codes that can be returned by `SubscriptionDraftUserError`. +""" +enum SubscriptionDraftErrorCode { """ - Malagasy. + This line has already been removed. """ - MG + ALREADY_REMOVED """ - Māori. + Input value is not present. """ - MI + PRESENCE """ - Macedonian. + Subscription draft has been already committed. """ - MK + COMMITTED """ - Malayalam. + Value is not in range. """ - ML + NOT_IN_RANGE """ - Mongolian. + The value is not an integer. """ - MN + NOT_AN_INTEGER """ - Marathi. + The maximum number of cycles must be greater than the minimum. """ - MR + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES """ - Malay. + The delivery policy interval must be a multiple of the billing policy interval. """ - MS + DELIVERY_MUST_BE_MULTIPLE_OF_BILLING """ - Maltese. + Next billing date is invalid. """ - MT + INVALID_BILLING_DATE """ - Burmese. + Note length is too long. """ - MY + INVALID_NOTE_LENGTH """ - Norwegian (Bokmål). + Must have at least one line. """ - NB + INVALID_LINES """ - North Ndebele. + Discount must have at least one entitled line. """ - ND + NO_ENTITLED_LINES """ - Nepali. + The customer doesn't exist. """ - NE + CUSTOMER_DOES_NOT_EXIST """ - Dutch. + The payment method customer must be the same as the contract customer. """ - NL + CUSTOMER_MISMATCH """ - Norwegian Nynorsk. + The delivery method can't be blank if any lines require shipping. """ - NN + DELIVERY_METHOD_REQUIRED """ - Norwegian. + The local delivery options must be set for local delivery. """ - NO + MISSING_LOCAL_DELIVERY_OPTIONS """ - Oromo. + The after cycle attribute must be unique between cycle discounts. """ - OM + CYCLE_DISCOUNTS_UNIQUE_AFTER_CYCLE """ - Odia. + The adjustment value must the same type as the adjustment type. """ - OR + INVALID_ADJUSTMENT_TYPE """ - Ossetic. + The adjustment value must be either fixed_value or percentage. """ - OS + INVALID_ADJUSTMENT_VALUE """ - Punjabi. + Another operation updated the contract concurrently as the commit was in progress. """ - PA + STALE_CONTRACT """ - Polish. + The contract draft has too many lines. """ - PL + TOO_MANY_LINES """ - Pashto. + The contract draft has too many discounts. """ - PS + TOO_MANY_DISCOUNTS """ - Portuguese (Brazil). + Currency is not enabled. """ - PT_BR + CURRENCY_NOT_ENABLED """ - Portuguese (Portugal). + Cannot update a subscription contract with a current or upcoming billing cycle contract edit. """ - PT_PT + HAS_FUTURE_EDITS """ - Quechua. + Cannot commit a billing cycle contract draft with this mutation. Please use SubscriptionBillingCycleContractDraftCommit. """ - QU + BILLING_CYCLE_PRESENT """ - Romansh. + Cannot commit a contract draft with this mutation. Please use SubscriptionDraftCommit. """ - RM + BILLING_CYCLE_ABSENT """ - Rundi. + Delivery policy cannot be updated for billing cycle contract drafts. """ - RN + BILLING_CYCLE_CONTRACT_DRAFT_DELIVERY_POLICY_INVALID """ - Romanian. + Billing policy cannot be updated for billing cycle contract drafts. """ - RO + BILLING_CYCLE_CONTRACT_DRAFT_BILLING_POLICY_INVALID """ - Russian. + Contract draft must be a billing cycle contract draft for contract concatenation. """ - RU + CONCATENATION_BILLING_CYCLE_CONTRACT_DRAFT_REQUIRED """ - Kinyarwanda. + Cannot concatenate a contract draft from subscriptionContractCreate mutation. """ - RW + CONCATENATION_UNCOMMITTED_CONTRACT_DRAFT """ - Sanskrit. + Concatenated contracts cannot contain duplicate subscription contracts. """ - SA + DUPLICATE_CONCATENATED_CONTRACTS """ - Sardinian. + Billing cycle selector cannot select upcoming billing cycle past limit. """ - SC + UPCOMING_CYCLE_LIMIT_EXCEEDED """ - Sindhi. + Billing cycle selector cannot select billing cycle outside of index range. """ - SD + CYCLE_INDEX_OUT_OF_RANGE """ - Northern Sami. + Billing cycle selector cannot select billing cycle outside of start date range. """ - SE + CYCLE_START_DATE_OUT_OF_RANGE """ - Sango. + Billing cycle selector requires exactly one of index or date to be provided. """ - SG + CYCLE_SELECTOR_VALIDATE_ONE_OF """ - Sinhala. + Maximum number of concatenated contracts on a billing cycle contract draft exceeded. """ - SI + EXCEEDED_MAX_CONCATENATED_CONTRACTS """ - Slovak. + Customer is scheduled for redaction or has been redacted. """ - SK + CUSTOMER_REDACTED """ - Slovenian. + Customer payment method is required. """ - SL + MISSING_CUSTOMER_PAYMENT_METHOD """ - Shona. + The input value is invalid. """ - SN + INVALID """ - Somali. + The input value is blank. """ - SO + BLANK """ - Albanian. + The input value should be greater than the minimum allowed value. """ - SQ + GREATER_THAN """ - Serbian. + The input value should be greater than or equal to the minimum value allowed. """ - SR + GREATER_THAN_OR_EQUAL_TO """ - Sundanese. + The input value should be less than the maximum value allowed. """ - SU + LESS_THAN """ - Swedish. + The input value should be less than or equal to the maximum value allowed. """ - SV + LESS_THAN_OR_EQUAL_TO """ - Swahili. + The input value is too long. """ - SW + TOO_LONG """ - Tamil. + The input value is too short. """ - TA + TOO_SHORT +} +""" +Return type for `subscriptionDraftFreeShippingDiscountAdd` mutation. +""" +type SubscriptionDraftFreeShippingDiscountAddPayload { """ - Telugu. + The added subscription free shipping discount. """ - TE + discountAdded: SubscriptionManualDiscount """ - Tajik. + The subscription contract draft object. """ - TG + draft: SubscriptionDraft """ - Thai. + The list of errors that occurred from executing the mutation. """ - TH + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftFreeShippingDiscountUpdate` mutation. +""" +type SubscriptionDraftFreeShippingDiscountUpdatePayload { """ - Tigrinya. + The updated Subscription Discount. """ - TI + discountUpdated: SubscriptionManualDiscount """ - Turkmen. + The Subscription Contract draft object. """ - TK + draft: SubscriptionDraft """ - Tongan. + The list of errors that occurred from executing the mutation. """ - TO + userErrors: [SubscriptionDraftUserError!]! +} +""" +The input fields required to create a Subscription Draft. +""" +input SubscriptionDraftInput { """ - Turkish. + The current status of the subscription contract. """ - TR + status: SubscriptionContractSubscriptionStatus """ - Tatar. + The ID of the payment method to be used for the subscription contract. """ - TT + paymentMethodId: ID """ - Uyghur. + The next billing date for the subscription contract. """ - UG + nextBillingDate: DateTime """ - Ukrainian. + The billing policy for the subscription contract. """ - UK + billingPolicy: SubscriptionBillingPolicyInput """ - Urdu. + The delivery policy for the subscription contract. """ - UR + deliveryPolicy: SubscriptionDeliveryPolicyInput """ - Uzbek. + The shipping price for each renewal the subscription contract. """ - UZ + deliveryPrice: Decimal """ - Vietnamese. + The delivery method for the subscription contract. """ - VI + deliveryMethod: SubscriptionDeliveryMethodInput """ - Wolof. + The note field that will be applied to the generated orders. """ - WO + note: String """ - Xhosa. + A list of the custom attributes added to the subscription contract. """ - XH + customAttributes: [AttributeInput!] +} +""" +Return type for `subscriptionDraftLineAdd` mutation. +""" +type SubscriptionDraftLineAddPayload { """ - Yiddish. + The Subscription Contract draft object. """ - YI + draft: SubscriptionDraft """ - Yoruba. + The added Subscription Line. """ - YO + lineAdded: SubscriptionLine """ - Chinese (Simplified). + The list of errors that occurred from executing the mutation. """ - ZH_CN + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftLineRemove` mutation. +""" +type SubscriptionDraftLineRemovePayload { """ - Chinese (Traditional). + The list of updated subscription discounts impacted by the removed line. """ - ZH_TW + discountsUpdated: [SubscriptionManualDiscount!] """ - Zulu. + The Subscription Contract draft object. """ - ZU + draft: SubscriptionDraft """ - Chinese. + The removed Subscription Line. """ - ZH + lineRemoved: SubscriptionLine """ - Portuguese. + The list of errors that occurred from executing the mutation. """ - PT + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftLineUpdate` mutation. +""" +type SubscriptionDraftLineUpdatePayload { """ - Church Slavic. + The Subscription Contract draft object. """ - CU + draft: SubscriptionDraft """ - Volapük. + The updated Subscription Line. """ - VO + lineUpdated: SubscriptionLine """ - Latin. + The list of errors that occurred from executing the mutation. """ - LA + userErrors: [SubscriptionDraftUserError!]! +} +""" +Return type for `subscriptionDraftUpdate` mutation. +""" +type SubscriptionDraftUpdatePayload { """ - Serbo-Croatian. + The Subscription Draft object. """ - SH + draft: SubscriptionDraft """ - Moldavian. + The list of errors that occurred from executing the mutation. """ - MO + userErrors: [SubscriptionDraftUserError!]! } """ -Information about the shop's configured localized experiences, including available countries and languages. The [`country`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.country) and [`language`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.language) fields reflect the active localization context, which you can change using the `@inContext` directive on queries. - -Use [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) to list all countries with enabled localized experiences, and [`availableLanguages`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableLanguages) to get languages available for the currently active country. Each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) includes its own currency, unit system, and available languages. +Represents a Subscription Draft error. """ -type Localization { +type SubscriptionDraftUserError implements DisplayableError { """ - The list of countries with enabled localized experiences. + The error code. """ - availableCountries: [Country!]! + code: SubscriptionDraftErrorCode """ - The list of languages available for the active country. + The path to the input field that caused the error. """ - availableLanguages: [Language!]! + field: [String!] """ - The country of the active localized experience. Use the `@inContext` directive to change this value. + The error message. """ - country: Country! + message: String! +} +""" +The input fields for a subscription free shipping discount on a contract. +""" +input SubscriptionFreeShippingDiscountInput { """ - The language of the active localized experience. Use the `@inContext` directive to change this value. + The title associated with the subscription free shipping discount. """ - language: Language! + title: String """ - The market including the country of the active localized experience. Use the `@inContext` directive to change this value. + The maximum number of times the subscription free shipping discount will be applied on orders. """ - market: Market! @deprecated(reason: "This `market` field will be removed in a future version of the API.") + recurringCycleLimit: Int } """ -A physical store location where product inventory is held and that supports in-store pickup. Provides the location's name, address, and geographic coordinates for proximity-based sorting. Use with [`StoreAvailability`](https://shopify.dev/docs/api/storefront/current/objects/StoreAvailability) to show customers where a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) is available for pickup. +A product line item within a [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). Each line represents a specific product variant that the customer subscribes to, including its quantity, pricing, and whether shipping is required. -Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). +The line maintains references to the [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant), [`SellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan), and custom [`Attribute`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Attribute) objects. It tracks the current price and any scheduled price changes through its [`pricingPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionPricingPolicy). You can modify lines through [`SubscriptionDraft`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDraft) objects without affecting the original contract until you commit changes. + +Learn more about [subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts) and [selling plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). """ -type Location implements HasMetafields & Node { +type SubscriptionLine { """ - The address of the location. + The origin contract of the line if it was concatenated from another contract. """ - address: LocationAddress! + concatenatedOriginContract: SubscriptionContract """ - A globally-unique ID. + The price per unit for the subscription line in the contract's currency. """ - id: ID! + currentPrice: MoneyV2! """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + List of custom attributes associated to the line item. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + customAttributes: [Attribute!]! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + Discount allocations. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + discountAllocations: [SubscriptionDiscountAllocation!]! """ - The name of the location. + The unique ID. """ - name: String! -} + id: ID! -""" -Represents the address of a location. -""" -type LocationAddress { """ - The first line of the address for the location. + Total line price including all discounts. """ - address1: String + lineDiscountedPrice: MoneyV2! """ - The second line of the address for the location. + Describe the price changes of the line over time. """ - address2: String + pricingPolicy: SubscriptionPricingPolicy """ - The city of the location. + The product ID associated with the subscription line. """ - city: String + productId: ID """ - The country of the location. + The quantity of the unit selected for the subscription line. """ - country: String + quantity: Int! """ - The country code of the location. + Whether physical shipping is required for the variant. """ - countryCode: String + requiresShipping: Boolean! """ - A formatted version of the address for the location. + The selling plan ID associated to the line. + + Indicates which selling plan was used to create this + contract line initially. The selling plan ID is also used to + find the associated delivery profile. + + The subscription contract, subscription line, or selling plan might have + changed. As a result, the selling plan's attributes might not + match the information on the contract. """ - formatted: [String!]! + sellingPlanId: ID """ - The latitude coordinates of the location. + The selling plan name associated to the line. This name describes + the order line items created from this subscription line + for both merchants and customers. + + The value can be different from the selling plan's name, because both + the selling plan's name and the subscription line's selling_plan_name + attribute can be updated independently. """ - latitude: Float + sellingPlanName: String """ - The longitude coordinates of the location. + Variant SKU number of the item associated with the subscription line. """ - longitude: Float + sku: String """ - The phone number of the location. + Whether the variant is taxable. """ - phone: String + taxable: Boolean! """ - The province of the location. + Product title of the item associated with the subscription line. """ - province: String + title: String! """ - The code for the province, state, or district of the address of the location. + The product variant ID associated with the subscription line. """ - provinceCode: String + variantId: ID """ - The ZIP code of the location. + The image associated with the line item's variant or product. """ - zip: String + variantImage: Image + + """ + Product variant title of the item associated with the subscription line. + """ + variantTitle: String } """ -An auto-generated type for paginating through multiple Locations. +An auto-generated type for paginating through multiple SubscriptionLines. """ -type LocationConnection { +type SubscriptionLineConnection { """ - A list of edges. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - edges: [LocationEdge!]! + edges: [SubscriptionLineEdge!]! """ - A list of the nodes contained in LocationEdge. + A list of nodes that are contained in SubscriptionLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - nodes: [Location!]! + nodes: [SubscriptionLine!]! """ - Information to aid in pagination. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ pageInfo: PageInfo! } """ -An auto-generated type which holds one Location and a cursor during pagination. +An auto-generated type which holds one SubscriptionLine and a cursor during pagination. """ -type LocationEdge { +type SubscriptionLineEdge { """ - A cursor for use in pagination. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ cursor: String! """ - The item at the end of LocationEdge. + The item at the end of SubscriptionLineEdge. """ - node: Location! + node: SubscriptionLine! } """ -The set of valid sort keys for the Location query. +The input fields required to add a new subscription line to a contract. """ -enum LocationSortKeys { +input SubscriptionLineInput { """ - Sort by the `id` value. + The ID of the product variant the subscription line refers to. """ - ID + productVariantId: ID! """ - Sort by the `name` value. + The quantity of the product. """ - NAME + quantity: Int! + + """ + The price of the product. + """ + currentPrice: Decimal! """ - Sort by the `city` value. + The custom attributes for this subscription line. + """ + customAttributes: [AttributeInput!] + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + + Defaults to using the selling plan's current name when not specified. """ - CITY + sellingPlanName: String """ - Sort by the `distance` value. + Describes expected price changes of the subscription line over time. """ - DISTANCE + pricingPolicy: SubscriptionPricingPolicyInput } """ -A physical mailing address associated with a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) or [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order). Stores standard address components including street address, city, province, country, and postal code, along with customer name and company information. - -The address includes geographic coordinates and provides pre-formatted output through the [`formatted`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress#field-MailingAddress.fields.formatted) field, which can optionally include or exclude name and company details. +The input fields required to update a subscription line on a contract. """ -type MailingAddress implements Node { +input SubscriptionLineUpdateInput { """ - The first line of the address. Typically the street address or PO Box number. + The ID of the product variant the subscription line refers to. """ - address1: String + productVariantId: ID """ - The second line of the address. Typically the number of the apartment, suite, or unit. + The quantity of the product. """ - address2: String + quantity: Int """ - The name of the city, district, village, or town. + The selling plan for the subscription line. """ - city: String + sellingPlanId: ID """ - The name of the customer's company or organization. + The selling plan name for the subscription line. """ - company: String + sellingPlanName: String """ - The name of the country. + The price of the product. """ - country: String + currentPrice: Decimal """ - The two-letter code for the country of the address. - - For example, US. + The custom attributes for this subscription line. """ - countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + customAttributes: [AttributeInput!] """ - The two-letter code for the country of the address. + Describes expected price changes of the subscription line over time. + """ + pricingPolicy: SubscriptionPricingPolicyInput +} - For example, US. +""" +A local delivery option for a subscription contract. +""" +type SubscriptionLocalDeliveryOption { """ - countryCodeV2: CountryCode + The code of the local delivery option. + """ + code: String! """ - The first name of the customer. + The description of the local delivery option. """ - firstName: String + description: String """ - A formatted version of the address, customized by the provided arguments. + Whether a phone number is required for the local delivery option. """ - formatted("Whether to include the customer's name in the formatted address." withName: Boolean = false, "Whether to include the customer's company in the formatted address." withCompany: Boolean = true): [String!]! + phoneRequired: Boolean! """ - A comma-separated list of the values for city, province, and country. + The presentment title of the local delivery option. """ - formattedArea: String + presentmentTitle: String """ - A globally-unique ID. + The price of the local delivery option. """ - id: ID! + price: MoneyV2 """ - The last name of the customer. + The title of the local delivery option. """ - lastName: String + title: String! +} +""" +Custom subscription discount. +""" +type SubscriptionManualDiscount { """ - The latitude coordinate of the customer address. + Entitled line items used to apply the subscription discount on. """ - latitude: Float + entitledLines: SubscriptionDiscountEntitledLines! """ - The longitude coordinate of the customer address. + The unique ID. """ - longitude: Float + id: ID! """ - The full name of the customer, based on firstName and lastName. + The maximum number of times the subscription discount will be applied on orders. """ - name: String + recurringCycleLimit: Int """ - A unique phone number for the customer. + The reason that the discount on the subscription draft is rejected. + """ + rejectionReason: SubscriptionDiscountRejectionReason - Formatted using E.164 standard. For example, _+16135551111_. """ - phone: String + Type of line the discount applies on. + """ + targetType: DiscountTargetType! """ - The region of the address, such as the province, state, or district. + The title associated with the subscription discount. """ - province: String + title: String """ - The alphanumeric code for the region. + The type of the subscription discount. + """ + type: DiscountType! - For example, ON. """ - provinceCode: String + The number of times the discount was applied. + """ + usageCount: Int! """ - The zip or postal code of the address. + The value of the subscription discount. """ - zip: String + value: SubscriptionDiscountValue! } """ -An auto-generated type for paginating through multiple MailingAddresses. +An auto-generated type for paginating through multiple SubscriptionManualDiscounts. """ -type MailingAddressConnection { +type SubscriptionManualDiscountConnection { """ - A list of edges. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - edges: [MailingAddressEdge!]! + edges: [SubscriptionManualDiscountEdge!]! """ - A list of the nodes contained in MailingAddressEdge. + A list of nodes that are contained in SubscriptionManualDiscountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - nodes: [MailingAddress!]! + nodes: [SubscriptionManualDiscount!]! """ - Information to aid in pagination. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ pageInfo: PageInfo! } """ -An auto-generated type which holds one MailingAddress and a cursor during pagination. +An auto-generated type which holds one SubscriptionManualDiscount and a cursor during pagination. """ -type MailingAddressEdge { +type SubscriptionManualDiscountEdge { """ - A cursor for use in pagination. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ cursor: String! """ - The item at the end of MailingAddressEdge. + The item at the end of SubscriptionManualDiscountEdge. """ - node: MailingAddress! + node: SubscriptionManualDiscount! } """ -The input fields for creating or updating a [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress). Accepts standard address components including street address, city, province, country, and postal code, along with customer name and contact information. - -Used by the [`customerAddressCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressCreate) and [`customerAddressUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressUpdate) mutations, and as part of [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) for cart delivery preferences. +The input fields for the subscription lines the discount applies on. """ -input MailingAddressInput { +input SubscriptionManualDiscountEntitledLinesInput { """ - The first line of the address. Typically the street address or PO Box number. + Specify whether the subscription discount will apply on all subscription lines. """ - address1: String + all: Boolean """ - The second line of the address. Typically the number of the apartment, suite, or unit. + The ID of the lines to add to or remove from the subscription discount. """ - address2: String + lines: SubscriptionManualDiscountLinesInput +} +""" +The input fields for the fixed amount value of the discount and distribution on the lines. +""" +input SubscriptionManualDiscountFixedAmountInput { """ - The name of the city, district, village, or town. + Fixed amount value. """ - city: String + amount: Float """ - The name of the customer's company or organization. + Whether the amount is intended per line item or once per subscription. """ - company: String + appliesOnEachItem: Boolean +} +""" +The input fields for a subscription discount on a contract. +""" +input SubscriptionManualDiscountInput { """ - The name of the country. + The title associated with the subscription discount. """ - country: String + title: String """ - The first name of the customer. + Percentage or fixed amount value of the discount. """ - firstName: String + value: SubscriptionManualDiscountValueInput """ - The last name of the customer. + The maximum number of times the subscription discount will be applied on orders. """ - lastName: String + recurringCycleLimit: Int """ - A unique phone number for the customer. + Entitled line items used to apply the subscription discount on. + """ + entitledLines: SubscriptionManualDiscountEntitledLinesInput +} - Formatted using E.164 standard. For example, _+16135551111_. +""" +The input fields for line items that the discount refers to. +""" +input SubscriptionManualDiscountLinesInput { """ - phone: String + The ID of the lines to add to the subscription discount. + """ + add: [ID!] """ - The region of the address, such as the province, state, or district. + The ID of the lines to remove from the subscription discount. """ - province: String + remove: [ID!] +} +""" +The input fields for the discount value and its distribution. +""" +input SubscriptionManualDiscountValueInput { """ - The zip or postal code of the address. + The percentage value of the discount. Value must be between 0 - 100. """ - zip: String + percentage: Int + + """ + Fixed amount input in the currency defined by the subscription. + """ + fixedAmount: SubscriptionManualDiscountFixedAmountInput } """ -A discount created manually by a merchant, as opposed to [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) or [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and includes a title, optional description, and the discount value as either a fixed amount or percentage. +A pickup option to deliver a subscription contract. """ -type ManualDiscountApplication implements DiscountApplication { +type SubscriptionPickupOption { """ - The method by which the discount's value is allocated to its entitled items. + The code of the pickup option. """ - allocationMethod: DiscountApplicationAllocationMethod! + code: String! """ - The description of the application. + The description of the pickup option. """ description: String """ - Which lines of targetType that the discount is allocated over. + The pickup location. """ - targetSelection: DiscountApplicationTargetSelection! + location: Location! """ - The type of line that the discount is applicable towards. + Whether a phone number is required for the pickup option. """ - targetType: DiscountApplicationTargetType! + phoneRequired: Boolean! """ - The title of the application. + The estimated amount of time it takes for the pickup to be ready. For example, "Usually ready in 24 hours".). """ - title: String! + pickupTime: String! """ - The value of the discount application. + The presentment title of the pickup option. """ - value: PricingValue! -} - -""" -An audience of buyers that a merchant targets for sales. Audiences can include geographic regions, company locations, and retail locations. Markets enable localized shopping experiences with region-specific languages, currencies, and pricing. + presentmentTitle: String -Each market has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Market#field-Market.fields.handle) for identification and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). Learn more about [building localized experiences with Shopify Markets](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets). -""" -type Market implements HasMetafields & Node { """ - A human-readable unique string for the market automatically generated from its title. + The price of the pickup option. """ - handle: String! + price: MoneyV2 """ - A globally-unique ID. + The title of the pickup option. """ - id: ID! + title: String! +} +""" +Represents a Subscription Line Pricing Policy. +""" +type SubscriptionPricingPolicy { """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The base price per unit for the subscription line in the contract's currency. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + basePrice: MoneyV2! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The adjustments per cycle for the subscription line. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + cycleDiscounts: [SubscriptionCyclePriceAdjustment!]! } """ -A common set of fields for media content associated with [products](https://shopify.dev/docs/api/storefront/current/objects/Product). Implementations include [`MediaImage`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage) for Shopify-hosted images, [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) for Shopify-hosted videos, [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) for videos hosted on platforms like YouTube or Vimeo, and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d) for 3D models. - -Each implementation shares fields for alt text, content type, and preview images, while adding type-specific fields like embed URLs for external videos or source files for 3D models. +The input fields for an array containing all pricing changes for each billing cycle. """ -interface Media { +input SubscriptionPricingPolicyCycleDiscountsInput { """ - A word or phrase to share the nature or contents of a media. + The cycle after which the pricing policy applies. """ - alt: String + afterCycle: Int! """ - A globally-unique ID. + The price adjustment type. """ - id: ID! + adjustmentType: SellingPlanPricingPolicyAdjustmentType! """ - The media content type. + The price adjustment value. """ - mediaContentType: MediaContentType! + adjustmentValue: SellingPlanPricingPolicyValueInput! + + """ + The computed price after the adjustments are applied. + """ + computedPrice: Decimal! +} +""" +The input fields for expected price changes of the subscription line over time. +""" +input SubscriptionPricingPolicyInput { """ - The presentation for a media. + The base price per unit for the subscription line in the contract's currency. """ - presentation: MediaPresentation + basePrice: Decimal! """ - The preview image for the media. + An array containing all pricing changes for each billing cycle. """ - previewImage: Image + cycleDiscounts: [SubscriptionPricingPolicyCycleDiscountsInput!]! } """ -An auto-generated type for paginating through multiple Media. +A shipping option to deliver a subscription contract. """ -type MediaConnection { +type SubscriptionShippingOption { """ - A list of edges. + The carrier service that's providing this shipping option. + This field isn't currently supported and returns null. """ - edges: [MediaEdge!]! + carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") """ - A list of the nodes contained in MediaEdge. + The code of the shipping option. """ - nodes: [Media!]! + code: String! """ - Information to aid in pagination. + The description of the shipping option. """ - pageInfo: PageInfo! -} + description: String -""" -The possible content types for a media object. -""" -enum MediaContentType { """ - An externally hosted video. + If a phone number is required for the shipping option. """ - EXTERNAL_VIDEO + phoneRequired: Boolean """ - A Shopify hosted image. + The presentment title of the shipping option. """ - IMAGE + presentmentTitle: String """ - A 3d model. + The price of the shipping option. """ - MODEL_3D + price: MoneyV2 """ - A Shopify hosted video. + The title of the shipping option. """ - VIDEO + title: String! } """ -An auto-generated type which holds one Media and a cursor during pagination. +The result of the query to fetch shipping options for the subscription contract. """ -type MediaEdge { +union SubscriptionShippingOptionResult = SubscriptionShippingOptionResultFailure|SubscriptionShippingOptionResultSuccess + +""" +Failure determining available shipping options for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultFailure { """ - A cursor for use in pagination. + Failure reason. """ - cursor: String! + message: String +} +""" +A shipping option for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultSuccess { """ - The item at the end of MediaEdge. + Available shipping options. """ - node: Media! + shippingOptions: [SubscriptionShippingOption!]! } """ -Host for a Media Resource. +A suggested transaction. Suggested transaction are usually used in the context of refunds +and exchanges. """ -enum MediaHost { +type SuggestedOrderTransaction { """ - Host for YouTube embedded videos. + The masked account number associated with the payment method. """ - YOUTUBE + accountNumber: String """ - Host for Vimeo embedded videos. + The amount of the transaction. """ - VIMEO -} + amount: Money! @deprecated(reason: "Use `amountSet` instead.") -""" -An image hosted on Shopify's content delivery network (CDN). Used for product images, brand logos, and other visual content across the storefront. + """ + The amount and currency of the suggested order transaction in shop and presentment currencies. + """ + amountSet: MoneyBag! -The [`image`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage#field-MediaImage.fields.image) field provides the actual image data with transformation options. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface alongside other media types like [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d). -""" -type MediaImage implements Media & Node { """ - A word or phrase to share the nature or contents of a media. + The human-readable payment gateway name suggested to process the transaction. """ - alt: String + formattedGateway: String """ - A globally-unique ID. + The suggested payment gateway used to process the transaction. """ - id: ID! + gateway: String """ - The image for the media. + Specifies the kind of the suggested order transaction. """ - image: Image + kind: SuggestedOrderTransactionKind! """ - The media content type. + Specifies the available amount to refund on the gateway. Only available within SuggestedRefund. """ - mediaContentType: MediaContentType! + maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableSet` instead.") """ - The presentation for a media. + Specifies the available amount to refund on the gateway in shop and presentment currencies. Only available within SuggestedRefund. """ - presentation: MediaPresentation + maximumRefundableSet: MoneyBag """ - The preview image for the media. + The associated parent transaction, for example the authorization of a capture. + """ + parentTransaction: OrderTransaction + + """ + The associated payment details related to the transaction. """ - previewImage: Image + paymentDetails: PaymentDetails } """ -A media presentation. +Specifies the kind of the suggested order transaction. """ -type MediaPresentation implements Node { +enum SuggestedOrderTransactionKind { """ - A JSON object representing a presentation view. + A suggested refund transaction for an order. """ - asJson("The format to transform the settings." format: MediaPresentationFormat!): JSON + SUGGESTED_REFUND +} +""" +The input fields for an exchange line item. +""" +input SuggestedOutcomeExchangeLineItemInput { """ - A globally-unique ID. + The ID of the exchange line item. """ - id: ID! @deprecated(reason: "MediaPresentation IDs are being deprecated. Access the data directly via the asJson field on the Media type.") + id: ID! + + """ + The quantity of the exchange line item. + """ + quantity: Int! } """ -The possible formats for a media presentation. +The input fields for a return line item. """ -enum MediaPresentationFormat { +input SuggestedOutcomeReturnLineItemInput { """ - A model viewer presentation. + The ID of the return line item. """ - MODEL_VIEWER + id: ID! """ - A media image presentation. + The quantity of the return line item. """ - IMAGE + quantity: Int! } """ -A navigation structure for building store [menus](https://help.shopify.com/manual/online-store/menus-and-links). Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can be nested to create multi-level navigation hierarchies. +A refund amount that Shopify suggests based on the items, duties, and shipping costs that customers return. Provides a breakdown of all monetary values including subtotals, taxes, discounts, and the maximum refundable amount. -Menu items can link to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. Use the [`menu`](https://shopify.dev/docs/api/storefront/current/queries/menu) query to retrieve a menu by its handle. +The suggested refund includes [`RefundLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem) objects to refund with their quantities and restock instructions, [`RefundDuty`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundDuty) objects for duty reimbursements, and [`ShippingRefund`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingRefund) for shipping cost refunds. Provides [`SuggestedOrderTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SuggestedOrderTransaction) objects and the [`SuggestedRefundMethod`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/SuggestedRefundMethod) interface to process the refund through the appropriate gateways. + +Learn more about [previewing and refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties#step-3-preview-a-refund-that-includes-duties). """ -type Menu implements Node { +type SuggestedRefund { """ - The menu's handle. + The total monetary value to be refunded. """ - handle: String! + amount: Money! @deprecated(reason: "Use `amountSet` instead.") """ - A globally-unique ID. + The total monetary value to be refunded in shop and presentment currencies. """ - id: ID! + amountSet: MoneyBag! """ - The menu's child items. + The sum of all the discounted prices of the line items being refunded. """ - items: [MenuItem!]! + discountedSubtotalSet: MoneyBag! """ - The count of items on the menu. + The total monetary value available to refund. """ - itemsCount: Int! + maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") """ - The menu's title. + The total monetary value available to refund in shop and presentment currencies. """ - title: String! -} + maximumRefundableSet: MoneyBag! -""" -A navigation link within a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu). Each item has a title, URL, and can link to store resources like [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + """ + A list of duties to be refunded from the order. + """ + refundDuties: [RefundDuty!]! -Menu items support nested hierarchies through the [`items`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.items) field, enabling dropdown or multi-level navigation structures. The [`tags`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.tags) field filters results when the item links to a collection specifically. -""" -type MenuItem implements Node { """ - A globally-unique ID. + A list of line items to be refunded, along with restock instructions. """ - id: ID! + refundLineItems: [RefundLineItem!]! """ - The menu item's child items. + The shipping costs to be refunded from the order. """ - items: [MenuItem!]! + shipping: ShippingRefund! """ - The linked resource. + The sum of all the prices of the line items being refunded. """ - resource: MenuItemResource + subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") """ - The ID of the linked resource. + The sum of all the prices of the line items being refunded in shop and presentment currencies. """ - resourceId: ID + subtotalSet: MoneyBag! """ - The menu item's tags to filter a collection. + A list of suggested refund methods. """ - tags: [String!]! + suggestedRefundMethods: [SuggestedRefundMethod!]! """ - The menu item's title. + A list of suggested order transactions. """ - title: String! + suggestedTransactions: [SuggestedOrderTransaction!]! """ - The menu item's type. + The total cart discount amount that was applied to all line items in this refund. """ - type: MenuItemType! + totalCartDiscountAmountSet: MoneyBag! """ - The menu item's URL. + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. """ - url: URL + totalDutiesSet: MoneyBag! + + """ + The sum of the taxes being refunded from the order in shop and presentment currencies. The value must be positive. + """ + totalTaxSet: MoneyBag! + + """ + The sum of the taxes being refunded from the order. The value must be positive. + """ + totalTaxes: Money! @deprecated(reason: "Use `totalTaxSet` instead.") } """ -The list of possible resources a `MenuItem` can reference. +Generic attributes of a suggested refund method. """ -union MenuItemResource = Article|Blog|Collection|Metaobject|Page|Product|ShopPolicy +interface SuggestedRefundMethod { + """ + The suggested amount to refund in shop and presentment currencies. + """ + amount: MoneyBag! + + """ + The maximum available amount to refund in shop and presentment currencies. + """ + maximumRefundable: MoneyBag! +} """ -A menu item type. +Represents a return financial outcome suggested by Shopify based on the items being reimbursed. You can then use the suggested outcome object to generate an actual refund or invoice for the return. """ -enum MenuItemType { +type SuggestedReturnFinancialOutcome { """ - A frontpage link. + The sum of all the discounted prices of the line items being refunded. """ - FRONTPAGE + discountedSubtotal: MoneyBag! """ - A collection link. + The financial transfer details for the return outcome. """ - COLLECTION + financialTransfer: ReturnOutcomeFinancialTransfer """ - A collection link. + The total monetary value available to refund in shop and presentment currencies. """ - COLLECTIONS + maximumRefundable: MoneyBag! """ - A product link. + A list of duties to be refunded from the order. """ - PRODUCT + refundDuties: [RefundDuty!]! """ - A catalog link. + The shipping costs to be refunded from the order. """ - CATALOG + shipping: ShippingRefund! """ - A page link. + The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. """ - PAGE + totalAdditionalFees: MoneyBag! """ - A blog link. + The total cart discount amount that was applied to all line items in this refund. """ - BLOG + totalCartDiscountAmount: MoneyBag! """ - An article link. + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. """ - ARTICLE + totalDuties: MoneyBag! """ - A search link. + The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. """ - SEARCH + totalTax: MoneyBag! +} +""" +Represents a return refund suggested by Shopify based on the items being reimbursed. You can then use the suggested refund object to generate an actual refund for the return. +""" +type SuggestedReturnRefund { """ - A shop policy link. + The total monetary value to be refunded in shop and presentment currencies. """ - SHOP_POLICY + amount: MoneyBag! """ - An http link. + The sum of all the discounted prices of the line items being refunded. """ - HTTP + discountedSubtotal: MoneyBag! """ - A metaobject page link. + The total monetary value available to refund in shop and presentment currencies. """ - METAOBJECT + maximumRefundable: MoneyBag! """ - A customer account page link. + A list of duties to be refunded from the order. """ - CUSTOMER_ACCOUNT_PAGE -} - -""" -A [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) that a buyer intends to purchase at checkout. -""" -union Merchandise = ProductVariant + refundDuties: [RefundDuty!]! -""" -[Custom metadata](https://shopify.dev/docs/apps/build/metafields) attached to a Shopify resource such as a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), or [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Each metafield is identified by a namespace and key, and stores a value with an associated type. + """ + The shipping costs to be refunded from the order. + """ + shipping: ShippingRefund! -Values are always stored as strings, but the [`type`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.type) field indicates how to interpret the data. When a metafield's type is a resource reference, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) or [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) fields to retrieve the linked objects. Access metafields on any resource that implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface. -""" -type Metafield implements Node { """ - The date and time when the storefront metafield was created. + The sum of all the prices of the line items being refunded in shop and presentment currencies. """ - createdAt: DateTime! + subtotal: MoneyBag! """ - The description of a metafield. + A list of suggested order transactions. """ - description: String + suggestedTransactions: [SuggestedOrderTransaction!]! """ - A globally-unique ID. + The total cart discount amount that was applied to all line items in this refund. """ - id: ID! + totalCartDiscountAmount: MoneyBag! """ - The unique identifier for the metafield within its namespace. + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. """ - key: String! + totalDuties: MoneyBag! """ - Whether the metafield's type is a list type. Returns `true` for types like `list.color` or `list.single_line_text_field`. + The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. """ - list: Boolean! + totalTax: MoneyBag! +} +""" +The suggested values for a refund to store credit. +""" +type SuggestedStoreCreditRefund implements SuggestedRefundMethod { """ - The container for a group of metafields that the metafield is associated with. + The suggested amount to refund in shop and presentment currencies. """ - namespace: String! + amount: MoneyBag! """ - The type of resource that the metafield is attached to. + The suggested expiration date for the store credit. """ - parentResource: MetafieldParentResource! + expiresAt: DateTime """ - Returns a reference object if the metafield's type is a resource reference. + The maximum available amount to refund in shop and presentment currencies. """ - reference: MetafieldReference + maximumRefundable: MoneyBag! +} +""" +Return type for `tagsAdd` mutation. +""" +type TagsAddPayload { """ - A list of reference objects if the metafield's type is a resource reference list. + The object that was updated. """ - references("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): MetafieldReferenceConnection + node: Node """ - The type name of the metafield. - Refer to the list of [supported types](https://shopify.dev/apps/metafields/definitions/types). + The list of errors that occurred from executing the mutation. """ - type: String! + userErrors: [UserError!]! +} +""" +Return type for `tagsRemove` mutation. +""" +type TagsRemovePayload { """ - The date and time when the metafield was last updated. + The object that was updated. """ - updatedAt: DateTime! + node: Node """ - The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + The list of errors that occurred from executing the mutation. """ - value: String! + userErrors: [UserError!]! } """ -Possible error codes that can be returned by `MetafieldDeleteUserError`. +Tax app configuration of a merchant. """ -enum MetafieldDeleteErrorCode { +type TaxAppConfiguration { """ - The owner ID is invalid. + State of the tax app configuration. """ - INVALID_OWNER + state: TaxPartnerState! +} +""" +Return type for `taxAppConfigure` mutation. +""" +type TaxAppConfigurePayload { """ - Metafield not found. + The updated tax app configuration. """ - METAFIELD_DOES_NOT_EXIST + taxAppConfiguration: TaxAppConfiguration """ - The current app is not authorized to perform this action. + The list of errors that occurred from executing the mutation. """ - APP_NOT_AUTHORIZED + userErrors: [TaxAppConfigureUserError!]! } """ -An error that occurs during the execution of cart metafield deletion. +An error that occurs during the execution of `TaxAppConfigure`. """ -type MetafieldDeleteUserError implements DisplayableError { +type TaxAppConfigureUserError implements DisplayableError { """ The error code. """ - code: MetafieldDeleteErrorCode + code: TaxAppConfigureUserErrorCode """ The path to the input field that caused the error. @@ -8987,1339 +92619,1437 @@ type MetafieldDeleteUserError implements DisplayableError { } """ -Filters products in a collection by matching a specific metafield value. Used by the [`ProductFilter`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter) input's `productMetafield` and `variantMetafield` fields. - -Supports the following metafield types: `number_integer`, `number_decimal`, `single_line_text_field`, and `boolean`. +Possible error codes that can be returned by `TaxAppConfigureUserError`. """ -input MetafieldFilter { +enum TaxAppConfigureUserErrorCode { """ - The namespace of the metafield to filter on. + Unable to find the tax partner record. """ - namespace: String! + TAX_PARTNER_NOT_FOUND """ - The key of the metafield to filter on. + Unable to update tax partner state. """ - key: String! + TAX_PARTNER_STATE_UPDATE_FAILED """ - The value of the metafield. + Unable to update already active tax partner. """ - value: String! + TAX_PARTNER_ALREADY_ACTIVE } """ -The Shopify resource that owns a metafield. Returned by the `Metafield` object's [`parentResource`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.parentResource) field, enabling traversal from a metafield back to the resource it's attached to. -""" -union MetafieldParentResource = Article|Blog|Cart|Collection|Company|CompanyLocation|Customer|Location|Market|Order|Page|Product|ProductVariant|SellingPlan|Shop - -""" -The resource that a metafield points to when its type is a resource reference. Metafields can store references to other Shopify resources, and this union provides access to the actual referenced object. - -Returned by the `Metafield` object's [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) field for single references or the [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) field for lists. -""" -union MetafieldReference = Article|Collection|GenericFile|MediaImage|Metaobject|Model3d|Page|Product|ProductVariant|Video - -""" -An auto-generated type for paginating through multiple MetafieldReferences. +Available customer tax exemptions. """ -type MetafieldReferenceConnection { +enum TaxExemption { """ - A list of edges. + This customer is exempt from specific taxes for holding a valid STATUS_CARD_EXEMPTION in Canada. """ - edges: [MetafieldReferenceEdge!]! + CA_STATUS_CARD_EXEMPTION """ - A list of the nodes contained in MetafieldReferenceEdge. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in British Columbia. """ - nodes: [MetafieldReference!]! + CA_BC_RESELLER_EXEMPTION """ - Information to aid in pagination. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Manitoba. """ - pageInfo: PageInfo! -} + CA_MB_RESELLER_EXEMPTION -""" -An auto-generated type which holds one MetafieldReference and a cursor during pagination. -""" -type MetafieldReferenceEdge { """ - A cursor for use in pagination. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Saskatchewan. """ - cursor: String! + CA_SK_RESELLER_EXEMPTION """ - The item at the end of MetafieldReferenceEdge. + This customer is exempt from VPT (Vapour Products Tax) for holding a valid VPT_RESELLER_EXEMPTION in Saskatchewan. """ - node: MetafieldReference! -} + CA_SK_VPT_RESELLER_EXEMPTION -""" -An error that occurs during the execution of `MetafieldsSet`. -""" -type MetafieldsSetUserError implements DisplayableError { """ - The error code. + This customer is exempt from VPT (Vapour Products Tax) for holding a valid VPT_RESELLER_EXEMPTION in Newfoundland and Labrador. """ - code: MetafieldsSetUserErrorCode + CA_NL_VPT_RESELLER_EXEMPTION """ - The index of the array element that's causing the error. + This customer is exempt from specific taxes for holding a valid DIPLOMAT_EXEMPTION in Canada. """ - elementIndex: Int + CA_DIPLOMAT_EXEMPTION """ - The path to the input field that caused the error. + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. """ - field: [String!] + CA_BC_COMMERCIAL_FISHERY_EXEMPTION """ - The error message. + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. """ - message: String! -} + CA_MB_COMMERCIAL_FISHERY_EXEMPTION -""" -Possible error codes that can be returned by `MetafieldsSetUserError`. -""" -enum MetafieldsSetUserErrorCode { """ - The input value is blank. + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Nova Scotia. """ - BLANK + CA_NS_COMMERCIAL_FISHERY_EXEMPTION """ - The input value isn't included in the list. + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Prince Edward Island. """ - INCLUSION + CA_PE_COMMERCIAL_FISHERY_EXEMPTION """ - The input value should be less than or equal to the maximum value allowed. + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Saskatchewan. """ - LESS_THAN_OR_EQUAL_TO + CA_SK_COMMERCIAL_FISHERY_EXEMPTION """ - The input value needs to be blank. + This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. """ - PRESENT + CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION """ - The input value is too short. + This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in Saskatchewan. """ - TOO_SHORT + CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION """ - The input value is too long. + This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in British Columbia. """ - TOO_LONG + CA_BC_SUB_CONTRACTOR_EXEMPTION """ - The owner ID is invalid. + This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in Saskatchewan. """ - INVALID_OWNER + CA_SK_SUB_CONTRACTOR_EXEMPTION """ - The value is invalid for metafield type or for definition options. + This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in British Columbia. """ - INVALID_VALUE + CA_BC_CONTRACTOR_EXEMPTION """ - The type is invalid. + This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in Saskatchewan. """ - INVALID_TYPE + CA_SK_CONTRACTOR_EXEMPTION """ - The current app is not authorized to perform this action. + This customer is exempt from specific taxes for holding a valid PURCHASE_EXEMPTION in Ontario. """ - APP_NOT_AUTHORIZED -} - -""" -An instance of [custom structured data](https://shopify.dev/docs/apps/build/metaobjects) defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections. + CA_ON_PURCHASE_EXEMPTION -Each metaobject contains fields that match the types and validation rules specified in its definition. [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the `renderable` capability, then the [`seo`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.seo) field provides SEO metadata. If it has the `online_store` capability, then the [`onlineStoreUrl`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.onlineStoreUrl) field returns the public URL. -""" -type Metaobject implements Node & OnlineStorePublishable { """ - Accesses a field of the object by key. + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Manitoba. """ - field("The key of the field." key: String!): MetaobjectField + CA_MB_FARMER_EXEMPTION """ - All object fields with defined values. - Omitted object keys can be assumed null, and no guarantees are made about field order. + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Nova Scotia. """ - fields: [MetaobjectField!]! + CA_NS_FARMER_EXEMPTION """ - The unique handle of the metaobject. Useful as a custom ID. + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Saskatchewan. """ - handle: String! + CA_SK_FARMER_EXEMPTION """ - A globally-unique ID. + This customer is exempt from VAT for purchases within the EU that is shipping from outside of customer's country, as well as purchases from the EU to the UK. """ - id: ID! + EU_REVERSE_CHARGE_EXEMPTION_RULE """ - The URL used for viewing the metaobject on the shop's Online Store. Returns `null` if the metaobject definition doesn't have the `online_store` capability. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alabama. """ - onlineStoreUrl: URL + US_AL_RESELLER_EXEMPTION """ - The metaobject's SEO information. Returns `null` if the metaobject definition - doesn't have the `renderable` capability. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alaska. """ - seo: MetaobjectSEO + US_AK_RESELLER_EXEMPTION """ - The type of the metaobject. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arizona. """ - type: String! + US_AZ_RESELLER_EXEMPTION """ - The date and time when the metaobject was last updated. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arkansas. """ - updatedAt: DateTime! -} + US_AR_RESELLER_EXEMPTION -""" -An auto-generated type for paginating through multiple Metaobjects. -""" -type MetaobjectConnection { """ - A list of edges. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in California. """ - edges: [MetaobjectEdge!]! + US_CA_RESELLER_EXEMPTION """ - A list of the nodes contained in MetaobjectEdge. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Colorado. """ - nodes: [Metaobject!]! + US_CO_RESELLER_EXEMPTION """ - Information to aid in pagination. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Connecticut. """ - pageInfo: PageInfo! -} + US_CT_RESELLER_EXEMPTION -""" -An auto-generated type which holds one Metaobject and a cursor during pagination. -""" -type MetaobjectEdge { """ - A cursor for use in pagination. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Delaware. """ - cursor: String! + US_DE_RESELLER_EXEMPTION """ - The item at the end of MetaobjectEdge. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Florida. """ - node: Metaobject! -} + US_FL_RESELLER_EXEMPTION -""" -The value of a field within a [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject). For fields that reference other resources, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/MetaobjectField#field-MetaobjectField.fields.reference) field for single references or [`references`](https://shopify.dev/docs/api/storefront/current/objects/MetaobjectField#field-MetaobjectField.fields.references) for lists. -""" -type MetaobjectField { """ - The field key. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Georgia. """ - key: String! + US_GA_RESELLER_EXEMPTION """ - A referenced object if the field type is a resource reference. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Hawaii. """ - reference: MetafieldReference + US_HI_RESELLER_EXEMPTION """ - A list of referenced objects if the field type is a resource reference list. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Idaho. """ - references("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): MetafieldReferenceConnection + US_ID_RESELLER_EXEMPTION """ - The type name of the field. - See the list of [supported types](https://shopify.dev/apps/metafields/definitions/types). + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Illinois. """ - type: String! + US_IL_RESELLER_EXEMPTION """ - The field value. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Indiana. """ - value: String -} + US_IN_RESELLER_EXEMPTION -""" -The input fields used to retrieve a metaobject by handle. -""" -input MetaobjectHandleInput { """ - The handle of the metaobject. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Iowa. """ - handle: String! + US_IA_RESELLER_EXEMPTION """ - The type of the metaobject. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kansas. """ - type: String! -} + US_KS_RESELLER_EXEMPTION -""" -SEO information for a metaobject. -""" -type MetaobjectSEO { """ - The meta description. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kentucky. """ - description: MetaobjectField + US_KY_RESELLER_EXEMPTION """ - The SEO title. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Louisiana. """ - title: MetaobjectField -} + US_LA_RESELLER_EXEMPTION -""" -Represents a Shopify hosted 3D model. -""" -type Model3d implements Media & Node { """ - A word or phrase to share the nature or contents of a media. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maine. """ - alt: String + US_ME_RESELLER_EXEMPTION """ - A globally-unique ID. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maryland. """ - id: ID! + US_MD_RESELLER_EXEMPTION """ - The media content type. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Massachusetts. """ - mediaContentType: MediaContentType! + US_MA_RESELLER_EXEMPTION """ - The presentation for a media. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Michigan. """ - presentation: MediaPresentation + US_MI_RESELLER_EXEMPTION """ - The preview image for the media. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Minnesota. """ - previewImage: Image + US_MN_RESELLER_EXEMPTION """ - The sources for a 3d model. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Mississippi. """ - sources: [Model3dSource!]! -} + US_MS_RESELLER_EXEMPTION -""" -Represents a source for a Shopify hosted 3d model. -""" -type Model3dSource { """ - The filesize of the 3d model. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Missouri. """ - filesize: Int! + US_MO_RESELLER_EXEMPTION """ - The format of the 3d model. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Montana. """ - format: String! + US_MT_RESELLER_EXEMPTION """ - The MIME type of the 3d model. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nebraska. """ - mimeType: String! + US_NE_RESELLER_EXEMPTION """ - The URL of the 3d model. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nevada. """ - url: String! -} + US_NV_RESELLER_EXEMPTION -""" -The input fields for a monetary value with currency. -""" -input MoneyInput { """ - Decimal money amount. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Hampshire. """ - amount: Decimal! + US_NH_RESELLER_EXEMPTION """ - Currency of the money. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Jersey. """ - currencyCode: CurrencyCode! -} + US_NJ_RESELLER_EXEMPTION -""" -A precise monetary value with its associated currency. Combines a decimal amount with a three-letter [`CurrencyCode`](https://shopify.dev/docs/api/storefront/current/enums/CurrencyCode) to express prices, costs, and other financial values. For example, 12.99 USD. -""" -type MoneyV2 { """ - Decimal money amount. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Mexico. """ - amount: Decimal! + US_NM_RESELLER_EXEMPTION """ - Currency of the money. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New York. """ - currencyCode: CurrencyCode! -} + US_NY_RESELLER_EXEMPTION -""" -The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. -""" -type Mutation { """ - Updates the attributes on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Attributes are custom key-value pairs that store additional information, such as gift messages, special instructions, or order notes. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Carolina. """ - cartAttributesUpdate("An array of key-value pairs that contains additional information about the cart.\n\nThe input must not contain more than `250` values." attributes: [AttributeInput!]!, "The ID of the cart." cartId: ID!): CartAttributesUpdatePayload + US_NC_RESELLER_EXEMPTION """ - Updates the billing address on the cart. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Dakota. """ - cartBillingAddressUpdate("The ID of the cart." cartId: ID!, "The customer's billing address." billingAddress: MailingAddressInput): CartBillingAddressUpdatePayload + US_ND_RESELLER_EXEMPTION """ - Updates the buyer identity on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart), including contact information, location, and checkout preferences. The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. - - Use this mutation to associate a logged-in customer via access token, set a B2B company location, or configure checkout preferences like delivery method. Preferences prefill checkout fields but don't sync back to the cart if overwritten at checkout. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Ohio. """ - cartBuyerIdentityUpdate("The ID of the cart." cartId: ID!, "The customer associated with the cart. Used to determine\n[international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing).\nBuyer identity should match the customer's shipping address.\n" buyerIdentity: CartBuyerIdentityInput!): CartBuyerIdentityUpdatePayload + US_OH_RESELLER_EXEMPTION """ - Creates a clone of the specified cart with all personally identifiable information removed. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oklahoma. """ - cartClone("The ID of the cart to clone." cartId: ID!): CartClonePayload + US_OK_RESELLER_EXEMPTION """ - Creates a new [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) for a buyer session. You can optionally initialize the cart with merchandise lines, discount codes, gift card codes, buyer identity for international pricing, and custom attributes. - - The returned cart includes a `checkoutUrl` that directs the buyer to complete their purchase. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oregon. """ - cartCreate("The fields used to create a cart." input: CartInput): CartCreatePayload + US_OR_RESELLER_EXEMPTION """ - Adds delivery addresses to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). A cart can have up to 20 delivery addresses. One address can be marked as selected for checkout, and addresses can optionally be marked as one-time use so they aren't saved to the customer's account. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Pennsylvania. """ - cartDeliveryAddressesAdd("The ID of the cart." cartId: ID!, "A list of delivery addresses to add to the cart.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressInput!]!): CartDeliveryAddressesAddPayload + US_PA_RESELLER_EXEMPTION """ - Removes delivery addresses from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by their IDs, allowing batch removal in a single request. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Rhode Island. """ - cartDeliveryAddressesRemove("The ID of the cart." cartId: ID!, "A list of delivery addresses by handle to remove from the cart.\n\nThe input must not contain more than `250` values." addressIds: [ID!]!): CartDeliveryAddressesRemovePayload + US_RI_RESELLER_EXEMPTION """ - Replaces all delivery addresses on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) with a new set of addresses in a single operation. Unlike [`cartDeliveryAddressesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartDeliveryAddressesUpdate), which modifies existing addresses, this mutation removes all current addresses and sets the provided list as the new delivery addresses. - - One address can be marked as selected, and each address can be flagged for one-time use or configured with a specific validation strategy. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Carolina. """ - cartDeliveryAddressesReplace("The ID of the cart." cartId: ID!, "A list of delivery addresses to replace on the cart.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressInput!]!): CartDeliveryAddressesReplacePayload + US_SC_RESELLER_EXEMPTION """ - Updates one or more delivery addresses on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Each address can be modified to change its details, set it as the pre-selected address for checkout, or mark it for one-time use so it isn't saved to the customer's account. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Dakota. """ - cartDeliveryAddressesUpdate("The ID of the cart." cartId: ID!, "The delivery addresses to update.\n\nThe input must not contain more than `250` values." addresses: [CartSelectableAddressUpdateInput!]!): CartDeliveryAddressesUpdatePayload + US_SD_RESELLER_EXEMPTION """ - Updates the discount codes applied to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). This mutation replaces all existing discount codes with the provided list, so pass an empty array to remove all codes. Discount codes are case-insensitive. - - After updating, check each [`CartDiscountCode`](https://shopify.dev/docs/api/storefront/current/objects/CartDiscountCode) in the cart's [`discountCodes`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.discountCodes) field to see whether the code is applicable to the cart's current contents. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Tennessee. """ - cartDiscountCodesUpdate("The ID of the cart." cartId: ID!, "The case-insensitive discount codes that the customer added at checkout.\n\nThe input must not contain more than `250` values." discountCodes: [String!]!): CartDiscountCodesUpdatePayload + US_TN_RESELLER_EXEMPTION """ - Adds gift card codes to a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) without replacing any codes already applied. Gift card codes are case-insensitive. - - To replace all gift card codes instead of adding to them, use [`cartGiftCardCodesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartGiftCardCodesUpdate). + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Texas. """ - cartGiftCardCodesAdd("The ID of the cart." cartId: ID!, "The case-insensitive gift card codes to add.\n\nThe input must not contain more than `250` values." giftCardCodes: [String!]!): CartGiftCardCodesAddPayload + US_TX_RESELLER_EXEMPTION """ - Removes gift cards from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) using their IDs. You can retrieve the IDs of applied gift cards from the cart's [`appliedGiftCards`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.appliedGiftCards) field. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Utah. """ - cartGiftCardCodesRemove("The ID of the cart." cartId: ID!, "The gift cards to remove.\n\nThe input must not contain more than `250` values." appliedGiftCardIds: [ID!]!): CartGiftCardCodesRemovePayload + US_UT_RESELLER_EXEMPTION """ - Updates the gift card codes applied to the cart. Unlike [`cartGiftCardCodesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartGiftCardCodesAdd), which adds codes without replacing existing ones, this mutation sets the gift card codes for the cart. Gift card codes are case-insensitive. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Vermont. """ - cartGiftCardCodesUpdate("The ID of the cart." cartId: ID!, "The case-insensitive gift card codes.\n\nThe input must not contain more than `250` values." giftCardCodes: [String!]!): CartGiftCardCodesUpdatePayload + US_VT_RESELLER_EXEMPTION """ - Adds one or more merchandise lines to an existing [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Each line specifies the [product variant](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to purchase. Quantity defaults to `1` if not provided. - - You can add up to 250 lines in a single request. Use [`CartLineInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineInput) to configure each line's merchandise, quantity, selling plan, custom attributes, and any parent relationships for nested line items such as warranties or add-ons. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Virginia. """ - cartLinesAdd("The ID of the cart." cartId: ID!, "A list of merchandise lines to add to the cart.\n\nThe input must not contain more than `250` values." lines: [CartLineInput!]!): CartLinesAddPayload + US_VA_RESELLER_EXEMPTION """ - Removes one or more merchandise lines from a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Accepts up to 250 line IDs per request. Returns the updated cart along with any errors or warnings. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington. """ - cartLinesRemove("The ID of the cart." cartId: ID!, "The merchandise line IDs to remove.\n\nThe input must not contain more than `250` values." lineIds: [ID!]!): CartLinesRemovePayload + US_WA_RESELLER_EXEMPTION """ - Updates one or more merchandise lines on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). You can modify the quantity, swap the merchandise, change custom attributes, or update the selling plan for each line. You can update a maximum of 250 lines per request. - - Omitting the [`attributes`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate#arguments-lines.fields.attributes) field or setting it to null preserves existing line attributes. Pass an empty array to clear all attributes from a line. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in West Virginia. """ - cartLinesUpdate("The ID of the cart." cartId: ID!, "The merchandise lines to update.\n\nThe input must not contain more than `250` values." lines: [CartLineUpdateInput!]!): CartLinesUpdatePayload + US_WV_RESELLER_EXEMPTION """ - Deletes a cart metafield. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wisconsin. + """ + US_WI_RESELLER_EXEMPTION - > Note: - > This mutation won't trigger [Shopify Functions](https://shopify.dev/docs/api/functions). The changes won't be available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions. """ - cartMetafieldDelete("The input fields used to delete a cart metafield." input: CartMetafieldDeleteInput!): CartMetafieldDeletePayload + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. + """ + US_WY_RESELLER_EXEMPTION """ - Sets [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) values on a cart, creating new metafields or updating existing ones. Accepts up to 25 metafields per request. + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington DC. + """ + US_DC_RESELLER_EXEMPTION +} - Cart metafields can automatically copy to order metafields when an order is created, if there's a matching order metafield definition with the [cart to order copyable](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. +""" +A tax applied to a [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) or [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine). Includes the tax amount, rate, title, and whether the channel that submitted the tax is liable for remitting it. - > Note: - > This mutation doesn't trigger [Shopify Functions](https://shopify.dev/docs/api/functions). Changes aren't available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions. +The tax amount in both shop and presentment currencies after applying discounts. Includes information about the tax rate, whether the channel is liable for remitting the tax, and other tax-related details. +""" +type TaxLine { + """ + Whether the channel that submitted the tax line is liable for remitting. A value of null indicates unknown liability for this tax line. """ - cartMetafieldsSet("The list of Cart metafield values to set. Maximum of 25.\n\nThe input must not contain more than `250` values." metafields: [CartMetafieldsSetInput!]!): CartMetafieldsSetPayload + channelLiable: Boolean """ - Updates the note on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). The note is a text field that stores additional information, such as a personalized message from the buyer or special instructions for the order. + The amount of tax, in shop currency, after discounts and before returns. """ - cartNoteUpdate("The ID of the cart." cartId: ID!, "The note on the cart." note: String!): CartNoteUpdatePayload + price: Money! @deprecated(reason: "Use `priceSet` instead.") """ - Update the customer's payment method that will be used to checkout. + The amount of tax, in shop and presentment currencies, after discounts and before returns. """ - cartPaymentUpdate("The ID of the cart." cartId: ID!, "The payment information for the cart that will be used at checkout." payment: CartPaymentInput!): CartPaymentUpdatePayload + priceSet: MoneyBag! """ - Prepare the cart for cart checkout completion. + The proportion of the line item price that the tax represents as a decimal. """ - cartPrepareForCompletion("The ID of the cart." cartId: ID!): CartPrepareForCompletionPayload + rate: Float """ - Removes personally identifiable information from the cart. + The proportion of the line item price that the tax represents as a percentage. """ - cartRemovePersonalData("The ID of the cart." cartId: ID!): CartRemovePersonalDataPayload + ratePercentage: Float """ - Updates the selected delivery option for one or more [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) objects in a cart. Each delivery group represents items shipping to a specific address and offers multiple delivery options with different costs and methods. - - Use this mutation when a customer chooses their preferred shipping method during checkout. The [`deliveryOptionHandle`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectedDeliveryOptionInput#field-CartSelectedDeliveryOptionInput.fields.deliveryOptionHandle) identifies which [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) to select for each delivery group. + The source of the tax. """ - cartSelectedDeliveryOptionsUpdate("The ID of the cart." cartId: ID!, "The selected delivery options.\n\nThe input must not contain more than `250` values." selectedDeliveryOptions: [CartSelectedDeliveryOptionInput!]!): CartSelectedDeliveryOptionsUpdatePayload + source: String """ - Submit the cart for checkout completion. + The name of the tax. """ - cartSubmitForCompletion("The ID of the cart." cartId: ID!, "The attemptToken is used to guarantee an idempotent result.\nIf more than one call uses the same attemptToken within a short period of time, only one will be accepted.\n" attemptToken: String!): CartSubmitForCompletionPayload + title: String! +} +""" +State of the tax app configuration. +""" +enum TaxPartnerState { + """ + App is not configured. """ - For legacy customer accounts only. + PENDING - Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) using the customer's email and password. The access token is required to read or modify the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) object, such as updating account information or managing addresses. + """ + App is configured, but not used for tax calculations. + """ + READY - The token has an expiration time. Use [`customerAccessTokenRenew`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenRenew) to extend the token before it expires, or create a new token if it's already expired. + """ + App is configured and to be used for tax calculations. + """ + ACTIVE +} - > Caution: - > This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password. +""" +Return type for `taxSummaryCreate` mutation. +""" +type TaxSummaryCreatePayload { + """ + A list of orders that were successfully enqueued to create a tax summary. """ - customerAccessTokenCreate("The fields used to create a customer access token." input: CustomerAccessTokenCreateInput!): CustomerAccessTokenCreatePayload + enqueuedOrders: [Order!] """ - Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) using a [multipass token](https://shopify.dev/docs/api/multipass) instead of email and password. This enables single sign-on for customers who authenticate through an external system. + The list of errors that occurred from executing the mutation. + """ + userErrors: [TaxSummaryCreateUserError!]! +} - If the customer doesn't exist in Shopify, then a new customer record is created automatically. If the customer exists but the record is disabled, then the customer record is re-enabled. +""" +An error that occurs during the execution of `TaxSummaryCreate`. +""" +type TaxSummaryCreateUserError implements DisplayableError { + """ + The error code. + """ + code: TaxSummaryCreateUserErrorCode - > Caution: - > Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance. """ - customerAccessTokenCreateWithMultipass("A valid [multipass token](https://shopify.dev/api/multipass) to be authenticated." multipassToken: String!): CustomerAccessTokenCreateWithMultipassPayload + The path to the input field that caused the error. + """ + field: [String!] """ - Permanently destroys a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken). Use this mutation when a customer explicitly signs out or when you need to revoke the token. Use [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) to generate a new token with the customer's credentials. + The error message. + """ + message: String! +} - > Caution: - > This action is irreversible. The customer needs to sign in again to obtain a new access token. +""" +Possible error codes that can be returned by `TaxSummaryCreateUserError`. +""" +enum TaxSummaryCreateUserErrorCode { + """ + No order was not found. """ - customerAccessTokenDelete("The access token used to identify the customer." customerAccessToken: String!): CustomerAccessTokenDeletePayload + ORDER_NOT_FOUND """ - Extends the validity of a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) before it expires. The renewed token maintains authenticated access to customer operations. + There was an error during enqueueing of the tax summary creation job(s). + """ + GENERAL_ERROR +} - Renewal must happen before the token's [`expiresAt`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken#field-CustomerAccessToken.fields.expiresAt) time. If a token has already expired, then use [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) to generate a new token with the customer's credentials. +""" +Represents Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) tree. Provides categories that you can filter by search criteria or hierarchical relationships. - > Caution: - > Store access tokens securely. Never store tokens in plain text or insecure locations, and avoid exposing them in URLs or logs. +You can search categories globally, retrieve children of a specific category, find siblings, or get descendants. When you specify no filter arguments, you get all top-level categories in the taxonomy. +""" +type Taxonomy { + """ + Returns the categories of the product taxonomy based on the arguments provided. + If a `search` argument is provided, then all categories that match the search query globally are returned. + If a `children_of` argument is provided, then all children of the specified category are returned. + If a `siblings_of` argument is provided, then all siblings of the specified category are returned. + If a `decendents_of` argument is provided, then all descendents of the specified category are returned. + If no arguments are provided, then all the top-level categories of the taxonomy are returned. """ - customerAccessTokenRenew("The access token used to identify the customer." customerAccessToken: String!): CustomerAccessTokenRenewPayload + categories("Searches the product taxonomy for matching categories." search: String, "The ID of the category associated with the child categories to return." childrenOf: ID, "The ID of the category associated with the sibling categories to return." siblingsOf: ID, "The ID of the category associated with the descendant categories to return." descendantsOf: ID, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): TaxonomyCategoryConnection! +} +""" +A Shopify product taxonomy attribute. +""" +type TaxonomyAttribute implements Node { + """ + A globally-unique ID. """ - Activates a customer account using an activation token received from the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. The customer sets their password during activation and receives a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for authenticated access. + id: ID! +} - For a simpler approach that doesn't require parsing the activation URL, use [`customerActivateByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerActivateByUrl) instead. +""" +A product category within Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). Provides hierarchical organization through parent-child relationships, with each category tracking its ancestors, children, and level in the taxonomy tree. - > Caution: - > This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token. +Categories include attributes specific to their product type and navigation properties like whether they're root, leaf, or archived categories. The taxonomy enables consistent product classification across Shopify and integrated marketplaces. +""" +type TaxonomyCategory implements Node { """ - customerActivate("Specifies the customer to activate." id: ID!, "The fields used to activate a customer." input: CustomerActivateInput!): CustomerActivatePayload - + The IDs of the category's ancestor categories. """ - Activates a customer account using the full activation URL from the [`customerCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerCreate) mutation. This approach simplifies activation by accepting the complete URL directly, eliminating the need to parse it for the customer ID and activation token. Returns a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for authenticating subsequent requests. + ancestorIds: [ID!]! - > Caution: - > Store the returned access token securely. It grants access to the customer's account data. """ - customerActivateByUrl("The customer activation URL." activationUrl: URL!, "A new password set during activation." password: String!): CustomerActivateByUrlPayload - + The attributes of the taxonomy category. """ - Creates a new [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Use the customer's [access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressCreate#arguments-customerAccessToken) to identify them. Successful creation returns the new address. + attributes("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): TaxonomyCategoryAttributeConnection! - Each customer can have multiple addresses. """ - customerAddressCreate("The access token used to identify the customer." customerAccessToken: String!, "The customer mailing address to create." address: MailingAddressInput!): CustomerAddressCreatePayload - + The IDs of the category's child categories. """ - Permanently deletes a specific [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a valid [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressDelete#arguments-customerAccessToken) to authenticate the request. + childrenIds: [ID!]! - > Caution: - > This action is irreversible. You can't recover the deleted address. """ - customerAddressDelete("Specifies the address to delete." id: ID!, "The access token used to identify the customer." customerAccessToken: String!): CustomerAddressDeletePayload - + The full name of the taxonomy category. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. """ - Updates an existing [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerAddressUpdate#arguments-customerAccessToken) to identify the customer, an ID to specify which address to modify, and an [`address`](https://shopify.dev/docs/api/storefront/current/input-objects/MailingAddressInput) with the updated fields. + fullName: String! - Successful update returns the updated [`MailingAddress`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress). """ - customerAddressUpdate("The access token used to identify the customer." customerAccessToken: String!, "Specifies the customer address to update." id: ID!, "The customer’s mailing address." address: MailingAddressInput!): CustomerAddressUpdatePayload - + The globally-unique ID of the TaxonomyCategory. """ - Creates a new [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) account with the provided contact information and login credentials. The customer can then sign in for things such as accessing their account, viewing order history, and managing saved addresses. + id: ID! - > Caution: - > This mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code. """ - customerCreate("The fields used to create a new customer." input: CustomerCreateInput!): CustomerCreatePayload + Whether the category is archived. The default value is `false`. + """ + isArchived: Boolean! """ - Updates the default address of an existing [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/current/mutations/customerDefaultAddressUpdate#arguments-customerAccessToken) to identify the customer and an address ID to specify which address to set as the new default. + Whether the category is a leaf category. A leaf category doesn't have any subcategories beneath it. For example, in Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Treadmills, Dog Treadmills is a leaf category. The value is `true` when there are no `childrenIds` specified. """ - customerDefaultAddressUpdate("The access token used to identify the customer." customerAccessToken: String!, "ID of the address to set as the new default for the customer." addressId: ID!): CustomerDefaultAddressUpdatePayload + isLeaf: Boolean! """ - Sends a reset password email to the customer. The email contains a reset password URL and token that you can pass to the [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerResetByUrl) or [`customerReset`](https://shopify.dev/docs/api/storefront/current/mutations/customerReset) mutation to reset the customer's password. - - This mutation is throttled by IP. With private access, you can provide a [`Shopify-Storefront-Buyer-IP` header](https://shopify.dev/docs/api/usage/authentication#optional-ip-header) instead of the request IP. The header is case-sensitive. - - > Caution: - > Ensure the value provided to `Shopify-Storefront-Buyer-IP` is trusted. Unthrottled access to this mutation presents a security risk. + Whether the category is a root category. A root category is at the top level of the category hierarchy and doesn't have a parent category. For example, Animals & Pet Supplies. The value is `true` when there's no `parentId` specified. """ - customerRecover("The email address of the customer to recover." email: String!): CustomerRecoverPayload + isRoot: Boolean! """ - Resets a customer's password using the reset token from a password recovery email. On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for immediate authentication. - - Use the [`customerRecover`](https://shopify.dev/docs/api/storefront/current/mutations/customerRecover) mutation to send the password recovery email that provides the reset token. Alternatively, use [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/current/mutations/customerResetByUrl) if you have the full reset URL instead of the customer ID and token. - - > Caution: - > This mutation handles sensitive customer credentials. Validate password requirements on the client before submission. + The level of the category in the taxonomy tree. Levels indicate the depth of the category from the root. For example, in Animals & Pet Supplies > Pet Supplies > Dog Supplies, Animals & Pet Supplies is at level 1, Animals & Pet Supplies > Pet Supplies is at level 2, and Animals & Pet Supplies > Pet Supplies > Dog Supplies is at level 3. """ - customerReset("Specifies the customer to reset." id: ID!, "The fields used to reset a customer’s password." input: CustomerResetInput!): CustomerResetPayload + level: Int! """ - Resets a customer's password using the reset URL from a password recovery email. The reset URL is generated by the [`customerRecover`](https://shopify.dev/docs/api/storefront/current/mutations/customerRecover) mutation. - - On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) for immediate authentication. - - > Caution: - > This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code. + The name of the taxonomy category. For example, Dog Beds. """ - customerResetByUrl("The customer's reset password url." resetUrl: URL!, "New password that will be set as part of the reset password process." password: String!): CustomerResetByUrlPayload + name: String! """ - Updates a [customer's](https://shopify.dev/docs/api/storefront/current/objects/Customer) personal information such as name, password, and marketing preferences. Requires a valid [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/current/objects/CustomerAccessToken) to authenticate the customer making the update. + The ID of the category's parent category. + """ + parentId: ID +} - If the customer's password is updated, then all previous access tokens become invalid. The mutation returns a new access token in the payload to maintain the customer's session. +""" +A product taxonomy attribute interface. +""" +union TaxonomyCategoryAttribute = TaxonomyAttribute|TaxonomyChoiceListAttribute|TaxonomyMeasurementAttribute - > Caution: - > Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out. +""" +An auto-generated type for paginating through multiple TaxonomyCategoryAttributes. +""" +type TaxonomyCategoryAttributeConnection { """ - customerUpdate("The access token used to identify the customer." customerAccessToken: String!, "The customer object input." customer: CustomerUpdateInput!): CustomerUpdatePayload - + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - Creates a [Shop Pay payment request session](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestSession) for processing payments. The session includes a checkout URL where customers complete their purchase and a token for subsequent operations like submitting the payment. - - The `sourceIdentifier` must be unique across all orders to ensure accurate reconciliation. + edges: [TaxonomyCategoryAttributeEdge!]! - For a complete integration guide including the JavaScript SDK setup and checkout flow, refer to the [Shop Component API documentation](https://shopify.dev/docs/api/commerce-components/pay). For implementation steps, see the [development journey guide](https://shopify.dev/docs/api/commerce-components/pay/development-journey). For common error scenarios, see the [troubleshooting guide](https://shopify.dev/docs/api/commerce-components/pay/troubleshooting-guide). """ - shopPayPaymentRequestSessionCreate("A unique identifier for the payment request session." sourceIdentifier: String!, "A payment request object." paymentRequest: ShopPayPaymentRequestInput!): ShopPayPaymentRequestSessionCreatePayload + A list of nodes that are contained in TaxonomyCategoryAttributeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [TaxonomyCategoryAttribute!]! """ - Finalizes a [Shop Pay payment request session](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestSession). Call this mutation after creating a session with [`shopPayPaymentRequestSessionCreate`](https://shopify.dev/docs/api/storefront/current/mutations/shopPayPaymentRequestSessionCreate). + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} - The [`idempotencyKey`](https://shopify.dev/docs/api/storefront/current/mutations/shopPayPaymentRequestSessionSubmit#arguments-idempotencyKey) argument ensures the payment transaction occurs only once, preventing duplicate charges. On success, returns a [`ShopPayPaymentRequestReceipt`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayPaymentRequestReceipt) with the processing status and a receipt token. +""" +An auto-generated type which holds one TaxonomyCategoryAttribute and a cursor during pagination. +""" +type TaxonomyCategoryAttributeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! - For a complete integration guide including the JavaScript SDK setup and checkout flow, refer to the [Shop Component API documentation](https://shopify.dev/docs/api/commerce-components/pay). For implementation steps, see the [development journey guide](https://shopify.dev/docs/api/commerce-components/pay/development-journey). For common error scenarios, see the [troubleshooting guide](https://shopify.dev/docs/api/commerce-components/pay/troubleshooting-guide). """ - shopPayPaymentRequestSessionSubmit("A token representing a payment session request." token: String!, "The final payment request object." paymentRequest: ShopPayPaymentRequestInput!, "The idempotency key is used to guarantee an idempotent result." idempotencyKey: String!, "The order name to be used for the order created from the payment request." orderName: String): ShopPayPaymentRequestSessionSubmitPayload + The item at the end of TaxonomyCategoryAttributeEdge. + """ + node: TaxonomyCategoryAttribute! } """ -Enables global object identification following the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). Any type implementing this interface has a globally-unique `id` field and can be fetched directly using the [`node`](https://shopify.dev/docs/api/storefront/current/queries/node) or [`nodes`](https://shopify.dev/docs/api/storefront/current/queries/nodes) queries. +An auto-generated type for paginating through multiple TaxonomyCategories. """ -interface Node { +type TaxonomyCategoryConnection { """ - A globally-unique ID. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - id: ID! + edges: [TaxonomyCategoryEdge!]! + + """ + A list of nodes that are contained in TaxonomyCategoryEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [TaxonomyCategory!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! } """ -Represents a resource that can be published to the Online Store sales channel. +An auto-generated type which holds one TaxonomyCategory and a cursor during pagination. """ -interface OnlineStorePublishable { +type TaxonomyCategoryEdge { """ - The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - onlineStoreUrl: URL + cursor: String! + + """ + The item at the end of TaxonomyCategoryEdge. + """ + node: TaxonomyCategory! } """ -An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. +A Shopify product taxonomy choice list attribute. """ -type Order implements HasMetafields & Node { +type TaxonomyChoiceListAttribute implements Node { """ - The address associated with the payment method. + The unique ID of the TaxonomyAttribute. """ - billingAddress: MailingAddress + id: ID! """ - The reason for the order's cancellation. Returns `null` if the order wasn't canceled. + The name of the product taxonomy attribute. For example, Color. """ - cancelReason: OrderCancelReason + name: String! """ - The date and time when the order was canceled. Returns null if the order wasn't canceled. + A list of values on the choice list attribute. """ - canceledAt: DateTime + values("The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String): TaxonomyValueConnection! +} +""" +A Shopify product taxonomy measurement attribute. +""" +type TaxonomyMeasurementAttribute implements Node { """ - The code of the currency used for the payment. + The unique ID of the TaxonomyAttribute. """ - currencyCode: CurrencyCode! + id: ID! """ - The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes aren't included unless the order is a taxes-included order. + The name of the product taxonomy attribute. For example, Color. """ - currentSubtotalPrice: MoneyV2! + name: String! """ - The total cost of duties for the order, including refunds. + The product taxonomy attribute options. """ - currentTotalDuties: MoneyV2 + options: [Attribute!]! +} +""" +Represents a Shopify product taxonomy value. +""" +type TaxonomyValue implements Node { """ - The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. + A globally-unique ID. """ - currentTotalPrice: MoneyV2! + id: ID! """ - The total cost of shipping, excluding shipping lines that have been refunded or removed. Taxes aren't included unless the order is a taxes-included order. + The name of the product taxonomy value. For example, Red. """ - currentTotalShippingPrice: MoneyV2! + name: String! +} +""" +An auto-generated type for paginating through multiple TaxonomyValues. +""" +type TaxonomyValueConnection { """ - The total of all taxes applied to the order, excluding taxes for returned line items. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - currentTotalTax: MoneyV2! + edges: [TaxonomyValueEdge!]! """ - A list of the custom attributes added to the order. For example, whether an order is a customer's first. + A list of nodes that are contained in TaxonomyValueEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - customAttributes: [Attribute!]! + nodes: [TaxonomyValue!]! """ - The locale code in which this specific order happened. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - customerLocale: String + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one TaxonomyValue and a cursor during pagination. +""" +type TaxonomyValueEdge { """ - The unique URL that the customer can use to access the order. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - customerUrl: URL + cursor: String! """ - Discounts that have been applied on the order. + The item at the end of TaxonomyValueEdge. """ - discountApplications("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): DiscountApplicationConnection! + node: TaxonomyValue! +} +""" +A TenderTransaction represents a transaction with financial impact on a shop's balance sheet. A tender transaction always +represents actual money movement between a buyer and a shop. TenderTransactions can be used instead of OrderTransactions +for reconciling a shop's cash flow. A TenderTransaction is immutable once created. +""" +type TenderTransaction implements Node { """ - Whether the order has had any edits applied or not. + The amount and currency of the tender transaction. """ - edited: Boolean! + amount: MoneyV2! """ - The customer's email address. + A globally-unique ID. """ - email: String + id: ID! """ - The financial status of the order. + The order that's related to the tender transaction. This value is null if the order has been deleted. """ - financialStatus: OrderFinancialStatus + order: Order """ - The fulfillment status for the order. + Information about the payment method used for the transaction. """ - fulfillmentStatus: OrderFulfillmentStatus! + paymentMethod: String """ - A globally-unique ID. + Date and time when the transaction was processed. """ - id: ID! + processedAt: DateTime """ - List of the order’s line items. + The remote gateway reference associated with the tender transaction. """ - lineItems("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): OrderLineItemConnection! + remoteReference: String """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Whether the transaction is a test transaction. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + test: Boolean! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + Information about the payment instrument used for the transaction. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + transactionDetails: TenderTransactionDetails """ - Unique identifier for the order that appears on the order. - For example, _#1000_ or _Store1001. + The staff member who performed the transaction. """ - name: String! + user: StaffMember +} +""" +An auto-generated type for paginating through multiple TenderTransactions. +""" +type TenderTransactionConnection { """ - A unique numeric identifier for the order for use by shop owner and customer. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - orderNumber: Int! + edges: [TenderTransactionEdge!]! """ - The total cost of duties charged at checkout. + A list of nodes that are contained in TenderTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - originalTotalDuties: MoneyV2 + nodes: [TenderTransaction!]! """ - The total price of the order before any applied edits. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - originalTotalPrice: MoneyV2! + pageInfo: PageInfo! +} +""" +Information about the credit card used for this transaction. +""" +type TenderTransactionCreditCardDetails { """ - The customer's phone number for receiving SMS notifications. + The name of the company that issued the customer's credit card. Example: `Visa`. """ - phone: String + creditCardCompany: String """ - The date and time when the order was imported. - This value can be set to dates in the past when importing from other systems. - If no value is provided, it will be auto-generated based on current date and time. + The customer's credit card number, with all digits except the last 4 redacted. Example: `•••• •••• •••• 1234` """ - processedAt: DateTime! + creditCardNumber: String +} + +""" +Information about the payment instrument used for this transaction. +""" +union TenderTransactionDetails = TenderTransactionCreditCardDetails +""" +An auto-generated type which holds one TenderTransaction and a cursor during pagination. +""" +type TenderTransactionEdge { """ - The address to where the order will be shipped. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - shippingAddress: MailingAddress + cursor: String! """ - The discounts that have been allocated onto the shipping line by discount applications. + The item at the end of TenderTransactionEdge. """ - shippingDiscountAllocations: [DiscountAllocation!]! + node: TenderTransaction! +} +""" +Return type for `themeCreate` mutation. +""" +type ThemeCreatePayload { """ - The unique URL for the order's status page. + The theme that was created. """ - statusUrl: URL! + theme: OnlineStoreTheme """ - Price of the order before shipping and taxes. + The list of errors that occurred from executing the mutation. """ - subtotalPrice: MoneyV2 + userErrors: [ThemeCreateUserError!]! +} +""" +An error that occurs during the execution of `ThemeCreate`. +""" +type ThemeCreateUserError implements DisplayableError { """ - Price of the order before duties, shipping and taxes. + The error code. """ - subtotalPriceV2: MoneyV2 @deprecated(reason: "Use `subtotalPrice` instead.") + code: ThemeCreateUserErrorCode """ - List of the order’s successful fulfillments. + The path to the input field that caused the error. """ - successfulFulfillments("Truncate the array result to this size." first: Int): [Fulfillment!] + field: [String!] """ - The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). + The error message. """ - totalPrice: MoneyV2! + message: String! +} +""" +Possible error codes that can be returned by `ThemeCreateUserError`. +""" +enum ThemeCreateUserErrorCode { """ - The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). + Must be a zip file. """ - totalPriceV2: MoneyV2! @deprecated(reason: "Use `totalPrice` instead.") + INVALID_ZIP """ - The total amount that has been refunded. + Zip is empty. """ - totalRefunded: MoneyV2! + ZIP_IS_EMPTY """ - The total amount that has been refunded. + May not be used to fetch a file bigger + than 50MB. """ - totalRefundedV2: MoneyV2! @deprecated(reason: "Use `totalRefunded` instead.") + ZIP_TOO_LARGE """ - The total cost of shipping. + Theme creation is not allowed for your shop's plan. """ - totalShippingPrice: MoneyV2! + THEME_CREATION_NOT_ALLOWED_FOR_THEME_LIMITED_PLAN """ - The total cost of shipping. + Invalid theme role for theme creation. """ - totalShippingPriceV2: MoneyV2! @deprecated(reason: "Use `totalShippingPrice` instead.") + INVALID_THEME_ROLE_FOR_THEME_CREATION +} +""" +Return type for `themeDelete` mutation. +""" +type ThemeDeletePayload { """ - The total cost of taxes. + The ID of the deleted theme. """ - totalTax: MoneyV2 + deletedThemeId: ID """ - The total cost of taxes. + The list of errors that occurred from executing the mutation. """ - totalTaxV2: MoneyV2 @deprecated(reason: "Use `totalTax` instead.") + userErrors: [ThemeDeleteUserError!]! } """ -Represents the reason for the order's cancellation. +An error that occurs during the execution of `ThemeDelete`. """ -enum OrderCancelReason { +type ThemeDeleteUserError implements DisplayableError { """ - The customer wanted to cancel the order. + The error code. """ - CUSTOMER + code: ThemeDeleteUserErrorCode """ - Payment was declined. + The path to the input field that caused the error. """ - DECLINED + field: [String!] """ - The order was fraudulent. + The error message. """ - FRAUD + message: String! +} +""" +Possible error codes that can be returned by `ThemeDeleteUserError`. +""" +enum ThemeDeleteUserErrorCode { """ - There was insufficient inventory. + The record with the ID used as the input value couldn't be found. """ - INVENTORY + NOT_FOUND +} +""" +Return type for `themeDuplicate` mutation. +""" +type ThemeDuplicatePayload { """ - Staff made an error. + The newly duplicated theme. """ - STAFF + newTheme: OnlineStoreTheme """ - The order was canceled for an unlisted reason. + The list of errors that occurred from executing the mutation. """ - OTHER + userErrors: [ThemeDuplicateUserError!]! } """ -An auto-generated type for paginating through multiple Orders. +An error that occurs during the execution of `ThemeDuplicate`. """ -type OrderConnection { +type ThemeDuplicateUserError implements DisplayableError { """ - A list of edges. + The error code. """ - edges: [OrderEdge!]! + code: ThemeDuplicateUserErrorCode """ - A list of the nodes contained in OrderEdge. + The path to the input field that caused the error. """ - nodes: [Order!]! + field: [String!] """ - Information to aid in pagination. + The error message. """ - pageInfo: PageInfo! + message: String! +} +""" +Possible error codes that can be returned by `ThemeDuplicateUserError`. +""" +enum ThemeDuplicateUserErrorCode { """ - The total count of Orders. + The record with the ID used as the input value couldn't be found. """ - totalCount: UnsignedInt64! + NOT_FOUND } """ -An auto-generated type which holds one Order and a cursor during pagination. +The input fields for the file copy. """ -type OrderEdge { +input ThemeFilesCopyFileInput { """ - A cursor for use in pagination. + The new file where the content is copied to. """ - cursor: String! + dstFilename: String! """ - The item at the end of OrderEdge. + The source file to copy from. """ - node: Order! + srcFilename: String! } """ -Represents the order's current financial status. +Return type for `themeFilesCopy` mutation. """ -enum OrderFinancialStatus { +type ThemeFilesCopyPayload { """ - Displayed as **Pending**. + The resulting theme files. """ - PENDING + copiedThemeFiles: [OnlineStoreThemeFileOperationResult!] """ - Displayed as **Authorized**. + The list of errors that occurred from executing the mutation. """ - AUTHORIZED + userErrors: [OnlineStoreThemeFilesUserErrors!]! +} +""" +Return type for `themeFilesDelete` mutation. +""" +type ThemeFilesDeletePayload { """ - Displayed as **Partially paid**. + The resulting theme files. """ - PARTIALLY_PAID + deletedThemeFiles: [OnlineStoreThemeFileOperationResult!] """ - Displayed as **Partially refunded**. + The list of errors that occurred from executing the mutation. """ - PARTIALLY_REFUNDED + userErrors: [OnlineStoreThemeFilesUserErrors!]! +} +""" +Return type for `themeFilesUpsert` mutation. +""" +type ThemeFilesUpsertPayload { """ - Displayed as **Voided**. + The theme files write job triggered by the mutation. """ - VOIDED + job: Job """ - Displayed as **Paid**. + The resulting theme files. """ - PAID + upsertedThemeFiles: [OnlineStoreThemeFileOperationResult!] """ - Displayed as **Refunded**. + The list of errors that occurred from executing the mutation. """ - REFUNDED + userErrors: [OnlineStoreThemeFilesUserErrors!]! } """ -The aggregated fulfillment status of an [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order), summarizing the state of all line items. Used for display purposes. - -Statuses range from unfulfilled to fully fulfilled, with intermediate states such as in progress and on hold. - -Learn more about [order statuses](https://help.shopify.com/manual/fulfillment/managing-orders/order-status). +Return type for `themePublish` mutation. """ -enum OrderFulfillmentStatus { - """ - Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. - """ - UNFULFILLED - +type ThemePublishPayload { """ - Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. + The theme that was published. """ - PARTIALLY_FULFILLED + theme: OnlineStoreTheme """ - Displayed as **Fulfilled**. All of the items in the order have been fulfilled. + The list of errors that occurred from executing the mutation. """ - FULFILLED + userErrors: [ThemePublishUserError!]! +} +""" +An error that occurs during the execution of `ThemePublish`. +""" +type ThemePublishUserError implements DisplayableError { """ - Displayed as **Restocked**. All of the items in the order have been restocked. Replaced by "UNFULFILLED" status. + The error code. """ - RESTOCKED + code: ThemePublishUserErrorCode """ - Displayed as **Pending fulfillment**. A request for fulfillment of some items awaits a response from the fulfillment service. Replaced by "IN_PROGRESS" status. + The path to the input field that caused the error. """ - PENDING_FULFILLMENT + field: [String!] """ - Displayed as **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. + The error message. """ - OPEN + message: String! +} +""" +Possible error codes that can be returned by `ThemePublishUserError`. +""" +enum ThemePublishUserErrorCode { """ - Displayed as **In progress**. Some of the items in the order have been fulfilled, or a request for fulfillment has been sent to the fulfillment service. + The record with the ID used as the input value couldn't be found. """ - IN_PROGRESS + NOT_FOUND """ - Displayed as **On hold**. All of the unfulfilled items in this order are on hold. + Theme publishing is not available during install. """ - ON_HOLD + CANNOT_PUBLISH_THEME_DURING_INSTALL """ - Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. + Theme publishing is not allowed on this plan. """ - SCHEDULED + THEME_PUBLISH_NOT_AVAILABLE_FOR_THEME_LIMITED_PLAN } """ -Represents a single line in an order. There is one line item for each distinct product variant. +The role of the theme. """ -type OrderLineItem { +enum ThemeRole { """ - The number of entries associated to the line item minus the items that have been removed. + The currently published theme. There can only be one main theme at any time. """ - currentQuantity: Int! + MAIN """ - List of custom attributes associated to the line item. + The theme is currently not published. It can be transitioned to the main role if it is published by the merchant. """ - customAttributes: [Attribute!]! + UNPUBLISHED """ - The discounts that have been allocated onto the order line item by discount applications. + The theme is installed as a trial from the Shopify Theme Store. It can be customized using the theme editor, but access to the code editor and the ability to publish the theme are restricted until it is purchased. """ - discountAllocations: [DiscountAllocation!]! + DEMO """ - The total price of the line item, including discounts, and displayed in the presentment currency. + The theme is automatically created by the CLI for previewing purposes when in a development session. """ - discountedTotalPrice: MoneyV2! + DEVELOPMENT """ - The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it's displayed in the presentment currency. + The theme is archived if a merchant changes their plan and exceeds the maximum number of themes allowed. Archived themes can be downloaded by merchant, but can not be customized or published until the plan is upgraded. """ - originalTotalPrice: MoneyV2! + ARCHIVED """ - The number of products variants associated to the line item. + The theme is locked if it is identified as unlicensed. Customization and publishing are restricted until the merchant resolves the licensing issue. """ - quantity: Int! + LOCKED """ - The title of the product combined with title of the variant. + The currently published theme that is only accessible to a mobile client. """ - title: String! + MOBILE @deprecated(reason: "The feature for this role has been deprecated.") +} +""" +Return type for `themeUpdate` mutation. +""" +type ThemeUpdatePayload { """ - The product variant object associated to the line item. + The theme that was updated. """ - variant: ProductVariant + theme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemeUpdateUserError!]! } """ -An auto-generated type for paginating through multiple OrderLineItems. +An error that occurs during the execution of `ThemeUpdate`. """ -type OrderLineItemConnection { +type ThemeUpdateUserError implements DisplayableError { """ - A list of edges. + The error code. """ - edges: [OrderLineItemEdge!]! + code: ThemeUpdateUserErrorCode """ - A list of the nodes contained in OrderLineItemEdge. + The path to the input field that caused the error. """ - nodes: [OrderLineItem!]! + field: [String!] """ - Information to aid in pagination. + The error message. """ - pageInfo: PageInfo! + message: String! } """ -An auto-generated type which holds one OrderLineItem and a cursor during pagination. +Possible error codes that can be returned by `ThemeUpdateUserError`. """ -type OrderLineItemEdge { +enum ThemeUpdateUserErrorCode { """ - A cursor for use in pagination. + The record with the ID used as the input value couldn't be found. """ - cursor: String! + NOT_FOUND """ - The item at the end of OrderLineItemEdge. + The input value is too long. + """ + TOO_LONG + """ - node: OrderLineItem! + The input value is invalid. + """ + INVALID } """ -The set of valid sort keys for the Order query. +A sale associated with a tip. """ -enum OrderSortKeys { +type TipSale implements Sale { """ - Sort by the `processed_at` value. + The type of order action that the sale represents. """ - PROCESSED_AT + actionType: SaleActionType! """ - Sort by the `total_price` value. + The unique ID for the sale. """ - TOTAL_PRICE + id: ID! """ - Sort by the `id` value. + The line item for the associated sale. """ - ID + lineItem: LineItem! """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The line type assocated with the sale. """ - RELEVANCE -} + lineType: SaleLineType! -""" -A [custom content page](https://help.shopify.com/manual/online-store/add-edit-pages) on a merchant's store. Pages display HTML-formatted content, such as "About Us", contact details, or store policies. + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int -Each page has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Page#field-Page.fields.handle) for URL routing and includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information for search engine optimization. Pages support [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) attachments for storing additional custom data. -""" -type Page implements HasMetafields & Node & OnlineStorePublishable & Trackable { """ - The description of the page, complete with HTML formatting. + All individual taxes associated with the sale. """ - body: HTML! + taxes: [SaleTax!]! """ - Summary of the page body. + The total sale amount after taxes and discounts. """ - bodySummary: String! + totalAmount: MoneyBag! """ - The timestamp of the page creation. + The total discounts allocated to the sale after taxes. """ - createdAt: DateTime! + totalDiscountAmountAfterTaxes: MoneyBag! """ - A human-friendly unique string for the page automatically generated from its title. + The total discounts allocated to the sale before taxes. """ - handle: String! + totalDiscountAmountBeforeTaxes: MoneyBag! """ - A globally-unique ID. + The total amount of taxes for the sale. """ - id: ID! + totalTaxAmount: MoneyBag! +} +""" +Transaction fee related to an order transaction. +""" +type TransactionFee implements Node { """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Amount of the fee. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + amount: MoneyV2! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + Flat rate charge for a transaction. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + flatFee: MoneyV2! """ - The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. + Name of the credit card flat fee. """ - onlineStoreUrl: URL + flatFeeName: String """ - The page's SEO information. + A globally-unique ID. """ - seo: SEO + id: ID! """ - The title of the page. + Percentage charge. """ - title: String! + rate: Decimal! """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + Name of the credit card rate. """ - trackingParameters: String + rateName: String """ - The timestamp of the latest page update. + Tax amount charged on the fee. """ - updatedAt: DateTime! + taxAmount: MoneyV2! + + """ + Name of the type of fee. + """ + type: String! } """ -An auto-generated type for paginating through multiple Pages. +The set of valid sort keys for the Transaction query. """ -type PageConnection { +enum TransactionSortKeys { """ - A list of edges. + Sort by the `created_at` value. """ - edges: [PageEdge!]! + CREATED_AT """ - A list of the nodes contained in PageEdge. + Sort by the `expires_at` value. """ - nodes: [Page!]! + EXPIRES_AT +} +""" +Return type for `transactionVoid` mutation. +""" +type TransactionVoidPayload { """ - Information to aid in pagination. + The created void transaction. """ - pageInfo: PageInfo! + transaction: OrderTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TransactionVoidUserError!]! } """ -An auto-generated type which holds one Page and a cursor during pagination. +An error that occurs during the execution of `TransactionVoid`. """ -type PageEdge { +type TransactionVoidUserError implements DisplayableError { """ - A cursor for use in pagination. + The error code. """ - cursor: String! + code: TransactionVoidUserErrorCode """ - The item at the end of PageEdge. + The path to the input field that caused the error. """ - node: Page! + field: [String!] + + """ + The error message. + """ + message: String! } """ -Returns information about pagination in a connection, in accordance with the -[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). -For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +Possible error codes that can be returned by `TransactionVoidUserError`. """ -type PageInfo { +enum TransactionVoidUserErrorCode { """ - The cursor corresponding to the last node in edges. + Transaction does not exist. """ - endCursor: String + TRANSACTION_NOT_FOUND """ - Whether there are more pages to fetch following the current page. + Transaction must be a successful authorization. """ - hasNextPage: Boolean! + AUTH_NOT_SUCCESSFUL """ - Whether there are any pages prior to the current page. + Transaction must be voidable. """ - hasPreviousPage: Boolean! + AUTH_NOT_VOIDABLE """ - The cursor corresponding to the first node in edges. + A generic error occurred while attempting to void the transaction. """ - startCursor: String + GENERIC_ERROR } """ -The set of valid sort keys for the Page query. +The set of valid sort keys for the Transfer query. """ -enum PageSortKeys { +enum TransferSortKeys { """ - Sort by the `title` value. + Sort by the `created_at` value. """ - TITLE + CREATED_AT """ - Sort by the `updated_at` value. + Sort by the `destination_name` value. """ - UPDATED_AT + DESTINATION_NAME + + """ + Sort by the `expected_shipment_arrival` value. + """ + EXPECTED_SHIPMENT_ARRIVAL """ Sort by the `id` value. @@ -10327,4134 +94057,3719 @@ enum PageSortKeys { ID """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + Sort by the `name` value. """ - RELEVANCE -} + NAME -""" -Type for paginating through multiple sitemap's resources. -""" -type PaginatedSitemapResources { """ - Whether there are more pages to fetch following the current page. + Sort by the `origin_name` value. """ - hasNextPage: Boolean! + ORIGIN_NAME + + """ + Sort by the `source_name` value. + """ + SOURCE_NAME """ - List of sitemap resources for the current page. - Note: The number of items varies between 0 and 250 per page. + Sort by the `status` value. """ - items: [SitemapResourceInterface!]! + STATUS } """ -Settings related to payments. +Translatable content of a resource's field. """ -type PaymentSettings { +type TranslatableContent { """ - List of the card brands which the business entity accepts. + Hash digest representation of the content value. """ - acceptedCardBrands: [CardBrand!]! + digest: String """ - The url pointing to the endpoint to vault credit cards. + The resource field that's being translated. """ - cardVaultUrl: URL! + key: String! """ - The country where the shop is located. When multiple business entities operate within the shop, then this will represent the country of the business entity that's serving the specified buyer context. + Locale of the content. """ - countryCode: CountryCode! + locale: String! """ - The three-letter code for the shop's primary currency. + Type of the translatable content. """ - currencyCode: CurrencyCode! + type: LocalizableContentType! """ - A list of enabled currencies (ISO 4217 format) that the shop accepts. - Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. + Content value. """ - enabledPresentmentCurrencies: [CurrencyCode!]! + value: String +} + +""" +A resource in Shopify that contains fields available for translation into different languages. Accesses the resource's translatable content, existing [`Translation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Translation) objects, and any nested resources that can also be translated. +The [`TranslatableContent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableContent) includes field keys, values, and digest hashes needed when [registering translations](https://shopify.dev/docs/api/admin-graphql/latest/mutations/translationsRegister). + +You can retrieve translations for specific [`Locale`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Locale) and [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) configurations. Each translation includes an `outdated` flag indicating whether the original content has changed since that translation was last updated. + +Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). +""" +type TranslatableResource { """ - The shop’s Shopify Payments account ID. + Nested translatable resources under the current resource. """ - shopifyPaymentsAccountId: String + nestedTranslatableResources("Return only resources of a type." resourceType: TranslatableResourceType, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): TranslatableResourceConnection! """ - List of the digital wallets which the business entity supports. + GID of the resource. """ - supportedDigitalWallets: [DigitalWallet!]! -} + resourceId: ID! -""" -Decides the distribution of results. -""" -enum PredictiveSearchLimitScope { """ - Return results up to limit across all types. + Translatable content. """ - ALL + translatableContent("Filters translatable content by market ID. Use this argument to retrieve translatable content specific to a market." marketId: ID): [TranslatableContent!]! """ - Return results up to limit per type. + Translatable content translations (includes unpublished locales). """ - EACH + translations("Filters translations by locale." locale: String!, "Filters by outdated translations." outdated: Boolean, "Filters translations by market ID. Use this argument to retrieve content specific to a market." marketId: ID): [Translation!]! } """ -Returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query to power type-ahead search experiences. Includes matching [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects, along with query suggestions that help customers refine their search. +An auto-generated type for paginating through multiple TranslatableResources. """ -type PredictiveSearchResult { +type TranslatableResourceConnection { """ - The articles that match the search query. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - articles: [Article!]! + edges: [TranslatableResourceEdge!]! """ - The articles that match the search query. + A list of nodes that are contained in TranslatableResourceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - collections: [Collection!]! + nodes: [TranslatableResource!]! """ - The pages that match the search query. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - pages: [Page!]! + pageInfo: PageInfo! +} +""" +An auto-generated type which holds one TranslatableResource and a cursor during pagination. +""" +type TranslatableResourceEdge { """ - The products that match the search query. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - products: [Product!]! + cursor: String! """ - The query suggestions that are relevant to the search query. + The item at the end of TranslatableResourceEdge. """ - queries: [SearchQuerySuggestion!]! + node: TranslatableResource! } """ -The types of search items to perform predictive search on. +Specifies the type of resources that are translatable. """ -enum PredictiveSearchType { +enum TranslatableResourceType { """ - Returns matching collections. + A blog post. Translatable fields: `title`, `body_html`, `summary_html`, `handle`, `meta_title`, `meta_description`. """ - COLLECTION + ARTICLE """ - Returns matching products. + An article image. Translatable fields: `alt`. """ - PRODUCT + ARTICLE_IMAGE """ - Returns matching pages. + A blog. Translatable fields: `title`, `handle`, `meta_title`, `meta_description`. """ - PAGE + BLOG """ - Returns matching articles. + A product collection. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. """ - ARTICLE + COLLECTION """ - Returns matching query strings. + A collection image. Translatable fields: `alt`. """ - QUERY -} + COLLECTION_IMAGE -""" -The preferred delivery methods such as shipping, local pickup or through pickup points. -""" -enum PreferenceDeliveryMethodType { """ - A delivery method used to send items directly to a buyer’s specified address. + The delivery method definition. For example, "Standard", or "Expedited". Translatable fields: `name`, `description`. """ - SHIPPING + DELIVERY_METHOD_DEFINITION """ - A delivery method used to let buyers receive items directly from a specific location within an area. + An email template. Translatable fields: `title`, `body_html`. """ - PICK_UP + EMAIL_TEMPLATE """ - A delivery method used to let buyers collect purchases at designated locations like parcel lockers. + A filter. Translatable fields: `label`. """ - PICKUP_POINT -} - -""" -A price range for filtering products in a collection. Used by the [`ProductFilter`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter) input's [`price`](https://shopify.dev/docs/api/storefront/current/input-objects/ProductFilter#fields-price) field. + FILTER -> Note: Omitting the [maximum](https://shopify.dev/docs/api/storefront/currents/input-objects/PriceRangeFilter#fields-max) returns all products above the [minimum](https://shopify.dev/docs/api/storefront/current/input-objects/PriceRangeFilter#fields-min). -""" -input PriceRangeFilter { """ - The minimum price in the range. Defaults to zero. + A link to direct users. Translatable fields: `title`. """ - min: Float = 0.0 + LINK """ - The maximum price in the range. Empty indicates no max price. + An image. Translatable fields: `alt`. """ - max: Float -} + MEDIA_IMAGE -""" -A percentage discount value applied to cart items or orders. Returned as part of the [`PricingValue`](https://shopify.dev/docs/api/storefront/current/unions/PricingValue) union on [discount applications](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication), where it represents discounts calculated as a percentage off rather than a [fixed amount](https://shopify.dev/docs/api/storefront/current/objects/MoneyV2). -""" -type PricingPercentageValue { """ - The percentage value of the object. + A category of links. Translatable fields: `title`. """ - percentage: Float! -} - -""" -The price value (fixed or percentage) for a discount application. -""" -union PricingValue = MoneyV2|PricingPercentageValue - -""" -Represents an item listed in a shop's catalog. + MENU -Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections. - -Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). - -Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections). -""" -type Product implements HasMetafields & Node & OnlineStorePublishable & Trackable { """ - A list of variants whose selected options differ with the provided selected options by one, ordered by variant id. - If selected options are not provided, adjacent variants to the first available variant is returned. - - Note that this field returns an array of variants. In most cases, the number of variants in this array will be low. - However, with a low number of options and a high number of values per option, the number of variants returned - here can be high. In such cases, it recommended to avoid using this field. + A Metafield. Translatable fields: `value`. + """ + METAFIELD - This list of variants can be used in combination with the `options` field to build a rich variant picker that - includes variant availability or other variant information. """ - adjacentVariants("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!], "Whether to ignore product options that are not present on the requested product." ignoreUnknownOptions: Boolean = true, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): [ProductVariant!]! + A Metaobject. Translatable fields are determined by the Metaobject type. + """ + METAOBJECT """ - Indicates if at least one product variant is available for sale. + An online store theme. Translatable fields: `dynamic keys based on theme data`. """ - availableForSale: Boolean! + ONLINE_STORE_THEME """ - The category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). + A theme app embed. Translatable fields: `dynamic keys based on theme data`. """ - category: TaxonomyCategory + ONLINE_STORE_THEME_APP_EMBED """ - A list of [collections](/docs/api/storefront/latest/objects/Collection) that include the product. + A theme json template. Translatable fields: `dynamic keys based on theme data`. """ - collections("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): CollectionConnection! + ONLINE_STORE_THEME_JSON_TEMPLATE """ - The [compare-at price range](https://help.shopify.com/manual/products/details/product-pricing/sale-pricing) of the product in the shop's default currency. + Locale file content of an online store theme. Translatable fields: `dynamic keys based on theme data`. """ - compareAtPriceRange: ProductPriceRange! + ONLINE_STORE_THEME_LOCALE_CONTENT """ - The date and time when the product was created. + A theme json section group. Translatable fields: `dynamic keys based on theme data`. """ - createdAt: DateTime! + ONLINE_STORE_THEME_SECTION_GROUP """ - A single-line description of the product, with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed. + A theme setting category. Translatable fields: `dynamic keys based on theme data`. """ - description("Truncates a string after the given length." truncateAt: Int): String! + ONLINE_STORE_THEME_SETTINGS_CATEGORY """ - The description of the product, with - HTML tags. For example, the description might include - bold `` and italic `` text. + Shared static sections of an online store theme. Translatable fields: `dynamic keys based on theme data`. """ - descriptionHtml: HTML! + ONLINE_STORE_THEME_SETTINGS_DATA_SECTIONS """ - An encoded string containing all option value combinations - with a corresponding variant that is currently available for sale. + A packing slip template. Translatable fields: `body`. + """ + PACKING_SLIP_TEMPLATE - Integers represent option and values: - [0,1] represents option_value at array index 0 for the option at array index 0 + """ + A page. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. + """ + PAGE - `:`, `,`, ` ` and `-` are control characters. - `:` indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. - `,` indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. - ` ` indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. - `-` indicates a continuous range of option values. ex: 0 1-3 4 + """ + A payment gateway. Translatable fields: `name`, `message`, `before_payment_instructions`. + """ + PAYMENT_GATEWAY - Decoding process: + """ + An online store product. Translatable fields: `title`, `body_html`, `handle`, `product_type`, `meta_title`, `meta_description`. + """ + PRODUCT - Example options: [Size, Color, Material] - Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] - Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,," + """ + An online store custom product property name. For example, "Size", "Color", or "Material". + Translatable fields: `name`. + """ + PRODUCT_OPTION - Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," - Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," - Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," - Step 4: Map to options + option values to determine existing variants: + """ + The product option value names. For example, "Red", "Blue", and "Green" for a "Color" option. Translatable fields: `name`. + """ + PRODUCT_OPTION_VALUE - [Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), - [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), - [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0). + """ + A selling plan. Translatable fields:`name`, `option1`, `option2`, `option3`, `description`. + """ + SELLING_PLAN """ - encodedVariantAvailability: String + A selling plan group. Translatable fields: `name`, `option1`, `option2`, `option3`. + """ + SELLING_PLAN_GROUP """ - An encoded string containing all option value combinations with a corresponding variant. + A shop. Translatable fields: `meta_title`, `meta_description`. + """ + SHOP - Integers represent option and values: - [0,1] represents option_value at array index 0 for the option at array index 0 + """ + A shop policy. Translatable fields: `body`. + """ + SHOP_POLICY +} - `:`, `,`, ` ` and `-` are control characters. - `:` indicates a new option. ex: 0:1 indicates value 0 for the option in position 1, value 1 for the option in position 2. - `,` indicates the end of a repeated prefix, mulitple consecutive commas indicate the end of multiple repeated prefixes. - ` ` indicates a gap in the sequence of option values. ex: 0 4 indicates option values in position 0 and 4 are present. - `-` indicates a continuous range of option values. ex: 0 1-3 4 +""" +A localized version of a field on a resource. Translations enable merchants to provide content in multiple languages for [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects, [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) objects, and other store resources. - Decoding process: +Each translation specifies the locale, the field being translated (identified by its key), and the translated value. Translations can be market-specific, allowing different content for the same language across different markets, or available globally when no [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) is specified. The `outdated` flag indicates whether the original content has changed since this translation was last updated. - Example options: [Size, Color, Material] - Example values: [[Small, Medium, Large], [Red, Blue], [Cotton, Wool]] - Example encoded string: "0:0:0,1:0-1,,1:0:0-1,1:1,,2:0:1,1:0,," +Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). +""" +type Translation { + """ + On the resource that this translation belongs to, the reference to the value being translated. + """ + key: String! - Step 1: Expand ranges into the numbers they represent: "0:0:0,1:0 1,,1:0:0 1,1:1,,2:0:1,1:0,," - Step 2: Expand repeated prefixes: "0:0:0,0:1:0 1,1:0:0 1,1:1:1,2:0:1,2:1:0," - Step 3: Expand shared prefixes so data is encoded as a string: "0:0:0,0:1:0,0:1:1,1:0:0,1:0:1,1:1:1,2:0:1,2:1:0," - Step 4: Map to options + option values to determine existing variants: + """ + ISO code of the translation locale. + """ + locale: String! - [Small, Red, Cotton] (0:0:0), [Small, Blue, Cotton] (0:1:0), [Small, Blue, Wool] (0:1:1), - [Medium, Red, Cotton] (1:0:0), [Medium, Red, Wool] (1:0:1), [Medium, Blue, Wool] (1:1:1), - [Large, Red, Wool] (2:0:1), [Large, Blue, Cotton] (2:1:0). + """ + The market that the translation is specific to. Null value means the translation is available in all markets. + """ + market: Market """ - encodedVariantExistence: String + Whether the original content has changed since this translation was updated. + """ + outdated: Boolean! """ - The featured image for the product. + The date and time when the translation was updated. + """ + updatedAt: DateTime - This field is functionally equivalent to `images(first: 1)`. """ - featuredImage: Image + Translation value. + """ + value: String +} +""" +Possible error codes that can be returned by `TranslationUserError`. +""" +enum TranslationErrorCode { """ - A unique, human-readable string of the product's title. - A handle can contain letters, hyphens (`-`), and numbers, but no spaces. - The handle is used in the online store URL for the product. + The input value is blank. """ - handle: String! + BLANK """ - A globally-unique ID. + The input value is invalid. """ - id: ID! + INVALID """ - List of images associated with the product. + Resource does not exist. """ - images("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductImageSortKeys = POSITION): ImageConnection! + RESOURCE_NOT_FOUND """ - Whether the product is a gift card. + Resource is not translatable. """ - isGiftCard: Boolean! + RESOURCE_NOT_TRANSLATABLE """ - The [media](/docs/apps/build/online-store/product-media) that are associated with the product. Valid media are images, 3D models, videos. + Too many translation keys for the resource. """ - media("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductMediaSortKeys = POSITION): MediaConnection! + TOO_MANY_KEYS_FOR_RESOURCE """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Translation key is invalid. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + INVALID_KEY_FOR_MODEL """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + Translation value is invalid. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + FAILS_RESOURCE_VALIDATION """ - The product's URL on the online store. - If `null`, then the product isn't published to the online store sales channel. + Translatable content is invalid. """ - onlineStoreUrl: URL + INVALID_TRANSLATABLE_CONTENT """ - A list of product options. The limit is defined by the [shop's resource limits for product options](/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) (`Shop.resourceLimits.maxProductOptions`). + Market localizable content is invalid. """ - options("Truncate the array result to this size." first: Int): [ProductOption!]! + INVALID_MARKET_LOCALIZABLE_CONTENT """ - The minimum and maximum prices of a product, expressed in decimal numbers. - For example, if the product is priced between $10.00 and $50.00, - then the price range is $10.00 - $50.00. + Locale is invalid for the shop. """ - priceRange: ProductPriceRange! + INVALID_LOCALE_FOR_SHOP """ - The [product type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. + Locale language code is invalid. """ - productType: String! + INVALID_CODE """ - The date and time when the product was published to the channel. + Locale code format is invalid. """ - publishedAt: DateTime! + INVALID_FORMAT """ - Whether the product can only be purchased with a [selling plan](/docs/apps/build/purchase-options/subscriptions/selling-plans). Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. If you update a product to be subscription-only (`requiresSellingPlan:false`), then the product is unpublished from all channels, except the online store. + The shop isn't allowed to operate on market custom content. """ - requiresSellingPlan: Boolean! + MARKET_CUSTOM_CONTENT_NOT_ALLOWED """ - Find an active product variant based on selected options, availability or the first variant. + The market corresponding to the `marketId` argument doesn't exist. + """ + MARKET_DOES_NOT_EXIST - All arguments are optional. If no selected options are provided, the first available variant is returned. - If no variants are available, the first variant is returned. """ - selectedOrFirstAvailableVariant("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!], "Whether to ignore unknown product options." ignoreUnknownOptions: Boolean = true, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): ProductVariant + The market override locale creation failed. + """ + MARKET_LOCALE_CREATION_FAILED """ - A list of all [selling plan groups](/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) that are associated with the product either directly, or through the product's variants. + The specified resource can't be customized for a market. """ - sellingPlanGroups("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanGroupConnection! + RESOURCE_NOT_MARKET_CUSTOMIZABLE """ - The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. + The locale is missing on the market corresponding to the `marketId` argument. """ - seo: SEO! + INVALID_LOCALE_FOR_MARKET @deprecated(reason: "`invalid_locale_for_market` is deprecated because the creation of a locale that's specific to a market no longer needs to be tied to that market's URL.\n") """ - A comma-separated list of searchable keywords that are - associated with the product. For example, a merchant might apply the `sports` - and `summer` tags to products that are associated with sportwear for summer. - Updating `tags` overwrites any existing tags that were previously added to the product. - To add new tags without overwriting existing tags, - use the GraphQL Admin API's [`tagsAdd`](/docs/api/admin-graphql/latest/mutations/tagsadd) - mutation. + The handle is already taken for this resource. """ - tags: [String!]! + INVALID_VALUE_FOR_HANDLE_TRANSLATION +} +""" +The input fields and values for creating or updating a translation. +""" +input TranslationInput { """ - The name for the product that displays to customers. The title is used to construct the product's handle. - For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. + ISO code of the locale being translated into. Only locales returned in `shopLocales` are valid. """ - title: String! + locale: String! """ - The quantity of inventory that's in stock. + On the resource that this translation belongs to, the reference to the value being translated. """ - totalInventory: Int + key: String! """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + The value of the translation. """ - trackingParameters: String + value: String! """ - The date and time when the product was last modified. - A product's `updatedAt` value can change for different reasons. For example, if an order - is placed for a product that has inventory tracking set up, then the inventory adjustment - is counted as an update. + Hash digest representation of the content being translated. """ - updatedAt: DateTime! + translatableContentDigest: String! """ - Find a product’s variant based on its selected options. - This is useful for converting a user’s selection of product options into a single matching variant. - If there is not a variant for the selected options, `null` will be returned. + The ID of the market that the translation is specific to. Not specifying this field means that the translation will be available in all markets. """ - variantBySelectedOptions("The input fields used for a selected option.\n\nThe input must not contain more than `250` values." selectedOptions: [SelectedOptionInput!]!, "Whether to ignore unknown product options." ignoreUnknownOptions: Boolean = false, "Whether to perform case insensitive match on option names and values." caseInsensitiveMatch: Boolean = false): ProductVariant + marketId: ID +} +""" +Represents an error that happens during the execution of a translation mutation. +""" +type TranslationUserError implements DisplayableError { """ - A list of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. + The error code. """ - variants("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductVariantSortKeys = POSITION): ProductVariantConnection! + code: TranslationErrorCode """ - The number of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. + The path to the input field that caused the error. """ - variantsCount: Count + field: [String!] """ - The name of the product's vendor. + The error message. """ - vendor: String! + message: String! } """ -Sort options for products within a [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection). Used by the [`products`](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products) connection to order results by best-selling, price, title, creation date, or the collection's default and manual ordering. - -> Note: The [`RELEVANCE`](https://shopify.dev/docs/api/storefront/current/enums/ProductCollectionSortKeys#enums-RELEVANCE) key applies only when you specify a search query. +Return type for `translationsRegister` mutation. """ -enum ProductCollectionSortKeys { +type TranslationsRegisterPayload { """ - Sort by the `title` value. + The translations that were created or updated. """ - TITLE + translations: [Translation!] """ - Sort by the `price` value. + The list of errors that occurred from executing the mutation. """ - PRICE + userErrors: [TranslationUserError!]! +} +""" +Return type for `translationsRemove` mutation. +""" +type TranslationsRemovePayload { """ - Sort by the `best-selling` value. + The translations that were deleted. """ - BEST_SELLING + translations: [Translation!] """ - Sort by the `created` value. + The list of errors that occurred from executing the mutation. """ - CREATED + userErrors: [TranslationUserError!]! +} +""" +Represents a typed custom attribute. +""" +type TypedAttribute { """ - Sort by the `id` value. + Key or name of the attribute. """ - ID + key: String! + + """ + Value of the attribute. + """ + value: String! +} + +""" +Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and +[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + +For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host +(`example.myshopify.com`). +""" +scalar URL +""" +Specifies the +[Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) +that are associated with a related marketing campaign. +""" +input UTMInput { """ - Sort by the `manual` value. + The name of the UTM campaign. """ - MANUAL + campaign: String! """ - Sort by the `collection-default` value. + The name of the website or application where the referral link exists. """ - COLLECTION_DEFAULT + source: String! """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The UTM campaign medium. """ - RELEVANCE + medium: String! } """ -An auto-generated type for paginating through multiple Products. +Represents a set of UTM parameters. """ -type ProductConnection { +type UTMParameters { """ - A list of edges. + The name of a marketing campaign. """ - edges: [ProductEdge!]! + campaign: String """ - A list of available filters. + Identifies specific content in a marketing campaign. Used to differentiate between similar content or links in a marketing campaign to determine which is the most effective. """ - filters: [Filter!]! + content: String """ - A list of the nodes contained in ProductEdge. + The medium of a marketing campaign, such as a banner or email newsletter. """ - nodes: [Product!]! + medium: String """ - Information to aid in pagination. + The source of traffic to the merchant's store, such as Google or an email newsletter. """ - pageInfo: PageInfo! + source: String + + """ + Paid search terms used by a marketing campaign. + """ + term: String } """ -An auto-generated type which holds one Product and a cursor during pagination. +The input fields that identify a unique valued metafield. """ -type ProductEdge { +input UniqueMetafieldValueInput { """ - A cursor for use in pagination. + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. """ - cursor: String! + namespace: String """ - The item at the end of ProductEdge. + The key for the metafield. """ - node: Product! -} + key: String! -""" -The input fields for a filter used to view a subset of products in a collection. -By default, the `available` and `price` filters are enabled. Filters are customized with the Shopify Search & Discovery app. -Learn more about [customizing storefront filtering](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters). -""" -input ProductFilter { """ - Filter on if the product is available for sale. + The value of the metafield. """ - available: Boolean + value: String! +} +""" +The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). +""" +type UnitPriceMeasurement { """ - A variant option to filter on. + The type of unit of measurement for the unit price measurement. """ - variantOption: VariantOptionFilter + measuredType: UnitPriceMeasurementMeasuredType """ - A product category to filter on. + The quantity unit for the unit price measurement. """ - category: CategoryFilter + quantityUnit: UnitPriceMeasurementMeasuredUnit """ - A standard product attribute metafield to filter on. + The quantity value for the unit price measurement. """ - taxonomyMetafield: TaxonomyMetafieldFilter + quantityValue: Float! """ - The product type to filter on. + The reference unit for the unit price measurement. """ - productType: String + referenceUnit: UnitPriceMeasurementMeasuredUnit """ - The product vendor to filter on. + The reference value for the unit price measurement. """ - productVendor: String + referenceValue: Int! +} +""" +The input fields for the measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). +""" +input UnitPriceMeasurementInput { """ - A range of prices to filter with-in. + The quantity value for the unit price measurement. """ - price: PriceRangeFilter + quantityValue: Float """ - A product metafield to filter on. + The quantity unit for the unit price measurement. """ - productMetafield: MetafieldFilter + quantityUnit: UnitPriceMeasurementMeasuredUnit """ - A variant metafield to filter on. + The reference value for the unit price measurement. """ - variantMetafield: MetafieldFilter + referenceValue: Int """ - A product tag to filter on. + The reference unit for the unit price measurement. """ - tag: String + referenceUnit: UnitPriceMeasurementMeasuredUnit } """ -The set of valid sort keys for the ProductImage query. +The accepted types of unit of measurement. """ -enum ProductImageSortKeys { - """ - Sort by the `created_at` value. - """ - CREATED_AT - +enum UnitPriceMeasurementMeasuredType { """ - Sort by the `position` value. + Unit of measurements representing volumes. """ - POSITION + VOLUME """ - Sort by the `id` value. + Unit of measurements representing weights. """ - ID + WEIGHT """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + Unit of measurements representing lengths. """ - RELEVANCE -} + LENGTH -""" -The set of valid sort keys for the ProductMedia query. -""" -enum ProductMediaSortKeys { """ - Sort by the `position` value. + Unit of measurements representing areas. """ - POSITION + AREA """ - Sort by the `id` value. + Unit of measurements representing counts. """ - ID + COUNT """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. """ - RELEVANCE + UNKNOWN } """ -A customizable product attribute that customers select when purchasing, such as "Size", "Color", or "Material". Each option has a name and a set of [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue) objects representing the available choices. - -Different combinations of option values create distinct [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. Option values can include visual swatches that display colors or images to help customers make selections. Option names have a 255-character limit. - -Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). +The valid units of measurement for a unit price measurement. """ -type ProductOption implements Node { +enum UnitPriceMeasurementMeasuredUnit { """ - A globally-unique ID. + 1000 milliliters equals 1 liter. """ - id: ID! + ML """ - The product option’s name. + 100 centiliters equals 1 liter. """ - name: String! + CL """ - The corresponding option value to the product option. + Metric system unit of volume. """ - optionValues: [ProductOptionValue!]! + L """ - The corresponding value to the product option name. + 1 cubic meter equals 1000 liters. """ - values: [String!]! @deprecated(reason: "Use `optionValues` instead.") -} - -""" -A specific value for a [`ProductOption`](https://shopify.dev/docs/api/storefront/current/objects/ProductOption), such as "Red" or "Blue" for a "Color" option. Option values combine across different options to create [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. - -Each value can include a visual swatch that displays a color or image. The [`firstSelectableVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue#field-ProductOptionValue.fields.firstSelectableVariant) field returns the variant that combines this option value with the lowest-position values for all other options. This is useful for building product selection interfaces. + M3 -Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). -""" -type ProductOptionValue implements Node { """ - The product variant that combines this option value with the - lowest-position option values for all other options. - - This field will always return a variant, provided a variant including this option value exists. + Imperial system unit of volume (U.S. customary unit). """ - firstSelectableVariant: ProductVariant + FLOZ """ - A globally-unique ID. + 1 pint equals 16 fluid ounces (U.S. customary unit). """ - id: ID! + PT """ - The name of the product option value. + 1 quart equals 32 fluid ounces (U.S. customary unit). """ - name: String! + QT """ - The swatch of the product option value. + 1 gallon equals 128 fluid ounces (U.S. customary unit). """ - swatch: ProductOptionValueSwatch -} + GAL -""" -A visual representation for a [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue), such as a color or image. Swatches help customers visualize options like "Red" or "Blue" without relying solely on text labels. -""" -type ProductOptionValueSwatch { """ - The swatch color. + 1000 milligrams equals 1 gram. """ - color: Color + MG """ - The swatch image. + Metric system unit of weight. """ - image: Media -} + G -""" -The minimum and maximum prices across all variants of a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). -""" -type ProductPriceRange { """ - The highest variant's price. + 1 kilogram equals 1000 grams. """ - maxVariantPrice: MoneyV2! + KG """ - The lowest variant's price. + 16 ounces equals 1 pound. """ - minVariantPrice: MoneyV2! -} + OZ -""" -The recommendation intent that is used to generate product recommendations. -You can use intent to generate product recommendations according to different strategies. -""" -enum ProductRecommendationIntent { """ - Offer customers a mix of products that are similar or complementary to a product for which recommendations are to be fetched. An example is substitutable products that display in a You may also like section. + Imperial system unit of weight. """ - RELATED + LB """ - Offer customers products that are complementary to a product for which recommendations are to be fetched. An example is add-on products that display in a Pair it with section. + 1000 millimeters equals 1 meter. """ - COMPLEMENTARY -} - -""" -Sorting options for the [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) query. Supports sorting products by criteria such as best-selling and price, and by product attributes such as type, and vendor. + MM -> Note: Use the [`RELEVANCE`](https://shopify.dev/docs/api/storefront/current/enums/ProductSortKeys#enums-RELEVANCE) key only when a search query is specified. -""" -enum ProductSortKeys { """ - Sort by the `title` value. + 100 centimeters equals 1 meter. """ - TITLE + CM """ - Sort by the `product_type` value. + Metric system unit of length. """ - PRODUCT_TYPE + M """ - Sort by the `vendor` value. + Imperial system unit of length. """ - VENDOR + IN """ - Sort by the `updated_at` value. + 1 foot equals 12 inches. """ - UPDATED_AT + FT """ - Sort by the `created_at` value. + 1 yard equals 36 inches. """ - CREATED_AT + YD """ - Sort by the `best_selling` value. + Metric system unit of area. """ - BEST_SELLING + M2 """ - Sort by the `price` value. + Imperial system unit of area. """ - PRICE + FT2 """ - Sort by the `id` value. + 1 item, a unit of count. """ - ID + ITEM """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. """ - RELEVANCE + UNKNOWN } """ -A specific version of a [product](https://shopify.dev/docs/api/storefront/current/objects/Product) available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). - -For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases. - -Variants also support subscriptions and pre-orders through [selling plan allocations](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) objects, bundle configurations through [product variant components](https://shopify.dev/docs/api/storefront/current/objects/ProductVariantComponent) objects, and [shop pay installments pricing](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) for flexible payment options. +Systems of weights and measures. """ -type ProductVariant implements HasMetafields & Node { +enum UnitSystem { """ - Indicates if the product variant is available for sale. + Imperial system of weights and measures. """ - availableForSale: Boolean! + IMPERIAL_SYSTEM """ - The barcode (for example, ISBN, UPC, or GTIN) associated with the variant. + Metric system of weights and measures. """ - barcode: String + METRIC_SYSTEM +} +""" +This is represents new sale types that have been added in future API versions. You may update to a more recent API version to receive additional details about this sale. +""" +type UnknownSale implements Sale { """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. + The type of order action that the sale represents. """ - compareAtPrice: MoneyV2 + actionType: SaleActionType! """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. + The unique ID for the sale. """ - compareAtPriceV2: MoneyV2 @deprecated(reason: "Use `compareAtPrice` instead.") + id: ID! """ - List of bundles components included in the variant considering only fixed bundles. + The line type assocated with the sale. """ - components("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): ProductVariantComponentConnection! + lineType: SaleLineType! """ - Whether a product is out of stock but still available for purchase (used for backorders). + The number of units either ordered or intended to be returned. """ - currentlyNotInStock: Boolean! + quantity: Int """ - List of bundles that include this variant considering only fixed bundles. + All individual taxes associated with the sale. """ - groupedBy("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): ProductVariantConnection! + taxes: [SaleTax!]! """ - A globally-unique ID. + The total sale amount after taxes and discounts. """ - id: ID! + totalAmount: MoneyBag! """ - Image associated with the product variant. This field falls back to the product image if no image is available. + The total discounts allocated to the sale after taxes. """ - image: Image + totalDiscountAmountAfterTaxes: MoneyBag! """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The total discounts allocated to the sale before taxes. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + totalDiscountAmountBeforeTaxes: MoneyBag! """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The total amount of taxes for the sale. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + totalTaxAmount: MoneyBag! +} + +""" +An unsigned 64-bit integer. Represents whole numeric values between 0 and 2^64 - 1 encoded as a string of base-10 digits. + +Example value: `"50"`. +""" +scalar UnsignedInt64 +""" +An unverified return line item. +""" +type UnverifiedReturnLineItem implements Node & ReturnLineItemType { """ - The product variant’s price. + A note from the customer that describes the item to be returned. Maximum length: 300 characters. """ - price: MoneyV2! + customerNote: String """ - The product variant’s price. + A globally-unique ID. """ - priceV2: MoneyV2! @deprecated(reason: "Use `price` instead.") + id: ID! """ - The product object that the product variant belongs to. + The quantity that can be processed. """ - product: Product! + processableQuantity: Int! """ - The total sellable quantity of the variant for online sales channels. + The quantity that has been processed. """ - quantityAvailable: Int + processedQuantity: Int! """ - A list of quantity breaks for the product variant. + The quantity being returned. """ - quantityPriceBreaks("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String): QuantityPriceBreakConnection! + quantity: Int! """ - The quantity rule for the product variant in a given context. + The quantity that can be refunded. """ - quantityRule: QuantityRule! + refundableQuantity: Int! """ - Whether a product variant requires components. The default value is `false`. - If `true`, then the product variant can only be purchased as a parent bundle with components. + The quantity that was refunded. """ - requiresComponents: Boolean! + refundedQuantity: Int! """ - Whether a customer needs to provide a shipping address when placing an order for the product variant. + The reason for returning the item. """ - requiresShipping: Boolean! + returnReason: ReturnReason! @deprecated(reason: "Use `returnReasonDefinition` instead. This field will be removed in the future.") """ - List of product options applied to the variant. + The standardized reason for why the item is being returned. """ - selectedOptions: [SelectedOption!]! + returnReasonDefinition: ReturnReasonDefinition """ - Represents an association between a variant and a selling plan. Selling plan allocations describe which selling plans are available for each variant, and what their impact is on pricing. + Additional information about the reason for the return. Maximum length: 255 characters. """ - sellingPlanAllocations("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanAllocationConnection! + returnReasonNote: String! """ - The Shop Pay Installments pricing information for the product variant. + The unit price of the unverified return line item. """ - shopPayInstallmentsPricing: ShopPayInstallmentsProductVariantPricing + unitPrice: MoneyV2! """ - The SKU (stock keeping unit) associated with the variant. + The quantity that has't been processed. """ - sku: String + unprocessedQuantity: Int! +} +""" +The input fields required to update a media object. +""" +input UpdateMediaInput { """ - The in-store pickup availability of this variant by location. + Specifies the media to update. """ - storeAvailability("Used to sort results based on proximity to the provided location." near: GeoCoordinateInput, "Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): StoreAvailabilityConnection! + id: ID! """ - Whether tax is charged when the product variant is sold. + The source from which to update the media preview image. May be an external URL or staged upload URL. """ - taxable: Boolean! + previewImageSource: String """ - The product variant’s title. + The alt text associated to the media. """ - title: String! + alt: String +} +""" +The URL redirect for the online store. +""" +type UrlRedirect implements Node { """ - The unit price value for the variant based on the variant's measurement. + The ID of the URL redirect. """ - unitPrice: MoneyV2 + id: ID! """ - The unit price measurement for the variant. + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. """ - unitPriceMeasurement: UnitPriceMeasurement + path: String! """ - The weight of the product variant in the unit system specified with `weight_unit`. + The target location where the user will be redirected to. """ - weight: Float + target: String! +} +""" +Return type for `urlRedirectBulkDeleteAll` mutation. +""" +type UrlRedirectBulkDeleteAllPayload { """ - Unit of measurement for weight. + The asynchronous job removing the redirects. """ - weightUnit: WeightUnit! + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! } """ -An individual product variant included in a [fixed bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). Fixed bundles group multiple products together and sell them as a single unit, with the bundle's inventory determined by its components. - -Access components through the `ProductVariant` object's [`components`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.components) field. +Return type for `urlRedirectBulkDeleteByIds` mutation. """ -type ProductVariantComponent { +type UrlRedirectBulkDeleteByIdsPayload { """ - The product variant object that the component belongs to. + The asynchronous job removing the redirects. """ - productVariant: ProductVariant! + job: Job """ - The quantity of component present in the bundle. + The list of errors that occurred from executing the mutation. """ - quantity: Int! + userErrors: [UrlRedirectBulkDeleteByIdsUserError!]! } """ -An auto-generated type for paginating through multiple ProductVariantComponents. +An error that occurs during the execution of `UrlRedirectBulkDeleteByIds`. """ -type ProductVariantComponentConnection { +type UrlRedirectBulkDeleteByIdsUserError implements DisplayableError { """ - A list of edges. + The error code. """ - edges: [ProductVariantComponentEdge!]! + code: UrlRedirectBulkDeleteByIdsUserErrorCode """ - A list of the nodes contained in ProductVariantComponentEdge. + The path to the input field that caused the error. """ - nodes: [ProductVariantComponent!]! + field: [String!] """ - Information to aid in pagination. + The error message. """ - pageInfo: PageInfo! + message: String! } """ -An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +Possible error codes that can be returned by `UrlRedirectBulkDeleteByIdsUserError`. """ -type ProductVariantComponentEdge { +enum UrlRedirectBulkDeleteByIdsUserErrorCode { """ - A cursor for use in pagination. + You must pass one or more [`URLRedirect`]( + https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect + ) object IDs. """ - cursor: String! + IDS_EMPTY +} +""" +Return type for `urlRedirectBulkDeleteBySavedSearch` mutation. +""" +type UrlRedirectBulkDeleteBySavedSearchPayload { """ - The item at the end of ProductVariantComponentEdge. + The asynchronous job removing the redirects. """ - node: ProductVariantComponent! + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectBulkDeleteBySavedSearchUserError!]! } """ -An auto-generated type for paginating through multiple ProductVariants. +An error that occurs during the execution of `UrlRedirectBulkDeleteBySavedSearch`. """ -type ProductVariantConnection { +type UrlRedirectBulkDeleteBySavedSearchUserError implements DisplayableError { """ - A list of edges. + The error code. """ - edges: [ProductVariantEdge!]! + code: UrlRedirectBulkDeleteBySavedSearchUserErrorCode """ - A list of the nodes contained in ProductVariantEdge. + The path to the input field that caused the error. """ - nodes: [ProductVariant!]! + field: [String!] """ - Information to aid in pagination. + The error message. """ - pageInfo: PageInfo! + message: String! } """ -An auto-generated type which holds one ProductVariant and a cursor during pagination. +Possible error codes that can be returned by `UrlRedirectBulkDeleteBySavedSearchUserError`. """ -type ProductVariantEdge { +enum UrlRedirectBulkDeleteBySavedSearchUserErrorCode { """ - A cursor for use in pagination. + Saved search not found. """ - cursor: String! + SAVED_SEARCH_NOT_FOUND """ - The item at the end of ProductVariantEdge. + The saved search's query cannot match all entries or be empty. """ - node: ProductVariant! + INVALID_SAVED_SEARCH_QUERY } """ -The set of valid sort keys for the ProductVariant query. +Return type for `urlRedirectBulkDeleteBySearch` mutation. """ -enum ProductVariantSortKeys { +type UrlRedirectBulkDeleteBySearchPayload { """ - Sort by the `title` value. + The asynchronous job removing the redirects. """ - TITLE + job: Job """ - Sort by the `sku` value. + The list of errors that occurred from executing the mutation. """ - SKU + userErrors: [UrlRedirectBulkDeleteBySearchUserError!]! +} +""" +An error that occurs during the execution of `UrlRedirectBulkDeleteBySearch`. +""" +type UrlRedirectBulkDeleteBySearchUserError implements DisplayableError { """ - Sort by the `position` value. + The error code. """ - POSITION + code: UrlRedirectBulkDeleteBySearchUserErrorCode """ - Sort by the `id` value. + The path to the input field that caused the error. """ - ID + field: [String!] """ - Sort by relevance to the search terms when the `query` parameter is specified on the connection. - Don't use this sort key when no search query is specified. + The error message. """ - RELEVANCE + message: String! } """ -Represents information about the buyer that is interacting with the cart. +Possible error codes that can be returned by `UrlRedirectBulkDeleteBySearchUserError`. """ -type PurchasingCompany { +enum UrlRedirectBulkDeleteBySearchUserErrorCode { """ - The company associated to the order or draft order. + Invalid search string. """ - company: Company! + INVALID_SEARCH_ARGUMENT +} +""" +An auto-generated type for paginating through multiple UrlRedirects. +""" +type UrlRedirectConnection { """ - The company contact associated to the order or draft order. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - contact: CompanyContact + edges: [UrlRedirectEdge!]! """ - The company location associated to the order or draft order. + A list of nodes that are contained in UrlRedirectEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - location: CompanyLocation! + nodes: [UrlRedirect!]! + + """ + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! } """ -Quantity price breaks lets you offer different rates that are based on the -amount of a specific variant being ordered. +Return type for `urlRedirectCreate` mutation. """ -type QuantityPriceBreak { +type UrlRedirectCreatePayload { """ - Minimum quantity required to reach new quantity break price. + The created redirect. """ - minimumQuantity: Int! + urlRedirect: UrlRedirect """ - The price of variant after reaching the minimum quanity. + The list of errors that occurred from executing the mutation. """ - price: MoneyV2! + userErrors: [UrlRedirectUserError!]! } """ -An auto-generated type for paginating through multiple QuantityPriceBreaks. +Return type for `urlRedirectDelete` mutation. """ -type QuantityPriceBreakConnection { - """ - A list of edges. - """ - edges: [QuantityPriceBreakEdge!]! - +type UrlRedirectDeletePayload { """ - A list of the nodes contained in QuantityPriceBreakEdge. + The ID of the deleted redirect. """ - nodes: [QuantityPriceBreak!]! + deletedUrlRedirectId: ID """ - Information to aid in pagination. + The list of errors that occurred from executing the mutation. """ - pageInfo: PageInfo! + userErrors: [UrlRedirectUserError!]! } """ -An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +An auto-generated type which holds one UrlRedirect and a cursor during pagination. """ -type QuantityPriceBreakEdge { +type UrlRedirectEdge { """ - A cursor for use in pagination. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ cursor: String! """ - The item at the end of QuantityPriceBreakEdge. + The item at the end of UrlRedirectEdge. """ - node: QuantityPriceBreak! + node: UrlRedirect! } """ -The quantity rule for the product variant in a given context. +Possible error codes that can be returned by `UrlRedirectUserError`. """ -type QuantityRule { +enum UrlRedirectErrorCode { """ - The value that specifies the quantity increment between minimum and maximum of the rule. - Only quantities divisible by this value will be considered valid. + Redirect does not exist. + """ + DOES_NOT_EXIST - The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum - must be divisible by this value. """ - increment: Int! + Redirect could not be created. + """ + CREATE_FAILED """ - An optional value that defines the highest allowed quantity purchased by the customer. - If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + Redirect could not be updated. """ - maximum: Int + UPDATE_FAILED """ - The value that defines the lowest allowed quantity purchased by the customer. - The minimum must be a multiple of the quantity rule's increment. + Redirect could not be deleted. """ - minimum: Int! + DELETE_FAILED } """ -The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start. +A request to import a [`URLRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object +into the Online Store channel. Apps can use this to query the state of an `UrlRedirectImport` request. -Use individual queries like [`product`](https://shopify.dev/docs/api/storefront/current/queries/product) or [`collection`](https://shopify.dev/docs/api/storefront/current/queries/collection) to fetch specific resources by ID or handle. Use plural queries like [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) or [`collections`](https://shopify.dev/docs/api/storefront/current/queries/collections) to retrieve paginated lists with optional filtering and sorting. The [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) and [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries enable storefront search functionality. - -Explore queries interactively with the [GraphiQL explorer and sample query kit](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/api-exploration). +For more information, see [`url-redirect`](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect)s. """ -type QueryRoot { - """ - Returns an [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) by its ID. Each article belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) and includes content in both plain text and HTML formats, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, [`Comment`](https://shopify.dev/docs/api/storefront/current/objects/Comment) objects, tags, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) data. - """ - article("The ID of the `Article`." id: ID!): Article - +type UrlRedirectImport implements Node { """ - Returns a paginated list of [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects from the shop's [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. Each article is a blog post containing content, author information, tags, and optional images. - - Use the `query` argument to filter results by author, blog title, tags, or date fields. Sort results using the `sortKey` argument and reverse them with the `reverse` argument. + The number of rows in the file. """ - articles("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ArticleSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| author |\n| blog_title |\n| created_at |\n| tag |\n| tag_not |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): ArticleConnection! + count: Int """ - Retrieves a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) by its handle or ID. A blog organizes [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects for the online store and includes author information, [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) settings, and custom [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + The number of redirects created from the import. """ - blog("The handle of the `Blog`." handle: String, "The ID of the `Blog`." id: ID): Blog + createdCount: Int """ - Retrieves a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) by its handle. A blog organizes [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects for the online store and includes author information, [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) settings, and custom [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + The number of redirects that failed to be imported. """ - blogByHandle("The handle of the blog." handle: String!): Blog @deprecated(reason: "Use `blog` instead.") + failedCount: Int """ - Returns a paginated list of the shop's [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. Each blog serves as a container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. + Whether the import is finished. """ - blogs("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: BlogSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| handle |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): BlogConnection! + finished: Boolean! """ - Returns a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by its ID. The cart contains the merchandise lines a buyer intends to purchase, along with estimated costs, applied discounts, gift cards, and delivery options. - - Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/latest/queries/cart#returns-Cart.fields.checkoutUrl) field to redirect buyers to Shopify's web checkout when they're ready to complete their purchase. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). + The date and time when the import finished. """ - cart("The ID of the cart." id: ID!): Cart + finishedAt: DateTime """ - A poll for the status of the cart checkout completion and order creation. + The ID of the `UrlRedirectImport` object. """ - cartCompletionAttempt("The ID of the attempt." attemptId: String!): CartCompletionAttemptResult + id: ID! """ - Retrieves a single [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection) by its ID or handle. Use the [`products`](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products) field to access items in the collection. + A list of up to three previews of the URL redirects to be imported. """ - collection("The ID of the `Collection`." id: ID, "The handle of the `Collection`." handle: String): Collection + previewRedirects: [UrlRedirectImportPreview!]! """ - Retrieves a [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection) by its URL-friendly handle. Handles are automatically generated from collection titles but merchants can customize them. + The number of redirects updated during the import. """ - collectionByHandle("The handle of the collection." handle: String!): Collection @deprecated(reason: "Use `collection` instead.") + updatedCount: Int +} +""" +Return type for `urlRedirectImportCreate` mutation. +""" +type UrlRedirectImportCreatePayload { """ - Returns a paginated list of the shop's [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection). Each `Collection` object includes a nested connection to its [products](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products). + The created `URLRedirectImport` object. """ - collections("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: CollectionSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| collection_type |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): CollectionConnection! + urlRedirectImport: UrlRedirectImport """ - Retrieves the [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) associated with the provided access token. Use the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation to obtain an access token using legacy customer account authentication (email and password). - - The returned customer includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress), [orders](https://shopify.dev/docs/api/storefront/current/objects/Order), and [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. + The list of errors that occurred from executing the mutation. """ - customer("The customer access token." customerAccessToken: String!): Customer + userErrors: [UrlRedirectImportUserError!]! +} +""" +Possible error codes that can be returned by `UrlRedirectImportUserError`. +""" +enum UrlRedirectImportErrorCode { """ - Returns the shop's localization settings. Use this query to build [country and language selectors](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets) for your storefront. - - The [`country`](https://shopify.dev/docs/api/storefront/latest/queries/localization#returns-Localization.fields.country) and [`language`](https://shopify.dev/docs/api/storefront/latest/queries/localization#returns-Localization.fields.language) fields reflect the active localized experience. To change the context, use the [`@inContext`](https://shopify.dev/docs/api/storefront#directives) directive with your desired country or language code. + CSV file does not exist at given URL. """ - localization: Localization! + FILE_DOES_NOT_EXIST @deprecated(reason: "This error code is never returned") """ - Returns shop locations that support in-store pickup. Use the `near` argument with [`GeoCoordinateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/GeoCoordinateInput) to sort results by proximity to the customer's location. - - When sorting by distance, set `sortKey` to [`DISTANCE`](https://shopify.dev/docs/api/storefront/current/queries/locations#arguments-sortKey.enums.DISTANCE) and provide coordinates using the [`near`](https://shopify.dev/docs/api/storefront/current/queries/locations#arguments-near) argument. - - Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). + URL redirect import not found. """ - locations("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: LocationSortKeys = ID, "Used to sort results based on proximity to the provided location." near: GeoCoordinateInput): LocationConnection! + NOT_FOUND """ - Retrieves a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu) by its handle. Menus are [hierarchical navigation structures](https://help.shopify.com/manual/online-store/menus-and-links) that merchants configure for their storefront, such as header and footer navigation. - - Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can nest up to three levels deep, with each item linking to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + The import has already completed. """ - menu("The navigation menu's handle." handle: String!): Menu + ALREADY_IMPORTED """ - Retrieves a single [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject) by either its [`global ID`](https://shopify.dev/docs/api/storefront/current/queries/metaobject#arguments-id) or its [`handle`](https://shopify.dev/docs/api/storefront/current/queries/metaobject#arguments-handle). - - > Note: - > When using the handle, you must also provide the metaobject type because handles are only unique within a type. + The import is already in progress. """ - metaobject("The ID of the metaobject." id: ID, "The handle and type of the metaobject." handle: MetaobjectHandleInput): Metaobject + IN_PROGRESS +} +""" +A preview of a URL redirect import row. +""" +type UrlRedirectImportPreview { """ - Returns a paginated list of [`Metaobject`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject) entries for a specific type. Metaobjects are [custom data structures](https://shopify.dev/docs/apps/build/metaobjects) that extend Shopify's data model with merchant-defined or app-defined content like size charts, product highlights, or custom sections. - - The required `type` argument specifies which metaobject type to retrieve. You can sort results by `id` or `updated_at` using the `sortKey` argument. + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. """ - metaobjects("The type of metaobject to retrieve." type: String!, "The key of a field to sort with. Supports \"id\" and \"updated_at\"." sortKey: String, "Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetaobjectConnection! + path: String! """ - Retrieves any object that implements the [`Node`](https://shopify.dev/docs/api/storefront/current/interfaces/Node) interface by its globally-unique ID. Use inline fragments to access type-specific fields on the returned object. - - This query follows the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface) and is commonly used for refetching objects when you have their ID but need updated data. + The target location where the user will be redirected to. """ - node("The ID of the Node to return." id: ID!): Node + target: String! +} +""" +Return type for `urlRedirectImportSubmit` mutation. +""" +type UrlRedirectImportSubmitPayload { """ - Retrieves multiple objects by their global IDs in a single request. Any object that implements the [`Node`](https://shopify.dev/docs/api/storefront/current/interfaces/Node) interface can be fetched, including [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [pages](https://shopify.dev/docs/api/storefront/current/objects/Page). - - Use inline fragments to access type-specific fields on the returned objects. The input accepts up to 250 IDs. + The asynchronous job importing the redirects. """ - nodes("The IDs of the Nodes to return.\n\nThe input must not contain more than `250` values." ids: [ID!]!): [Node]! + job: Job """ - Retrieves a [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page) by its [`handle`](https://shopify.dev/docs/api/storefront/current/queries/page#arguments-handle) or [`id`](https://shopify.dev/docs/api/storefront/current/queries/page#arguments-id). Pages are static content pages that merchants display outside their product catalog, such as "About Us," "Contact," or policy pages. - - The returned page includes information such as the [HTML body content](https://shopify.dev/docs/api/storefront/current/queries/page#returns-Page.fields.body), [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, and any associated [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. + The list of errors that occurred from executing the mutation. """ - page("The handle of the `Page`." handle: String, "The ID of the `Page`." id: ID): Page + userErrors: [UrlRedirectImportUserError!]! +} +""" +Represents an error that happens during execution of a redirect import mutation. +""" +type UrlRedirectImportUserError implements DisplayableError { """ - Retrieves a [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page) by its handle. + The error code. """ - pageByHandle("The handle of the page." handle: String!): Page @deprecated(reason: "Use `page` instead.") + code: UrlRedirectImportErrorCode """ - Returns a paginated list of the shop's content [pages](https://shopify.dev/docs/api/storefront/current/objects/Page). Pages are custom HTML content like "About Us", "Contact", or policy information that merchants display outside their product catalog. + The path to the input field that caused the error. """ - pages("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: PageSortKeys = ID, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| handle |\n| title |\n| updated_at |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): PageConnection! + field: [String!] """ - Settings related to payments. + The error message. """ - paymentSettings: PaymentSettings! + message: String! +} +""" +The input fields to create or update a URL redirect. +""" +input UrlRedirectInput { """ - Returns suggested results as customers type in a search field, enabling type-ahead search experiences. The query matches [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), and [articles](https://shopify.dev/docs/api/storefront/current/objects/Article) based on partial search terms, and also provides [search query suggestions](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion) to help customers refine their search. - - You can filter results by resource type and limit the quantity. The [`limitScope`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch#arguments-limitScope) argument controls whether limits apply across all result types or per type. Use [`unavailableProducts`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch#arguments-unavailableProducts) to control how out-of-stock products appear in results. + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. """ - predictiveSearch("Limits the number of results based on `limit_scope`. The value can range from 1 to 10, and the default is 10." limit: Int, "Decides the distribution of results." limitScope: PredictiveSearchLimitScope, "The search query." query: String!, "Specifies the list of resource fields to use for search. The default fields searched on are TITLE, PRODUCT_TYPE, VARIANT_TITLE, and VENDOR. For the best search experience, you should search on the default field set.\n\nThe input must not contain more than `250` values." searchableFields: [SearchableField!], "The types of resources to search for.\n\nThe input must not contain more than `250` values." types: [PredictiveSearchType!], "Specifies how unavailable products are displayed in the search results." unavailableProducts: SearchUnavailableProductsType): PredictiveSearchResult + path: String """ - Retrieves a single [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) by its ID or handle. Use this query to build product detail pages, access variant and pricing information, or fetch product media and [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). See some [examples of querying products](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/getting-started). + The target location where the user will be redirected to. """ - product("The ID of the `Product`." id: ID, "The handle of the `Product`." handle: String): Product + target: String +} +""" +The set of valid sort keys for the UrlRedirect query. +""" +enum UrlRedirectSortKeys { """ - Retrieves a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) by its handle. The handle is a URL-friendly identifier that's automatically generated from the product's title. If no product exists with the specified handle, returns `null`. + Sort by the `id` value. """ - productByHandle("A unique, human-readable string of the product's title.\nA handle can contain letters, hyphens (`-`), and numbers, but no spaces.\nThe handle is used in the online store URL for the product.\n" handle: String!): Product @deprecated(reason: "Use `product` instead.") + ID """ - Returns recommended products for a given product, identified by either ID or handle. Use the [`intent`](https://shopify.dev/docs/api/storefront/current/enums/ProductRecommendationIntent) argument to control the recommendation strategy. - - Shopify [auto-generates related recommendations](https://shopify.dev/docs/storefronts/themes/product-merchandising/recommendations) based on sales data, product descriptions, and collection relationships. Complementary recommendations require [manual configuration](https://help.shopify.com/manual/online-store/storefront-search/search-and-discovery-recommendations) through the Shopify Search & Discovery app. Returns up to ten [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) objects. + Sort by the `path` value. """ - productRecommendations("The id of the product." productId: ID, "The handle of the product." productHandle: String, "The recommendation intent that is used to generate product recommendations. You can use intent to generate product recommendations on various pages across the channels, according to different strategies." intent: ProductRecommendationIntent = RELATED): [Product!] + PATH """ - Returns a paginated list of all tags that have been added to [products](https://shopify.dev/docs/api/storefront/current/objects/Product) in the shop. Useful for building tag-based product filtering or navigation in a storefront. + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. """ - productTags("Returns up to the first `n` elements from the list." first: Int!): StringConnection! + RELEVANCE +} +""" +Return type for `urlRedirectUpdate` mutation. +""" +type UrlRedirectUpdatePayload { """ - Returns a list of product types from the shop's [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product) objects that are published to your app. Use this query to build [filtering interfaces](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) or navigation menus based on product categorization. + Returns the updated URL redirect. """ - productTypes("Returns up to the first `n` elements from the list." first: Int!): StringConnection! + urlRedirect: UrlRedirect """ - Returns a paginated list of the shop's [products](https://shopify.dev/docs/api/storefront/current/objects/Product). - - For full-text storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) query instead. + The list of errors that occurred from executing the mutation. """ - products("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: ProductSortKeys = ID, "You can apply one or multiple filters to a query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| available_for_sale | Filter by products that have at least one product variant available for sale. |\n| created_at | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<=2024` |\n| product_type | Filter by a comma-separated list of [product types](https://help.shopify.com/en/manual/products/details/product-type). | | | `product_type:snowboard` |\n| tag | Filter products by the product [`tags`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags) field. | | | `tag:my_tag` |\n| tag_not | Filter by products that don't have the specified product [tags](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags). | | | `tag_not:my_tag` |\n| title | Filter by the product [`title`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-title) field. | | | `title:The Minimal Snowboard` |\n| updated_at | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<=2024` |\n| variants.price | Filter by the price of the product's variants. |\n| vendor | Filter by the product [`vendor`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-vendor) field. | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` |\nLearn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): ProductConnection! + userErrors: [UrlRedirectUserError!]! +} +""" +Represents an error that happens during execution of a redirect mutation. +""" +type UrlRedirectUserError implements DisplayableError { """ - Returns all public Storefront [API versions](https://shopify.dev/docs/api/storefront/current/objects/ApiVersion), including supported, release candidate, and unstable versions. + The error code. """ - publicApiVersions: [ApiVersion!]! + code: UrlRedirectErrorCode """ - Returns paginated search results for [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) resources based on a query string. Results are sorted by relevance by default. - - The response includes the total result count and available product filters for building [faceted search interfaces](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products). Use the [`prefix`](https://shopify.dev/docs/api/storefront/current/enums/SearchPrefixQueryType) argument to enable partial word matching on the last search term, allowing queries like "winter snow" to match "snowboard" or "snowshoe". + The path to the input field that caused the error. """ - search("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list by the given key." sortKey: SearchSortKeys = RELEVANCE, "The search query." query: String!, "Specifies whether to perform a partial word match on the last search term." prefix: SearchPrefixQueryType, "Returns a subset of products matching all product filters.\n\nThe input must not contain more than `250` values." productFilters: [ProductFilter!], "The types of resources to search for.\n\nThe input must not contain more than `250` values." types: [SearchType!], "Specifies how unavailable products or variants are displayed in the search results." unavailableProducts: SearchUnavailableProductsType): SearchResultItemConnection! + field: [String!] """ - Returns the [`Shop`](https://shopify.dev/docs/api/storefront/current/objects/Shop) associated with the storefront access token. The `Shop` object provides general store information such as the shop name, description, and primary domain. - - Use this query to access data like store policies, [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings), [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) configuration, and shipping destinations. It also exposes [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. + The error message. """ - shop: Shop! + message: String! +} +""" +An error in the input of a mutation. Mutations return `UserError` objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing. +""" +type UserError implements DisplayableError { """ - Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization. The query provides a page count and paginated access to resources like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/current/objects/Page), and [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog) objects. - - When paginating through resources, the number of items per page varies from 0 to 250, and empty pages can occur without indicating the end of results. Always check [`hasNextPage`](https://shopify.dev/docs/api/storefront/current/objects/PaginatedSitemapResources#field-PaginatedSitemapResources.fields.hasNextPage) to determine if more pages are available. + The path to the input field that caused the error. """ - sitemap("The type of the resource for the sitemap." type: SitemapType!): Sitemap! + field: [String!] """ - Returns a paginated list of [`UrlRedirect`](https://shopify.dev/docs/api/storefront/current/objects/UrlRedirect) objects configured for the shop. Each redirect maps an old path to a target location. + The error message. """ - urlRedirects("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Apply one or multiple filters to the query.\n| name | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- |\n| created_at |\n| path |\n| target |\nRefer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.\n" query: String): UrlRedirectConnection! + message: String! } """ -Search engine optimization metadata for a resource. The title and description appear in search engine results and browser tabs. +Time between UTC time and a location's observed time, in the format `"+HH:MM"` or `"-HH:MM"`. + +Example value: `"-07:00"`. +""" +scalar UtcOffset + """ -type SEO { +A server-side validation that enforces business rules before customers complete their purchases. Each validation links to a [`ShopifyFunction`](https://shopify.dev/docs/api/functions/latest/cart-and-checkout-validation) that implements the validation logic. + +Validations run on Shopify's servers and are enforced throughout the checkout process. Validation errors always block checkout progress. The `blockOnFailure` setting determines whether runtime exceptions, like timeouts, also block checkout. Tracks runtime exception history for the validation function and supports custom data through [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. +""" +type Validation implements HasMetafieldDefinitions & HasMetafields & Node { """ - The meta description. + Whether the validation should block on failures other than expected violations. """ - description: String + blockOnFailure: Boolean! """ - The SEO title. + Whether the validation is enabled on the merchant checkout. """ - title: String -} + enabled: Boolean! -""" -A discount application created by a Shopify Script. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/current/interfaces/DiscountApplication) interface and captures the discount's value, allocation method, and targeting rules at the time the script applied it. -""" -type ScriptDiscountApplication implements DiscountApplication { """ - The method by which the discount's value is allocated to its entitled items. + The error history on the most recent version of the validation function. """ - allocationMethod: DiscountApplicationAllocationMethod! + errorHistory: FunctionsErrorHistory """ - Which lines of targetType that the discount is allocated over. + Global ID for the validation. """ - targetSelection: DiscountApplicationTargetSelection! + id: ID! """ - The type of line that the discount is applicable towards. + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. """ - targetType: DiscountApplicationTargetType! + metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The key for the metafield." key: String!): Metafield """ - The title of the application as defined by the Script. + List of metafield definitions. """ - title: String! + metafieldDefinitions("Filter metafield definitions by namespace." namespace: String, "Filter by the definition's pinned status." pinnedStatus: MetafieldDefinitionPinnedStatus = ANY, "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false, "Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations)." sortKey: MetafieldDefinitionSortKeys = ID, "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` |\n| created_at | time | Filter by the date and time when the metafield definition was created. | | | - `created_at:>2020-10-21T23:39:20Z`
- `created_at: - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |\n| key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. | | | - `key:some-key` |\n| namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. | | | - `namespace:some-namespace` |\n| owner_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. | | | - `owner_type:PRODUCT` |\n| type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. | | | - `type:single_line_text_field` |\n| updated_at | time | Filter by the date and time when the metafield definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`
- `updated_at: - `updated_at:<=2024` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n" query: String): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") """ - The value of the discount application. + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. """ - value: PricingValue! -} + metafields("The metafield namespace to filter by. If omitted, all metafields are returned." namespace: String, "List of keys of metafields in the format `namespace.key`, will be returned in the same format." keys: [String!], "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." first: Int, "The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." after: String, "The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql)." last: Int, "The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql)." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): MetafieldConnection! -""" -Specifies whether to perform a partial word match on the last search term. -""" -enum SearchPrefixQueryType { """ - Perform a partial word match on the last search term. + The Shopify Function implementing the validation. """ - LAST + shopifyFunction: ShopifyFunction! """ - Don't perform a partial word match on the last search term. + The merchant-facing validation name. """ - NONE + title: String! } """ -A suggested search term returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query. Query suggestions help customers refine their searches by showing relevant terms as they type. - -The [`text`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.text) field provides the plain suggestion, while [`styledText`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.styledText) includes HTML tags to highlight matching portions. Implements [`Trackable`](https://shopify.dev/docs/api/storefront/current/interfaces/Trackable) for analytics reporting on search traffic origins. +An auto-generated type for paginating through multiple Validations. """ -type SearchQuerySuggestion implements Trackable { +type ValidationConnection { """ - The text of the search query suggestion with highlighted HTML tags. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - styledText: String! + edges: [ValidationEdge!]! """ - The text of the search query suggestion. + A list of nodes that are contained in ValidationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - text: String! + nodes: [Validation!]! """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - trackingParameters: String + pageInfo: PageInfo! } """ -A search result that matches the search query. -""" -union SearchResultItem = Article|Page|Product - -""" -An auto-generated type for paginating through multiple SearchResultItems. +The input fields required to install a validation. """ -type SearchResultItemConnection { +input ValidationCreateInput { + """ + The function ID representing the extension to install. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + """ - A list of edges. + The function handle representing the extension to install. """ - edges: [SearchResultItemEdge!]! + functionHandle: String """ - A list of the nodes contained in SearchResultItemEdge. + Whether the validation should be live on the merchant checkout. """ - nodes: [SearchResultItem!]! + enable: Boolean = false """ - Information to aid in pagination. + Whether the validation should block on failures other than expected violations. """ - pageInfo: PageInfo! + blockOnFailure: Boolean = false """ - A list of available filters. + Additional metafields to associate to the validation. """ - productFilters: [Filter!]! + metafields: [MetafieldInput!] = [] """ - The total number of results. + The title of the validation. """ - totalCount: Int! + title: String } """ -An auto-generated type which holds one SearchResultItem and a cursor during pagination. +Return type for `validationCreate` mutation. """ -type SearchResultItemEdge { +type ValidationCreatePayload { """ - A cursor for use in pagination. + The list of errors that occurred from executing the mutation. """ - cursor: String! + userErrors: [ValidationUserError!]! """ - The item at the end of SearchResultItemEdge. + The created validation. """ - node: SearchResultItem! + validation: Validation } """ -The set of valid sort keys for the search query. +Return type for `validationDelete` mutation. """ -enum SearchSortKeys { +type ValidationDeletePayload { """ - Sort by the `price` value. + Returns the deleted validation ID. """ - PRICE + deletedId: ID """ - Sort by relevance to the search terms. + The list of errors that occurred from executing the mutation. """ - RELEVANCE + userErrors: [ValidationUserError!]! } """ -The types of search items to perform search within. +An auto-generated type which holds one Validation and a cursor during pagination. """ -enum SearchType { +type ValidationEdge { """ - Returns matching products. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - PRODUCT + cursor: String! """ - Returns matching pages. + The item at the end of ValidationEdge. """ - PAGE + node: Validation! +} +""" +The set of valid sort keys for the Validation query. +""" +enum ValidationSortKeys { """ - Returns matching articles. + Sort by the `id` value. """ - ARTICLE + ID } """ -Specifies whether to display results for unavailable products. +The input fields required to update a validation. """ -enum SearchUnavailableProductsType { +input ValidationUpdateInput { """ - Show unavailable products in the order that they're found. + Whether the validation should be live on the merchant checkout. """ - SHOW + enable: Boolean = false """ - Exclude unavailable products. + Whether the validation should block on failures other than expected violations. """ - HIDE + blockOnFailure: Boolean = false """ - Show unavailable products after all other matching results. This is the default. + Additional metafields to associate to the validation. """ - LAST + metafields: [MetafieldInput!] = [] + + """ + The title of the validation. + """ + title: String } """ -Specifies the list of resource fields to search. +Return type for `validationUpdate` mutation. """ -enum SearchableField { +type ValidationUpdatePayload { """ - Author of the page or article. + The list of errors that occurred from executing the mutation. """ - AUTHOR + userErrors: [ValidationUserError!]! """ - Body of the page or article or product description or collection description. + The updated validation. """ - BODY + validation: Validation +} +""" +An error that occurs during the execution of a validation mutation. +""" +type ValidationUserError implements DisplayableError { """ - Product type. + The error code. """ - PRODUCT_TYPE + code: ValidationUserErrorCode """ - Tag associated with the product or article. + The path to the input field that caused the error. """ - TAG + field: [String!] """ - Title of the page or article or product title or collection title. + The error message. """ - TITLE + message: String! +} +""" +Possible error codes that can be returned by `ValidationUserError`. +""" +enum ValidationUserErrorCode { """ - Variant barcode. + Validation not found. """ - VARIANTS_BARCODE + NOT_FOUND """ - Variant SKU. + Function not found. """ - VARIANTS_SKU + FUNCTION_NOT_FOUND """ - Variant title. + Shop must be on a Shopify Plus plan to activate functions from a custom app. """ - VARIANTS_TITLE + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE """ - Product vendor. + Function does not implement the required interface for this cart & checkout validation. """ - VENDOR -} + FUNCTION_DOES_NOT_IMPLEMENT -""" -A name/value pair representing a product option selection on a variant. The [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) object's [`selectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.selectedOptions) field returns this to indicate which options define that variant, such as "Size: Large" or "Color: Red". -""" -type SelectedOption { """ - The product option’s name. + Only unlisted apps can be used for this cart & checkout validation. """ - name: String! + PUBLIC_APP_NOT_ALLOWED """ - The product option’s value. + Function is pending deletion. """ - value: String! -} + FUNCTION_PENDING_DELETION -""" -The input fields required for a selected option. -""" -input SelectedOptionInput { """ - The product option’s name. + Cannot have more than 25 active validation functions. """ - name: String! + MAX_VALIDATIONS_ACTIVATED """ - The product option’s value. + Either function_id or function_handle must be provided. """ - value: String! -} + MISSING_FUNCTION_IDENTIFIER -""" -Represents deferred or recurring purchase options for [products](https://shopify.dev/docs/api/storefront/current/objects/Product) and [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), such as subscriptions, pre-orders, or try-before-you-buy. Each selling plan belongs to a [`SellingPlanGroup`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) and defines billing, pricing, inventory, and delivery policies. -""" -type SellingPlan implements HasMetafields { """ - The billing policy for the selling plan. + Only one of function_id or function_handle can be provided, not both. """ - billingPolicy: SellingPlanBillingPolicy + MULTIPLE_FUNCTION_IDENTIFIERS """ - The initial payment due for the purchase. + The type is invalid. """ - checkoutCharge: SellingPlanCheckoutCharge! + INVALID_TYPE """ - The delivery policy for the selling plan. + The value is invalid for the metafield type or for the definition options. """ - deliveryPolicy: SellingPlanDeliveryPolicy + INVALID_VALUE """ - The description of the selling plan. + ApiPermission metafields can only be created or updated by the app owner. """ - description: String + APP_NOT_AUTHORIZED """ - A globally-unique ID. + Unstructured reserved namespace. """ - id: ID! + UNSTRUCTURED_RESERVED_NAMESPACE """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + Owner type can't be used in this mutation. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + DISALLOWED_OWNER_TYPE """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The input value isn't included in the list. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + INCLUSION """ - The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'. + The input value is already taken. """ - name: String! + TAKEN """ - The selling plan options available in the drop-down list in the storefront. For example, 'Delivery every week' or 'Delivery every 2 weeks' specifies the delivery frequency options for the product. Individual selling plans contribute their options to the associated selling plan group. For example, a selling plan group might have an option called `option1: Delivery every`. One selling plan in that group could contribute `option1: 2 weeks` with the pricing for that option, and another selling plan could contribute `option1: 4 weeks`, with different pricing. + The input value needs to be blank. """ - options: [SellingPlanOption!]! + PRESENT """ - The price adjustments that a selling plan makes when a variant is purchased with a selling plan. + The input value is blank. """ - priceAdjustments: [SellingPlanPriceAdjustment!]! + BLANK """ - Whether purchasing the selling plan will result in multiple deliveries. + The input value is too long. """ - recurringDeliveries: Boolean! -} - -""" -Links a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to a [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan), providing the pricing details for that specific combination. Each allocation includes the checkout charge amount, any remaining balance due for the purchase, and up to two price adjustments that show how the selling plan affects the variant's price. + TOO_LONG -Selling plan allocations are available on product variants and [cart lines](https://shopify.dev/docs/api/storefront/current/objects/CartLine), enabling storefronts to display information such as subscription or purchase option pricing before and during checkout. -""" -type SellingPlanAllocation { """ - The checkout charge amount due for the purchase. + The input value is too short. """ - checkoutChargeAmount: MoneyV2! + TOO_SHORT """ - A list of price adjustments, with a maximum of two. When there are two, the first price adjustment goes into effect at the time of purchase, while the second one starts after a certain number of orders. A price adjustment represents how a selling plan affects pricing when a variant is purchased with a selling plan. Prices display in the customer's currency if the shop is configured for it. + The input value is invalid. """ - priceAdjustments: [SellingPlanAllocationPriceAdjustment!]! + INVALID """ - The remaining balance charge amount due for the purchase. + The metafield violates a capability restriction. """ - remainingBalanceChargeAmount: MoneyV2! + CAPABILITY_VIOLATION """ - A representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. + An internal error occurred. """ - sellingPlan: SellingPlan! + INTERNAL_ERROR } """ -An auto-generated type for paginating through multiple SellingPlanAllocations. +The input fields required to create or modify a product variant's option value. """ -type SellingPlanAllocationConnection { +input VariantOptionValueInput { """ - A list of edges. + Specifies the product option value by ID. """ - edges: [SellingPlanAllocationEdge!]! + id: ID """ - A list of the nodes contained in SellingPlanAllocationEdge. + Specifies the product option value by name. """ - nodes: [SellingPlanAllocation!]! + name: String """ - Information to aid in pagination. + Metafield value associated with an option. """ - pageInfo: PageInfo! -} + linkedMetafieldValue: String -""" -An auto-generated type which holds one SellingPlanAllocation and a cursor during pagination. -""" -type SellingPlanAllocationEdge { """ - A cursor for use in pagination. + Specifies the product option by ID. """ - cursor: String! + optionId: ID """ - The item at the end of SellingPlanAllocationEdge. + Specifies the product option by name. """ - node: SellingPlanAllocation! + optionName: String } """ -The resulting prices for variants when they're purchased with a specific selling plan. +Represents a credit card payment instrument. """ -type SellingPlanAllocationPriceAdjustment { +type VaultCreditCard { """ - The price of the variant when it's purchased without a selling plan for the same number of deliveries. For example, if a customer purchases 6 deliveries of $10.00 granola separately, then the price is 6 x $10.00 = $60.00. + The billing address of the card. """ - compareAtPrice: MoneyV2! + billingAddress: CustomerCreditCardBillingAddress """ - The effective price for a single delivery. For example, for a prepaid subscription plan that includes 6 deliveries at the price of $48.00, the per delivery price is $8.00. + The brand for the card. """ - perDeliveryPrice: MoneyV2! + brand: String! """ - The price of the variant when it's purchased with a selling plan For example, for a prepaid subscription plan that includes 6 deliveries of $10.00 granola, where the customer gets 20% off, the price is 6 x $10.00 x 0.80 = $48.00. + Whether the card has been expired. """ - price: MoneyV2! + expired: Boolean! """ - The resulting price per unit for the variant associated with the selling plan. If the variant isn't sold by quantity or measurement, then this field returns `null`. + The expiry month of the card. """ - unitPrice: MoneyV2 -} + expiryMonth: Int! -""" -The selling plan billing policy. -""" -union SellingPlanBillingPolicy = SellingPlanRecurringBillingPolicy + """ + The expiry year of the card. + """ + expiryYear: Int! -""" -The initial payment due for the purchase. -""" -type SellingPlanCheckoutCharge { """ - The charge type for the checkout charge. + The last four digits for the card. """ - type: SellingPlanCheckoutChargeType! + lastDigits: String! """ - The charge value for the checkout charge. + The name of the card holder. """ - value: SellingPlanCheckoutChargeValue! + name: String! } """ -The percentage value of the price used for checkout charge. +Represents a paypal billing agreement payment instrument. """ -type SellingPlanCheckoutChargePercentageValue { +type VaultPaypalBillingAgreement { """ - The percentage value of the price used for checkout charge. + Whether the paypal billing agreement is inactive. """ - percentage: Float! -} + inactive: Boolean! -""" -The checkout charge when the full amount isn't charged at checkout. -""" -enum SellingPlanCheckoutChargeType { """ - The checkout charge is a percentage of the product or variant price. + The paypal account name. """ - PERCENTAGE + name: String! """ - The checkout charge is a fixed price amount. + The paypal account email address. """ - PRICE + paypalAccountEmail: String! } """ -The portion of the price to be charged at checkout. -""" -union SellingPlanCheckoutChargeValue = MoneyV2|SellingPlanCheckoutChargePercentageValue - -""" -An auto-generated type for paginating through multiple SellingPlans. +Representation of 3d vectors and points. It can represent +either the coordinates of a point in space, a direction, or +size. Presented as an object with three floating-point values. """ -type SellingPlanConnection { +type Vector3 { """ - A list of edges. + The x coordinate of Vector3. """ - edges: [SellingPlanEdge!]! + x: Float! """ - A list of the nodes contained in SellingPlanEdge. + The y coordinate of Vector3. """ - nodes: [SellingPlan!]! + y: Float! """ - Information to aid in pagination. + The z coordinate of Vector3. """ - pageInfo: PageInfo! + z: Float! } """ -The selling plan delivery policy. +Represents a Shopify hosted video. """ -union SellingPlanDeliveryPolicy = SellingPlanRecurringDeliveryPolicy +type Video implements File & Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String -""" -An auto-generated type which holds one SellingPlan and a cursor during pagination. -""" -type SellingPlanEdge { """ - A cursor for use in pagination. + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. """ - cursor: String! + createdAt: DateTime! """ - The item at the end of SellingPlanEdge. + The video's duration in milliseconds. This value is `null` unless the video's status field is + [READY](https://shopify.dev/api/admin-graphql/latest/enums/MediaStatus#value-ready). """ - node: SellingPlan! -} + duration: Int -""" -A fixed amount that's deducted from the original variant price. For example, $10.00 off. -""" -type SellingPlanFixedAmountPriceAdjustment { """ - The money value of the price adjustment. + Any errors that have occurred on the file. """ - adjustmentAmount: MoneyV2! -} + fileErrors: [FileError!]! -""" -A fixed price adjustment for a variant that's purchased with a selling plan. -""" -type SellingPlanFixedPriceAdjustment { """ - A new price of the variant when it's purchased with the selling plan. + The status of the file. """ - price: MoneyV2! -} + fileStatus: FileStatus! -""" -A selling method that defines how products can be sold through purchase options like subscriptions, pre-orders, or try-before-you-buy. Groups one or more [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) objects that share the same selling method and options. + """ + The video's filename. + """ + filename: String! -The `SellingPlanGroup` acts as a container for one or more individual `SellingPlan` objects, enabling merchants to offer multiple options (like weekly or monthly deliveries) under one, unified category on a product page. -""" -type SellingPlanGroup { """ - A display friendly name for the app that created the selling plan group. + A globally-unique ID. """ - appName: String + id: ID! """ - The name of the selling plan group. + The media content type. """ - name: String! + mediaContentType: MediaContentType! """ - Represents the selling plan options available in the drop-down list in the storefront. For example, 'Delivery every week' or 'Delivery every 2 weeks' specifies the delivery frequency options for the product. + Any errors which have occurred on the media. """ - options: [SellingPlanGroupOption!]! + mediaErrors: [MediaError!]! """ - A list of selling plans in a selling plan group. A selling plan is a representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. + The warnings attached to the media. """ - sellingPlans("Returns up to the first `n` elements from the list." first: Int, "Returns the elements that come after the specified cursor." after: String, "Returns up to the last `n` elements from the list." last: Int, "Returns the elements that come before the specified cursor." before: String, "Reverse the order of the underlying list." reverse: Boolean = false): SellingPlanConnection! -} + mediaWarnings: [MediaWarning!]! -""" -An auto-generated type for paginating through multiple SellingPlanGroups. -""" -type SellingPlanGroupConnection { """ - A list of edges. + The video's original source. This value is `null` unless the video's status field is + [READY](https://shopify.dev/api/admin-graphql/latest/enums/MediaStatus#value-ready). """ - edges: [SellingPlanGroupEdge!]! + originalSource: VideoSource """ - A list of the nodes contained in SellingPlanGroupEdge. + The preview image for the media. """ - nodes: [SellingPlanGroup!]! + preview: MediaPreviewImage """ - Information to aid in pagination. + The video's sources. This value is empty unless the video's status field is + [READY](https://shopify.dev/api/admin-graphql/latest/enums/MediaStatus#value-ready). """ - pageInfo: PageInfo! -} + sources: [VideoSource!]! -""" -An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. -""" -type SellingPlanGroupEdge { """ - A cursor for use in pagination. + Current status of the media. """ - cursor: String! + status: MediaStatus! """ - The item at the end of SellingPlanGroupEdge. + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. """ - node: SellingPlanGroup! + updatedAt: DateTime! } """ -Represents an option on a selling plan group that's available in the drop-down list in the storefront. +Represents a source for a Shopify hosted video. + +Types of sources include the original video, lower resolution versions of the original video, +and an m3u8 playlist file. -Individual selling plans contribute their options to the associated selling plan group. For example, a selling plan group might have an option called `option1: Delivery every`. One selling plan in that group could contribute `option1: 2 weeks` with the pricing for that option, and another selling plan could contribute `option1: 4 weeks`, with different pricing. +Only [videos](https://shopify.dev/api/admin-graphql/latest/objects/video) with a status field +of [READY](https://shopify.dev/api/admin-graphql/latest/enums/MediaStatus#value-ready) have sources. """ -type SellingPlanGroupOption { +type VideoSource { """ - The name of the option. For example, 'Delivery every'. + The video source's file size in bytes. """ - name: String! + fileSize: Int """ - The values for the options specified by the selling plans in the selling plan group. For example, '1 week', '2 weeks', '3 weeks'. + The video source's file format extension. """ - values: [String!]! -} + format: String! -""" -Represents a valid selling plan interval. -""" -enum SellingPlanInterval { """ - Day interval. + The video source's height. """ - DAY + height: Int! """ - Month interval. + The video source's MIME type. """ - MONTH + mimeType: String! """ - Week interval. + The video source's URL. """ - WEEK + url: String! """ - Year interval. + The video source's width. """ - YEAR + width: Int! } """ -An option provided by a Selling Plan. +The `WebPixel` object enables you to manage JavaScript code snippets +that run on an online store and collect +[behavioral data](https://shopify.dev/docs/api/web-pixels-api/standard-events) +for marketing campaign optimization and analytics. + +Learn how to create a +[web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) +to subscribe your app to events that are emitted by Shopify. """ -type SellingPlanOption { +type WebPixel implements Node { """ - The name of the option (ie "Delivery every"). + A globally-unique ID. """ - name: String + id: ID! """ - The value of the option (ie "Month"). + The + [settings object](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings) + for the web pixel. This object specifies configuration options that control the web pixel's functionality and behavior. You can find the settings for a web pixel in + `extensions//shopify.extension.toml`. """ - value: String + settings: JSON! } """ -A percentage amount that's deducted from the original variant price. For example, 10% off. +Return type for `webPixelCreate` mutation. """ -type SellingPlanPercentagePriceAdjustment { +type WebPixelCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsWebPixelUserError!]! + """ - The percentage value of the price adjustment. + The created web pixel settings. """ - adjustmentPercentage: Float! + webPixel: WebPixel } """ -Represents by how much the price of a variant associated with a selling plan is adjusted. Each variant can have up to two price adjustments. If a variant has multiple price adjustments, then the first price adjustment applies when the variant is initially purchased. The second price adjustment applies after a certain number of orders (specified by the `orderCount` field) are made. If a selling plan doesn't have any price adjustments, then the unadjusted price of the variant is the effective price. +Return type for `webPixelDelete` mutation. """ -type SellingPlanPriceAdjustment { +type WebPixelDeletePayload { """ - The type of price adjustment. An adjustment value can have one of three types: percentage, amount off, or a new price. + The ID of the web pixel settings that was deleted. """ - adjustmentValue: SellingPlanPriceAdjustmentValue! + deletedWebPixelId: ID """ - The number of orders that the price adjustment applies to. If the price adjustment always applies, then this field is `null`. + The list of errors that occurred from executing the mutation. """ - orderCount: Int + userErrors: [ErrorsWebPixelUserError!]! } """ -Represents by how much the price of a variant associated with a selling plan is adjusted. Each variant can have up to two price adjustments. +The input fields for creating or updating a web pixel. """ -union SellingPlanPriceAdjustmentValue = SellingPlanFixedAmountPriceAdjustment|SellingPlanFixedPriceAdjustment|SellingPlanPercentagePriceAdjustment - -""" -The recurring billing policy for the selling plan. -""" -type SellingPlanRecurringBillingPolicy { - """ - The billing frequency, it can be either: day, week, month or year. - """ - interval: SellingPlanInterval! - +input WebPixelInput { """ - The number of intervals between billings. + The + [settings object](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings) + for the web pixel. This object specifies configuration options that control the web pixel's functionality and behavior. + You can find the settings for a web pixel in `extensions//shopify.extension.toml`. """ - intervalCount: Int! + settings: JSON! } """ -The recurring delivery policy for the selling plan. +Return type for `webPixelUpdate` mutation. """ -type SellingPlanRecurringDeliveryPolicy { +type WebPixelUpdatePayload { """ - The delivery frequency, it can be either: day, week, month or year. + The list of errors that occurred from executing the mutation. """ - interval: SellingPlanInterval! + userErrors: [ErrorsWebPixelUserError!]! """ - The number of intervals between deliveries. + The updated web pixel settings. """ - intervalCount: Int! + webPixel: WebPixel } """ -The central hub for store-wide settings and information accessible through the Storefront API. Provides the shop's name, description, and branding configuration including logos and colors through the [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) object. - -Access store policies such as privacy, refund, shipping, and terms of service via [`ShopPolicy`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicy), and the subscription policy via [`ShopPolicyWithDefault`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicyWithDefault). [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings) expose accepted card brands, supported digital wallets, and enabled presentment currencies. The object also includes the primary [`Domain`](https://shopify.dev/docs/api/storefront/current/objects/Domain), countries the shop ships to, [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing), and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. +The input fields used to create a web presence. """ -type Shop implements HasMetafields & Node { +input WebPresenceCreateInput { """ - The shop's branding configuration. + The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. """ - brand: Brand + domainId: ID """ - Translations for customer accounts. + The default locale for the web presence. """ - customerAccountTranslations: [Translation!] + defaultLocale: String! """ - The URL for the customer account (only present if shop has a customer account vanity domain). + The alternate locales for the web presence. """ - customerAccountUrl: String + alternateLocales: [String!] """ - A description of the shop. + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. """ - description: String + subfolderSuffix: String +} +""" +Return type for `webPresenceCreate` mutation. +""" +type WebPresenceCreatePayload { """ - A globally-unique ID. + The list of errors that occurred from executing the mutation. """ - id: ID! + userErrors: [MarketUserError!]! """ - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. + The created web presence object. """ - metafield("The container the metafield belongs to. If omitted, the app-reserved namespace will be used." namespace: String, "The identifier for the metafield." key: String!): Metafield + webPresence: MarketWebPresence +} +""" +Return type for `webPresenceDelete` mutation. +""" +type WebPresenceDeletePayload { """ - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. + The ID of the deleted web presence. """ - metafields("The list of metafields to retrieve by namespace and key.\n\nThe input must not contain more than `250` values." identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! + deletedId: ID """ - A string representing the way currency is formatted when the currency isn’t specified. + The list of errors that occurred from executing the mutation. """ - moneyFormat: String! + userErrors: [MarketUserError!]! +} +""" +The input fields used to update a web presence. +""" +input WebPresenceUpdateInput { """ - The shop’s name. + The default locale for the web presence. """ - name: String! + defaultLocale: String """ - Settings related to payments. + The alternate locales for the web presence. """ - paymentSettings: PaymentSettings! + alternateLocales: [String!] """ - The primary domain of the shop’s Online Store. + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. + This field must be null if subfolder suffix is not already defined for the web presence. """ - primaryDomain: Domain! + subfolderSuffix: String +} +""" +Return type for `webPresenceUpdate` mutation. +""" +type WebPresenceUpdatePayload { """ - The shop’s privacy policy. + The list of errors that occurred from executing the mutation. """ - privacyPolicy: ShopPolicy + userErrors: [MarketUserError!]! """ - The shop’s refund policy. + The web presence object. """ - refundPolicy: ShopPolicy + webPresence: MarketWebPresence +} - """ - The shop’s shipping policy. - """ - shippingPolicy: ShopPolicy +""" +Connects your app to Amazon EventBridge so you can receive Shopify webhook events and process them through AWS's event-driven architecture. This gives you enterprise-grade scalability and lets you tap into the full AWS ecosystem for handling webhook traffic. - """ - Countries that the shop ships to. - """ - shipsToCountries: [CountryCode!]! +For example, when a customer places an order, Shopify can publish the order creation event directly to your EventBridge partner source, allowing your AWS infrastructure to process the event through Lambda functions, SQS queues, or other AWS services. + +EventBridge endpoints provide enterprise-grade event routing and processing capabilities, making them ideal for apps that need to handle high-volume webhook traffic or integrate deeply with AWS services. +Learn more about [webhook endpoints](https://shopify.dev/docs/apps/build/webhooks/subscribe/get-started). +""" +type WebhookEventBridgeEndpoint { """ - The Shop Pay Installments pricing information for the shop. + The ARN of this EventBridge partner event source. """ - shopPayInstallmentsPricing: ShopPayInstallmentsPricing + arn: ARN! +} + +""" +An HTTPS endpoint that receives webhook events as POST requests, letting your app respond to Shopify events in real-time. This is the most common webhook endpoint type, allowing apps to process Shopify events through standard HTTP callbacks. +For example, when setting up order notifications, your app would provide an HTTPS URL like `https://yourapp.com/webhooks/orders/create` to receive order creation events as JSON payloads. + +HTTP endpoints offer straightforward webhook integration with immediate event delivery, making them suitable for apps that need real-time notifications without complex infrastructure requirements. + +Learn more about [HTTP webhook configuration](https://shopify.dev/docs/apps/build/webhooks/subscribe/https). +""" +type WebhookHttpEndpoint { """ - The social login providers for customer accounts. + The URL to which the webhooks events are sent. """ - socialLoginProviders: [SocialLoginProvider!]! + callbackUrl: URL! +} +""" +Individual Google Cloud Pub/Sub topics that receive webhook events for reliable, asynchronous processing. This endpoint type lets your app tap into Google Cloud's messaging infrastructure to handle events at scale. + +For example, when inventory levels change, Shopify can publish these events to your Pub/Sub topic `projects/your-project/topics/inventory-updates`, allowing your Google Cloud functions or services to process inventory changes at their own pace. + +Pub/Sub endpoints provide reliable message delivery to Google Cloud Pub/Sub, making them excellent for apps that need to handle variable webhook volumes or integrate with Google Cloud Platform services. + +Learn more about [Pub/Sub webhook configuration](https://shopify.dev/docs/apps/build/webhooks/subscribe/get-started). +""" +type WebhookPubSubEndpoint { """ - The shop’s subscription policy. + The Google Cloud Pub/Sub project ID. """ - subscriptionPolicy: ShopPolicyWithDefault + pubSubProject: String! """ - The shop’s terms of service. + The Google Cloud Pub/Sub topic ID. """ - termsOfService: ShopPolicy + pubSubTopic: String! } """ -The financing plan in Shop Pay Installments. +A webhook subscription is a persisted data object created by an app using the REST Admin API or GraphQL Admin API. +It describes the topic that the app wants to receive, and a destination where Shopify should send webhooks of the specified topic. +When an event for a given topic occurs, the webhook subscription sends a relevant payload to the destination. +Learn more about the [webhooks system](https://shopify.dev/apps/webhooks). """ -type ShopPayInstallmentsFinancingPlan implements Node { +type WebhookSubscription implements LegacyInteroperability & Node { """ - A globally-unique ID. + The Admin API version that Shopify uses to serialize webhook events. This value is inherited from the app that created the webhook subscription. """ - id: ID! + apiVersion: ApiVersion! """ - The maximum price to qualify for the financing plan. + The destination URI to which the webhook subscription will send a message when an event occurs. """ - maxPrice: MoneyV2! + callbackUrl: URL! @deprecated(reason: "Use `uri` instead.") """ - The minimum price to qualify for the financing plan. + The date and time when the webhook subscription was created. """ - minPrice: MoneyV2! + createdAt: DateTime! """ - The terms of the financing plan. + The endpoint to which the webhook subscription will send events. """ - terms: [ShopPayInstallmentsFinancingPlanTerm!]! -} + endpoint: WebhookSubscriptionEndpoint! @deprecated(reason: "Use `uri` instead.") -""" -The payment frequency for a Shop Pay Installments Financing Plan. -""" -enum ShopPayInstallmentsFinancingPlanFrequency { """ - Weekly payment frequency. + A constraint specified using search syntax that ensures only webhooks that match the specified filter are emitted. See our [guide on filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. """ - WEEKLY + filter: String """ - Monthly payment frequency. + The format in which the webhook subscription should send the data. """ - MONTHLY -} + format: WebhookSubscriptionFormat! -""" -The terms of the financing plan in Shop Pay Installments. -""" -type ShopPayInstallmentsFinancingPlanTerm implements Node { """ - The annual percentage rate (APR) of the financing plan. + A globally-unique ID. """ - apr: Int! + id: ID! """ - The payment frequency for the financing plan. + The list of fields to be included in the webhook subscription. Only the fields specified will be included in the webhook payload. If null, then all fields will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify-payloads). """ - frequency: ShopPayInstallmentsFinancingPlanFrequency! + includeFields: [String!]! """ - A globally-unique ID. + The ID of the corresponding resource in the REST Admin API. """ - id: ID! + legacyResourceId: UnsignedInt64! """ - The number of installments for the financing plan. + The list of namespaces for any metafields that should be included in the webhook subscription. """ - installmentsCount: Count + metafieldNamespaces: [String!]! """ - The type of loan for the financing plan. + The list of identifiers specifying metafields to include in the webhook subscription. """ - loanType: ShopPayInstallmentsLoan! -} + metafields: [WebhookSubscriptionMetafieldIdentifier!]! -""" -The loan type for a Shop Pay Installments Financing Plan Term. -""" -enum ShopPayInstallmentsLoan { """ - An interest-bearing loan type. + The type of event that triggers the webhook. The topic determines when the webhook subscription sends a webhook, as well as what class of data object that webhook contains. """ - INTEREST + topic: WebhookSubscriptionTopic! """ - A split-pay loan type. + The date and time when the webhook subscription was updated. """ - SPLIT_PAY + updatedAt: DateTime! """ - A zero-percent loan type. + The URI to which the webhook subscription will send events. """ - ZERO_PERCENT + uri: String! } """ -The result for a Shop Pay Installments pricing request. +An auto-generated type for paginating through multiple WebhookSubscriptions. """ -type ShopPayInstallmentsPricing { +type WebhookSubscriptionConnection { """ - The financing plans available for the given price range. + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. """ - financingPlans: [ShopPayInstallmentsFinancingPlan!]! + edges: [WebhookSubscriptionEdge!]! """ - The maximum price to qualify for financing. + A list of nodes that are contained in WebhookSubscriptionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. """ - maxPrice: MoneyV2! + nodes: [WebhookSubscription!]! """ - The minimum price to qualify for financing. + An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. """ - minPrice: MoneyV2! + pageInfo: PageInfo! } """ -The shop pay installments pricing information for a product variant. +Return type for `webhookSubscriptionCreate` mutation. """ -type ShopPayInstallmentsProductVariantPricing implements Node { +type WebhookSubscriptionCreatePayload { """ - Whether the product variant is available. + The list of errors that occurred from executing the mutation. """ - available: Boolean! + userErrors: [UserError!]! """ - Whether the product variant is eligible for Shop Pay Installments. + The webhook subscription that was created. """ - eligible: Boolean! + webhookSubscription: WebhookSubscription +} +""" +Return type for `webhookSubscriptionDelete` mutation. +""" +type WebhookSubscriptionDeletePayload { """ - The full price of the product variant. + The ID of the deleted webhook subscription. """ - fullPrice: MoneyV2! + deletedWebhookSubscriptionId: ID """ - The ID of the product variant. + The list of errors that occurred from executing the mutation. """ - id: ID! + userErrors: [UserError!]! +} +""" +An auto-generated type which holds one WebhookSubscription and a cursor during pagination. +""" +type WebhookSubscriptionEdge { """ - The number of payment terms available for the product variant. + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). """ - installmentsCount: Count + cursor: String! """ - The price per term for the product variant. + The item at the end of WebhookSubscriptionEdge. """ - pricePerTerm: MoneyV2! + node: WebhookSubscription! } """ -Represents a Shop Pay payment request. +An endpoint to which webhook subscriptions send webhooks events. """ -type ShopPayPaymentRequest { - """ - The delivery methods for the payment request. - """ - deliveryMethods: [ShopPayPaymentRequestDeliveryMethod!]! @deprecated(reason: "This field is deprecated and will be removed in a future version.") +union WebhookSubscriptionEndpoint = WebhookEventBridgeEndpoint|WebhookHttpEndpoint|WebhookPubSubEndpoint - """ - The discount codes for the payment request. - """ - discountCodes: [String!]! +""" +The supported formats for webhook subscriptions. +""" +enum WebhookSubscriptionFormat { + JSON - """ - The discounts for the payment request order. - """ - discounts: [ShopPayPaymentRequestDiscount!] + XML +} +""" +The input fields for a webhook subscription. +""" +input WebhookSubscriptionInput { """ - The line items for the payment request. + The format in which the webhook subscription should send the data. """ - lineItems: [ShopPayPaymentRequestLineItem!]! + format: WebhookSubscriptionFormat """ - The locale for the payment request. + The list of fields to be included in the webhook subscription. Only the fields specified will be included in the webhook payload. If null, then all fields will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). """ - locale: String! + includeFields: [String!] """ - The presentment currency for the payment request. + A constraint specified using search syntax that ensures only webhooks that match the specified filter are emitted. See our [guide on filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. """ - presentmentCurrency: CurrencyCode! + filter: String """ - The delivery method type for the payment request. + The list of namespaces for any metafields that should be included in the webhook subscription. """ - selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType! + metafieldNamespaces: [String!] """ - The shipping address for the payment request. + A list of identifiers specifying metafields to include in the webhook payload. """ - shippingAddress: ShopPayPaymentRequestContactField + metafields: [HasMetafieldsMetafieldIdentifierInput!] """ - The shipping lines for the payment request. + URL where the webhook subscription should send the POST request when the event occurs. """ - shippingLines: [ShopPayPaymentRequestShippingLine!]! + callbackUrl: URL @deprecated(reason: "Use `uri` instead.") """ - The subtotal amount for the payment request. + The URI where the webhook subscription should send events. Supports an HTTPS URL, a Google Pub/Sub URI (pubsub://{project-id}:{topic-id}) or an Amazon EventBridge event source ARN. """ - subtotal: MoneyV2! + uri: String +} - """ - The total amount for the payment request. - """ - total: MoneyV2! +""" +Webhook subscriptions let you receive instant notifications when important events happen in a merchant's store, so you can automate workflows and keep your systems in sync without constantly polling for updates. + +For example, a subscription might monitor `orders/create` events and send JSON payloads to `https://yourapp.com/webhooks/orders` whenever customers place new orders, enabling immediate order processing workflows. + +Use the `WebhookSubscription` object to: +- Monitor active webhook configurations +- Access subscription details like topics, endpoints, and filtering rules +- Retrieve creation and update timestamps for audit purposes +- Review API versions and format settings +- Examine metafield namespace configurations for extended data access +Each subscription includes comprehensive configuration details such as the specific Shopify events being monitored, the destination endpoint (HTTP, EventBridge, or Pub/Sub), event filtering criteria, and payload customization settings. The subscription tracks its creation and modification history. + +Subscriptions can include advanced features like Shopify search syntax for event filtering to control +which events trigger notifications, specific field inclusion rules to control which fields are included +in the webhook payload, and metafield namespace access to capture custom store data. The API version +is inherited from the app that created the webhook subscription. + +The endpoint configuration varies by type - HTTP subscriptions include callback URLs, EventBridge subscriptions reference AWS ARNs, and Pub/Sub subscriptions specify Google Cloud project and topic details. This flexibility allows apps to integrate webhooks with their preferred infrastructure and event processing systems. + +Learn more about [webhook subscription management](https://shopify.dev/docs/apps/webhooks). +""" +type WebhookSubscriptionMetafieldIdentifier { """ - The total shipping price for the payment request. + The unique identifier for the metafield definition within its namespace. """ - totalShippingPrice: ShopPayPaymentRequestTotalShippingPrice + key: String! """ - The total tax for the payment request. + The container for a group of metafields that the metafield definition is associated with. """ - totalTax: MoneyV2 + namespace: String! } """ -Represents a contact field for a Shop Pay payment request. +The set of valid sort keys for the WebhookSubscription query. """ -type ShopPayPaymentRequestContactField { +enum WebhookSubscriptionSortKeys { """ - The first address line of the contact field. + Sort by the `created_at` value. """ - address1: String! + CREATED_AT """ - The second address line of the contact field. + Sort by the `id` value. """ - address2: String + ID +} - """ - The city of the contact field. - """ - city: String! +""" +The supported topics for webhook subscriptions. You can use webhook subscriptions to receive +notifications about particular events in a shop. - """ - The company name of the contact field. - """ - companyName: String +You create [mandatory webhooks](https://shopify.dev/apps/webhooks/configuration/mandatory-webhooks#mandatory-compliance-webhooks) either via the +[Partner Dashboard](https://shopify.dev/apps/webhooks/configuration/mandatory-webhooks#subscribe-to-privacy-webhooks) +or by updating the [app configuration file](https://shopify.dev/apps/tools/cli/configuration#app-configuration-file-example). +> Tip: +>To configure your subscription using the app configuration file, refer to the [full list of topic names](https://shopify.dev/docs/api/webhooks?reference=graphql). +""" +enum WebhookSubscriptionTopic { """ - The country of the contact field. + The webhook topic for `tax_summaries/create` events. Occurs when a tax summary is created. Consumed by tax partners. Requires at least one of the following scopes: read_fulfillments, read_marketplace_orders, read_orders. """ - countryCode: String! + TAX_SUMMARIES_CREATE """ - The email of the contact field. + The webhook topic for `app/uninstalled` events. Occurs whenever a shop has uninstalled the app. """ - email: String + APP_UNINSTALLED """ - The first name of the contact field. + The webhook topic for `app/scopes_update` events. Occurs whenever the access scopes of any installation are modified. Allows apps to keep track of the granted access scopes of their installations. """ - firstName: String! + APP_SCOPES_UPDATE """ - The first name of the contact field. + The webhook topic for `carts/create` events. Occurs when a cart is created in the online store. Other types of carts aren't supported. For example, the webhook doesn't support carts that are created in a custom storefront. Requires the `read_orders` scope. """ - lastName: String! + CARTS_CREATE """ - The phone number of the contact field. + The webhook topic for `carts/update` events. Occurs when a cart is updated in the online store. Other types of carts aren't supported. For example, the webhook doesn't support carts that are updated in a custom storefront. Requires the `read_orders` scope. """ - phone: String + CARTS_UPDATE """ - The postal code of the contact field. + The webhook topic for `channels/delete` events. Occurs whenever a channel is deleted. Requires the `read_publications` scope. """ - postalCode: String + CHANNELS_DELETE """ - The province of the contact field. + The webhook topic for `checkouts/create` events. Occurs whenever a checkout is created. Requires the `read_orders` scope. """ - provinceCode: String -} + CHECKOUTS_CREATE -""" -Represents a delivery method for a Shop Pay payment request. -""" -type ShopPayPaymentRequestDeliveryMethod { """ - The amount for the delivery method. + The webhook topic for `checkouts/delete` events. Occurs whenever a checkout is deleted. Requires the `read_orders` scope. """ - amount: MoneyV2! + CHECKOUTS_DELETE """ - The code of the delivery method. + The webhook topic for `checkouts/update` events. Occurs whenever a checkout is updated. Requires the `read_orders` scope. """ - code: String! + CHECKOUTS_UPDATE """ - The detail about when the delivery may be expected. + The webhook topic for `customer_payment_methods/create` events. Occurs whenever a customer payment method is created. Requires the `read_customer_payment_methods` scope. """ - deliveryExpectationLabel: String + CUSTOMER_PAYMENT_METHODS_CREATE """ - The detail of the delivery method. + The webhook topic for `customer_payment_methods/update` events. Occurs whenever a customer payment method is updated. Requires the `read_customer_payment_methods` scope. """ - detail: String + CUSTOMER_PAYMENT_METHODS_UPDATE """ - The label of the delivery method. + The webhook topic for `customer_payment_methods/revoke` events. Occurs whenever a customer payment method is revoked. Requires the `read_customer_payment_methods` scope. """ - label: String! + CUSTOMER_PAYMENT_METHODS_REVOKE """ - The maximum delivery date for the delivery method. + The webhook topic for `collection_listings/add` events. Occurs whenever a collection listing is added. Requires the `read_product_listings` scope. """ - maxDeliveryDate: ISO8601DateTime + COLLECTION_LISTINGS_ADD """ - The minimum delivery date for the delivery method. + The webhook topic for `collection_listings/remove` events. Occurs whenever a collection listing is removed. Requires the `read_product_listings` scope. """ - minDeliveryDate: ISO8601DateTime -} + COLLECTION_LISTINGS_REMOVE -""" -The input fields to create a delivery method for a Shop Pay payment request. -""" -input ShopPayPaymentRequestDeliveryMethodInput { """ - The code of the delivery method. + The webhook topic for `collection_listings/update` events. Occurs whenever a collection listing is updated. Requires the `read_product_listings` scope. """ - code: String + COLLECTION_LISTINGS_UPDATE """ - The label of the delivery method. + The webhook topic for `collection_publications/create` events. Occurs whenever a collection publication listing is created. Requires the `read_publications` scope. """ - label: String + COLLECTION_PUBLICATIONS_CREATE """ - The detail of the delivery method. + The webhook topic for `collection_publications/delete` events. Occurs whenever a collection publication listing is deleted. Requires the `read_publications` scope. """ - detail: String + COLLECTION_PUBLICATIONS_DELETE """ - The amount for the delivery method. + The webhook topic for `collection_publications/update` events. Occurs whenever a collection publication listing is updated. Requires the `read_publications` scope. """ - amount: MoneyInput + COLLECTION_PUBLICATIONS_UPDATE """ - The minimum delivery date for the delivery method. + The webhook topic for `collections/create` events. Occurs whenever a collection is created. Requires the `read_products` scope. """ - minDeliveryDate: ISO8601DateTime + COLLECTIONS_CREATE """ - The maximum delivery date for the delivery method. + The webhook topic for `collections/delete` events. Occurs whenever a collection is deleted. Requires the `read_products` scope. """ - maxDeliveryDate: ISO8601DateTime + COLLECTIONS_DELETE """ - The detail about when the delivery may be expected. + The webhook topic for `collections/update` events. Occurs whenever a collection is updated, including when a product is manually added or removed from the collection or when the collection rules change. Occurs once if multiple products are manually added or removed from a collection at the same time. Not fired when attribute changes affect whether a product matches a collection's rules. Requires the `read_products` scope. """ - deliveryExpectationLabel: String -} + COLLECTIONS_UPDATE -""" -Represents the delivery method type for a Shop Pay payment request. -""" -enum ShopPayPaymentRequestDeliveryMethodType { """ - The delivery method type is shipping. + The webhook topic for `customer_groups/create` events. Occurs whenever a customer saved search is created. Requires the `read_customers` scope. """ - SHIPPING + CUSTOMER_GROUPS_CREATE """ - The delivery method type is pickup. + The webhook topic for `customer_groups/delete` events. Occurs whenever a customer saved search is deleted. Requires the `read_customers` scope. """ - PICKUP -} + CUSTOMER_GROUPS_DELETE -""" -Represents a discount for a Shop Pay payment request. -""" -type ShopPayPaymentRequestDiscount { """ - The amount of the discount. + The webhook topic for `customer_groups/update` events. Occurs whenever a customer saved search is updated. Requires the `read_customers` scope. """ - amount: MoneyV2! + CUSTOMER_GROUPS_UPDATE """ - The label of the discount. + The webhook topic for `customers/create` events. Occurs whenever a customer is created. Requires the `read_customers` scope. """ - label: String! -} + CUSTOMERS_CREATE -""" -The input fields to create a discount for a Shop Pay payment request. -""" -input ShopPayPaymentRequestDiscountInput { """ - The label of the discount. + The webhook topic for `customers/delete` events. Occurs whenever a customer is deleted. Requires the `read_customers` scope. """ - label: String + CUSTOMERS_DELETE """ - The amount of the discount. + The webhook topic for `customers/disable` events. Occurs whenever a customer account is disabled. Requires the `read_customers` scope. """ - amount: MoneyInput -} + CUSTOMERS_DISABLE -""" -Represents an image for a Shop Pay payment request line item. -""" -type ShopPayPaymentRequestImage { """ - The alt text of the image. + The webhook topic for `customers/enable` events. Occurs whenever a customer account is enabled. Requires the `read_customers` scope. """ - alt: String + CUSTOMERS_ENABLE """ - The source URL of the image. + The webhook topic for `customers/update` events. Occurs whenever a customer is updated. Requires the `read_customers` scope. """ - url: String! -} + CUSTOMERS_UPDATE -""" -The input fields to create an image for a Shop Pay payment request. -""" -input ShopPayPaymentRequestImageInput { """ - The source URL of the image. + The webhook topic for `customers/purchasing_summary` events. Occurs when a customer sales history change. Requires the `read_customers` scope. """ - url: String! + CUSTOMERS_PURCHASING_SUMMARY """ - The alt text of the image. + The webhook topic for `customers_marketing_consent/update` events. Occurs whenever a customer's SMS marketing consent is updated. Requires the `read_customers` scope. """ - alt: String -} + CUSTOMERS_MARKETING_CONSENT_UPDATE -""" -The input fields represent a Shop Pay payment request. -""" -input ShopPayPaymentRequestInput { """ - The discount codes for the payment request. - - The input must not contain more than `250` values. + The webhook topic for `customer.tags_added` events. Triggers when tags are added to a customer. Requires the `read_customers` scope. """ - discountCodes: [String!] + CUSTOMER_TAGS_ADDED """ - The line items for the payment request. - - The input must not contain more than `250` values. + The webhook topic for `customer.tags_removed` events. Triggers when tags are removed from a customer. Requires the `read_customers` scope. """ - lineItems: [ShopPayPaymentRequestLineItemInput!] + CUSTOMER_TAGS_REMOVED """ - The shipping lines for the payment request. - - The input must not contain more than `250` values. + The webhook topic for `customers_email_marketing_consent/update` events. Occurs whenever a customer's email marketing consent is updated. Requires the `read_customers` scope. """ - shippingLines: [ShopPayPaymentRequestShippingLineInput!] + CUSTOMERS_EMAIL_MARKETING_CONSENT_UPDATE """ - The total amount for the payment request. + The webhook topic for `disputes/create` events. Occurs whenever a dispute is created. Requires the `read_shopify_payments_disputes` scope. """ - total: MoneyInput! + DISPUTES_CREATE """ - The subtotal amount for the payment request. + The webhook topic for `disputes/update` events. Occurs whenever a dispute is updated. Requires the `read_shopify_payments_disputes` scope. """ - subtotal: MoneyInput! + DISPUTES_UPDATE """ - The discounts for the payment request order. - - The input must not contain more than `250` values. + The webhook topic for `draft_orders/create` events. Occurs whenever a draft order is created. Requires the `read_draft_orders` scope. """ - discounts: [ShopPayPaymentRequestDiscountInput!] + DRAFT_ORDERS_CREATE """ - The total shipping price for the payment request. + The webhook topic for `draft_orders/delete` events. Occurs whenever a draft order is deleted. Requires the `read_draft_orders` scope. """ - totalShippingPrice: ShopPayPaymentRequestTotalShippingPriceInput + DRAFT_ORDERS_DELETE """ - The total tax for the payment request. + The webhook topic for `draft_orders/update` events. Occurs whenever a draft order is updated. Requires the `read_draft_orders` scope. """ - totalTax: MoneyInput + DRAFT_ORDERS_UPDATE """ - The delivery methods for the payment request. - - The input must not contain more than `250` values. + The webhook topic for `fulfillment_events/create` events. Occurs whenever a fulfillment event is created. Requires the `read_fulfillments` scope. """ - deliveryMethods: [ShopPayPaymentRequestDeliveryMethodInput!] @deprecated(reason: "This field is deprecated and will be removed in a future version.") + FULFILLMENT_EVENTS_CREATE """ - The delivery method type for the payment request. + The webhook topic for `fulfillment_events/delete` events. Occurs whenever a fulfillment event is deleted. Requires the `read_fulfillments` scope. """ - selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType + FULFILLMENT_EVENTS_DELETE """ - The locale for the payment request. + The webhook topic for `fulfillments/create` events. Occurs whenever a fulfillment is created. Requires at least one of the following scopes: read_fulfillments, read_marketplace_orders. """ - locale: String! + FULFILLMENTS_CREATE """ - The presentment currency for the payment request. + The webhook topic for `fulfillments/update` events. Occurs whenever a fulfillment is updated. Requires at least one of the following scopes: read_fulfillments, read_marketplace_orders. """ - presentmentCurrency: CurrencyCode! + FULFILLMENTS_UPDATE """ - The encrypted payment method for the payment request. + The webhook topic for `attributed_sessions/first` events. Occurs whenever an order with a "first" attributed session is attributed. Requires the `read_marketing_events` scope. """ - paymentMethod: String -} + ATTRIBUTED_SESSIONS_FIRST -""" -Represents a line item for a Shop Pay payment request. -""" -type ShopPayPaymentRequestLineItem { """ - The final item price for the line item. + The webhook topic for `attributed_sessions/last` events. Occurs whenever an order with a "last" attributed session is attributed. Requires the `read_marketing_events` scope. """ - finalItemPrice: MoneyV2! + ATTRIBUTED_SESSIONS_LAST """ - The final line price for the line item. + The webhook topic for `order_transactions/create` events. Occurs when a order transaction is created or when it's status is updated. Only occurs for transactions with a status of success, failure or error. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - finalLinePrice: MoneyV2! + ORDER_TRANSACTIONS_CREATE """ - The image of the line item. + The webhook topic for `orders/cancelled` events. Occurs whenever an order is cancelled. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - image: ShopPayPaymentRequestImage + ORDERS_CANCELLED """ - The item discounts for the line item. + The webhook topic for `orders/create` events. Occurs whenever an order is created. Requires at least one of the following scopes: read_orders, read_marketplace_orders. """ - itemDiscounts: [ShopPayPaymentRequestDiscount!] + ORDERS_CREATE """ - The label of the line item. + The webhook topic for `orders/delete` events. Occurs whenever an order is deleted. Requires the `read_orders` scope. """ - label: String! + ORDERS_DELETE """ - The line discounts for the line item. + The webhook topic for `orders/edited` events. Occurs whenever an order is edited. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - lineDiscounts: [ShopPayPaymentRequestDiscount!] + ORDERS_EDITED """ - The original item price for the line item. + The webhook topic for `orders/fulfilled` events. Occurs whenever an order is fulfilled. Requires at least one of the following scopes: read_orders, read_marketplace_orders. """ - originalItemPrice: MoneyV2 + ORDERS_FULFILLED """ - The original line price for the line item. + The webhook topic for `orders/paid` events. Occurs whenever an order is paid. Requires at least one of the following scopes: read_orders, read_marketplace_orders. """ - originalLinePrice: MoneyV2 + ORDERS_PAID """ - The quantity of the line item. + The webhook topic for `orders/partially_fulfilled` events. Occurs whenever an order is partially fulfilled. Requires at least one of the following scopes: read_orders, read_marketplace_orders. """ - quantity: Int! + ORDERS_PARTIALLY_FULFILLED """ - Whether the line item requires shipping. + The webhook topic for `orders/updated` events. Occurs whenever an order is updated. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - requiresShipping: Boolean + ORDERS_UPDATED """ - The SKU of the line item. + The webhook topic for `orders/link_requested` events. Occurs whenever a customer requests a new order link from the expired order status page. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - sku: String -} + ORDERS_LINK_REQUESTED -""" -The input fields to create a line item for a Shop Pay payment request. -""" -input ShopPayPaymentRequestLineItemInput { - """ - The label of the line item. """ - label: String + The webhook topic for `fulfillment_orders/moved` events. Occurs whenever the location which is assigned to fulfill one or more fulfillment order line items is changed. + * `original_fulfillment_order` - The final state of the original fulfillment order. + * `moved_fulfillment_order` - The fulfillment order which now contains the re-assigned line items. + * `source_location` - The original location which was assigned to fulfill the line items (available as of the `2023-04` API version). + * `destination_location_id` - The ID of the location which is now responsible for fulfilling the line items. + + **Note:** The [assignedLocation](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorder#field-fulfillmentorder-assignedlocation) + of the `original_fulfillment_order` might be changed by the move operation. + If you need to determine the originally assigned location, then you should refer to the `source_location`. + + [Learn more about moving line items](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentOrderMove). + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - The quantity of the line item. - """ - quantity: Int! + FULFILLMENT_ORDERS_MOVED """ - The SKU of the line item. + The webhook topic for `fulfillment_orders/hold_released` events. Occurs when a fulfillment order is released and is no longer on hold. + + If a fulfillment order has multiple holds then this webhook will only be triggered once when the last hold is released and the status of the fulfillment order is no longer `ON_HOLD`. + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - sku: String + FULFILLMENT_ORDERS_HOLD_RELEASED """ - Whether the line item requires shipping. + The webhook topic for `fulfillment_orders/scheduled_fulfillment_order_ready` events. Occurs whenever a fulfillment order which was scheduled becomes due. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - requiresShipping: Boolean + FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY """ - The image of the line item. + The webhook topic for `fulfillment_holds/released` events. Occurs each time that a hold is released from a fulfillment order. + For cases where multiple holds are released from a fulfillment order a the same time, this webhook will trigger for each released hold. + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - image: ShopPayPaymentRequestImageInput + FULFILLMENT_HOLDS_RELEASED """ - The original line price for the line item. + The webhook topic for `fulfillment_orders/order_routing_complete` events. Occurs when an order has finished being routed and it's fulfillment orders assigned to a fulfillment service's location. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_buyer_membership_orders, read_marketplace_fulfillment_orders. """ - originalLinePrice: MoneyInput + FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE """ - The final line price for the line item. + The webhook topic for `fulfillment_orders/cancelled` events. Occurs when a fulfillment order is cancelled. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - finalLinePrice: MoneyInput + FULFILLMENT_ORDERS_CANCELLED """ - The line discounts for the line item. - - The input must not contain more than `250` values. + The webhook topic for `fulfillment_orders/fulfillment_service_failed_to_complete` events. Occurs when a fulfillment service intends to close an in_progress fulfillment order. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - lineDiscounts: [ShopPayPaymentRequestDiscountInput!] + FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE """ - The original item price for the line item. + The webhook topic for `fulfillment_orders/fulfillment_request_rejected` events. Occurs when a 3PL rejects a fulfillment request that was sent by a merchant. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - originalItemPrice: MoneyInput + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED """ - The final item price for the line item. + The webhook topic for `fulfillment_orders/cancellation_request_submitted` events. Occurs when a merchant requests a fulfillment request to be cancelled after that request was approved by a 3PL. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - finalItemPrice: MoneyInput + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED """ - The item discounts for the line item. - - The input must not contain more than `250` values. + The webhook topic for `fulfillment_orders/cancellation_request_accepted` events. Occurs when a 3PL accepts a fulfillment cancellation request, received from a merchant. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - itemDiscounts: [ShopPayPaymentRequestDiscountInput!] -} + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED -""" -Represents a receipt for a Shop Pay payment request. -""" -type ShopPayPaymentRequestReceipt { """ - The payment request object. + The webhook topic for `fulfillment_orders/cancellation_request_rejected` events. Occurs when a 3PL rejects a fulfillment cancellation request, received from a merchant. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - paymentRequest: ShopPayPaymentRequest! + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED """ - The processing status. + The webhook topic for `fulfillment_orders/fulfillment_request_submitted` events. Occurs when a merchant submits a fulfillment request to a 3PL. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - processingStatusType: String! + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED """ - The token of the receipt. + The webhook topic for `fulfillment_orders/fulfillment_request_accepted` events. Occurs when a fulfillment service accepts a request to fulfill a fulfillment order. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - token: String! -} + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED -""" -Represents a Shop Pay payment request session. -""" -type ShopPayPaymentRequestSession { """ - The checkout URL of the Shop Pay payment request session. + The webhook topic for `fulfillment_holds/added` events. Occurs each time that a hold is added to a fulfillment order. + + For cases where multiple holds are applied to a fulfillment order, this webhook will trigger after each hold is applied. + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - checkoutUrl: URL! + FULFILLMENT_HOLDS_ADDED """ - The payment request associated with the Shop Pay payment request session. + The webhook topic for `fulfillment_orders/line_items_prepared_for_local_delivery` events. Occurs whenever a fulfillment order's line items are prepared for local delivery. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - paymentRequest: ShopPayPaymentRequest! + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY """ - The source identifier of the Shop Pay payment request session. + The webhook topic for `fulfillment_orders/placed_on_hold` events. Occurs when a fulfillment order transitions to the `ON_HOLD` status + + For cases where multiple holds are applied to a fulfillment order, this webhook will only trigger once when the first hold is applied and the fulfillment order status changes to `ON_HOLD`. + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - sourceIdentifier: String! + FULFILLMENT_ORDERS_PLACED_ON_HOLD """ - The token of the Shop Pay payment request session. + The webhook topic for `fulfillment_orders/merged` events. Occurs when multiple fulfillment orders are merged into a single fulfillment order. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. """ - token: String! -} + FULFILLMENT_ORDERS_MERGED -""" -Return type for `shopPayPaymentRequestSessionCreate` mutation. -""" -type ShopPayPaymentRequestSessionCreatePayload { """ - The new Shop Pay payment request session object. + The webhook topic for `fulfillment_orders/split` events. Occurs when a fulfillment order is split into multiple fulfillment orders. Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. """ - shopPayPaymentRequestSession: ShopPayPaymentRequestSession + FULFILLMENT_ORDERS_SPLIT """ - Error codes for failed Shop Pay payment request session mutations. + The webhook topic for `product_listings/add` events. Occurs whenever an active product is listed on a channel. Requires the `read_product_listings` scope. """ - userErrors: [UserErrorsShopPayPaymentRequestSessionUserErrors!]! -} + PRODUCT_LISTINGS_ADD -""" -Return type for `shopPayPaymentRequestSessionSubmit` mutation. -""" -type ShopPayPaymentRequestSessionSubmitPayload { """ - The checkout on which the payment was applied. + The webhook topic for `product_listings/remove` events. Occurs whenever a product listing is removed from the channel. Requires the `read_product_listings` scope. """ - paymentRequestReceipt: ShopPayPaymentRequestReceipt + PRODUCT_LISTINGS_REMOVE """ - Error codes for failed Shop Pay payment request session mutations. + The webhook topic for `product_listings/update` events. Occurs whenever a product publication is updated. Requires the `read_product_listings` scope. """ - userErrors: [UserErrorsShopPayPaymentRequestSessionUserErrors!]! -} + PRODUCT_LISTINGS_UPDATE -""" -Represents a shipping line for a Shop Pay payment request. -""" -type ShopPayPaymentRequestShippingLine { """ - The amount for the shipping line. + The webhook topic for `scheduled_product_listings/add` events. Occurs whenever a product is scheduled to be published. Requires the `read_product_listings` scope. """ - amount: MoneyV2! + SCHEDULED_PRODUCT_LISTINGS_ADD """ - The code of the shipping line. + The webhook topic for `scheduled_product_listings/update` events. Occurs whenever a product's scheduled availability date changes. Requires the `read_product_listings` scope. """ - code: String! + SCHEDULED_PRODUCT_LISTINGS_UPDATE """ - The label of the shipping line. + The webhook topic for `scheduled_product_listings/remove` events. Occurs whenever a product is no longer scheduled to be published. Requires the `read_product_listings` scope. """ - label: String! -} + SCHEDULED_PRODUCT_LISTINGS_REMOVE -""" -The input fields to create a shipping line for a Shop Pay payment request. -""" -input ShopPayPaymentRequestShippingLineInput { """ - The code of the shipping line. + The webhook topic for `product_publications/create` events. Occurs whenever a product publication for an active product is created, or whenever an existing product publication is published on the app that is subscribed to this webhook topic. Note that a webhook is only emitted when there are publishing changes to the app that is subscribed to the topic (ie. no webhook will be emitted if there is a publishing change to the online store and the webhook subscriber of the topic is a third-party app). Requires the `read_publications` scope. """ - code: String + PRODUCT_PUBLICATIONS_CREATE """ - The label of the shipping line. + The webhook topic for `product_publications/delete` events. Occurs whenever a product publication for an active product is removed, or whenever an existing product publication is unpublished from the app that is subscribed to this webhook topic. Note that a webhook is only emitted when there are publishing changes to the app that is subscribed to the topic (ie. no webhook will be emitted if there is a publishing change to the online store and the webhook subscriber of the topic is a third-party app). Requires the `read_publications` scope. """ - label: String + PRODUCT_PUBLICATIONS_DELETE """ - The amount for the shipping line. + The webhook topic for `product_publications/update` events. Occurs whenever a product publication is updated from the app that is subscribed to this webhook topic. Note that a webhook is only emitted when there are publishing changes to the app that is subscribed to the topic (ie. no webhook will be emitted if there is a publishing change to the online store and the webhook subscriber of the topic is a third-party app). Requires the `read_publications` scope. """ - amount: MoneyInput -} + PRODUCT_PUBLICATIONS_UPDATE -""" -Represents a shipping total for a Shop Pay payment request. -""" -type ShopPayPaymentRequestTotalShippingPrice { """ - The discounts for the shipping total. + The webhook topic for `products/create` events. Occurs whenever a product is created. Requires the `read_products` scope. """ - discounts: [ShopPayPaymentRequestDiscount!]! + PRODUCTS_CREATE """ - The final total for the shipping total. + The webhook topic for `products/delete` events. Occurs whenever a product is deleted. Requires the `read_products` scope. """ - finalTotal: MoneyV2! + PRODUCTS_DELETE """ - The original total for the shipping total. + The webhook topic for `products/update` events. Occurs whenever a product is updated, ordered, or variants are added, removed or updated. Requires the `read_products` scope. """ - originalTotal: MoneyV2 -} + PRODUCTS_UPDATE -""" -The input fields to create a shipping total for a Shop Pay payment request. -""" -input ShopPayPaymentRequestTotalShippingPriceInput { """ - The discounts for the shipping total. - - The input must not contain more than `250` values. + The webhook topic for `refunds/create` events. Occurs whenever a new refund is created without errors on an order, independent from the movement of money. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_buyer_membership_orders. """ - discounts: [ShopPayPaymentRequestDiscountInput!] + REFUNDS_CREATE """ - The original total for the shipping total. + The webhook topic for `segments/create` events. Occurs whenever a segment is created. Requires the `read_customers` scope. """ - originalTotal: MoneyInput + SEGMENTS_CREATE """ - The final total for the shipping total. + The webhook topic for `segments/delete` events. Occurs whenever a segment is deleted. Requires the `read_customers` scope. """ - finalTotal: MoneyInput -} + SEGMENTS_DELETE -""" -The input fields for submitting Shop Pay payment method information for checkout. -""" -input ShopPayWalletContentInput { """ - The customer's billing address. + The webhook topic for `segments/update` events. Occurs whenever a segment is updated. Requires the `read_customers` scope. """ - billingAddress: MailingAddressInput! + SEGMENTS_UPDATE """ - Session token for transaction. + The webhook topic for `shipping_addresses/create` events. Occurs whenever a shipping address is created. Requires the `read_shipping` scope. """ - sessionToken: String! -} + SHIPPING_ADDRESSES_CREATE -""" -Policy that a merchant has configured for their store, such as their refund or privacy policy. -""" -type ShopPolicy implements Node { """ - Policy text, maximum size of 64kb. + The webhook topic for `shipping_addresses/update` events. Occurs whenever a shipping address is updated. Requires the `read_shipping` scope. """ - body: String! + SHIPPING_ADDRESSES_UPDATE """ - Policy’s handle. + The webhook topic for `shop/update` events. Occurs whenever a shop is updated. """ - handle: String! + SHOP_UPDATE """ - A globally-unique ID. + The webhook topic for `tax_partners/update` events. Occurs whenever a tax partner is created or updated. Requires the `read_taxes` scope. """ - id: ID! + TAX_PARTNERS_UPDATE """ - Policy’s title. + The webhook topic for `tax_services/create` events. Occurs whenever a tax service is created. Requires the `read_taxes` scope. """ - title: String! + TAX_SERVICES_CREATE """ - Public URL to the policy. + The webhook topic for `tax_services/update` events. Occurs whenver a tax service is updated. Requires the `read_taxes` scope. """ - url: URL! -} + TAX_SERVICES_UPDATE -""" -A policy for the store that comes with a default value, such as a subscription policy. -If the merchant hasn't configured a policy for their store, then the policy will return the default value. -Otherwise, the policy will return the merchant-configured value. -""" -type ShopPolicyWithDefault { """ - The text of the policy. Maximum size: 64KB. + The webhook topic for `themes/create` events. Occurs whenever a theme is created. Does not occur when theme files are created. Requires the `read_themes` scope. """ - body: String! + THEMES_CREATE """ - The handle of the policy. + The webhook topic for `themes/delete` events. Occurs whenever a theme is deleted. Does not occur when theme files are deleted. Requires the `read_themes` scope. """ - handle: String! + THEMES_DELETE """ - The unique ID of the policy. A default policy doesn't have an ID. + The webhook topic for `themes/publish` events. Occurs whenever a theme with the main or mobile (deprecated) role is published. Requires the `read_themes` scope. """ - id: ID + THEMES_PUBLISH """ - The title of the policy. + The webhook topic for `themes/update` events. Occurs whenever a theme is updated. Does not occur when theme files are updated. Requires the `read_themes` scope. """ - title: String! + THEMES_UPDATE """ - Public URL to the policy. + The webhook topic for `variants/in_stock` events. Occurs whenever a variant becomes in stock. Online channels receive this webhook only when the variant becomes in stock online. Requires the `read_products` scope. """ - url: URL! -} + VARIANTS_IN_STOCK -""" -Contains all fields required to generate sitemaps. -""" -type Sitemap { """ - The number of sitemap's pages for a given type. + The webhook topic for `variants/out_of_stock` events. Occurs whenever a variant becomes out of stock. Online channels receive this webhook only when the variant becomes out of stock online. Requires the `read_products` scope. """ - pagesCount: Count + VARIANTS_OUT_OF_STOCK """ - A list of sitemap's resources for a given type. - - Important Notes: - - The number of items per page varies from 0 to 250. - - Empty pages (0 items) may occur and do not necessarily indicate the end of results. - - Always check `hasNextPage` to determine if more pages are available. + The webhook topic for `inventory_levels/connect` events. Occurs whenever an inventory level is connected. Requires the `read_inventory` scope. """ - resources("The page number to fetch." page: Int!): PaginatedSitemapResources -} + INVENTORY_LEVELS_CONNECT -""" -Represents a sitemap's image. -""" -type SitemapImage { """ - Image's alt text. + The webhook topic for `inventory_levels/update` events. Occurs whenever an inventory level is updated. Requires the `read_inventory` scope. """ - alt: String + INVENTORY_LEVELS_UPDATE """ - Path to the image. + The webhook topic for `inventory_levels/disconnect` events. Occurs whenever an inventory level is disconnected. Requires the `read_inventory` scope. """ - filepath: String + INVENTORY_LEVELS_DISCONNECT """ - The date and time when the image was updated. + The webhook topic for `inventory_items/create` events. Occurs whenever an inventory item is created. Requires at least one of the following scopes: read_inventory, read_products. """ - updatedAt: DateTime! -} + INVENTORY_ITEMS_CREATE -""" -Represents a sitemap resource that is not a metaobject. -""" -type SitemapResource implements SitemapResourceInterface { """ - Resource's handle. + The webhook topic for `inventory_items/update` events. Occurs whenever an inventory item is updated. Requires at least one of the following scopes: read_inventory, read_products. """ - handle: String! + INVENTORY_ITEMS_UPDATE """ - Resource's image. + The webhook topic for `inventory_items/delete` events. Occurs whenever an inventory item is deleted. Requires at least one of the following scopes: read_inventory, read_products. """ - image: SitemapImage + INVENTORY_ITEMS_DELETE """ - Resource's title. + The webhook topic for `locations/activate` events. Occurs whenever a deactivated location is re-activated. Requires the `read_locations` scope. """ - title: String + LOCATIONS_ACTIVATE """ - The date and time when the resource was updated. + The webhook topic for `locations/deactivate` events. Occurs whenever a location is deactivated. Requires the `read_locations` scope. """ - updatedAt: DateTime! -} + LOCATIONS_DEACTIVATE -""" -Represents the common fields for all sitemap resource types. -""" -interface SitemapResourceInterface { """ - Resource's handle. + The webhook topic for `locations/create` events. Occurs whenever a location is created. Requires the `read_locations` scope. """ - handle: String! + LOCATIONS_CREATE """ - The date and time when the resource was updated. + The webhook topic for `locations/update` events. Occurs whenever a location is updated. Requires the `read_locations` scope. """ - updatedAt: DateTime! -} + LOCATIONS_UPDATE -""" -A SitemapResourceMetaobject represents a metaobject with -[the `renderable` capability](https://shopify.dev/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities#render-metaobjects-as-web-pages). -""" -type SitemapResourceMetaobject implements SitemapResourceInterface { """ - Resource's handle. + The webhook topic for `locations/delete` events. Occurs whenever a location is deleted. Requires the `read_locations` scope. """ - handle: String! + LOCATIONS_DELETE """ - The URL handle for accessing pages of this metaobject type in the Online Store. + The webhook topic for `tender_transactions/create` events. Occurs when a tender transaction is created. Requires the `read_orders` scope. """ - onlineStoreUrlHandle: String + TENDER_TRANSACTIONS_CREATE """ - The type of the metaobject. + The webhook topic for `app_purchases_one_time/update` events. Occurs whenever a one-time app charge is updated. """ - type: String! + APP_PURCHASES_ONE_TIME_UPDATE """ - The date and time when the resource was updated. + The webhook topic for `app_subscriptions/approaching_capped_amount` events. Occurs when the balance used on an app subscription crosses 90% of the capped amount. """ - updatedAt: DateTime! -} + APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT -""" -The types of resources potentially present in a sitemap. -""" -enum SitemapType { """ - Products present in the sitemap. + The webhook topic for `app_subscriptions/update` events. Occurs whenever an app subscription is updated. """ - PRODUCT + APP_SUBSCRIPTIONS_UPDATE """ - Collections present in the sitemap. + The webhook topic for `locales/create` events. Occurs whenever a shop locale is created Requires the `read_locales` scope. """ - COLLECTION + LOCALES_CREATE """ - Pages present in the sitemap. + The webhook topic for `locales/update` events. Occurs whenever a shop locale is updated, such as published or unpublished Requires the `read_locales` scope. """ - PAGE + LOCALES_UPDATE """ - Metaobjects present in the sitemap. Only metaobject types with the - [`renderable` capability](https://shopify.dev/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities#render-metaobjects-as-web-pages) - are included in sitemap. + The webhook topic for `locales/destroy` events. Occurs whenever a shop locale is destroyed Requires the `read_locales` scope. """ - METAOBJECT + LOCALES_DESTROY """ - Blogs present in the sitemap. + The webhook topic for `machine_translation_batch/completed` events. Occurs when a whole-shop machine translation batch completes. """ - BLOG + MACHINE_TRANSLATION_BATCH_COMPLETED """ - Articles present in the sitemap. + The webhook topic for `domains/create` events. Occurs whenever a domain is created. """ - ARTICLE -} + DOMAINS_CREATE -""" -A social login provider for customer accounts. -""" -type SocialLoginProvider { """ - The handle of the social login provider. + The webhook topic for `domains/update` events. Occurs whenever a domain is updated. """ - handle: String! -} + DOMAINS_UPDATE -""" -Inventory information for a product variant at a physical store location that offers local pickup. Includes stock availability, quantity on hand, and estimated pickup readiness time. Availability also includes inventory that can be moved to the location through a store transfer route, so a variant can be available for pickup with no on-hand stock at the location. - -Local pickup must be [enabled in the store's shipping settings](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup) for this data to be returned. Results can be sorted by proximity to a customer's location using the `near` argument on the [`ProductVariant.storeAvailability`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.storeAvailability) connection. - -Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). -""" -type StoreAvailability { """ - Whether the product variant can be picked up at this location. This is `true` when the variant is in stock here, can be supplied through a store transfer from another location, or is sold with untracked or oversellable inventory (its inventory isn't tracked, or its inventory policy allows continuing to sell when out of stock). As a result, `available` can be `true` even when `quantityAvailable` is `0`. + The webhook topic for `domains/destroy` events. Occurs whenever a domain is destroyed. """ - available: Boolean! + DOMAINS_DESTROY """ - The location where this product variant is stocked at. + The webhook topic for `subscription_contracts/create` events. Occurs whenever a subscription contract is created. Requires the `read_own_subscription_contracts` scope. """ - location: Location! + SUBSCRIPTION_CONTRACTS_CREATE """ - Returns the estimated amount of time it takes for pickup to be ready (Example: Usually ready in 24 hours). When the variant is out of stock at this location and supplied through a store transfer, this reflects the estimated transfer transit time when available, otherwise it falls back to the location's standard pickup processing time. + The webhook topic for `subscription_contracts/update` events. Occurs whenever a subscription contract is updated. Requires the `read_own_subscription_contracts` scope. """ - pickUpTime: String! + SUBSCRIPTION_CONTRACTS_UPDATE """ - The quantity of the product variant physically in stock at this location. This counts on-hand inventory only and excludes inventory available through a store transfer, so it can be `0` while `available` is `true`. + The webhook topic for `subscription_billing_cycle_edits/create` events. Occurs whenever a subscription contract billing cycle is edited. Requires the `read_own_subscription_contracts` scope. """ - quantityAvailable: Int! -} + SUBSCRIPTION_BILLING_CYCLE_EDITS_CREATE -""" -An auto-generated type for paginating through multiple StoreAvailabilities. -""" -type StoreAvailabilityConnection { """ - A list of edges. + The webhook topic for `subscription_billing_cycle_edits/update` events. Occurs whenever a subscription contract billing cycle edit is updated. Requires the `read_own_subscription_contracts` scope. """ - edges: [StoreAvailabilityEdge!]! + SUBSCRIPTION_BILLING_CYCLE_EDITS_UPDATE """ - A list of the nodes contained in StoreAvailabilityEdge. + The webhook topic for `subscription_billing_cycle_edits/delete` events. Occurs whenever a subscription contract billing cycle edit is deleted. Requires the `read_own_subscription_contracts` scope. """ - nodes: [StoreAvailability!]! + SUBSCRIPTION_BILLING_CYCLE_EDITS_DELETE """ - Information to aid in pagination. + The webhook topic for `profiles/create` events. Occurs whenever a delivery profile is created Requires at least one of the following scopes: read_shipping, read_assigned_shipping. """ - pageInfo: PageInfo! -} + PROFILES_CREATE -""" -An auto-generated type which holds one StoreAvailability and a cursor during pagination. -""" -type StoreAvailabilityEdge { """ - A cursor for use in pagination. + The webhook topic for `profiles/update` events. Occurs whenever a delivery profile is updated Requires at least one of the following scopes: read_shipping, read_assigned_shipping. """ - cursor: String! + PROFILES_UPDATE """ - The item at the end of StoreAvailabilityEdge. + The webhook topic for `profiles/delete` events. Occurs whenever a delivery profile is deleted Requires at least one of the following scopes: read_shipping, read_assigned_shipping. """ - node: StoreAvailability! -} - -""" -Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text. -""" -scalar String + PROFILES_DELETE -""" -An auto-generated type for paginating through multiple Strings. -""" -type StringConnection { """ - A list of edges. + The webhook topic for `subscription_billing_attempts/success` events. Occurs whenever a subscription billing attempt succeeds. Requires the `read_own_subscription_contracts` scope. """ - edges: [StringEdge!]! + SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS """ - A list of the nodes contained in StringEdge. + The webhook topic for `subscription_billing_attempts/failure` events. Occurs whenever a subscription billing attempt fails. Requires the `read_own_subscription_contracts` scope. """ - nodes: [String!]! + SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE """ - Information to aid in pagination. + The webhook topic for `subscription_billing_attempts/challenged` events. Occurs when the financial instutition challenges the subscripttion billing attempt charge as per 3D Secure. Requires the `read_own_subscription_contracts` scope. """ - pageInfo: PageInfo! -} + SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED -""" -An auto-generated type which holds one String and a cursor during pagination. -""" -type StringEdge { """ - A cursor for use in pagination. + The webhook topic for `returns/cancel` events. Occurs whenever a return is canceled. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - cursor: String! + RETURNS_CANCEL """ - The item at the end of StringEdge. + The webhook topic for `returns/close` events. Occurs whenever a return is closed. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - node: String! -} + RETURNS_CLOSE -""" -An error that occurred during cart submit for completion. -""" -type SubmissionError { """ - The error code. + The webhook topic for `returns/reopen` events. Occurs whenever a closed return is reopened. Requires at least one of the following scopes: read_orders, read_marketplace_orders, read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - code: SubmissionErrorCode! + RETURNS_REOPEN """ - The error message. + The webhook topic for `returns/request` events. Occurs whenever a return is requested. This means `Return.status` is `REQUESTED`. Requires at least one of the following scopes: read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - message: String -} - -""" -The code of the error that occurred during cart submit for completion. -""" -enum SubmissionErrorCode { - ERROR - - NO_DELIVERY_GROUP_SELECTED - - BUYER_IDENTITY_EMAIL_IS_INVALID - - BUYER_IDENTITY_EMAIL_REQUIRED - - BUYER_IDENTITY_PHONE_IS_INVALID - - DELIVERY_ADDRESS1_INVALID - - DELIVERY_ADDRESS1_REQUIRED - - DELIVERY_ADDRESS1_TOO_LONG - - DELIVERY_ADDRESS2_INVALID - - DELIVERY_ADDRESS2_REQUIRED - - DELIVERY_ADDRESS2_TOO_LONG - - DELIVERY_CITY_INVALID - - DELIVERY_CITY_REQUIRED - - DELIVERY_CITY_TOO_LONG - - DELIVERY_COMPANY_INVALID - - DELIVERY_COMPANY_REQUIRED - - DELIVERY_COMPANY_TOO_LONG - - DELIVERY_COUNTRY_REQUIRED - - DELIVERY_FIRST_NAME_INVALID - - DELIVERY_FIRST_NAME_REQUIRED - - DELIVERY_FIRST_NAME_TOO_LONG - - DELIVERY_INVALID_POSTAL_CODE_FOR_COUNTRY - - DELIVERY_INVALID_POSTAL_CODE_FOR_ZONE - - DELIVERY_LAST_NAME_INVALID - - DELIVERY_LAST_NAME_REQUIRED - - DELIVERY_LAST_NAME_TOO_LONG - - DELIVERY_NO_DELIVERY_AVAILABLE - - DELIVERY_NO_DELIVERY_AVAILABLE_FOR_MERCHANDISE_LINE - - DELIVERY_OPTIONS_PHONE_NUMBER_INVALID - - DELIVERY_OPTIONS_PHONE_NUMBER_REQUIRED - - DELIVERY_PHONE_NUMBER_INVALID - - DELIVERY_PHONE_NUMBER_REQUIRED - - DELIVERY_POSTAL_CODE_INVALID - - DELIVERY_POSTAL_CODE_REQUIRED - - DELIVERY_ZONE_NOT_FOUND - - DELIVERY_ZONE_REQUIRED_FOR_COUNTRY - - DELIVERY_ADDRESS_REQUIRED - - MERCHANDISE_NOT_APPLICABLE - - MERCHANDISE_LINE_LIMIT_REACHED - - MERCHANDISE_NOT_ENOUGH_STOCK_AVAILABLE - - MERCHANDISE_OUT_OF_STOCK - - MERCHANDISE_PRODUCT_NOT_PUBLISHED - - PAYMENTS_ADDRESS1_INVALID - - PAYMENTS_ADDRESS1_REQUIRED - - PAYMENTS_ADDRESS1_TOO_LONG - - PAYMENTS_ADDRESS2_INVALID - - PAYMENTS_ADDRESS2_REQUIRED - - PAYMENTS_ADDRESS2_TOO_LONG - - PAYMENTS_CITY_INVALID - - PAYMENTS_CITY_REQUIRED - - PAYMENTS_CITY_TOO_LONG - - PAYMENTS_COMPANY_INVALID - - PAYMENTS_COMPANY_REQUIRED - - PAYMENTS_COMPANY_TOO_LONG - - PAYMENTS_COUNTRY_REQUIRED - - PAYMENTS_CREDIT_CARD_BASE_EXPIRED - - PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED - - PAYMENTS_CREDIT_CARD_BASE_INVALID_START_DATE_OR_ISSUE_NUMBER_FOR_DEBIT - - PAYMENTS_CREDIT_CARD_BRAND_NOT_SUPPORTED - - PAYMENTS_CREDIT_CARD_FIRST_NAME_BLANK - - PAYMENTS_CREDIT_CARD_GENERIC - - PAYMENTS_CREDIT_CARD_LAST_NAME_BLANK - - PAYMENTS_CREDIT_CARD_MONTH_INCLUSION - - PAYMENTS_CREDIT_CARD_NAME_INVALID - - PAYMENTS_CREDIT_CARD_NUMBER_INVALID - - PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT - - PAYMENTS_CREDIT_CARD_SESSION_ID - - PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK - - PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE - - PAYMENTS_CREDIT_CARD_YEAR_EXPIRED - - PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR - - PAYMENTS_FIRST_NAME_INVALID - - PAYMENTS_FIRST_NAME_REQUIRED - - PAYMENTS_FIRST_NAME_TOO_LONG - - PAYMENTS_INVALID_POSTAL_CODE_FOR_COUNTRY - - PAYMENTS_INVALID_POSTAL_CODE_FOR_ZONE - - PAYMENTS_LAST_NAME_INVALID - - PAYMENTS_LAST_NAME_REQUIRED - - PAYMENTS_LAST_NAME_TOO_LONG - - PAYMENTS_METHOD_UNAVAILABLE - - PAYMENTS_METHOD_REQUIRED - - PAYMENTS_UNACCEPTABLE_PAYMENT_AMOUNT - - PAYMENTS_PHONE_NUMBER_INVALID - - PAYMENTS_PHONE_NUMBER_REQUIRED - - PAYMENTS_POSTAL_CODE_INVALID - - PAYMENTS_POSTAL_CODE_REQUIRED - - PAYMENTS_SHOPIFY_PAYMENTS_REQUIRED - - PAYMENTS_WALLET_CONTENT_MISSING - - PAYMENTS_BILLING_ADDRESS_ZONE_NOT_FOUND - - PAYMENTS_BILLING_ADDRESS_ZONE_REQUIRED_FOR_COUNTRY + RETURNS_REQUEST """ - Redirect to checkout required to complete this action. + The webhook topic for `returns/approve` events. Occurs whenever a return is approved. This means `Return.status` is `OPEN`. Requires at least one of the following scopes: read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - REDIRECT_TO_CHECKOUT_REQUIRED - - TAXES_MUST_BE_DEFINED - - TAXES_LINE_ID_NOT_FOUND - - TAXES_DELIVERY_GROUP_ID_NOT_FOUND + RETURNS_APPROVE """ - Validation failed. + The webhook topic for `returns/update` events. Occurs whenever a return is updated. Requires at least one of the following scopes: read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - VALIDATION_CUSTOM -} + RETURNS_UPDATE -""" -Cart submit for checkout completion is successful. -""" -type SubmitAlreadyAccepted { """ - The ID of the cart completion attempt that will be used for polling for the result. + The webhook topic for `returns/process` events. Occurs whenever a return is processed. Requires at least one of the following scopes: read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - attemptId: String! -} + RETURNS_PROCESS -""" -Cart submit for checkout completion failed. -""" -type SubmitFailed { """ - The URL of the checkout for the cart. + The webhook topic for `returns/decline` events. Occurs whenever a return is declined. This means `Return.status` is `DECLINED`. Requires at least one of the following scopes: read_returns, read_marketplace_returns, read_buyer_membership_orders. """ - checkoutUrl: URL + RETURNS_DECLINE """ - The list of errors that occurred from executing the mutation. + The webhook topic for `reverse_deliveries/attach_deliverable` events. Occurs whenever a deliverable is attached to a reverse delivery. + This occurs when a reverse delivery is created or updated with delivery metadata. + Metadata includes the delivery method, label, and tracking information associated with a reverse delivery. + Requires at least one of the following scopes: read_returns, read_marketplace_returns. """ - errors: [SubmissionError!]! -} + REVERSE_DELIVERIES_ATTACH_DELIVERABLE -""" -Cart submit for checkout completion is already accepted. -""" -type SubmitSuccess { """ - The ID of the cart completion attempt that will be used for polling for the result. + The webhook topic for `reverse_fulfillment_orders/dispose` events. Occurs whenever a disposition is made on a reverse fulfillment order. + This includes dispositions made on reverse deliveries that are associated with the reverse fulfillment order. + Requires at least one of the following scopes: read_returns, read_marketplace_returns. """ - attemptId: String! + REVERSE_FULFILLMENT_ORDERS_DISPOSE """ - The url to which the buyer should be redirected after the cart is successfully submitted. + The webhook topic for `payment_terms/create` events. Occurs whenever payment terms are created. Requires the `read_payment_terms` scope. """ - redirectUrl: URL! -} + PAYMENT_TERMS_CREATE -""" -Cart submit for checkout completion is throttled. -""" -type SubmitThrottled { """ - UTC date time string that indicates the time after which clients should make their next - poll request. Any poll requests sent before this time will be ignored. Use this value to schedule the - next poll request. + The webhook topic for `payment_terms/delete` events. Occurs whenever payment terms are deleted. Requires the `read_payment_terms` scope. """ - pollAfter: DateTime! -} + PAYMENT_TERMS_DELETE -""" -A visual representation for filter values, containing a color, an image, or both. The [`FilterValue`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue) object's [`swatch`](https://shopify.dev/docs/api/storefront/current/objects/FilterValue#field-FilterValue.fields.swatch) field returns this when the filter's presentation is set to `SWATCH`. -""" -type Swatch { """ - The swatch color. + The webhook topic for `payment_terms/update` events. Occurs whenever payment terms are updated. Requires the `read_payment_terms` scope. """ - color: Color + PAYMENT_TERMS_UPDATE """ - The swatch image. + The webhook topic for `payment_schedules/due` events. Occurs whenever payment schedules are due. Requires the `read_payment_terms` scope. """ - image: MediaImage -} - -""" -A category from Shopify's [Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) assigned to a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). Categories provide hierarchical classification through the `ancestors` field. + PAYMENT_SCHEDULES_DUE -The [`ancestors`](https://shopify.dev/docs/api/storefront/current/objects/TaxonomyCategory#field-TaxonomyCategory.fields.ancestors) field returns the parent chain from the immediate parent up to the root. Each ancestor category also includes its own `ancestors`. - -The [`name`](https://shopify.dev/docs/api/storefront/latest/objects/TaxonomyCategory#field-TaxonomyCategory.fields.name) field returns the localized category name based on the storefront's request language with shop locale fallbacks. If a translation isn't available for the resolved locale, the English taxonomy name is returned. -""" -type TaxonomyCategory implements Node { """ - All parent nodes of the current taxonomy category. + The webhook topic for `selling_plan_groups/create` events. Notifies when a SellingPlanGroup is created. Requires the `read_products` scope. """ - ancestors: [TaxonomyCategory!]! + SELLING_PLAN_GROUPS_CREATE """ - A static identifier for the taxonomy category. + The webhook topic for `selling_plan_groups/update` events. Notifies when a SellingPlanGroup is updated. Requires the `read_products` scope. """ - id: ID! + SELLING_PLAN_GROUPS_UPDATE """ - The localized name of the taxonomy category. + The webhook topic for `selling_plan_groups/delete` events. Notifies when a SellingPlanGroup is deleted. Requires the `read_products` scope. """ - name: String! -} + SELLING_PLAN_GROUPS_DELETE -""" -A filter used to view a subset of products in a collection matching a specific taxonomy metafield value. -""" -input TaxonomyMetafieldFilter { """ - The namespace of the metafield to filter on. + The webhook topic for `bulk_operations/finish` events. Notifies when a Bulk Operation finishes. """ - namespace: String! + BULK_OPERATIONS_FINISH """ - The key of the metafield to filter on. + The webhook topic for `product_feeds/create` events. Triggers when product feed is created Requires the `read_product_listings` scope. """ - key: String! + PRODUCT_FEEDS_CREATE """ - The value of the metafield. + The webhook topic for `product_feeds/update` events. Triggers when product feed is updated Requires the `read_product_listings` scope. """ - value: String! -} + PRODUCT_FEEDS_UPDATE -""" -Represents a resource that you can track the origin of the search traffic. -""" -interface Trackable { """ - URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries, otherwise returns null. + The webhook topic for `product_feeds/incremental_sync` events. Occurs whenever a product publication is created, updated or removed for a product feed Requires the `read_product_listings` scope. """ - trackingParameters: String -} + PRODUCT_FEEDS_INCREMENTAL_SYNC -""" -Translation represents a translation of a key-value pair. -""" -type Translation { """ - The key of the translation. + The webhook topic for `product_feeds/full_sync` events. Triggers when a full sync for a product feed is performed Requires the `read_product_listings` scope. """ - key: String! + PRODUCT_FEEDS_FULL_SYNC """ - The value of the translation. + The webhook topic for `product_feeds/full_sync_finish` events. Triggers when a full sync finishes Requires the `read_product_listings` scope. """ - value: String! -} - -""" -Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and -[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. - -For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host -(`example.myshopify.com`). -""" -scalar URL + PRODUCT_FEEDS_FULL_SYNC_FINISH -""" -The measurement data used to calculate unit prices for a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant). Unit pricing helps customers compare costs across different package sizes by showing a standardized price, such as "$9.99 / 100ml". - -The object includes the quantity being sold (value and unit) and the reference measurement used for price comparison. Use this alongside the variant's [`unitPrice`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant#field-ProductVariant.fields.unitPrice) field to display complete unit pricing information. -""" -type UnitPriceMeasurement { """ - The type of unit of measurement for the unit price measurement. + The webhook topic for `markets/create` events. Occurs when a new market is created. Requires the `read_markets` scope. """ - measuredType: UnitPriceMeasurementMeasuredType + MARKETS_CREATE """ - The quantity unit for the unit price measurement. + The webhook topic for `markets/update` events. Occurs when a market is updated. Requires the `read_markets` scope. """ - quantityUnit: UnitPriceMeasurementMeasuredUnit + MARKETS_UPDATE """ - The quantity value for the unit price measurement. + The webhook topic for `markets/delete` events. Occurs when a market is deleted. Requires the `read_markets` scope. """ - quantityValue: Float! + MARKETS_DELETE """ - The reference unit for the unit price measurement. + The webhook topic for `orders/risk_assessment_changed` events. Triggers when a new risk assessment is available on the order. + This can be the first or a subsequent risk assessment. + New risk assessments can be provided until the order is marked as fulfilled. + Includes the risk level, risk facts, the provider and the order ID. + When the provider is Shopify, that field is null. + Does not include the risk recommendation for the order. + The Shop ID is available in the headers. + Requires the `read_orders` scope. """ - referenceUnit: UnitPriceMeasurementMeasuredUnit + ORDERS_RISK_ASSESSMENT_CHANGED """ - The reference value for the unit price measurement. + The webhook topic for `orders/shopify_protect_eligibility_changed` events. Occurs whenever Shopify Protect's eligibility for an order is changed. Requires the `read_orders` scope. """ - referenceValue: Int! -} + ORDERS_SHOPIFY_PROTECT_ELIGIBILITY_CHANGED -""" -The accepted types of unit of measurement. -""" -enum UnitPriceMeasurementMeasuredType { """ - Unit of measurements representing volumes. + The webhook topic for `finance_kyc_information/update` events. Occurs whenever shop's finance KYC information was updated Requires the `read_financial_kyc_information` scope. """ - VOLUME + FINANCE_KYC_INFORMATION_UPDATE """ - Unit of measurements representing weights. + The webhook topic for `fulfillment_orders/rescheduled` events. Triggers when a fulfillment order is rescheduled. + + Fulfillment orders may be merged if they have the same `fulfillAt` datetime. + If the fulfillment order is merged then the resulting fulfillment order will be indicated in the webhook body. + Otherwise it will be the original fulfillment order with an updated `fulfill_at` datetime. + Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - WEIGHT + FULFILLMENT_ORDERS_RESCHEDULED """ - Unit of measurements representing lengths. + The webhook topic for `publications/delete` events. Occurs whenever a publication is deleted. Requires the `read_publications` scope. """ - LENGTH + PUBLICATIONS_DELETE """ - Unit of measurements representing areas. + The webhook topic for `audit_events/admin_api_activity` events. Triggers for each auditable Admin API request. This topic is limited to one active subscription per Plus store and requires the use of Google Cloud Pub/Sub or AWS EventBridge. Requires the `read_audit_events` scope. """ - AREA + AUDIT_EVENTS_ADMIN_API_ACTIVITY """ - Unit of measurements representing counts. + The webhook topic for `fulfillment_orders/line_items_prepared_for_pickup` events. Triggers when one or more of the line items for a fulfillment order are prepared for pickup Requires at least one of the following scopes: read_merchant_managed_fulfillment_orders, read_assigned_fulfillment_orders, read_third_party_fulfillment_orders, read_marketplace_fulfillment_orders. """ - COUNT + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP """ - The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. + The webhook topic for `companies/create` events. Occurs whenever a company is created. Requires at least one of the following scopes: read_customers, read_companies. """ - UNKNOWN -} + COMPANIES_CREATE -""" -The valid units of measurement for a unit price measurement. -""" -enum UnitPriceMeasurementMeasuredUnit { """ - 1000 milliliters equals 1 liter. + The webhook topic for `companies/update` events. Occurs whenever a company is updated. Requires at least one of the following scopes: read_customers, read_companies. """ - ML + COMPANIES_UPDATE """ - 100 centiliters equals 1 liter. + The webhook topic for `companies/delete` events. Occurs whenever a company is deleted. Requires at least one of the following scopes: read_customers, read_companies. """ - CL + COMPANIES_DELETE """ - Metric system unit of volume. + The webhook topic for `company_locations/create` events. Occurs whenever a company location is created. Requires at least one of the following scopes: read_customers, read_companies. """ - L + COMPANY_LOCATIONS_CREATE """ - 1 cubic meter equals 1000 liters. + The webhook topic for `company_locations/update` events. Occurs whenever a company location is updated. Requires at least one of the following scopes: read_customers, read_companies. """ - M3 + COMPANY_LOCATIONS_UPDATE """ - Imperial system unit of volume (U.S. customary unit). + The webhook topic for `company_locations/delete` events. Occurs whenever a company location is deleted. Requires at least one of the following scopes: read_customers, read_companies. """ - FLOZ + COMPANY_LOCATIONS_DELETE """ - 1 pint equals 16 fluid ounces (U.S. customary unit). + The webhook topic for `company_contacts/create` events. Occurs whenever a company contact is created. Requires at least one of the following scopes: read_customers, read_companies. """ - PT + COMPANY_CONTACTS_CREATE """ - 1 quart equals 32 fluid ounces (U.S. customary unit). + The webhook topic for `company_contacts/update` events. Occurs whenever a company contact is updated. Requires at least one of the following scopes: read_customers, read_companies. """ - QT + COMPANY_CONTACTS_UPDATE """ - 1 gallon equals 128 fluid ounces (U.S. customary unit). + The webhook topic for `company_contacts/delete` events. Occurs whenever a company contact is deleted. Requires at least one of the following scopes: read_customers, read_companies. """ - GAL + COMPANY_CONTACTS_DELETE """ - 1000 milligrams equals 1 gram. + The webhook topic for `customers/merge` events. Triggers when two customers are merged Requires the `read_customer_merge` scope. """ - MG + CUSTOMERS_MERGE """ - Metric system unit of weight. + The webhook topic for `inventory_transfers/add_items` events. Occurs any time items are added to a transfer. Requires the `read_inventory_transfers` scope. """ - G + INVENTORY_TRANSFERS_ADD_ITEMS """ - 1 kilogram equals 1000 grams. + The webhook topic for `inventory_transfers/update_item_quantities` events. Occurs whenever the quantity of transfer line items changes. Requires the `read_inventory_transfers` scope. """ - KG + INVENTORY_TRANSFERS_UPDATE_ITEM_QUANTITIES """ - Imperial system unit of weight. + The webhook topic for `inventory_transfers/remove_items` events. Occurs any time items are removed from a transfer. Requires the `read_inventory_transfers` scope. """ - LB + INVENTORY_TRANSFERS_REMOVE_ITEMS """ - 16 ounces equals 1 pound. + The webhook topic for `inventory_transfers/ready_to_ship` events. Triggers when a transfer is marked as ready to ship. Requires the `read_inventory_transfers` scope. """ - OZ + INVENTORY_TRANSFERS_READY_TO_SHIP """ - 1000 millimeters equals 1 meter. + The webhook topic for `inventory_transfers/cancel` events. Triggers when a transfer is canceled. Requires the `read_inventory_transfers` scope. """ - MM + INVENTORY_TRANSFERS_CANCEL """ - 100 centimeters equals 1 meter. + The webhook topic for `inventory_transfers/complete` events. Triggers when a transfer is completed. Requires the `read_inventory_transfers` scope. """ - CM + INVENTORY_TRANSFERS_COMPLETE """ - Metric system unit of length. + The webhook topic for `inventory_shipments/delete` events. Triggers when a shipment is deleted. Requires the `read_inventory_shipments` scope. """ - M + INVENTORY_SHIPMENTS_DELETE """ - Imperial system unit of length. + The webhook topic for `inventory_shipments/create` events. Triggers when a shipment is created. Requires the `read_inventory_shipments` scope. """ - IN + INVENTORY_SHIPMENTS_CREATE """ - 1 foot equals 12 inches. + The webhook topic for `inventory_shipments/mark_in_transit` events. Triggers when a shipment is marked as in transit. Requires the `read_inventory_shipments` scope. """ - FT + INVENTORY_SHIPMENTS_MARK_IN_TRANSIT """ - 1 yard equals 36 inches. + The webhook topic for `inventory_shipments/update_tracking` events. Triggers when tracking info on a shipment is updated. Requires the `read_inventory_shipments` scope. """ - YD + INVENTORY_SHIPMENTS_UPDATE_TRACKING """ - Metric system unit of area. + The webhook topic for `inventory_shipments/add_items` events. Occurs whenever items are added to a shipment. Requires the `read_inventory_shipments` scope. """ - M2 + INVENTORY_SHIPMENTS_ADD_ITEMS """ - Imperial system unit of area. + The webhook topic for `inventory_shipments/update_item_quantities` events. Occurs whenever quantities change on a shipment. Requires the `read_inventory_shipments` scope. """ - FT2 + INVENTORY_SHIPMENTS_UPDATE_ITEM_QUANTITIES """ - 1 item, a unit of count. + The webhook topic for `inventory_shipments/remove_items` events. Occurs whenever items are removed from a shipment. Requires the `read_inventory_shipments` scope. """ - ITEM + INVENTORY_SHIPMENTS_REMOVE_ITEMS """ - The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. + The webhook topic for `inventory_shipments/receive_items` events. Triggers when items on a shipment are received. Requires the `read_inventory_shipments_received_items` scope. """ - UNKNOWN -} + INVENTORY_SHIPMENTS_RECEIVE_ITEMS -""" -Systems of weights and measures. -""" -enum UnitSystem { """ - Imperial system of weights and measures. + The webhook topic for `customer_account_settings/update` events. Triggers when merchants change customer account setting. """ - IMPERIAL_SYSTEM + CUSTOMER_ACCOUNT_SETTINGS_UPDATE """ - Metric system of weights and measures. + The webhook topic for `customer.joined_segment` events. Triggers when a customer joins a segment. Requires the `read_customers` scope. """ - METRIC_SYSTEM -} - -""" -An unsigned 64-bit integer. Represents whole numeric values between 0 and 2^64 - 1 encoded as a string of base-10 digits. + CUSTOMER_JOINED_SEGMENT -Example value: `"50"`. -""" -scalar UnsignedInt64 - -""" -A redirect on the online store. -""" -type UrlRedirect implements Node { """ - The ID of the URL redirect. + The webhook topic for `customer.left_segment` events. Triggers when a customer leaves a segment. Requires the `read_customers` scope. """ - id: ID! + CUSTOMER_LEFT_SEGMENT """ - The old path to be redirected from. When the user visits this path, they'll be redirected to the target location. + The webhook topic for `company_contact_roles/assign` events. Occurs whenever a role is assigned to a contact at a location. Requires at least one of the following scopes: read_customers, read_companies. """ - path: String! + COMPANY_CONTACT_ROLES_ASSIGN """ - The target location where the user will be redirected to. + The webhook topic for `company_contact_roles/revoke` events. Occurs whenever a role is revoked from a contact at a location. Requires at least one of the following scopes: read_customers, read_companies. """ - target: String! -} + COMPANY_CONTACT_ROLES_REVOKE -""" -An auto-generated type for paginating through multiple UrlRedirects. -""" -type UrlRedirectConnection { """ - A list of edges. + The webhook topic for `subscription_contracts/activate` events. Occurs when a subscription contract is activated. Requires the `read_own_subscription_contracts` scope. """ - edges: [UrlRedirectEdge!]! + SUBSCRIPTION_CONTRACTS_ACTIVATE """ - A list of the nodes contained in UrlRedirectEdge. + The webhook topic for `subscription_contracts/pause` events. Occurs when a subscription contract is paused. Requires the `read_own_subscription_contracts` scope. """ - nodes: [UrlRedirect!]! + SUBSCRIPTION_CONTRACTS_PAUSE """ - Information to aid in pagination. + The webhook topic for `subscription_contracts/cancel` events. Occurs when a subscription contract is canceled. Requires the `read_own_subscription_contracts` scope. """ - pageInfo: PageInfo! -} + SUBSCRIPTION_CONTRACTS_CANCEL -""" -An auto-generated type which holds one UrlRedirect and a cursor during pagination. -""" -type UrlRedirectEdge { """ - A cursor for use in pagination. + The webhook topic for `subscription_contracts/fail` events. Occurs when a subscription contract is failed. Requires the `read_own_subscription_contracts` scope. """ - cursor: String! + SUBSCRIPTION_CONTRACTS_FAIL """ - The item at the end of UrlRedirectEdge. + The webhook topic for `subscription_contracts/expire` events. Occurs when a subscription contract expires. Requires the `read_own_subscription_contracts` scope. """ - node: UrlRedirect! -} + SUBSCRIPTION_CONTRACTS_EXPIRE -""" -Represents an error in the input of a mutation. -""" -type UserError implements DisplayableError { """ - The path to the input field that caused the error. + The webhook topic for `subscription_billing_cycles/skip` events. Occurs whenever a subscription contract billing cycle is skipped. Requires the `read_own_subscription_contracts` scope. """ - field: [String!] + SUBSCRIPTION_BILLING_CYCLES_SKIP """ - The error message. + The webhook topic for `subscription_billing_cycles/unskip` events. Occurs whenever a subscription contract billing cycle is unskipped. Requires the `read_own_subscription_contracts` scope. """ - message: String! -} + SUBSCRIPTION_BILLING_CYCLES_UNSKIP -""" -Error codes for failed Shop Pay payment request session mutations. -""" -type UserErrorsShopPayPaymentRequestSessionUserErrors implements DisplayableError { """ - The error code. + The webhook topic for `metaobjects/create` events. Occurs when a metaobject is created. Requires the `read_metaobjects` scope. """ - code: UserErrorsShopPayPaymentRequestSessionUserErrorsCode + METAOBJECTS_CREATE """ - The path to the input field that caused the error. + The webhook topic for `metaobjects/update` events. Occurs when a metaobject is updated. Requires the `read_metaobjects` scope. """ - field: [String!] + METAOBJECTS_UPDATE """ - The error message. + The webhook topic for `metaobjects/delete` events. Occurs when a metaobject is deleted. Requires the `read_metaobjects` scope. """ - message: String! -} + METAOBJECTS_DELETE -""" -Possible error codes that can be returned by `ShopPayPaymentRequestSessionUserErrors`. -""" -enum UserErrorsShopPayPaymentRequestSessionUserErrorsCode { """ - Payment request input is invalid. + The webhook topic for `finance_app_staff_member/grant` events. Triggers when a staff is granted access to all or some finance app. Requires the `read_financial_kyc_information` scope. """ - PAYMENT_REQUEST_INVALID_INPUT + FINANCE_APP_STAFF_MEMBER_GRANT """ - Payment request not found. + The webhook topic for `finance_app_staff_member/revoke` events. Triggers when a staff's access to all or some finance app has been revoked. Requires the `read_financial_kyc_information` scope. """ - PAYMENT_REQUEST_NOT_FOUND + FINANCE_APP_STAFF_MEMBER_REVOKE """ - Idempotency key has already been used. + The webhook topic for `finance_app_staff_member/delete` events. Triggers when a staff with access to all or some finance app has been removed. Requires the `read_financial_kyc_information` scope. """ - IDEMPOTENCY_KEY_ALREADY_USED -} + FINANCE_APP_STAFF_MEMBER_DELETE -""" -The input fields for a filter used to view a subset of products in a collection matching a specific variant option. -""" -input VariantOptionFilter { """ - The name of the variant option to filter on. + The webhook topic for `finance_app_staff_member/update` events. Triggers when a staff's information has been updated. Requires the `read_financial_kyc_information` scope. """ - name: String! + FINANCE_APP_STAFF_MEMBER_UPDATE """ - The value of the variant option to filter on. + The webhook topic for `discounts/create` events. Occurs whenever a discount is created. Requires the `read_discounts` scope. """ - value: String! -} + DISCOUNTS_CREATE -""" -A video hosted on Shopify's servers. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface and provides multiple video sources through the [`sources`](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources) field, each with [format](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.format), dimensions, and [URL information](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.url) for adaptive playback. + """ + The webhook topic for `discounts/update` events. Occurs whenever a discount is updated. Requires the `read_discounts` scope. + """ + DISCOUNTS_UPDATE -For videos hosted on external platforms like YouTube or Vimeo, use [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) instead. -""" -type Video implements Media & Node { """ - A word or phrase to share the nature or contents of a media. + The webhook topic for `discounts/delete` events. Occurs whenever a discount is deleted. Requires the `read_discounts` scope. """ - alt: String + DISCOUNTS_DELETE """ - A globally-unique ID. + The webhook topic for `discounts/redeemcode_added` events. Occurs whenever a redeem code is added to a code discount. Requires the `read_discounts` scope. """ - id: ID! + DISCOUNTS_REDEEMCODE_ADDED """ - The media content type. + The webhook topic for `discounts/redeemcode_removed` events. Occurs whenever a redeem code on a code discount is deleted. Requires the `read_discounts` scope. """ - mediaContentType: MediaContentType! + DISCOUNTS_REDEEMCODE_REMOVED """ - The presentation for a media. + The webhook topic for `metafield_definitions/create` events. Occurs when a metafield definition is created. Requires the `read_content` scope. """ - presentation: MediaPresentation + METAFIELD_DEFINITIONS_CREATE """ - The preview image for the media. + The webhook topic for `metafield_definitions/update` events. Occurs when a metafield definition is updated. Requires the `read_content` scope. """ - previewImage: Image + METAFIELD_DEFINITIONS_UPDATE """ - The sources for a video. + The webhook topic for `metafield_definitions/delete` events. Occurs when a metafield definition is deleted. Requires the `read_content` scope. """ - sources: [VideoSource!]! -} + METAFIELD_DEFINITIONS_DELETE -""" -Represents a source for a Shopify hosted video. -""" -type VideoSource { """ - The format of the video source. + The webhook topic for `delivery_promise_settings/update` events. Occurs when a promise setting is updated. Requires the `read_shipping` scope. """ - format: String! + DELIVERY_PROMISE_SETTINGS_UPDATE """ - The height of the video. + The webhook topic for `markets_backup_region/update` events. Occurs when a backup region is updated. Requires the `read_markets` scope. """ - height: Int! + MARKETS_BACKUP_REGION_UPDATE """ - The video MIME type. + The webhook topic for `checkout_and_accounts_configurations/update` events. The event occurs whenever a published checkout and account configuration is updated. """ - mimeType: String! + CHECKOUT_AND_ACCOUNTS_CONFIGURATIONS_UPDATE +} +""" +Return type for `webhookSubscriptionUpdate` mutation. +""" +type WebhookSubscriptionUpdatePayload { """ - The URL of the video. + The list of errors that occurred from executing the mutation. """ - url: String! + userErrors: [UserError!]! """ - The width of the video. + The webhook subscription that was updated. """ - width: Int! + webhookSubscription: WebhookSubscription } """ -The visitor's consent to data processing purposes for the shop. true means accepting the purposes, false means declining them, and null means that the visitor didn't express a preference. +A weight measurement with its numeric value and unit. Used throughout the API, for example in shipping calculations, delivery conditions, order line items, and inventory measurements. + +The weight combines a decimal value with a standard unit of measurement to ensure consistent weight handling across different regional systems. """ -input VisitorConsent { +type Weight { """ - The visitor accepts or rejects the preferences data processing purpose. + The unit of measurement for `value`. """ - preferences: Boolean + unit: WeightUnit! """ - The visitor accepts or rejects the analytics data processing purpose. + The weight value using the unit system specified with `unit`. """ - analytics: Boolean + value: Float! +} +""" +The input fields for the weight unit and value inputs. +""" +input WeightInput { """ - The visitor accepts or rejects the first and third party marketing data processing purposes. + The weight value using the unit system specified with `weight_unit`. """ - marketing: Boolean + value: Float! """ - The visitor accepts or rejects the sale or sharing of their data with third parties. + Unit of measurement for `value`. """ - saleOfData: Boolean + unit: WeightUnit! } """ -Units of measurement for weight, supporting both metric and imperial systems. Used by [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to specify the unit for the variant's weight value. +Units of measurement for weight. """ enum WeightUnit { """ @@ -14620,23 +97935,29 @@ type __EnumValue { Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. """ type __Field { + accessRestricted: Boolean! + + accessRestrictedReason: String + args(includeDeprecated: Boolean = false): [__InputValue!]! deprecationReason: String description: String - inContextAnnotations: [InContextAnnotation!]! - isDeprecated: Boolean! isPrivatelyDocumented: Boolean! + isProtected: Boolean! + name: String! - requiredAccess: String + protectedContent: String + + protectedSubject: String - tokenRequired: Boolean! + requiredAccess: String type: __Type! } @@ -14654,9 +97975,9 @@ type __InputValue { description: String - isDeprecated: Boolean! + gidTypes: [String!] - maxInputSize: Int + isDeprecated: Boolean! name: String! @@ -14701,6 +98022,12 @@ The fundamental unit of any GraphQL Schema is the type. There are many kinds of Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. """ type __Type { + accessRestricted: Boolean! + + accessRestrictedReason: String + + componentName: String + description: String enumValues(includeDeprecated: Boolean = false): [__EnumValue!] @@ -14715,6 +98042,8 @@ type __Type { isPrivatelyDocumented: Boolean! + isProtected: Boolean! + kind: __TypeKind! name: String @@ -14723,11 +98052,11 @@ type __Type { possibleTypes: [__Type!] + protectedSubject: String + requiredAccess: String specifiedByURL: String - - tokenRequired: Boolean! } """ @@ -14780,20 +98109,15 @@ Marks an element of a GraphQL schema as having restricted access. """ directive @accessRestricted("Explains the reason around this restriction" reason: String = null) on FIELD_DEFINITION | OBJECT -""" -Informs the server to delay the execution of the current fragment, potentially resulting in multiple responses from the server. Non-deferred data is delivered in the initial response and data deferred is delivered in subsequent responses. Only available on development stores with the Defer Directive developer preview enabled. -""" -directive @defer("When `true`, fragment should be deferred. When `false`, fragment will not be\ndeferred and data will be included in the initial response. Defaults to `true`\nwhen omitted.\n" if: Boolean = true, "May be used to identify the data from responses and associate it with the\ncorresponding defer directive. `label` must be unique label across all `@defer` and\n`@stream` directives in a document. `label` must not be provided as a variable.\n" label: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT - """ Marks an element of a GraphQL schema as no longer supported. """ directive @deprecated("Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/)." reason: String = "No longer supported") on FIELD_DEFINITION | ENUM_VALUE | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION """ -Contextualizes data based on the additional information provided by the directive. For example, you can use the `@inContext(country: CA)` directive to [query a product's price](https://shopify.dev/custom-storefronts/internationalization/international-pricing) in a storefront within the context of Canada. +Enables idempotent mutation execution using a provided key. Only supported on mutations that explicitly document idempotency support in their description. Example: `@idempotent(key: "123e4567-e89b-12d3-a456-426614174000")`. Note: The idempotency key cannot be an empty string or whitespace only. """ -directive @inContext("The country code for context. For example, `CA`." country: CountryCode, "The language code for context. For example, `EN`." language: LanguageCode, "The identifier of the customer's preferred location." preferredLocationId: ID, "The buyer's identity." buyer: BuyerInput, "The visitor's consent preferences for data processing purposes." visitorConsent: VisitorConsent) on QUERY | MUTATION +directive @idempotent("The key to identify the idempotent mutation." key: String!) on FIELD """ Directs the executor to include this field or fragment only when the `if` argument is true. diff --git a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt index 42b10452..f4b57d86 100644 --- a/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt +++ b/data/src/commonMain/kotlin/com/troves/data/di/DataModule.kt @@ -16,7 +16,6 @@ import com.troves.data.source.remote.RemoteDatasource import com.troves.data.source.remote.RemoteDatasourceImpl import com.troves.data.source.remote.service.TrovesApiService import com.troves.data.source.remote.service.apollo.ApolloTrovesApiServiceImpl -import com.troves.data.source.remote.service.ktor.KtorTrovesApiServiceImpl import com.troves.domain.repository.AuthenticationRepository import com.troves.domain.repository.CartRepository import com.troves.domain.repository.PaymentRepository @@ -31,14 +30,13 @@ import org.koin.dsl.module val dataModule = module { // ── Network ─────────────────────────────────────────────────────────────── + // Ktor client kept registered for easy rollback to the REST implementation. single { provideHttpClient() } - single { KtorTrovesApiServiceImpl(get()) } single { provideApolloClient() } - single { - ApolloTrovesApiServiceImpl(get()) - } + // GraphQL (Apollo) is now the active TrovesApiService implementation. + single { ApolloTrovesApiServiceImpl(get()) } // ── Remote data source ──────────────────────────────────────────────────── single { RemoteDatasourceImpl(get(), get()) } diff --git a/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt b/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt index 98e7a7ea..fec05a70 100644 --- a/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt +++ b/data/src/commonMain/kotlin/com/troves/data/network/ApolloClient.kt @@ -5,9 +5,11 @@ import com.apollographql.apollo.network.http.LoggingInterceptor import com.troves.data.config.ShopifyConfig fun provideApolloClient(): ApolloClient { + // REST_URL already ends with the Admin API base (…/admin/api//), + // so the GraphQL endpoint is that base + "graphql.json". return ApolloClient.Builder() - .serverUrl("${ShopifyConfig.REST_URL}/graphql.json") - .addHttpHeader("X-Shopify-Storefront-Access-Token", ShopifyConfig.API_KEY) + .serverUrl("${ShopifyConfig.REST_URL.trimEnd('/')}/graphql.json") + .addHttpHeader("X-Shopify-Access-Token", ShopifyConfig.API_KEY) .addHttpHeader("Content-Type", "application/json") .addHttpInterceptor(LoggingInterceptor(level = LoggingInterceptor.Level.BODY)) .build() diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt index 2e25b57e..66ad90de 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/ApolloTrovesApiServiceImpl.kt @@ -2,6 +2,19 @@ package com.troves.data.source.remote.service.apollo import com.apollographql.apollo.ApolloClient import com.apollographql.apollo.api.Optional +import com.troves.data.source.remote.service.TrovesApiService +import com.troves.data.source.remote.service.apollo.graphql.GetCollectionsQuery +import com.troves.data.source.remote.service.apollo.graphql.GetProductByIdQuery +import com.troves.data.source.remote.service.apollo.graphql.GetProductsBySearchQuery +import com.troves.data.source.remote.service.apollo.graphql.GetProductsQuery +import com.troves.data.source.remote.service.apollo.mapper.toCustomCollectionDto +import com.troves.data.source.remote.service.apollo.mapper.toDomainProduct +import com.troves.data.source.remote.service.apollo.mapper.toProductDto +import com.troves.data.source.remote.service.apollo.mapper.toSmartCollection +import com.troves.data.source.remote.service.apollo.util.runQuery +import com.troves.data.source.remote.service.apollo.util.toProductGid +import com.troves.data.source.remote.service.apollo.util.toQueryOptional +import com.troves.data.source.remote.service.apollo.util.toShopifySearchQuery import com.troves.data.source.remote.service.ktor.dto.Collection import com.troves.data.source.remote.service.ktor.dto.CollectionImage import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse @@ -9,91 +22,55 @@ import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse import com.troves.data.source.remote.service.ktor.dto.ProductDto import com.troves.data.source.remote.service.ktor.dto.ProductResponse import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse -import com.troves.data.source.remote.service.TrovesApiService -import com.troves.data.source.remote.service.apollo.graphql.GetProductsQuery import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result - - class ApolloTrovesApiServiceImpl( -private val apolloClient: ApolloClient -): TrovesApiService{ + private val apolloClient: ApolloClient +) : TrovesApiService { + + // region products override suspend fun createProduct(productDto: ProductDto): Result { TODO("Not yet implemented") } - override suspend fun getAllProducts( - ): Result { - return try { - val response = apolloClient.query( - GetProductsQuery( - first = 20, - after = Optional.presentIfNotNull(null), - reverse = Optional.presentIfNotNull(null) - ) - ).execute() - - if (response.hasErrors()) { - val errorMessage = response.errors?.firstOrNull()?.message ?: "Unknown GraphQL Error" - return Result.Error(Exception(errorMessage)) - } - - val productsData = response.data?.products - - // Map the Relay edges/nodes structure to your Clean Architecture Domain Model - val domainProducts = productsData?.edges?.map { edge -> - edge.node.toDomainProduct() - - } ?: emptyList() - - val products: List = domainProducts.map { - ProductDto( - id = it.id, - title = it.title, - vendor = it.vendor, - status = it.status, - adminGraphqlApiId = null, - bodyHtml = null, - createdAt = null, - handle = null, - image = null, - images = emptyList(), - options = emptyList(), - productType = null, - publishedAt = null, - publishedScope = null, - tags = null, - updatedAt = null, - variants = emptyList(), - ) - } - val productResponse = ProductResponse(products = products) - - Result.Success(productResponse) - - } catch (e: Exception) { - Result.Error(e) + override suspend fun getAllProducts(): Result = + apolloClient.runQuery(GetProductsQuery(first = DEFAULT_PAGE_SIZE)) { data -> + ProductResponse(products = data.products.edges.map { it.node.productCard.toProductDto() }) } - } - override suspend fun getProductsByQuery(queryMap: Map): Result { - TODO("Not yet implemented") - } + override suspend fun getProductsByQuery(queryMap: Map): Result = + apolloClient.runQuery( + GetProductsBySearchQuery( + first = queryMap["limit"]?.toIntOrNull() ?: DEFAULT_PAGE_SIZE, + query = queryMap.toShopifySearchQuery().toQueryOptional(), + ) + ) { data -> + ProductResponse(products = data.products.edges.map { it.node.productCard.toProductDto() }) + } - override suspend fun searchProducts(params: ProductSearchParams): Result> { - TODO("Not yet implemented") - } + override suspend fun searchProducts(params: ProductSearchParams): Result> = + apolloClient.runQuery( + GetProductsBySearchQuery( + first = params.limit, + query = params.toShopifySearchQuery().toQueryOptional(), + ) + ) { data -> + data.products.edges.map { it.node.productCard.toDomainProduct() } + } override suspend fun getProductImages(productId: String): Result> { TODO("Not yet implemented") } - override suspend fun getProductById(productId: String): Result { - TODO("Not yet implemented") - } + override suspend fun getProductById(productId: String): Result = + apolloClient.runQuery(GetProductByIdQuery(id = productId.toProductGid())) { data -> + val product = data.product?.productCard + ?: throw NoSuchElementException("Product not found: $productId") + SingleProductResponse(product = product.toProductDto()) + } override suspend fun updateProduct(productId: String) { TODO("Not yet implemented") @@ -102,27 +79,31 @@ private val apolloClient: ApolloClient override suspend fun deleteProduct(productDto: ProductDto) { TODO("Not yet implemented") } + // endregion - override suspend fun getAllBrands(): Result { - TODO("Not yet implemented") - } + // region brands / categories + override suspend fun getAllBrands(): Result = + apolloClient.runQuery(GetCollectionsQuery(first = DEFAULT_PAGE_SIZE, query = Optional.present(BRANDS_QUERY))) { data -> + Collection(smartCollections = data.collections.edges.map { it.node.toSmartCollection() }) + } - override suspend fun getCategory(): Result { - TODO("Not yet implemented") - } + override suspend fun getCategory(): Result = + apolloClient.runQuery(GetCollectionsQuery(first = DEFAULT_PAGE_SIZE, query = Optional.present(CATEGORIES_QUERY))) { data -> + CustomCollectionResponse(customCollections = data.collections.edges.map { it.node.toCustomCollectionDto() }) + } + // endregion + // region events override suspend fun getAllEventsById(eventId: String): MarketingEventsResponse { TODO("Not yet implemented") } - -} -private fun GetProductsQuery.Node.toDomainProduct(): Product { - return Product( - id = this.id.toLongOrNull() ?: 0L, - title = this.title, - vendor = this.vendor, - imageUrl = this.featuredImage?.url?.toString() ?: "", - price = this.priceRange.maxVariantPrice.amount.toString(), - status = "active" - ) + // endregion + + private companion object { + const val DEFAULT_PAGE_SIZE = 250 + const val BRANDS_QUERY = "collection_type:Vendor" + const val CATEGORIES_QUERY = "collection_type:Collection" + const val PRODUCT_TYPE_QUERY = "collection_type:product_type" + + } } diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/CollectionMapper.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/CollectionMapper.kt new file mode 100644 index 00000000..4201e065 --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/CollectionMapper.kt @@ -0,0 +1,35 @@ +package com.troves.data.source.remote.service.apollo.mapper + +import com.troves.data.source.remote.service.apollo.graphql.GetCollectionsQuery +import com.troves.data.source.remote.service.apollo.util.gidToLong +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionDto +import com.troves.data.source.remote.service.ktor.dto.SmartCollection + + +internal fun GetCollectionsQuery.Node.toSmartCollection(): SmartCollection = SmartCollection( + adminGraphqlApiId = null, + bodyHtml = null, + disjunctive = null, + handle = null, + id = id.gidToLong(), + collectionImage = collectionImage(image?.url?.toString()), + publishedAt = null, + publishedScope = null, + rules = null, + sortOrder = null, + title = title, + updatedAt = null, +) + +internal fun GetCollectionsQuery.Node.toCustomCollectionDto(): CustomCollectionDto = CustomCollectionDto( + adminGraphqlApiId = null, + bodyHtml = null, + handle = null, + id = id.gidToLong(), + customCollectionImage = customCollectionImage(image?.url?.toString()), + publishedAt = null, + publishedScope = null, + sortOrder = null, + title = title, + updatedAt = null, +) diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/DtoFactory.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/DtoFactory.kt new file mode 100644 index 00000000..42e16c07 --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/DtoFactory.kt @@ -0,0 +1,39 @@ +package com.troves.data.source.remote.service.apollo.mapper + +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionImage +import com.troves.data.source.remote.service.ktor.dto.Variant + + +internal fun collectionImage(src: String?): CollectionImage = + CollectionImage(alt = null, createdAt = null, height = null, src = src, width = null) + +internal fun customCollectionImage(src: String?): CustomCollectionImage = + CustomCollectionImage(alt = null, createdAt = null, height = null, src = src, width = null) + +internal fun priceVariant(price: String): Variant = Variant( + adminGraphqlApiId = null, + compareAtPrice = null, + createdAt = null, + fulfillmentService = null, + grams = null, + id = null, + imageId = null, + inventoryItemId = null, + inventoryManagement = null, + inventoryPolicy = null, + inventoryQuantity = null, + oldInventoryQuantity = null, + option1 = null, + option2 = null, + position = null, + price = price, + productId = null, + requiresShipping = null, + sku = null, + taxable = null, + title = null, + updatedAt = null, + weight = null, + weightUnit = null, +) diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/ProductMapper.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/ProductMapper.kt new file mode 100644 index 00000000..7e92b687 --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/mapper/ProductMapper.kt @@ -0,0 +1,53 @@ +package com.troves.data.source.remote.service.apollo.mapper + +import com.troves.data.source.remote.service.apollo.graphql.fragment.ProductCard +import com.troves.data.source.remote.service.apollo.util.gidToLong +import com.troves.data.source.remote.service.ktor.dto.Option +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.domain.entity.Product + +internal fun ProductCard.toProductDto(): ProductDto = ProductDto( + adminGraphqlApiId = null, + bodyHtml = descriptionHtml.toString(), + createdAt = null, + handle = null, + id = id.gidToLong(), + image = collectionImage(featuredImage?.url?.toString()), + images = images.edges.map { collectionImage(it.node.url.toString()) }, + options = options.map { option -> + Option( + id = null, + name = option.name, + position = null, + productId = null, + values = option.values, + ) + }, + productType = null, + publishedAt = null, + publishedScope = null, + status = status.rawValue.lowercase(), + tags = null, + title = title, + updatedAt = null, + variants = listOf(priceVariant(priceRangeV2.minVariantPrice.amount.toString())), + vendor = vendor, +) + +internal fun ProductCard.toDomainProduct(): Product = Product( + id = id.gidToLong() ?: 0L, + title = title, + vendor = vendor, + price = priceRangeV2.minVariantPrice.amount.toString(), + imageUrl = featuredImage?.url?.toString() ?: "", + status = status.rawValue.lowercase(), + images = images.edges.map { it.node.url.toString() }, + sizes = optionValuesFor("Size"), + colors = optionValuesFor("Color"), + description = descriptionHtml.toString(), +) + +private fun ProductCard.optionValuesFor(optionName: String): List = + options.firstOrNull { it.name.equals(optionName, ignoreCase = true) } + ?.values + .orEmpty() diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ApolloExtensions.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ApolloExtensions.kt new file mode 100644 index 00000000..432d462e --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ApolloExtensions.kt @@ -0,0 +1,41 @@ +package com.troves.data.source.remote.service.apollo.util + +import com.apollographql.apollo.ApolloClient +import com.apollographql.apollo.api.ApolloResponse +import com.apollographql.apollo.api.Operation +import com.apollographql.apollo.api.Optional +import com.apollographql.apollo.api.Query +import com.troves.domain.utils.Result + + + +internal suspend fun ApolloClient.runQuery( + operation: Query, + transform: (D) -> T, +): Result = try { + query(operation).execute().toResult(transform) +} catch (e: Exception) { + Result.Error(e) +} + +internal fun ApolloResponse.toResult(transform: (D) -> T): Result { + graphqlErrorOrNull()?.let { return it } + val data = data ?: return Result.Error(IllegalStateException("Empty GraphQL response")) + return Result.Success(transform(data)) +} + +internal fun ApolloResponse<*>.graphqlErrorOrNull(): Result.Error? = + if (hasErrors()) { + Result.Error(Exception(errors?.firstOrNull()?.message ?: "Unknown GraphQL Error")) + } else { + null + } + +internal fun String.toQueryOptional(): Optional = + Optional.presentIfNotNull(ifBlank { null }) + + +internal fun String.gidToLong(): Long? = substringAfterLast('/').toLongOrNull() + +internal fun String.toProductGid(): String = + if (startsWith("gid://")) this else "gid://shopify/Product/$this" diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ShopifySearchQuery.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ShopifySearchQuery.kt new file mode 100644 index 00000000..b97e09d0 --- /dev/null +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/service/apollo/util/ShopifySearchQuery.kt @@ -0,0 +1,18 @@ +package com.troves.data.source.remote.service.apollo.util + +import com.troves.domain.entity.ProductSearchParams + + + +private val PRODUCT_FILTER_KEYS = setOf("vendor", "product_type", "tag", "title", "available_for_sale") + +internal fun Map.toShopifySearchQuery(): String = + entries + .filter { it.key in PRODUCT_FILTER_KEYS && it.value.isNotBlank() } + .joinToString(" ") { "${it.key}:${it.value}" } + +internal fun ProductSearchParams.toShopifySearchQuery(): String = buildList { + vendor?.takeIf { it.isNotBlank() }?.let { add("vendor:$it") } + productType?.takeIf { it.isNotBlank() }?.let { add("product_type:$it") } + query?.takeIf { it.isNotBlank() }?.let { add(it) } +}.joinToString(" ") diff --git a/shared/src/commonMain/kotlin/com/troves/App.kt b/shared/src/commonMain/kotlin/com/troves/App.kt index 37c9236f..0f51ae26 100644 --- a/shared/src/commonMain/kotlin/com/troves/App.kt +++ b/shared/src/commonMain/kotlin/com/troves/App.kt @@ -3,9 +3,7 @@ package com.troves import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.tooling.preview.Preview -import com.troves.data.network.provideApolloClient -import com.troves.data.source.local.preferenceses.AppPreferencesDataSourceImpl -import com.troves.data.source.remote.service.apollo.ApolloTrovesApiServiceImpl +import com.troves.data.source.remote.service.TrovesApiService import com.troves.designsystem.theme.SpTheme import com.troves.presintation.navigation.AppNav import org.koin.compose.koinInject @@ -14,7 +12,7 @@ import org.koin.compose.koinInject @Preview fun App() { SpTheme { - val apiService = koinInject() + val apiService = koinInject() LaunchedEffect(key1 = Unit) { apiService.getAllProducts() } From 72ac66c3a8ffe52b4856f4eea01637758402a986 Mon Sep 17 00:00:00 2001 From: yasse Date: Thu, 2 Jul 2026 16:30:00 +0300 Subject: [PATCH 4/4] refactor: update import paths for remote data source DTOs and services --- .../data/repository/TrovesRepositoryImpl.kt | 1 + .../data/source/remote/RemoteDatasource.kt | 18 +++++++++--------- .../data/source/remote/RemoteDatasourceImpl.kt | 10 +--------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/data/src/commonMain/kotlin/com/troves/data/repository/TrovesRepositoryImpl.kt b/data/src/commonMain/kotlin/com/troves/data/repository/TrovesRepositoryImpl.kt index 4f46dd9c..8fe4cf53 100644 --- a/data/src/commonMain/kotlin/com/troves/data/repository/TrovesRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/repository/TrovesRepositoryImpl.kt @@ -19,6 +19,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.IO import kotlinx.coroutines.withContext import kotlinx.io.IOException +import kotlin.map class TrovesRepositoryImpl( private val remoteDataSource: RemoteDatasource, diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt index f28b02e4..d2d8dafc 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasource.kt @@ -1,17 +1,17 @@ package com.troves.data.source.remote -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.SingleProductResponse +import com.troves.data.source.remote.dto.CartItemDto +import com.troves.data.source.remote.service.ktor.dto.CollectionImage +import com.troves.data.source.remote.service.ktor.dto.Collection +import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse +import com.troves.data.source.remote.service.ktor.dto.MarketingEventsResponse +import com.troves.data.source.remote.service.ktor.dto.ProductDto +import com.troves.data.source.remote.service.ktor.dto.ProductResponse +import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse +import com.troves.data.source.remote.service.ktor.dto.WishlistDto import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result -import com.troves.data.source.remote.dto.WishlistDto -import com.troves.data.source.remote.dto.CartItemDto interface RemoteDatasource { //region product diff --git a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt index 77bc7daf..2d52a58e 100644 --- a/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt +++ b/data/src/commonMain/kotlin/com/troves/data/source/remote/RemoteDatasourceImpl.kt @@ -1,14 +1,7 @@ package com.troves.data.source.remote -import com.troves.data.source.remote.dto.Collection -import com.troves.data.source.remote.dto.CollectionImage -import com.troves.data.source.remote.dto.CustomCollectionResponse -import com.troves.data.source.remote.dto.MarketingEventsResponse -import com.troves.data.source.remote.dto.ProductDto -import com.troves.data.source.remote.dto.ProductResponse -import com.troves.data.source.remote.dto.SingleProductResponse -import com.troves.data.source.remote.dto.WishlistDto import com.troves.data.source.remote.dto.CartItemDto +import com.troves.data.source.remote.service.TrovesApiService import com.troves.data.source.remote.service.ktor.dto.Collection import com.troves.data.source.remote.service.ktor.dto.CollectionImage import com.troves.data.source.remote.service.ktor.dto.CustomCollectionResponse @@ -17,7 +10,6 @@ import com.troves.data.source.remote.service.ktor.dto.ProductDto import com.troves.data.source.remote.service.ktor.dto.ProductResponse import com.troves.data.source.remote.service.ktor.dto.SingleProductResponse import com.troves.data.source.remote.service.ktor.dto.WishlistDto -import com.troves.data.source.remote.service.TrovesApiService import com.troves.domain.entity.Product import com.troves.domain.entity.ProductSearchParams import com.troves.domain.utils.Result